Hello engineers, Im trying to see how I can create a dynamo script thats so versatile at helping me in varrying surfaces as I try to rebalance cut and fill between my original ground and the proposed surface, is it possible to create a dynamo script that can create curfaces from polylines existing in different layers, so it it treats the polylines as contours and add them as breaklines, and in case the polilines have z elevation, is dynamo capable of controling the elevations of those polylines, once the surfaces have been created, is dynamo able to control the datum levels of such surfaces, like in civil 3d we can select the surface and raise/lower datum by any amount lets say -0.3 or +0.5, is dynamo able to raise /lower the datum of the surfaces, in so doing, it will be giving me direct feedback about the adjustments to the original ground such that i can decide if the difference in cut and fill volumes is what i need , if i can do these adjustments via number slider it would be great, will appreciate any reply towards how i can build this kind of a dynamo script, the surfaces i need to build via the polylines that exist in many layers in the drawing are to form the base existing surface, thats why i need to be able to varry their elevations , then i will use it against the proposed surface to create cut and fill volumes, so far ive only managed to create a dynamo script thats able to compute cut and fill from 2 tin surfaces, but i didnt see any capable nodes that can help me create such capabilities ive mentioned above, will appreciate any help, ive shared the screenshot of what I have created, thanksdynamo script to do cut and fill vols
I don’t mean this in a bad way, but your question is really hard to read (at least to me)
because of the absence of periods and commas.
Well, not really commas, but more periods followed by Capital letters
.
I think AI is a great tool to help with that.
For example;
Hello engineers,
I’m trying to build a flexible Dynamo script that helps me rebalance cut and fill volumes between an existing ground surface and a proposed surface across varying conditions.
My goal is to dynamically adjust the existing ground surface so I can quickly evaluate how changes affect cut and fill volumes.
Specifically, I would like to know if Dynamo can do the following:
- Create TIN surfaces from polylines that exist on different layers, treating those polylines as contours and/or breaklines.
- Read and control the Z elevation of those polylines (especially when they already contain elevations).
- After creating the surfaces, raise or lower the surface datum by a specified value (similar to the Civil 3D surface “Raise/Lower” function).
- Control these adjustments using Number Sliders, so I get real-time feedback on cut and fill volumes.
The idea is to use these layer-based polylines to generate a base existing surface, vary its elevation, and then compare it against the proposed surface to evaluate cut and fill.
So far, I’ve managed to create a Dynamo script that calculates cut and fill between two existing TIN surfaces, but I haven’t found nodes that allow me to:
- Build surfaces directly from polylines across layers
- Modify polyline or surface elevations programmatically
I’ve attached a screenshot of my current Dynamo graph.
Any guidance, node recommendations, or example workflows would be greatly appreciated.
Not sure if the AI captured your question correctly though ![]()
PS
My guess it is for CIVIL 3D, so i can’t really help you with your question
.
yes exactly AI captured everything, any node or any suggestions even rocommended packages apart from arknance and camber that can help me accomplish this will be highly appreciated, Thanks a lot
Hi @oliverkisera seems like a civil3d thing, could you give your post a category, so we exackly know whats is about
@bvs1982 , thank you for the summary! ![]()
@oliverkisera , in short, yes, it is possible in Civil 3D .
Let’s give you some starting blocks. This is an example of extracting all polylines from 2 layers, converting them into COGO points, adjusting their elevation and then creating a surface.
C3D_SurfaceFromPolylines.dyn (48.3 KB)
This is great, I really really appreciate your help in enabling me to get this dynamo script, the thoughful arrangement of the nodes is on another level, Thanks again for sharing your knowledge, Ive tested it and it works as intended, it gets all the polylines in the layers I need, convert them to points, and I can add offsets as elevations, and creates the surface i need, Thanks
You are welcome, @oliverkisera ! ![]()
In addition, if you are going to be iterating on your surface design, then you probably want to use Dynamo Player. To prepare your graph for Dynamo Player, you need to set nodes as Input nodes. I also recommend renaming those input nodes and adding notes so you remember how to operate the graph. If you want more feedback on your design, you could create a reporting function with an Output node. Here is an example:
C3D_SurfaceFromPolylines_player.dyn (68.9 KB)
Thanks a lot for sharing these extra nodes and tips, it works great and very much happy about it
Hello, I have one more issues with some objects on a layer that i want to use to create surface, in that layer tere are two circular polylines and one circle, in this node called polycurve.points, its reporting warning with words, “Asked to convert non-convertible types”, and in the node called object.geometry, I can see preview of "Circle(Normal = Vector(X = 0.000, Y = 0.000, Z = 1.000, Length = 1.000), CenterPoint = Point(X = 431202.532, Y = 5558953.887, Z = 0.000), Radius = 14.200), and PolyCurve(NumberOfCurves = 2), what should i do to get them error to get away, being that theres a circle and 2 circular polylines, is it that only there centres coordinates are needed to form the points needed for the cogo points, so in that case i can create node like curve.start or curve.endpoint and connect to the object.geometry node and connect to the geometry.translate node, will appreciate your response, thanks
and lets say after I have created multiple surfaces, do we have a node/nodes that can now combine multiple surfaces into one surface, more like pasting 3 or 4 surfaces to form one surface that we can called the exising ground, thanks in advance if such a node is available
@oliverkisera , I recommend that you search the forum. This thread seems relevant to what you want to do:
Polycurve.Points can only process polycurves.
If you have circles in the layer, then you need to either change the drawing or add a function to separate the geometries.
If the circle represents a spot elevation, then you could extract points using Circle.CenterPoint.
You could separate the geometries with List.GroupByKey and use Object.Type as the keys.
Thanks a lot for this clarification
I have tried creating surface and cogo points from the circular polylines in the layer called P_Embankment permanent, but the surface is not forming as dynamo also cant report even the surface area of that surface, unless i create that surface manually in civil 3d using contours as definition, also I realized that that the points Z elevation of those circular polylines are not captured in dynamo, ive attached links to the dwg plus the dynamo script, the first row of the script is giving the erros because its the script row having nodes forming the surface based on those circular polylines, ive separated rows in that script forming surfaces from different layers in the dwg, so after all i wanted to paste all those surfaces and have one common existing surface which i will use to compute cut and fill from the proposed surface, if i can fix the first row of this script such that dynamo can form for me the surface from those circular polylines, and also if the Z elevations from the points forming the circular polylines can be captured by dynamo, that would be great, will highly appreciate any suggestion, dwg having the layers , dynamo script to do cut and fill vols
The problem is that the circular polylines are converted into arc geometry in Dynamo. Converting arc geometry to points will only give you the start and end points of the arc.
Circular polyline → 2 arc curves with start and end points
You can separate the polycurves into the curve components using Polycurve.Curves to see that they are arcs. You can create supplemental points on the curves using Curve.PointAtParameter that adds points from the start (0) to the end (1). In this example, I used Range to create 10 points along the curves at equal intervals. You can increase the number of points by reducing the step value.
Circular polyline → 2 arc curves → create additional points on curves
I also noticed that many of your geometries have no elevation (Z = 0 m).
Geometries with 0 m elevation (below)
This is an example of how you could identify geometries with 0 m elevation and duplicate them to a temporary layer in the DWG for reference.
Reference layer of geometries with 0m elevation
C3D_SurfaceFromPolylines_PointsOnArcs.dyn (273.3 KB)
I really appreciate for the help in resolving the points issue related to the circular polylines, im almost getting to where I need, Ive now created the dynamo the dynamo script with 4 rows, each row is like a surface creation from groups of polylines in their layers, with the distance in the geometry.translate node also defined separately for each surface created, so these are 4 surfaces and they represent my proposed ground, I have EG which represent the original ground, ive added some nodes from camber package to report the cut and fill from two tin surfaces, what i dont know how to do in dynamo from here is to have these 4 surfaces forming proposed ground pasted together to form one surface that i can use as the second tin surface, ive added included the dynamo script plus the dwg, I also added Z elevation values to all the required polylines, will appreciate if you can help with some nodes that can help me paste these 4 surfaces into one so i can see the cut and fill data within dynamo, Thanks, dynamo script to do cut and fill vols, dwg having the layers and surfaces
any idea, thoughts please?, will appreciate any help









