Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Sweep problem

scott_bolton
Advocate

Sweep problem

scott_bolton
Advocate
Advocate

Hi,

I'm encountering anomalies with the sweep command. See the attached image.

I have two 3D polylines, one cyan and one red. If I sweep the same closed polyline along each line the cyan path results in an upside-down solid. If I truncate the cyan line the result is correctly orientated. There's obviously some dodgy geometry in the cyan line so my question is, how can I query the line and correct it prior to sweeping?

S

0 Likes
Reply
1,143 Views
10 Replies
Replies (10)

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> There's obviously some dodgy geometry in the cyan line

Sorry, I don't see any chance to find the issue of the cyan line in the JPG. Also a comparison with the red line is not possible by just looking to an image (besides of the color 😉 ).

 

Please upload the dwg-file ... there we can select geometry and see details for the entity as well as the settings for your drawing.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes

scott_bolton
Advocate
Advocate

Here's a file: green is good; red is bad.

0 Likes

strawberry12
Advocate
Advocate

Try changing Alignment to 'No' - you may need to manipulate the shape into the correct starting position

0 Likes

scott_bolton
Advocate
Advocate

Nope. That gave even weirder results.

0 Likes

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

interesting, and to be honest, I have no idea how to solve that with SWEEP command.

 

I would place your profile at the start as well as at the end of your alignment (vertically, of course) and use command _LOFT instead.

 

Sorry to not have a better idea, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes

j.palmeL29YX
Mentor
Mentor

I don't know which result you expect, therefore two variants in the attached video https://autode.sk/2U2aakF.

 

cadder

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes

j.palmeL29YX
Mentor
Mentor

@scott_bolton wrote:

Nope. That gave even weirder results.


 

If one of this results https://autode.sk/2txRltP is not the correct one, what do you expect?

 

 

cadder

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes

scott_bolton
Advocate
Advocate

Thanks for the video. Manually, of course, a solution is very simple as you have shown. However, this sweep function is part of a lisp routine and I would need to determine which profile to use. Coding aside, why do the two polylines produce different results. They both have the same UCS; they both travel in the same direction. There must be some "feature" that results in the profile being inverted.

0 Likes

j.palmeL29YX
Mentor
Mentor

@scott_bolton wrote:

 

 There must be some "feature" that results in the profile being inverted.


 

I have to admit that I have never understood the internal rules AutoCAD uses when sweeping with the "Align" option to align objects. I only know that (if ON) the geometry is rotated perpendicular to the tangent at the starting point of the path.
In the attached video https://autode.sk/2Sl3o7M you can see that the result depends on the current position of the geometry to be swept to the path. (I only rotated the paths relative to the Shape a little). By means of try and error you may find a position which gives the desired result. If success you can rotate back the resulted solid. But that's not garanted.


Therefore I never use this option even when drawing manually. I always place the objects in the desired position on the starting point of the path, define a base point and deactivate the Align option.

How to solve the problem even within a LISP routine - I'm sorry I can't help you there.

 

cadder

 

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes

scott_bolton
Advocate
Advocate

Chaps,

I haven't been able to find a direct solution to this in order to determine which way the object will sweep but have been able to code a fix. All edges of my object should be above the path so I determine the minimum Z value of the path and the object using vla-GetBoundingBox. A comparison between the two enables me to determine if the object should be rotated before sweeping. This solution would not work if the path were to be within the shape, for example the centreline of a duct, but for now I'm happy.

S

0 Likes