Offset with Loose=Yes of an ellipse results in a polycurve with 4 segments and C0 continuity between segements. The expected result would be an ellipse or single closed NURBS curve. In contrast Offset with Loose=Yes of a closed degree 3 NURBS curve results in a single closed degree 3 NURBS curve as expected.
Version 6 SR12 (6.12.19016.7051, 1/16/2019)
Offset Bug.3dm (50.6 KB)
Hi David,
Thanks for posting what youāre seeing. The Loose option for Offset is new in v6 so I checked with the devs and this is mathematically expected for an ellipse when loose is used. The offset of an ellipse is not an ellipse so when the loose option is used the edit points (editpton) are actually in the same location as they would be if offset normally.
Iām not sure what your doing that needs this but I would guess you want less points on the offset result. If so, here are some ideas that might helpā¦
- Use a normal Offset and then use RebuildCurveNonuniform to reduce the ctrl pt count.
- Make a ādeformableā Ellipse and offset that Loose.
- Offset loose and then run ExtractPt and use CurveThroughPt on those with the closed option.
Technically the loose result is apparently to do with the āfully multiple knotā structure of the ellipseā¦ but please donāt ask me to explain that
Hi Brian, David, ādevsā,
I would have expected a loose offset of a regular ellipse to look like this:
i.e. offset the control points in a rectangular manner. It makes an ellipse as well (and the offset is correct at the quadrant points).
LooseOffsetEllipseSuggestion.3dm (313.0 KB)
@BrianJ I completely understand that a ālooseā offset of an ellipse may not be an ellipse. Given that McNeel has defined a loose offset based on the edit points the loose offset of an ellipse should be a single curve with C2 or higher continuity which goes through the offset edit points, not a polycurve with cusps. Offset the edit points then determine the curve which corresponds to those edit points.
Interesting.
So a consequence of the ellipse representation using multi-knots and defining a loose offset using edit points is cuspsā¦
Perhaps the loose offset option should only be available for non-rational NURBS.
@pascal, devs
I donāt understand why ellipses and circles/arcs are not special-cased for Loose offset, offsetting the edit points in this case doesnāt make any sense to me when offsetting control points gives a better result with less curve deviationā¦ And itās relatively easily programmed in this case (IMO).
āMitch
Iām with Mitchell!
the offset loose of a conical crv should be the same type of crv.
+1
Iām with Mitchell too!
But keep in mind that an offset of a conic is not a conic, I donāt know how that fits in with being āthe same type of crvā.
-Pascal
But a loose offset could beā¦ as per my example above.
Hi Mitch - yep, thanks, I do see ā¦ but Iām too dense so far to see how to do this predictably on an elliptical āsubā curve though - can you see where the points should go?
-Pascal
Workinā on itā¦ still need a bit more time to finish my āproof of conceptāā¦
Here is a really bad hack, the code needs lots of cleanup and there are still issues to be resolved, UI, etc. It works on closed ellipses or open ellipse segments; and should work on out-of main plane objects as well, canāt guarantee the on-screen side picking will work correctly for those though.
Edit: below is a somewhat improved versionā¦
OffsetEllipseLooseHack2.py (4.0 KB)
āMitch
Here is a comparison of the native loose offset of both full and partial ellipses compared with the script
(original=cyan, native loose=red, script loose=green)
You can see that the script produces better results in every case. However, one downside with partial ellipses made by the script in its current form is the endpoints do not fall on the line normal from the original. I think that can be fixed in the code though, itās just a matter of calculating the split points differently.
LooseOffsetEllipseExample.3dm (384.4 KB)