i’m trying to offset polylines and to get a polygon out of a single line.
OFFSET.dyn (123.5 KB) offset_test.dwg (527.6 KB)
some lines fail, and output a 3d polyline, what i was expecting was a closed polyline.
what am I missing?
i’m trying to offset polylines and to get a polygon out of a single line.
what am I missing?
Offset works only on planar curves. Can you make sure the polycurves are projected on the XY plane for example before you call the offset?
with curve.pullonplane in between, i get the same results.
adding a midpoint not colinear to the start and endpoint sets the plane to the correct XY-plane, moving the point colinear with the start and endpoint and the result is a offset on a different plane.
tested it with 6 lines in a polar array, 60 degrees rotated, funny result with the same script.
I’ve run into this as well. A search for “curve offset” shows that the issue has been discussed for many years. From what I can tell, the behavior of the curve in Dynamo is dependent on how it was natively drawn in the host application. In other words, Dynamo is at the mercy of Civil 3D in this case. The array is a good example - all of the curves are planar, but obviously not all in the XY plane. There have been a lot of posts where people suggest adding a “plane” input to the Curve.Offset node in order to constrain the offset.
The only workaround I’ve found is to extrude the curve as a surface along the canonical Z axis vector, offset the surface, then intersect the surface with the XY plane. Another option is to just translate the curves by a normal vector in the XY plane, but that only mimics a true offset for line segments, not arcs.
even redrawing the lines from the points within dynamo doesn’t resolve the issues. pretty nasty bug.
edit: have to wait for 2.10 of dynamo for the supposed fix
those work, a curve with all points colinear fails
After creating a new dyn. file it worked properly
getting the desired result now, thanks for showing the different approach.
@zachri.jensen @Paolo_Emilio_Serra1 @Sybold could you try out the latest 2.10 build (2.10.0.3173) on https://dynamobuilds.com/ to test the fix for the Curve.Offset node. We would like to know if these fixes meet the requirements. Thank you.
@Aparajit_Pratap, i can confirm that the issue is resolved in 2.10.0.3173
This is great! Thanks a lot for testing it @Sybold.