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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

make spiral hexagon


make spiral hexagon

do any one help me to make hexagonal spiral profile with use of equation or any other method.


Do you mean something like this?


I used a curve driven by a cylindrical equation and a swept blend. There are other ways... for instance you could use the trajpar variable to perform a variable section sweep while rotating the hex shape.

In fact, I like that second way better (it's more flexible and robust)... but no one ever uses a Swept Blend so I figured I'd dust it off for this example. I've attached a file to play with (Creo 2 format).



PS: Edit the curve equation. By changing the value in red in the line that says: theta = t * 360 * 1 you can add more turns. For example, change the line to theta = t * 360 *5 to add 5 turns.

brian I need to make a spring like given belowhexagonal+spring.png


I guess you have to generate the hexagonal trajectory outside of Creo into so called IBL file. Then you will be able to create a curve in Creo using this IBL file.

Inside attached TXT file you will find a link to web page containing info about IBL.

Martin Hanak

Martin Hanák

Hi, a simple method would be to extrude an hexagonal surface, & wrap a line around it, & use this as a trajectory for a sweep. Not very scientific, but simple, & seems to work. Good luck.




john i made it. but after sweeping the profile the extrude surface as remain which was made it in begining, so how do I remove it.

You can't remove it, you hide it, so it is no longer visible in the model. Do this by layer, or simply select in model tree, RMB, hide.


thank you john..i also got it

Is it important that it is parametric?

Is it important that the verticies are sharp?

Is it important that the segments between the verticies are straight?

Is this to represent the actual formed wire?

martin I am first time heard about IBL do u tell me how do i create profile using IBL

I would not go with an IBL, this entire thing can be done in Creo. John's suggestion is good. Amy of Vladimir Palffy's work with trajpar and variable section sweeps is also applicable. I'm on the road at the moment but I will link to some pertinent threads when I get to my computer.



Ah... like I said... go to Vladimir Palffy's blog. You can pretty much make anything into a spring using his technique. It's a bit of what John Pryal suggested with the addition of a straight curve. The technique uses a variable section sweep and the trajpar variable to create a complex curve...

All the credit goes to Vladimir... he's quite the Creo genius.



Some care must be taken when defining non-round springs as the slope is not consistent if you intersect a revolve surface with the profile. John's wrap takes this into account.

Somewhere I have also seen a sheetmetal video on defining the trajectory on a flattened sheetmetal profile. I can't find that one.

Seems to me we should be able to define a cylindrical equation for an n-sided polgyon that provides a clean curve with no crazy wraps or intersections.

A quick glance on google shows several techniques for doing this. I'd imagine the floor command would be used to generate the straight edges.

We can generate the cylindrical equation of a circle using the default suggestions:

r = 1

theta = t * 360

z = 0

To convert this to a hex, we need the radius to be precisely 1 at each 60 degree inteval and "some lesser value" at the points in between. The "apothem" of the hexagon is the distance from the center point to the midpoint of one of the straight sides. We can calculate this using the following equation:

apothem = r cos (180 / n)

In that equation, 'n' is the number of sides. Of course, we're using a hexagon so that number is 6. Therefore...

apothem = r cos (30)

So then we need to vary the radius r everywhere except at exactly 60 degree intervals (60, 120, 180, 240, etc). The radius value will fall between 1 (because in this example I used r = 1) and the apothem. At 60, 120, 180, 240, and 300, the radius will equal 1 precisely. At 30, 90, 150, 210, 270, and 330 the radius will be the apothem value. The value will oscillate, like a sin wave, between those two values.

This is getting very close to an equation for r. It seems to me we if we just flesh out this final equation, we'll actually have the equation for a hexagon that can then be varied over 'z' to provide a spring trajectory.

For whatever reason, this is just not coming to me tonight- perhaps its the impending Windchill migration. But it seems totally solvable without resorting to wraps or intersecting curves.



Funny thing is, when I tried John's method, I got a good wrap, but the sweep fails to generate. Of course, the wire needs some radius so building the swept round feature would be outside the guide curve.

I like your thinking though, Brian We miss you around here!

From Help:


You cannot use the following statements in an equation that defines a datum curve: abs,ceil, floor, else, extract, if, endif, itos, and search.

Perhaps Fourier will help in transforming a summation of a sufficient number of sine terms into a hex.


After further examination, you do not need to use ceil, floor, abs, or any of those other statements. There's sufficient evidence and calculations elsewhere online that this equation can be written without those crutches. Whether or not Creo can handle such an equation remains to be seen.

One statement that is allowed is mod. Also, bound is available. Both of these can be used in calculations. Mod can be employed to produce the same type of effect as ceil/floor. Bound is less useful in this case.

Most of the online discussions I found for creating an equation of a hex were written for other programs... or were provided for theoretical discourse. We have a very special situation and a non-typical type of equation builder in Creo. I've successfully created all sorts of strange shapes using equations. It seems to me that if someone could figure this out, the same basic equation could be used for all n-sided polygons.

This one reads pretty straight forward to Creo, but I don't know what the %% does...

Replace a couple of statements with respect to "t". The key element is "r".


What do MOD and BOUND do?

IN R, the "%%" operator stands for Modulus, binary (takes two arguments, not a bitwise modulus)

In PTC relations:

mod(x,y) is the remainder function, that is x–int(x/y)*y, where int() is “integer part of”. The sign of the result is always the same as the sign of x.

bound(x,lo,hi) Limits x between the ‘lo’ and the ‘hi’ values. If x < lo; the result of the function is lo; if x > hi, the result is hi; for all other values of x, the result of the function is x. The ‘lo’ value must be smaller than the ‘hi’ value.

It's odd if they support mod and bound, but not ceil; they all interfere with determining derivatives; second derivative particularly at places that move from one side to the other of the point they trigger.

I could have looked for eons in the PTC help and never got that much information.

Thanks for that, David!

Hi Antonius...

That information is available in the help files under "Functions Used in Relations". Here's a link to the page for Creo 3 containing all that information...

Here's an example showing that mod is, indeed, supported.


This link goes to the page where the restrictions on ceil, floor, abs, etc are mentioned.

All we need now is for someone with time on their hands to work out the equation for 'r' and we're all set!



He already showed you the equation.

Although it was fairly easy to translate the above R code into a CREO curve from equation, at least for one "turn" of the spring, the results are not satisfactory. Examine the image and notice that the generated curve is a spline and using it for sweeps leads to errors related to model accuracy.

hexagonal spring using curve from equation.jpg

Nice work, Paul!

I think the site specifically noted using a polar coordinate curve (cylindrical).

It should end up being the same.

This is my result...


Is the error in Creo or in the formula?

If the operation is done correctly there is infinite curvature at the corners and zero curvature everywhere else.

As I wrote before "It's odd if they support mod and bound, but not ceil; they all interfere with determining derivatives; second derivative particularly at places that move from one side to the other of the point they trigger"

When there is an instantaneous change in direction, the slope changes from one value to another without intermediates. dy/dx on the first section goes to a new value of dy/dx on the second section. Being instanteous the interval is zero resulting in d(dy/dx)/0, which equals infinity.

I'd say that PTC has done a fair job of producing the curve.

Makes sense. I do know that accuracy settings greatly affect equation curves.

It is certainly better than a fatal hard crash

I missed part of the conversation and didn't notice you'd already translated the equation into polar coordinates. Nice work!

Actually, Paul did that... but in the end, Creo will not make sharp corners. I tried using a pure curve *6 in a evalgraph sketch and even then, Creo would round the ends although the original curve was perfect.

22-Sapphire II

True. Although I think the shape you get intersecting a hexagon surface with a spiral is more what you would get in the actual production of a hexagon spring, because you'd be winding a wire around a mandrel, and the machine would be spinning the wire at a constant rate as the mandrel spins at a constant rate.

Business Continuity with Creo: Learn more about it here.

Top Tags