Jump to content

Recommended Posts

Posted
Could it be due to the different AutoCAD versions we're using?

 

Perhaps - but I cannot see why the derivatives at the different points on the curve would suddenly be reversed - it just seems a bit weird :(

  • Replies 231
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    107

  • lizp

    99

  • SEANT

    24

  • The Buzzard

    2

Top Posters In This Topic

Posted Images

Posted

There is something mildly odd about ellipsis. They have 2D Normal property, i.e., a vector describing the plane with which they are parallel. The Normal can be 0,0,-1, but only if they were created with an active UCS opposite that of the WCS.

 

Unlike Circles, Polylines, and all other 2d (as well as 1d, and even 0d [Point]), when an Ellipse is modified with Mirror3d, the normal does not change. The vector remains 0,0,1 when ‘List”ed or queried via Ellipse.Normal.

 

Perhaps this quirk plays some odd role when dragging grip points. I have experimented with dragging a grip from one side to the other but did not see any change in the Normal.

 

Quite possibly this quirk is at a very fundamental level of AutoCADs own code base, and yes, perhaps it is version specific.

Posted
There is something mildly odd about ellipsis. They have 2D Normal property, i.e., a vector describing the plane with which they are parallel. The Normal can be 0,0,-1, but only if they were created with an active UCS opposite that of the WCS.

 

Unlike Circles, Polylines, and all other 2d (as well as 1d, and even 0d [Point]), when an Ellipse is modified with Mirror3d, the normal does not change. The vector remains 0,0,1 when ‘List”ed or queried via Ellipse.Normal.

 

Perhaps this quirk plays some odd role when dragging grip points. I have experimented with dragging a grip from one side to the other but did not see any change in the Normal.

 

Quite possibly this quirk is at a very fundamental level of AutoCADs own code base, and yes, perhaps it is version specific.

 

Just what we need thrown into the mix... :geek:

 

But thanks Sean, very informative indeed.

 

Lee

Posted
Perhaps - but I cannot see why the derivatives at the different points on the curve would suddenly be reversed - it just seems a bit weird :(

 

I have to agree there. Even if it were a "wayward" Normal, one would expect it to be consistent throughout the span.

Posted
I have to agree there. Even if it were a "wayward" Normal, one would expect it to be consistent throughout the span.

 

Another bizzare thing, is that I cannot seem to replicate it.

 

I have opened the drawing posted (where the vectors are reversed), and, upon using the program on them - yes, they are reversed.

 

But then, if I draw an ellipse over the top of the one in the drawing, all is fine. - So it cannot be the size or position of the ellipse.

 

I think I shall compare DXF tables of the erroneous Ellipse and one that I have drawn.

Posted

Upon removing the obvious differences (entity name, handle), the difference is clear:

 


Problem Curve

(10 239.117 4.0554 0.0)
(11 -19.7719 62.8991 0.0)
[color=Red][b](210 0.0 0.0 -1.0)[/b][/color]
(40 . 0.858775)
(41 . 0.0)
(42 . 6.28319)

Redrawn:

(10 239.117 4.0554 0.0)
(11 -19.7719 62.8991 0.0)
[color=Red][b](210 0.0 0.0 1.0)[/b][/color]
(40 . 0.858775)
(41 . 0.0)
(42 . 6.28319)

Posted

@SEANT,

 

Thanks for the explanation. I see you're using Mechanical 2009, is that AutoCAD 2009 or some enhancement of it? Does it come out right as with Lee when you modify the ellipse?

 

I was wondering if it would be possible to convert the initial curve we were using, consisting of numerous small segments, into a contiguous curve prone to the code procedures of finding Min and Max? Is there such function or I'm expecting too much -- something like merging or subtracting 3D objects?

Posted
Upon removing the obvious differences (entity name, handle), the difference is clear:

 


Problem Curve

(10 239.117 4.0554 0.0)
(11 -19.7719 62.8991 0.0)
[color=Red][b](210 0.0 0.0 -1.0)[/b][/color]
(40 . 0.858775)
(41 . 0.0)
(42 . 6.28319)

Redrawn:

(10 239.117 4.0554 0.0)
(11 -19.7719 62.8991 0.0)
[color=Red][b](210 0.0 0.0 1.0)[/b][/color]
(40 . 0.858775)
(41 . 0.0)
(42 . 6.28319)

Do you think this is some kind of glitch in AutoCAD?
Posted
Upon removing the obvious differences (entity name, handle), the difference is clear:

 


Problem Curve

(10 239.117 4.0554 0.0)
(11 -19.7719 62.8991 0.0)
[color=Red][b](210 0.0 0.0 -1.0)[/b][/color]
(40 . 0.858775)
(41 . 0.0)
(42 . 6.28319)

Redrawn:

(10 239.117 4.0554 0.0)
(11 -19.7719 62.8991 0.0)
[color=Red][b](210 0.0 0.0 1.0)[/b][/color]
(40 . 0.858775)
(41 . 0.0)
(42 . 6.28319)

 

Wayward Normal. :shock:

Posted
@SEANT,

 

Thanks for the explanation. I see you're using Mechanical 2009, is that AutoCAD 2009 or some enhancement of it? Does it come out right as with Lee when you modify the ellipse?

 

I was wondering if it would be possible to convert the initial curve we were using, consisting of numerous small segments, into a contiguous curve prone to the code procedures of finding Min and Max? Is there such function or I'm expecting too much -- something like merging or subtracting 3D objects?

 

Typically, I would recommend the use of splines. Sadly, It has been determined that Splines do not return a “Bounding Box” useful for a valid Min/Max routine.

 

An option other than the highly segmented, straight line segment Poly would be a “Fit” Polyline. These are available from the Ellipse command (provided the PELLIPSE system variable is set to 1). Those too, however, are difficult to modify smoothly via grips.

 

All things considered, I still suspect Splines are the way to go. I’ll give some more thought on an alternate Min/Max process.

Posted
Typically, I would recommend the use of splines. Sadly, It has been determined that Splines do not return a “Bounding Box” useful for a valid Min/Max routine.

 

An option other than the highly segmented, straight line segment Poly would be a “Fit” Polyline. These are available from the Ellipse command (provided the PELLIPSE system variable is set to 1). Those too, however, are difficult to modify smoothly via grips.

 

All things considered, I still suspect Splines are the way to go. I’ll give some more thought on an alternate Min/Max process.

 

Well, I suppose we could use an iterative method for splines?

 

Obviously less accurate - but then the Max/min points are only for determining the "sign" of the vectors, so the accuracy lost in an iterative method may be negligble... :wink:

Posted

Good Point. Any loss of accuracy would not likely amount to even a full percent error in a “Net Torque” reading.

 

I agree that starting out with something that is less than perfect is annoying. Someone once told me: "With Mathematics there is the possibility of perfect rigour, so why settle for less?" * Clearly a sentiment Autodesk should aspire to. :)

 

 

*http://www.cadtutor.net/forum/showpost.php?p=202223&postcount=49

Posted
Good Point. Any loss of accuracy would not likely amount to even a full percent error in a “Net Torque” reading.

 

I agree that starting out with something that is less than perfect is annoying. Someone once told me: "With Mathematics there is the possibility of perfect rigour, so why settle for less?" * Clearly a sentiment Autodesk should aspire to. :)

 

 

*http://www.cadtutor.net/forum/showpost.php?p=202223&postcount=49

 

Ahh yes, I remember that... :P

 

It is annoying that the getBoudingBox method does not work with Splines, but as you bring up the sentiment about perfect rigour, even this method does not return the "Maximum". With the getBoudingBox method, one must provide a "fuzz" factor to enable an intersection, as the IntersectWith method doesn't deal too well with tangential intersections. Hence, there are in fact two (or more) intersections, close to the maximum, from which, one is chosen.

Posted

If there were no "Wayward Normal" problem we're having when trying to modify a curve could there be a code which would overlay a closed spline curve on the drawn ellipse? In this way we'd use the "prefect rigor" AutoCAD allows in drawing the spline and once the spline is drawn we can drag it here and there to change shape accordingly. Wonder if this dragging here and there couldn't be made with code to smoothen it further.

Posted
If there were no "Wayward Normal" problem we're having when trying to modify a curve could there be a code which would overlay a closed spline curve on the drawn ellipse? In this way we'd use the "prefect rigor" AutoCAD allows in drawing the spline and once the spline is drawn we can drag it here and there to change shape accordingly. Wonder if this dragging here and there couldn't be made with code to smoothen it further.

 

If we want asymmetric curves, ellipses will have to be abandoned, clearly due to their inherent properties.

 

This would prompt us to move onto Splines/Polylines.

 

Whilst using Polylines would provide us with a better method for determining the Maximum and Minimum Points of the curve, Splines would provide a smoother curve to model with.

 

IMO, I would use Polylines in this situation, as you can easily convert the short segments you were previously using, into one continuous Polyline, by using the "PEDIT" command. This could be then modified as easily as the individual segments themselves, and could be used with the getBoundingBox method to provide a better Maximum/Minimum.

 

Thats my $0.02.

 

Lee

Posted

Why can't you select it?

 

I have performed a PEDIT on it, and it returns 344 segments joined to 17 polylines.

 

The reason it can't be made into 1 continuous polyline (in its present state anyway), is because not all the segmented lines are touching end to end.

Posted

The only way it appears selected is by Ctrl-A. Then PEDIT again asks me: 'Select polyline or {Multiple}:'. If I press M then it again asks me to select objects. If, however, I select P then it says 'Expects a point or Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Multiple'. Some kind of vicious circle.

Posted

PEDIT does not allow pre-selection of objects.

 

You will need to type:

 

_PEDIT > _M > (window select the objects) > (convert to polyline if necessary) > _J > 0.00 > enter.

 

or something like that. :)

Posted

This gave me 380 segments (for some reason more than your 344 segments) and then, after multiple clicking on 'j' and 'b' I could only convert it to 36 elements (not the 17 polylines you got). That all right if only there were a way to connect the ends that are not touching.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...