Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert spline to tangent arcs (parametrically)? 1

Status
Not open for further replies.

CNSZU

Mechanical
Sep 2, 2005
318
Hi,

I'm in a situation where I need to convert a spline into a series of arcs (due to an inexplicable factory request). The arcs need to match as close as possible to the original spline and they must be tangent to each other to preserve some smoothness. The spline is flush against a plane (it's a 2D spline, not 3D). I want to be able to specify the number of arcs, more or less evenly spaced. For example, the spline will be represented by 10 arcs. The arcs should be parametric, so if the shape or length of the spline changes, the arcs will act like well-behaved children and automatically update themselves to reflect the new spline shape. What is the best way to achieve this?

The Simplify Curve command is good, but doesn't fulfill all my requirements (not associative, cannot specify count, tangency uncertain).

This is what I've tried: Create a series of Point features defined as percentages along the spline, then create a sketch with 10 arcs, making the arc endpoints constrained to the points, and making the arcs tangent to each other. However, this solution fails because the arcs get over-constrained.

What could be the solution to this problem?

NX10.0 Win8.1 64bit i7-3770K 16GB QuadroK2200
 
Replies continue below

Recommended for you

Before I get your hopes up, I didn't do any analysis on the results, only used the final curve to revolve a surface and see if it had 10 faces and if the faces were graphically tangent. How close the outcome was to the original spline and if tangency is maintained if the spline drastically changes is going to be up to you to check, since I have no idea how complicated your spline might be (hope you understand).

I experimented with a command I've not used before, but I feel it's pretty slick and it's all associative.

1. Use Insert -> Datum/Point -> Point Set to put 21 associative points on the spline, from 0 to 100 percent of the spline's arc length.
2. Use Insert -> Curve -> Arc/Circle to create 10 associative 3 point arcs. Each consecutive arc will use the same point that defined the endpoint of the previous arc.
3. Use Insert -> Derived Curve -> Smooth Curve String and select all 10 of the associative arcs as the Section Curves. For the fixed curves, again select the 10 arcs. Set your Continuity Level to G1 (tangency); DO NOT select Add Transition Fillets; set the Merge pulldown to None (else you'll end up with a spline again); set your desired Distance/Angular Thresholds and Maximum Deviation requirement (I used 0.001mm, 0.25°, 0.001mm in that order, top to bottom).

You should end up with 10 arcs that are now all tangent and are within 0.001mm of the points that defined the associative arcs. Again, not having your spline MIGHT affect the outcome, particularly with tangency.

Hope this works out for what you need.

Tim Flater
NX Designer
NX 9.0.3.4 Win7 Pro x64 SP1
Intel Xeon 2.53 GHz 6GB RAM
NVIDIA Quadro 4000 2GB
 
After doing some experimenting, it seems that this doesn't always result in a smooth chain of tangent arcs - it all depends on the shape of the spline. You may have to split your spline if it changes curvature. You will have to watch this if the original spline changes shape.

Face Analysis Reflections (zebra stripes) applied to the faces will show you where the Smooth Curve String has issues, if any.

Tim Flater
NX Designer
NX 9.0.3.4 Win7 Pro x64 SP1
Intel Xeon 2.53 GHz 6GB RAM
NVIDIA Quadro 4000 2GB
 
I also experimented with the original Sketch method you tried. That will work and result in a smooth chain of arcs - the problem is that you can only force the first arc to pass through 3 points on the spline, but the remaining 9 can only pass through 2 of their 3 allotted points and be tangent to the adjacent arcs. Trying to force arcs to pass through 3 points and be tangent to adjacent arcs exceeds the number of degrees of freedom an arc has and results in them being over-constrained.

If it were me, I'd use the Sketch method and just live with the deviation on the "midpoint" of the arc. It probably depends on the shape of the spline and how close you/manufacturing need to match the original spline.

Tim Flater
NX Designer
NX 9.0.3.4 Win7 Pro x64 SP1
Intel Xeon 2.53 GHz 6GB RAM
NVIDIA Quadro 4000 2GB
 
Both of your methods work. I think that originally when I made the sketch I had one too many constraints applied to one of the outer arcs, therefore it over-constrained. The Sketch method deviates more from the original spline, and every second arc has a tendency to "flip" when changing the spline shape (the arcs follow the spline like a wave).

The Smooth Curve String method is the clear winner. You said that there was a problem with the tangency. This can be solved by NOT selecting any Fixed Curves and adjusting the Settings like this:

Distance Threshold: 0.1 mm
Angular Threshold: 5 deg
Maximum Deviation: 0.0001 mm

These settings will ensure that the resulting curve is smooth and with same number or arcs even when drastically changing the shape of the original spline, yet keeping the shape almost exactly the same as the original spline (much more so than the Sketch method).

Attached are images for proof (thin lines on the surface mean it's tangent).
 
 http://files.engineering.com/getfile.aspx?folder=4867f43d-a0a5-4512-9b8d-14f575156430&file=smooth_curve_string.png
I would recommend Simplify Curves.

It will give you tangent arcs, which is pretty difficult using other methods.

It doesn't let you specify the number of arcs directly, but it lets you specify a deviation tolerance, which seems more useful, to me. If you want some specific number of arcs (and I can't imagine why you would), just play with the deviation tolerance until you get what you want.

It's not associative, but you can join the arcs together to get a spline (a rational one has exactly circular segments) and then you can replace your old spline by this new one in whatever features it appears. I suppose you could do this same replacement just by using the arcs (without joining them into a new spline), but the spline might be easier to manage.
 
CNSZU said:
The Smooth Curve String method is the clear winner. You said that there was a problem with the tangency. This can be solved by NOT selecting any Fixed Curves and adjusting the Settings like this:

Distance Threshold: 0.1 mm
Angular Threshold: 5 deg
Maximum Deviation: 0.0001 mm

I tried adjusting all settings, but what happened when editing the original spline was tangency being lost along some face edges and you could visibly see these rough areas using Face Analysis -> Reflections and especially so with Radius Analysis. Not suggesting you avoid your chosen method, just throwing caution into the wind.

My gut tells me this method may work great for some spline shapes and edits but might be a total failure with other spline shapes. Sharp transitions might become more problematic.

Glad we got something suitable for you, nonetheless.

Tim Flater
NX Designer
NX 9.0.3.4 Win7 Pro x64 SP1
Intel Xeon 2.53 GHz 6GB RAM
NVIDIA Quadro 4000 2GB
 
BubbaK, you're right. Simplify Curves does give the smoothest result at the cost of not being completely aligned with the original spline, because the resulting arcs have different length (there are more arcs in the areas with tight bends).

But where does it let you choose deviation tolerance? With NX10 you have to change the Distance Tolerance in modeling preferences (not very user friendly).

Now, if this tool had a dialog box where you could specify the tolerance, and was associative too, Simplify Curves would definitely be the right tool for the job.

Tim, yes, the result is bad if there is a sharp bend in the spline.

In any case, the obnoxious factory has now requested that the arcs have their radius set to whole integers(!). This forces me to manually sketch up the arcs constrained with radius dimensions, which is a real nightmare.

NX10.0 Win8.1 64bit i7-3770K 16GB QuadroK2200
 
I feel for you. Been there, done that. Good luck.

Tim Flater
NX Designer
NX 9.0.3.4 Win7 Pro x64 SP1
Intel Xeon 2.53 GHz 6GB RAM
NVIDIA Quadro 4000 2GB
 
CNSZU said:
In any case, the obnoxious factory has now requested that the arcs have their radius set to whole integers(!).

Craziness. Tell them you modeled it in angstroms and the radii are all whole integers. [glasses]
 
Yes, Simplify Curves will put more arcs in tight areas, typically, if this is necessary for achieving the distance tolerance.

I agree that changing the modeling tolerance is annoyingly inconvenient.

The requirement for integer radii completely changes the problem, and I don't see any way to solve it, other than writing a huge amount of math code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor