Skip to main content
1-Visitor
April 23, 2012
Question

Trajpar -- varying dimension for only portion of trajectory

  • April 23, 2012
  • 2 replies
  • 6535 views

Let's say you wanted to make a long and serpentine tube of diameter 20, but you wanted to flute one end a little bit. In other words, you wanted to vary the diameter across a short length at end of the trajectory.

I would like to use Trajpar to simply change the diameter dimension of a circle for the cross section of a Sweep. But I don't know how to limit th change in the parameter for only a small portion of the sweep rather than across the whole thing.

Anyone have an advice on how to accomplish this?


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

2 replies

1-Visitor
April 24, 2012

Geometry circle diameter --> sd1

Construction circle diameter --> sd2

if (trajpar(0) <= 0.5)

sd1=sd2-sin(trajpar(0)*360*10)*2

else

sd1=sd2

endif

1-Visitor
April 24, 2012

This looks really interesting but I'm afraid it's not entirely clear to me. Could you possibly elaborate a little on the roles of the terms and values in the equation? Also, I wonder why you used "trajpar(0)" instead of just "trajpar".

When I just try using the code unmodified I get the following. Of course, I know it's not meant to be used unmodified. But I was wondering if you (or anyone) could make it more clear how to use the code.

What I'm going for is something more like a trumpet: constant tube but then flared out at one end.

undulatetube.png

13-Aquamarine
April 24, 2012

I think you can do something with a graph, rather than using trajpar; but I'm not familiar enough with this technique to advise you further.

Patriot_1776
22-Sapphire II
April 24, 2012

If it's JUST at the end, it'd be best and easiest to do it with a second feature. Though a graph feature CAN be used to drive it, you have to be a LOT more careful the dimensions in your graph work out to the geometry you need. In other words, if your tube is 10" long, and you want the flare in the last inch, you must make sure your graph has that 10:1 ratio. If you change the length of the tube to 10.125, and don't change the graph to reflect this, then your flare will not start where you want it, possibly screwing up other child features. If you do it as a second feature (revolve or sweep, etc.) and only make that feature an inch long, you can change the overall length at will and the flare will only be the last inch.

I use graphs all the time to drive trajpars:

Use:

sdX=evalgraph ("GRAPH_NAME", trajpar * 360 * 30)

This was used to twist a trajectory around another trajectory 30 revolutions, but with some features I put in the ends of the graph. You will need to change this as needed after "trajpar".

Best of luck.

13-Aquamarine
April 27, 2012

Okay now c'mon Frank... so few people use graphs and you've got a twisting trajectory using a graph. Where's the pictures?

Also... if you're just trying for raw geometry... you can use a Warp feature to flare the end of the tube.

If I were doing it, I'd probably go with the variable section sweep due to the greater control, followed by the graph (pain in the neck), then trajpar (ugly), and finally the Warp.

Thanks!

-Brian