Help PolyCurve.ByThickeningCurve

I am trying to thicken a curve, but when i use PolyCurve.ByThickeningCurve and defined the normal vector, the direction that they take is not the same of the vector that I have defined.
The normal vector was defined with help of the plane.

Someone knows how can i solve this problem?

I have the same problem. In the image below, the red line is what I am trying to offset/thicken. The short black line is the normal vector for the curve, and the blue lines are the result. So the direction of the offset seems to completely ignore the input vector.

@jacob.small any ideas? I know there are several other posts about offsetting a curve in a specific plane or forcing the offset to be in the global XY plane. Some solutions I’ve seen involve joining whatever curves you’re dealing with into a single polycurve before offsetting, but in this case I’m just trying to offset a single curve.

Another note is that these curves are originally from Civil 3D, but regardless of the host app it seems like the node is not working as designed.

yeah, this is definitely a bug. Filed it internally.

2 Likes

They way I percieve the normal, it isn’t a bug.

The normal (in the image above) seems to be parallel to the Y-Axis and the Polycurve is thickened in the Z-Axis direction. If the polycurve is patched the normal at the the start point of the original curve would be the normal specified. After all the input does say Normal, not Direction

yes, I thought that too at first… until I looked at the code.

2 Likes

In the interim perhaps translate the curve along the desired vector by the distance and inverse distance, build a line from Start to Start of the new curve, make a Polycurve of the joined curves and close the Polycurve… not a great option but with an ID’d bug less fun workarounds are the option. :frowning:

Thanks everyone! Looking forward to the fix.

Try to use or look into “Line.XYOffset” code from Springs package.
Ii’s very simple, just two lines.
There’s SmartOffset from Wombat package, doing same things.

And share your DYN and RVT files, please. We’ll make complete solution.

We have fixed this issue. The node now takes the normal vector input and uses it to orient the resulting curve on the plane perpendicular to that normal (as expected). To some users however, who are using this node as-is, this change could come as a surprise as the normal now takes effect and it could possibly change existing graph behaviour.

In any case, this is a screenshot of what the new results would look like for the attached graph (the fix will be available in a future Dynamo version obviously). As you can see, the thickened curves now lie on the planes for which the normals have been passed as input to the PolyCurve.ByThickeningCurve node.

PolyCurveByThickeningCurve.dyn (29.0 KB)

3 Likes

Thanks for the update @Aparajit_Pratap!

Continuing with the same update - the team has decided to create a new node called PolyCurve.ByThickeningCurveNormal so that the old node (PolyCurve.ByThickeningCurve) continues to work as it did before and not break existing graphs. The new node will be available in Dynamo 2.9 and the old node, although it can be loaded from old graphs, will no longer be usable in new graphs as it will be hidden in the Dynamo library.

3 Likes

One last update - We have made the normal input a default parameter in the new PolyCurve.ByThickeningCurveNormal node with a default value of null. This means that if no normal vector is supplied to the node, it will treat the null vector as an indication that it should default to the curve normal as it was doing previously with the old node. In other words, if no normal is passed, the new node behaves just like the old one.

2 Likes