Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

parametric ecuation f(x) in intervals definition

Status
Not open for further replies.

sara1234123

Mechanical
Apr 26, 2012
4
Hello everybody.
Since 3 days I am traying something as ''easy'' as drawing a line that follow a given ecuation. Every body tells me taht with catia it should be easy and quick, but I think it is imposible.

the function of my line is:
f(x) = 0 , -100<x<-50
f(x) = h/2 * (cos (2*pi*x/l)+1) , -50<x<50
f(x) = 0 , 50<x<100

where h and l area parametres in have already introduced and x should be values (betwen -100 and 100) and f(x) is the y coordenate.

So far i have created my parametres and I tried to create laws, (fog) which i was able to introduce parametres. The problem is that the law gives to x only values betwen 0 and 1 and I do not know how to tell to the program, please, calculate values of y, taken for x values between -100 and 100!!!

Anybody has any idea? Would be very nice to get a clue how to do this!!
Thanks!
Sara.
 
Replies continue below

Recommended for you

I don't know which steps you already have done. I will present a workflow that I would try. When using law (fog)you can in the law editor setup if statements, so in this case I would try:

if -100<x<-50
{
y = 0
}

if -50<x<50
{
y = h/2 * (cos (2*pi*x/l)+1)
}

if 50<x<100
{
y = 0
}

Considering yout -100 to 100 issue, I would actually introduce two new parameters, say A and B, that I create a curve with and also use those parameters in the law statements. ( if A<x<-50 and if 50<x<B)

Use parallel curve and chose the line and the law option to create the wanted curve
 
Hello. Thanks for your answer.
I have tried what you told me. but the law editor does not let me to write ''-50<x<50'' gives me error once and again.

After trying everything and reading in the forum, I choosed the option of creating my curve in excel and with a macro export all the points to catia, and then create a spline that joint those points.

It works, but for me is not the perfect solution, since i would like to have a total parametric model in catia. I still think that it is not possible :(

 
Sara,

once you have this equation defined in CATIA, what will you use it for?

what are typical values for H and L ?
 
Don't have R18 but I will give it a go on R21. Could you explain what it is for and as Jackk wonder so do I, what values are to be expected for H and L? It's important to undertand how it will be used because you are merging three equations, two linear and a wave form, which will render in an abvious issue that the result may be non-continous.
 
Didn't got the interval working... either I did something wrong or a limitation? so I created the reference curve for parallel curve function as the interval. But as you see the three different curves have gaps and even if I got the equations set to work I would got problems with the vertical line missing. If you could fill in the blanks about usage I maybe could find another way.
 
 http://files.engineering.com/getfile.aspx?folder=35fed6aa-c64f-4895-807f-7e9614c5af8e&file=Law.jpg
Hello boys
Yes, this is exactly what happens to me.
The reason for this is that CATIA considers that the values of x are going from 0 to 1 and gives values to the parametre x and calculates y.
there is no way to tell that x goes from a number to antoher. it is allways 0 to 1!

But anyway, I like your way to define the flate lines.

@ Jackk and Azrael, typical values for l=100 and =20mm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor