Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
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?
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
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.
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.
trajpar() ---> My habit:function + (), "0" typing error
0 ~ 0.5 wavy
sd1=sd2-sin(trajpar()*360*10)*2
(360 Degree , total of 10 cycles ,)
0.5~1 no wavy
sd1=sd2
graph :
sd3=evalgraph("your_graph_name",trajpar()*100)
100 --> graph x max
I am not sure if I fully understand the situation or not, but I thought of a Variable Section Sweep with two trajectories to vary the OD like a trumpet. Not sure if this will help, but I thought I would metnion it.
-Greg
If it's straight, that'll work perfectly, and is probably what he wants.
Yeah, I wasn't sure exactly what he is looking for. If it isn't straight, then maybe a combination of the VSS and a spinal bend might be a good shot at it.
-Greg
ok, if the line is straight u can use simple rvolve feature simple and easy
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.
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