Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Making a user-defined curve from equation 1

Status
Not open for further replies.

TDIMeister

Automotive
Feb 18, 2002
199
0
0
CA
Hello all,

I hope someone will be able to help me with this. I want to create a parametric curve of a 2D logarithmic spiral, ultimately to create an extruded body out of it.

The equation of this curve is given by:
In polar coordinates:
r = a*e^(b*theta)

or

theta = (1/b)*ln(r/a)

In parametric form:
x(t) = r(t)*cos(t) = a*e^(b*t)*cos(t)
y(t) = r(t)*sin(t) = a*e^(b*t)*sin(t)

where "a" and "b" are constants.

I want to be able to manually "orient" the spiral (t) -> (t + phi) and bring it into a sketch using Existing Curves and also to close the spiral. I guess the way to do this is Insert > Curve > Helix... > Radius Method: Use Law > etc.

It would be best to be able to input the parametric equation of the spiral as an expression(s) but after having not used NX full-time for several years, I've gotten quite rusty.

Thanks very much in advance for any help!
 
Replies continue below

Recommended for you

John, that appears to be it, thank you!! I'm trying to understand how you created it using a law spline (unexpected, but makes sense with the benefit of hindsight).

I'm reading up some more on the logarithmic spiral function. Seems there are a couple of different forms in cartesian coordinates. Is there a way to do a law curve in polar coordinates? Or using increment indexes, i.e.:
x_ij = x_ij-1 + (increment_i)*((ln(W/(2*pi)))*x_ij-1 - y_ij-1)
y_ij = y_ij-1 + (increment_i)*((ln(W/(2*pi)))*y_ij-1 + y_ij-1)

Thanks again!
 
Sorry, but the 'Law Curve' function only handles the so-called 'Parametric' definition where you supply separate equations for the X, Y, and in the case of a 3D curve, the Z values of a curve as it's evaluated from 0 to 1 in parameter space (hence the term 'Parametric').

Now keep in mind that in the terminology of NX 'Law Curves', the variable 't' is the parameter which gets evaluated (from 0 to 1) and the user has no real control over its value as it's used by the Law Curve function itself to drive the evaluation.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
You can also use a Sketch as a Graph for a Curve I made one back in the day that used a single Sketch to drive the X, Y and Z locations of the curve of the Silicon Graphics Logo.

The following image was not created by me but I posted it as a [ img link. for image on following site
sgi_logo.jpg


None of my images have that cool shading and shadow effect, At least not yet. [smile]

"It's not the size of the Forum that matters, It's the Quality of the Posts"

Michael Cole
Boston, MA
CSWP, CSWI, CSWTS
Follow me on !w¡#$%
@ TrajPar - @ Shweep
= ProE = SolidWorks
 
I played around with the example file kindly provided by JohnRBaker (thank you!). I changed the law function because that in the example has a constant pitch between loops, i.e. an Archimedean rather than a logarithmic spiral (e.g. nautilis shell, hurricanes, etc.) that whose pitch get progressively larger while turning outwards:
xt = a*exp(b*t)*cos(Num*360*t)
yt = a*exp(b*t)*sin(Num*360*t)

Two problems I'm encountering (sorry if these may seem very trivial - my last full-time use was when the original NX was current...):

1) I cannot seem to bring in the spiral geometry into a sketch. I tried what I remembered - In a sketch, Insert > Curve from Curves > Existing Curves - but am not able to select the spiral.

2) To close the spiral to be able to extrude, I am thinking of either creating two spirals and making an outside arc that's tangent to both to make a continuous shape or permit discontinuities at the intersection of the two spirals at two specifically chosen polar angles (the final shape will actually be two spiral halves that come together with a ~1mm gap. In the first case, no solution can seem to be found for an outside arc, only inside. The second case just needs me to spend some time with some math and my Excel sheet to determine the parameters a, b and Num for each of the two spirals where the x and y coordinates are coincident at the chosen theta and (cross my fingers) be able to trim the two spirals to make one closed shape... John, does my logic make any sense?


Thanks again!
 
Yes, it is true that you cannot directly 'Add' a Law Curve, or for that matter, ANY curve which is itself a 'feature', to a Sketch. However, you can use the...

Insert -> Recipe Curve -> Project Curve...

...to effectively 'add' (if the 'Associative' option is toggled ON) a Law Curve to the Sketch, in that editing the original 'feature' curve will cause the Sketch to update.

As for using a single sprial curve to create a SOLID body, try using the Extrude function with the 'Offset' option set to give it some 'thickness'.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
John,

Looked at your example as I am having problems, "Invalid spine or law function data" with a similar law curve I am trying to create for the involute of an internal spline between the minor diameter and the form diameter. See the attached for the relevant expressions.

I am at a loss, but suspect the error is because several of the expressions used in the parametric equations have units (in, radians) even though the parametric equations themselves are unitless.

 
 http://files.engineering.com/getfile.aspx?folder=702db579-015f-461f-8d84-2a2e0a44a6da&file=Worksheet_in_Expression.xlsx
You may be right about the units since if they're included they will be taken into consideration which means that if there's a mismatch it will cause you problems. That's why, if you look at my example, I used unitless parameters just so as to remove that variable from the mix, which I would recommend you doing as well if there is not some compelling reason to do otherwise.

Note that I tired to test your expressions and I also get the same error, however without seeing a simple format for the two equations it will be difficult to see where the problem might be.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.
Back
Top