Weird bug in PolyCurve.Offset node

PolyCurve.Offset returns a polycurve with the wrong type. There is a simple enough workaround as shown. But logically (and to avoid user confusion) shouldn’t PolyCurve.Offset return a polycurve and Curve.Offset return a curve?

(this is in Dynamo 1.3, haven’t tested in other versions)

A polycurve is a type of curve so both are technically correct. The object type shouldn’t matter too much anyway.

I believe this is a result of some geometry issues which can occur when offsetting polycurve with irregularly curved segments, but I can’t recall (same idea as an ellipse which has been offset doesn’t produce an ellipse).

The object type does matter since there is a PolyCurve.Curves node but no Curve.Curves. I would expect dynamo to try to maintain data type fidelity where ever possible. If we offset a curve we expect a curve back, offset an arc we expect a arc back, offset a rectangle and we expect a rectangle back. True, ellipses are different but the exception doesn’t make the rule. I, as an end user, would expect the same behavior from dynamo offset node as revit’s native offset tool.

I agree, just pointing out there may be an exception which makes the rule that we don’t know of. Best to submit to the GitHub so the team can confirm if there is an issue and take action accordingly.

Also, Geometry.Explode resolves the need for the Polycurve recreation before the Polycurve.Curves node. :slight_smile:

1 Like

Fixed in 2.8.0