Need 50 polylines converted to surface

I have about 50 polylines image i need to convert to a surface. I have tried the following from Polyline3D to Surface
image

Finally i tried

which says it runs but i see no surface in my civil 3d (Not sure if i should create a new topic for this because it is still apart of this same large project)

From the image above it looks like you are wanting to create a TIN surface from contour lines, is that correct?

correct

Thought it is just possible to create a Civil Surface from CogoPoints within a PointGroup? Can someone correct me , if a am wrong.
See attached an example where 1) Points along the lines are created 2) points are pushed into apoint group and 3) terrain is built from the PointGroup.

Surface from Linework.dyn (186.6 KB)

You could also add them as breaklines. The node at the end is from the Civil 3D Toolkit.

@FC_GN8 I believe you are on the right track suggesting to create surface from cogopoints. I tried your dyn file its not working for me. My current layer is 0, my 50 polylines are on layer 1 so i changed your breakline layer to 1 and it ran and ran and ran with no end. Attached is my cad file for your reference called TEST_DYNAMO.dwg.

My thoughts were to approach it by converting my polylines to points by exploding them, but i am getting error unable to create line. I referenced other forum posts suggesting to up the scaling, which was the first error i got. Another article suggested the problem is now my polylines are to far away from origin, therefore causing the scaling issue, and the resolution would be to shift points to origin


unfortunately i cant turn the polyline into points to shift because of this error
below is my code (before trying to change origin)

any tips would be appreciated


selects all on layer 1 which are all the polylines, convert poly line to polycurve and then surface.byloft the curve
getting this error:
image

@tpitera check if under PolylineExtensions.GetGeometry you have some null values, in case remove it using List.Clean(false).

@Paolo_Emilio_Serra1 thanks for that, but still getting this error

Also do you have any suggestions on approaching above?
assuming i could get bottom left and right of the bounding box (which is not working properly)
im putting list into groups of two, left point and right point of my box
im then doing code block
//i = count - 1;
//j = 0…i;
points[0][0];
points[1][0];
points[0][1];
points[1][1];
in which i am doing if y = y and x[1,0]-x[0,0] =(x[0,1] - x[0,0]) + (x[1,0] - x[0,1])
and connecting the and value into an if statement but dont know how to proceed from theremytestscript.dyn (91.7 KB)

Hi @tpitera,

Did you try this approach? It’s only a few nodes and should produce much more consistent results. I highly recommend trying this because creating a surface by lofting between the curves is a computationally heavy task.

I did try this per your suggestion, it did add the breaklines to the surface, but the surface did not change, thats why im trying to add polylines as contours like i would in civil 3d or do a surface by points, still working on figuring out how to change polyline to point, but someone else suggested it would add to the processing time

What are you referring to by “did not change”?

Ok sorry to put you under the spotlight, but this is a good opportunity to learn something important in Dynamo.
There are a number of errors, the logic here is completely wrong: you are calling the TinSurface node with a Cogo Point group name “_All Points” that is different from the actual Cogo Point Group name “EG”. Pay more attention next time or you risk to continue to have a very weak grasp of what is going on, it will save you a lot of headaches.

The second error is more subtle and critical: you have parallel branches in your graph but one depends on the other (first you need to create the Cogo Point Group and after the TinSurface). In this way you are not controlling the flow of execution (e.g. there is no guarantee that the node you created first in the graph will execute first, etc.).
You need to use a “Pass Through” to wait for the completion of a node (Cogo Point Group) before you can actually move to the next task (Tinsurface).

This is theoretically doing what you need (theoretically because it is just very large to process).

@Paolo_Emilio_Serra1 thanks for that feedback. i got that from a video and currently not in my code but i was referring to it because I thought it may provide a good method for solving this issue, if i could figure out the whole convert polyline to point group

the break lines do not have all of the polylines as shown from screenshot below. as well in the surface i need contours because of the elevation data. if this is the same thing than i may be a bit confused
image

@tpitera just use the Breaklines as suggested previously, this method gives you some issues in the corners but you can fix it afterwards quite easily.

any chance u could provide the dyn code, this one i cant zoom in to copy it like i was doing on the other

Save the image!

thanks i will defintely test it out
can you check my other post and see if you have any thoughts on that one?