I have a quite complex shape for a special road marking, and i would like to transform this Civil3D Block, which is now 2D into an 3D Object through Dynamo.
The problem is, i dont know where or how to approach this. This is what i have created so far in Dynamo:
I suggest extracting the geometry using the Civil 3D Toolkit : BlockReferenceExtensions.GetGeometry.
This will give you each curve that makes the block (without the nulls/empty).
Afterwards you can join the polycurves (knowing which is which is tricky and will take some time) to construct surfaces : .
-First I’ll construct a surface that represents the whole (see image below)
-and then substract the surfaces representing the gaps (when joining the polycurves make sure that you create a polycurve containing for curves for each of the gap and you can create the surfaces by patching).
Finally you can use the the surface.thicken node to make it a solid.
Anyway this is by no means the only way to do it. As with everything in Dynamo you can have many ways to get to the same result. This is what I came up when seeing the geometry. Maybe just creating it in Dynamo from scratch can be easier ? It seems every parameter is constant (space between the gaps, slope of the lines, etc.)
I would like to thank you both for your in depth feedback! That is a great solution!
However i have another small problem, when i insert another symbol, a STOP marking i get this weird result: (Using the BlockReferenceExtensions node)
Yes, i have already seen that…you can split the arcs in several straights lines with Curve.PointAtParameter, and then join those points to redraw the arcs…
Thanks for pointing this out there is something off going on in the the Dynamo node to create Ellipse Arc, I had to do some changes to the logic of the geometry conversion but the result looks good now.