Add breaklines to TIN surface

Hi,
I’d like to create a TIN surface out of 2 set of 2D polylines and 1 set of feature lines. My main problem was that I couldn’t create the feature lines with the help of Dynamo nodes so I made them with a Python script. Out of the script I could only get either Autodes.Civil.Databaseservices.FeatureLine objects in a list or an ObjectIdCollection but none of them was suiteble for generating a surface.
So what type of object should I take out from the Python script?

excavation.dwg (3.2 MB)
excavation_pit_modeller.dyn (2.2 MB)

Just wanted to highlight here that there is a FeatureLine.ByPoints node available in Civil 3D 2026. Perhaps it would work for you? More info here:

1 Like

There are lots of dependencies in your graph, so 2026 might not work (especially because of the C3D Toolkit)
Why do you need feature line? Do you want to edit it later? 3D poly is not sufficient?
Also you can add the pointcollection directly. Something like this:

Well, with multiple breaklines it may require another loop.

 # Place your code below
                        plineid = pline.InternalObjectId
                        plineobj = t.GetObject(plineid, OpenMode.ForWrite)
                        
                        point_collection = Point3dCollection()
                        # Loop through vertices and add to collection
                        for vertex_id in plineobj:
                            vertex = t.GetObject(vertex_id, OpenMode.ForWrite)
                            point_collection.Add(vertex.Position)
                        
                        
                        # Create TIN Surface
                        #surfaceId = TinSurface.Create(db, "temp")
                        surface = t.GetObject(surfaceId, OpenMode.ForWrite)
                        
                        # Add breakline
                        surface.BreaklinesDefinition.AddStandardBreaklines(point_collection, 1.0, 1.0, 1.0, 0.0)
1 Like

Thanks for the information but right now C3D 2026 is not an option form me, I’m using 2024.

1 Like

Thanks yor the idea!

I don’t care what is the type of the object, I just need the intersection line of 2 surfaces. That seemed to be the easiest method for me.

I’ll try to use your solution. I will refer about the results.