cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

VSS with trajpar

dgschaefer
21-Topaz II

VSS with trajpar

Creo 2, M120

I have a VSS where I need the value of one radius to vary along the sweep from 100 at the start to 25 at half way back to 100 at the end.  Can I do this with a relation and trajpar?  If needed, I could split it into 2 sweeps where one went from 100 to 25 and the next from 25 to 100.

Thanks,

--
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.
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
16 REPLIES 16
mlocascio
4-Participant
(To:dgschaefer)

Is there a fully defined tutorial, or technical document, on trajpar?



MPL


Hi Doug,
Yes, you can do it with a relation and trajpar. It is easiest if it is
one equation:

R = 300*trajpar^2 - 300*trajpar + 100

Is an example of a parabola that will do what you want (R is the radius
dimension).

I believe you can use IF statements to make a non-continuous curve but I
have never done this before.


If you want to do an arbitrary curve, you can use the "evalgraph" function
so that the radius is read off a sketched graph as a function of trajpar.
I can give some instructions on this if you need it.
--
Mark von Huben

Principal Mechanical Engineer
Cochlear Ltd
1 University Ave
Macquarie Park, NSW, 2113
Australia

p +61 2 9425 5210


I would also recommend looking at driving it by a "graph". Either way work great.
Tim McLellan
Mobius Innovation and Development, Inc.
mlocascio
4-Participant
(To:dgschaefer)

Trajpar has always been kind of a mystery to me. I know that you (WE) can do
marvelous things using trajpar. But how do we know, or learn, how to use it?




Michael P. Locascio


This is great, thanks.  Can you help me dissect this a bit because I'm realizing that the values that I need may be different than 25 & 100.  How would I adapt this to different values?

Also, I'm realizing that if it's a linear progression for high to low to high I'll likely get a peak / valley in the center, so perhaps a graph would be more appropriate.

--
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
mlocascio
4-Participant
(To:dgschaefer)

This is what I was asking for. Is there any kind of trajpar training course?
I REALLY want to become more of an "expert" with this.



Michael P. Locascio


Sounds like a graph-driven VSS might be best for your application.

A sample Creo 2 model is attached (resume all features).

A critical part of the process is to enter a sketch relation, such as the following:
sd3=evalgraph("GRAPH_1", trajpar*100)

PTCU used to have a section on driving VSS's with trajpar/graphs; ... look for the "Surfacing using Creo Parametric 2.0" course, and the section on
"Using Trajpar and Datum Graphs with Sweep Surface features".

Regards,

Terry Partridge

Hi Doug,
Did Terry's model give you enough of a hint (Thanks Terry!)? To get the
equation I just started with the equation for a parabola, y = ax^2 + bx +
c and solved for a, b and c so it went through (0,100), (0.5, 25) and (1,
100) where x = trajpar and varies from 0 to 1 along the origin curve (from
start to finish, however you have defined that).

If you find the the VSS feature isn't generating for some reason,
sometimes it is because your sketch can't be resolved at all places along
the curve (. An easy way to check this is to place a datum point along
your origin curve and then placing the VSS sketch on that point.

You can then move the datum point up and down the curve and look at the
sketch at each location to see what is going on. I have done this to
Terry's file and reattached it here (in the group evalgraph_method).

It occurred to me that there was another way to do what you wanted with
datum curves (easiest to directly sketch to the curve or you can use the
second curve to drive a dimension) - an example is the "curve_method"
group. Create as many curves as you want to get the desired geometry. VSS
is very powerful - you are only limited by your imagination!



Should you need to have the edge of a VSS tangent to a curved surface and
ProE decides it can't do it automatically, there are ways to cheat if you
are happy with "close enough to tangent is good enough". If needed I can
find an example but it will take quite some time to remove confidential
info / genericise the model. I can't do this today.

cheers
--
Mark von Huben

Principal Mechanical Engineer
Cochlear Ltd
1 University Ave
Macquarie Park, NSW, 2113
Australia

p +61 2 9425 5210


Actually, I got something workable (for now) without trying it.  I’ll need to come back to it later, but I’ve got other fires to fight first.  I definitely appreciate the input and have files the emails away for that inevitability.

I particularly liked this bit:

“I just started with the equation for a parabola, y = ax^2 + bx + c and solved for a, b and c so it went through (0,100), (0.5, 25) and (1, 100) where x = trajpar and varies from 0 to 1 along the origin curve”

Of course, why didn’t I think of that? 😛

So, if I needed values of A & B instead of 25 & 100, I need to re-solve for the points (0,A), (0.5,B) and (1,A), correct?  This assumes that I can dust off my long dormant Algebra skills and figure that out. 😕

--
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

While breaking out the Algebra book can work, you may wish to try a solve block:


SOLVE
d1 + d2 = 500
d1 - d2 = 0
FOR d1 d2


You can substitute your own functions.


http://help.ptc.com/creo_hc/creo30_pma_hc/usascii/index.html#page/pma/fundamentals/fund_seven_sub/About_Simultaneous_Equations.html


x

I didn't know that - thanks for sharing!
--
Mark von Huben

Principal Mechanical Engineer
Cochlear Ltd
1 University Ave
Macquarie Park, NSW, 2113
Australia

p +61 2 9425 5210


Try this equation as an alternative to the parabola:



radius= 25 + 25* (3 * sin(trajpar*180))

Here is an example part that illustrates how you might approach the solution...

Hi Doug.


If you need a linear approach with variable values, you might try this:



/* End value
end=100
/* Relative position of turning point
rel= 0.25
/* Value at turning point
val=100
/* auxiliary variables
delta_first_half=val-start
delta_second_half=end-val


if trajpar < rel
sd3=start+delta_first_half*(trajpar/rel)
else
sd3=val+delta_second_half*(trajpar-rel)/(1-rel)
endif



Nice thread by the way...



Matthias.

Hi Doug - (and others participating in this discussion)


I was impressed by the use of parabolic and other trigonometric equations which would yield a very "smart looking" variable section sweep result. Personally, I like to jump on the evalgraph function, especially when I don't know exactly what I want my results to end up looking like. Someone asked how evalgraph works and truthfully I have to relearn it every time I use it because many moons pass between uses and it's not the most straight forward methodology. It is an incredible tool to imbed in a solid modeler (not sure if I will find it in SolidWorks).


The way it works is (for Creo 2);




  1. You will need a datum graph (pull down datum tab on ribbon) prior to the VSS on the model tree.




  2. You will be asked to assign a name to the graph which I suggest a short name that reminds you what it is for, for exampleradius_value in this case.




  3. Then a section window looking like graph paper will appear. Time to draw your graph. Sketch a coordinate system in the lower left and work to a unit length of one. (the graph is one unit on the horizontal axis). When you use evalgraph in a VSS relation, the value the graph generates will vary as you travel from 0 to 1.




  4. Draw the graph to a shape that represents the dimension value you want assigned as you travel along the trajectory. This shape can be any line that does not present two “y” values for a given “x” value. Depending of the values that you want to generate, it maybe appropriate to use a multiplier later when generating the relations. (In this example the values of 100-25-100 represent a very broad vertical range, so it may be easier to generate the graph as a unit graph vertically and then using a multiplier of 100 in the relations.)




  5. When the graph is complete, exit the sketcher and you will have a graph feature in the model tree. Graph features can be modified (opens up a smaller window with the non-dynamic graph show) or redefined (edit definition). For lack up attention, this feature will be take you to the “old fashion” menu option and you will be given the option to rename the feature every time prior to opening the graph window. Once you are back in the sketch, you can dynamically modify the graph, but you will have to regenerate the model to update the results.




  6. Generate the VSS feature (sketch the trajectory curve and create a sweep) Before sketching, select the icon that looks like a curved graph that “Allows section to change based on parametric references....”




  7. Generate the sketch and assign a dimensioning scheme that includes the dimensions that you wish to vary. It is now time to start getting fancy using relations. On the ribbon tab, select tools, and then select d=Relations. Since you are in the sketcher, the relations window will open ready to add relations to the section by default.




  8. Select the dimension that you want to drive with the graph (sd7 for example) and it will populate the relation window. Then you can either type or use the gui tools, but you want to end up with: sd7=evalgraph(“ radius_value”,trajpar)*100 - Note that I have a 100 multiplier working on the evalgraph since I drew my graph from 1-.25-1 instead of 100-25-100. Note the syntax of evalgraph function includes putting the name of the graph inside the parenthesis and inside double quotes. The second argument of the evalgraph is trajpar which basically means change the value of the dimension as you travel down the trajectory.




  9. Select OK to exit the relations window and exit the sketcher. If the feature fails to regenerate, check for geometry / dimensioning scheme in your sketch that would cause inversions or “zero” length line segments, etc as the variable dimension varies through its expected range. It may be necessary to temporarily nullify the relation and manually modify the dimension through the range to evaluate the problem. To suspend the relation, edit the relations and insert /* in front of the line to make it comment (comments are ignored).



Best regards,


Larsen Design Engineering


https://sites.google.com/site/larsendesignengineering/


Thanks for all the great info.  In my case, upon re-evaluation by the team (unrelated to my difficulties in modeling it), the design direction was revised and simplified.  With the simpler geometry, I no longer needed the sweep; a simple boundary blend got the result we needed.

Still, all the info presented will come in handy someday, I'm just not sure when.

--
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
Top Tags