Sweep tool nightmare

Sweep tool nightmare

matt
Advocate Advocate
6,496 Views
18 Replies
Message 1 of 19

Sweep tool nightmare

matt
Advocate
Advocate

I've just spent two days beating the sweep tool into submission, and seem to have the results I want for the moment. But I have no confidence that I understand the matter and fear that I have merely stumbled upon a lucky combination. Please review my tale of woe, and give some guidelines on the use of the sweep tool.

 

I need to sweep a profile along a three-dimensional path. My path is an Archimedean spiral about the Z axis, but which also advances along the Z axis at a linear rate. Imagine a spiral climbing a cone. I've written an add-in to produce this path, and have versions that simulate it with arcs, line segments, and a single spline curve.

 

My profile is drawn on a construction plane made 'along the path' and set at the start of the path.

 

path-overview.png

 

I can produce a 'single path' sweep using any of the three path types, but the profile twists as it proceeds, which is unacceptable.

 

singlepath-twists.png

 

 

So, using the same add-in, I produced a second curve to use as a 'guide rail'. I've tried arranging the guide in a parallel fashion (identical to the path, but offset in the Z dimension)...

 

parallel-guide.png

 

...or a radial fashion (corresponding points have the same Z value, but are radially offset from the center axis by a fixed amount).

 

radial-guide.png

 

 

The arc and line segment versions simply fail with this error:

 

Error: The path is not smooth.
Try modifying the path so that all edges are connected with tangent continuity. To create a swept shape with a sharp edge, try using multiple sweeps.

 

I don't think it's possible to represent my path with 'tangent continuity' using line segments and arcs. Why is this restriction made only when using the 'guide rail' type? The single-path sweep worked fine (except for the twist).

 

While you're considering that question, let's move on to the spline path version, which provides a bit more entertainment:

 

If I use the 'radial' guide rail, I see the following error:

 

Error: The sweep would create an illegal surface.
Try changing the profile or path.

 

...which leaves me rather nonplussed. What law has this hapless surface broken? Can anyone explain this error message more clearly?

 

Undaunted, I discovered, quite by accident, that altering the 'Distance' parameter to something less than one often eliminates the error, and occasionally even produces the correct result as far as it goes. I experimentally found that the maximum distance is about 0.8461 in this particular case. Examining my model visually, we can see that this appears to be exactly one turn before the end of the path; precisely below (looking down the Z axis) the endpoints of the path and guide rail. Curious.

 

8461-side.png

 

 

8461-top.png

 

If I use the 'parallel' guide rail I get the same error, but must reduce the distance much further to eliminate it: .344 works; .41 fails with error; values in between give twisted results. Experimenting with these intermediate values seems to suggest that the sweep is trying to align with the _earlier_ portion of the guide rail instead of marching along the guide rail apace with the path:

 

 

parallel-twisted.png

 

 

 

Theorizing that it might have to do with the distance from the path to the guide rail, I tried using a very small parallel offset for the guide rail, with no significant change.

 

Then I tried a very large parallel offset. The error was eliminated, but the shape is clearly not what I want:

 

largeparallel-twisted.png

 

Again, this might be explained by the sweep choosing an arbitrary point on the guide rail instead of proceeding along the guide rail at the same rate as the path.

 

Finally, I tried a radially offset guide rail a with a very small offset, and got the result I want.

smallradial-success.png

 

 

 

During the sweep operation, Fusion is choosing an alignment point on the guide rail that doesn't always match my expectations. My successful version seems to suggest that by making the guide rail extremely close to the path, Fusion will be more likely to choose an alignment point that makes sense. Although then I would think that the small parallel offset should have worked just as well as the radial offset--or perhaps even better since the parallel-offset paths are precisely the same length. In my case, only the radially-offset guide rail worked.

 

Can you (Autodesk) give us some clearer insight into how the guide rail is used during the sweep process?

 

Otherwise, I fear I'm doomed to re-live this nightmare time and time again, forever cursing day I met Fusion 360.

 

-Matt

 

6,497 Views
18 Replies
Replies (18)
Message 2 of 19

TMC.Engineering
Collaborator
Collaborator

Try constraining the sketch of the rectangular section. maybe with vertical constraints or with a construction line perpendicular to the z axis.

 

 EDIT: This reminded me of another thread.  might be out of luck for now

 

 

Timm

Engineer, Maker
System: Aorus X3 Plus V3, Windows 10
Plymouth Michigan, USA
Owner TMC Engineering
0 Likes
Message 3 of 19

matt
Advocate
Advocate

My profile sketch is fully constrained.

 

profile-sketch.png

 

...though I can't imagine why that would matter.  Certainly the sweep would not be altering the profile (except when using the stretch/scale features, which I'm not).

 

But thanks for trying!

 

 

0 Likes
Message 4 of 19

jeff_strater
Community Manager
Community Manager

Hi @matt,

 

I appreciate the time you've put into both this and into the post itself.  I can't answer all of your questions, some of them I will have to reach out to my more capable co-workers, but I don't want to leave you completely hanging, so I'll start the dialog.

 

First, regarding the sweep without the rail:  Yes, an unconstrained sweep along a 3D path will definitely twist.  And there is no way to control it.  The rail is, as you've figured, the only way to control that twist.

 

Regarding why the rail has to be continuous - that's the one I will have to ask for some assistance on.  It has to do with the complex math involved in sweep (which is a lame answer).  Perhaps @wilkhui can shed some light on this error.

 

Regarding the "illegal surface" error for your radial rail, we would have to see your model to be certain.  Would you be willing to share it?  My guess is that this is somewhat of a generic error code, likely the low-level error message is something undecipherable to us mortals, so we substitute this generic "illegal surface" error.  If we can take a look at the model, we can probably shed more light on it.  Your info that setting the distance to less than 1.0 helps is useful.  I also suspect that your analysis that "Experimenting with these intermediate values seems to suggest that the sweep is trying to align with the _earlier_ portion of the guide rail instead of marching along the guide rail apace with the path" is probably pretty close to the answer.  It could be that small adjustments to the rail curve could improve this mapping, or it may reveal a bug in Fusion.

 

Anyway, we will try to get more answers for you.  Thanks for your patience.

 

Jeff

 


Jeff Strater
Engineering Director
0 Likes
Message 5 of 19

donsmac
Collaborator
Collaborator

This shape was made by scaling (in two directions) a tapered coil with a square section. I made the groove using the bevel tool,... making a spline and using the pipe tool with a triangular section 

failed to resolve, so I ended up duplicating and moving the part, combining to get an intersection and deleting a couple parts till you have two to bevel.

 

coil with groove.jpg

 

 

0 Likes
Message 6 of 19

donsmac
Collaborator
Collaborator

edit..duplicate post

0 Likes
Message 7 of 19

matt
Advocate
Advocate

That's a very creative workaround.  Thanks for the ideas!

Unfortunately, my project may require different spiral formulae as I go on, which is why I wrote an add-in to produce it in the first place. I'll also have a more complex profile by the time I'm done.

 

And, of course, I want to understand the sweep tool so I can make best use of it.

 

-Matt

0 Likes
Message 8 of 19

matt
Advocate
Advocate

Thanks for the attention Jeff.  I'll get you my model soon.

 

 

0 Likes
Message 9 of 19

matt
Advocate
Advocate

@jeff_strater,

Here's the document; sorry for the delay.
While writing this little tome, I was editing a single model.  This version has all models saved in the history.  Un-suppress the one you're interested in.

Anxious to hear what your team comes up with.

-Matt

Message 10 of 19

jeff_strater
Community Manager
Community Manager

Thanks so much for the model, @matt, we will look into this.

 

Jeff

 


Jeff Strater
Engineering Director
0 Likes
Message 11 of 19

jeff_strater
Community Manager
Community Manager

Hi @matt,

 

I have to thank you again for this model.  This is the most well-documented and thoughtful example of a problem description I have seen for a long time.  You clearly put a ton of time into this.  We will definitely analyze all these cases to see what we can learn and feed back to you. 

 

Jeff

 


Jeff Strater
Engineering Director
Message 12 of 19

matt
Advocate
Advocate

Hey @jeff_strater,

 

It's been over 6 months.

 

Any traction on this?  The reported issues are still happening, just as originally reported.

 

-Matt

 

0 Likes
Message 13 of 19

jeff_strater
Community Manager
Community Manager

Hi @matt,

 

Unfortunately, no, we don't have any update on this.  To be perfectly honest, it's not a situation that comes up all that often, so it doesn't get a lot of oxygen.  We have recently opened a few projects on more "advanced surface modeling" topics, that include Loft and Sweep.  But, controlling twist in Sweep is a tricky matter.  It's not going to be an easy fix, unfortunately.

 

Jeff

 


Jeff Strater
Engineering Director
Message 14 of 19

TrippyLighting
Consultant
Consultant

The solution to this is to create a second offset spiral just as you did in the last sweep in your file.

Once your addin has created a spline curve in a sketch, you can simply edit the sketch, select the spline curve and offset it with the offset tool.

 

Then you can use the original spiral as the path and the second, offset curve as the rail for the sweep. That should always provide you with the twist control.

 

 


EESignature

Message 15 of 19

matt
Advocate
Advocate

@jeff_strater,

 

While it may not be frequently used, it represents strange, unpredictable behavior in a core modeling function, likely to be built-upon by additional features you build down the road.  I suspect you haven't heard the last of it.

 

Thanks for trying, Jeff, but I'm sure disappointed.

 

-Matt

 

Message 16 of 19

matt
Advocate
Advocate

@TrippyLighting,

 

Thanks so much for your input.  I appreciate the effort you and others have made to help me solve this particular problem... But that's not what I'm asking for.

 

I'm asking for a clear explanation of how this tool works, so I don't have to burn a day or more fumbling around with it next time I have to use it to precisely render a complex shape.  For example, an upcoming project is to write an add-in to create hypoid gears, the teeth of which are rendered with a profile that sweeps along a complex path; twisting and scaling along the way.   Either the sweep or loft tool should be capable of that, but only if I understand (and can trust) them.

 

I provided all these cases to illustrate how unpredictable sweep currently seems to be: have another look at my case above, just below the text ".344 works; .41 fails."  Is there any reasonable explanation for that behavior?  (I ask honestly, and with all due respect; maybe there's something I'm missing.)

 

As I understand the tool, all of my path/rail choices should have given the same results.

 - - - -

...all that said, thanks for the tip on using the offset tool.  My script simply rendered the coil twice, using a slightly different radius.

Can you explain why this 'radially offset' path worked but an but an 'axially-offset' path did not?

 

Thanks again for your interest!

 

-Matt

0 Likes
Message 17 of 19

celikcinar
Explorer
Explorer

It's been 5 years and the issue with 3-dimensional sweeps still exists...

I'm trying to use the sweep tool to construct a simple rectangular edge around a cylindrical object along a 3D path. I want the sweep profile to be parallel with the cylinder but it's impossible to do. I spent days tackling this but nothing has worked so far. I've been using Fusion for nearly 4 years, and 3D sketches were always causing trouble since the first day. I'm as disappointed as @Anonymous on this matter...

0 Likes
Message 18 of 19

TrippyLighting
Consultant
Consultant

Yep, indeed!

You would not believe how often I've had to ask users in those 5 years to please share a design so we have something to analyze. So how about it ...


EESignature

Message 19 of 19

celikcinar
Explorer
Explorer
I'm sorry, I had no time to isolate or remodel that edge again so I couldn't share yesterday, but I did manage to do what I want by using a more straightforward approach today.
The first method I tried would model the edge in 2 steps. The second method I'm using right now consists of 4 steps for the same outcome.
0 Likes