Rhino ( and most 3d modelling software) have a command where you can draw a 2d curve in plane and in section view and the curve in plan view adapts to the curvature in section view. In Rhino it’s called Curves from 2 views.
In Dynamo you can achieve the same results by extruding the curves and doing a geometry intersect, but could become quite tedious. Is there a custom node that is similar to the “curves form two views” command in Rhino?
There isn’t a good “fail safe” solution for out of the box methodology, but you can pretty easily build something like this as a custom definition, which can be kept handy for future use.
The definition is as follows:
def curvebycurves (SectionCurve,PlanCurve)
{
SecCrv =
Display.ByGeometryColor(
SectionCurve,
Color.ByARGB(
120,255,0,0
)
);
PlnCrv =
Display.ByGeometryColor(
PlanCurve,
Color.ByARGB(
120,0,0,255
)
);
ExtrudeDist =
Autodesk.Geometry.DistanceTo(
PlanCurve.BoundingBox.MinPoint,
SectionCurve.BoundingBox.MaxPoint
);
NewCurve =
Autodesk.Geometry.Intersect(
SectionCurve.Translate(
SectionCurve.Normal,
ExtrudeDist/2
).Extrude(
SectionCurve.Normal,
-ExtrudeDist
),
PlanCurve.Translate(
PlanCurve.Normal,
ExtrudeDist/2
).Extrude(
PlanCurve.Normal,
-ExtrudeDist
)
);
return = Flatten({SecCrv,PlnCrv,NewCurve});
};
2 Likes
We used the Curve from two views alot in Rhino. So a definition like that is very handy. Either way, it gets the job done. Thanks!!
Glad I could help.
Note that the nurbs aspect in my input curves will lead to some inaccuracies (as with pretty much any nurbs based work). Play around a bit and tweak the code to make it work the way that is right for you.