×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Curve by equation - logic expressions?

Curve by equation - logic expressions?

Curve by equation - logic expressions?

(OP)
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?

RE: Curve by equation - logic expressions?

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.

http://files.engineering.com/getfile.aspx?folder=096f2b58-b832-4a28-b9e3-1264c8a7ec9a&file=var-t_eqnrel.ptd

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

RE: Curve by equation - logic expressions?

Follow-Up
Download Trailfile and settings file used below.
http://files.engineering.com/getfile.aspx?folder=528dd744-e846-41c2-9f02-27a48b18d1f6&amp;file=IFeqn_trailfile-AND-settings.zip

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

RE: Curve by equation - logic expressions?

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources