Hi all,
I’m working on a script that needs to place a family with a center to center distance on a 3D polycurve. This polycurve originates from a alignment line in Civil 3D. So I link the dwg file into Revit and extract the polycurve into Dynamo.
So far so good. When dividing the curve things go wrong, Dynamo says it can’t create points on a PolyCurve:
Is there something I can do different to let this work?
Is this just not possible in Dynamo?
Is the shape of my polycurve to complicated?
I’m working with dynamo 2.16.1 and Revit 2023
Thanks in advance!
Pim
Hi @pjacobs try something here instead and see if it could work
Hi sovitek,
Thank you for your quick reply.
Unfortunately this solution doesn’t work. It only gives me one point (the start point).
But with the Curve.PointsAtChordLengthFromPoint I suspect to not use the code block with the “x/4000” because my ctc distance is 4000 so it should be this:
But unfortunately this also doesn’t give me the desired result as it only gives met 23 points from the start and not the 3389302 (curve length) / 4000 = 847 points that I expected
Instead of 4000
into the chord length, use a range of 0..#crv.Length/4000+1..4000;
Edit: You might actually want 0…crv.Length…4000 now that I think about it… Either way, try a range.
Note that this node produces stuff by curve length not chord length.
Hi Jacob,
Thanks for your reply.
This solution gives me 847 lists So not exactly what I’m looking for but it started to look like something. The first few lists are longer then the last ones. So I’m not quite understanding what’s happening exactly.
Note that this node produces stuff by curve length not chord length.
I need the polycurve to be separated by chord lenght becaus I need to place straight objects from point to point with a ctc of 4000mm no matter how the polycurve looks.
Where is your initial polycurve coming from?
We got it from our customer. In the dwg file it’s a 3D polyline. I linked it into Revit and extracted the geometry like this (it’s the only curve/element in the dwg):
It would probably help if you provided the polycurve as a single item instead of a list or at least specified list levels to help clear some things up.
Why not offset the polycurve in the DWG before importing? Or better yet use Dynamo for Civil3D to offset and extract all the points you need to place the curves and save that to an intermediate file. Every bit as easy as importing the DWG, but with less impact on the long term model health (imports are bad).
Thanks for all your answers but I switched to Rhino.Inside for my script. I only needed 4 nodes to offset it and divide it.
For the people who are interested: