Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Curve by equation - logic expressions?

Status
Not open for further replies.

jdowsett

Mechanical
Jan 8, 2010
4
0
0
GB
Is it possible to include logic or boolean expressions in the definition of a curve?

I've two different curves, one presenting an error due to atan(something/0) and the other producing a discontinuity in theta (by 180 degrees) also due to trigonometric functionality.

The first error I could eliminate if I knew the step size that ProE increments t by - as I could then add half this value thus stepping over the 0 value.

This would not solve the second problem - hence I'd like to use either something like (k>0) as a boolean multiplier or alternatively use an explict if - then statement.

Any thoughts?
 
Replies continue below

Recommended for you

t goes from 0 to 1
The same is tru for trajpar or "Trajectory Parameter"
You can use If Then like statements in your equation
if t<=.5
ELSE
IF T>.5

OR SO I THOUGHT [ponder]
Tried the following
/* TEXT NOTES preceed w/ "/*"
/* evaluating y(x) for (-2< = x <=2)
start=-2
range=4
x=start+(range*t) /*starts at (-2+4*0)=-2 ends at -2+4*1=2
if t<=.5
y=x^3
z=sin(180*(start+range*t))
else
y=x^2
z=2*sin(180*(start+range*t))
endif
[banghead]
"if" cannot be used in equations.
Curve could not be constructed.
If you play trail use the equations as typed above. They may not playback I'll check that out. I did use editor multiple times cause IF ELSE ENDIF reasons

Two solutions
(1) Make multiple curve by equation features for each range you are defining.
(2) Use VSS Variable Section Sweep Define trajectory as sketch of X range. Drive Y and Z offsets with H and V dimensions in single line sketch for surface edge to use.


Tools > Play Trail training file. failed on replay do to window sizing sorry. I can create a fresh one.
Relations for VSS section
/* Reference curve defines range can use surf midpnt for edge make 1 a reference curve
/* sd3 surface segment wid
/* sd4 = Y value
/* sd5 = Z value

/* For cartesian coordinate system, enter parametric equation
/* in terms of t rajpar (which will vary from 0 to 1)
/* TEXT NOTES preceed w/ "/*"
/* evaluating y(x) and z(x) for (-2< = x <=2)
start=-2
range=4

/* starts eval at at -2+4*0=-2 ends at -2+4*1=2 used as x in following relations
/* X = [start+(range*trajpar) ]
/* equations FOR X<=0
IF trajpar<=.5
sd4=(start+range*trajpar)^3
sd5=sin(90*(start+range*trajpar))

ELSE
/* equations FOR X>0
sd4=(start+range*trajpar)^2
sd5=2*sin(90*(start+range*trajpar))
ENDIF

Michael
 
Follow-Up
Download Trailfile and settings file used below.

For trailfile playback do the following
1. Open ProE
2. Create new file
3. Select [Settings] button >Open Settings file
4. choose tree_etips1.cfg

5. Make sure all the datums are shown

6. Tools > Play Trail/Training file
7. Open curve-equation_vss-method-trl3.txt
8. If prompted for Single Step Trail select Continue

Watch Playback. You may see it focus back to PRT000001 which was used to load tree settings.
You can minimize and maximize proe icon from system tray to see the part being created.

Let me know what you think.

Michael
 
Hi, thanks for the suggestions.

I shall have a play with the VSS when I get home; my only concern is the complexity of my curve equations - one of them includes evaluating the root of a fourth order polynomial...it's not pretty!

Just been browsing...shall also see if I can use a graph - I doubt it's possible but if I can have a discontinuous graph ie 0 for x < 0.5 and 1 for x >= 0.5, then that might do the trick.

Shall have a play.
 
Status
Not open for further replies.
Back
Top