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?
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)