Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sweep problem

10 REPLIES 10
Reply
Message 1 of 11
scott_bolton
1041 Views, 10 Replies

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

Sweep problem

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

10 REPLIES 10
Message 2 of 11

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 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes

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 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 11

scott_bolton
Advocate
Advocate

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

0 Likes

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

Message 4 of 11
strawberry12
in reply to: scott_bolton

strawberry12
Advocate
Advocate

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

0 Likes

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

Message 5 of 11
scott_bolton
in reply to: strawberry12

scott_bolton
Advocate
Advocate

Nope. That gave even weirder results.

0 Likes

Nope. That gave even weirder results.

Message 6 of 11

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 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes

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 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 7 of 11
j.palmeL29YX
in reply to: scott_bolton

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

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

Message 8 of 11
j.palmeL29YX
in reply to: scott_bolton

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 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

Message 9 of 11
scott_bolton
in reply to: j.palmeL29YX

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

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.

Message 10 of 11
j.palmeL29YX
in reply to: scott_bolton

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 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

Message 11 of 11
scott_bolton
in reply to: j.palmeL29YX

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

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report