Hello everyone
I am new to dynamo, I wonder if there is a way to add tin Surface boundaries, to an existing surface.
This is how it looks like and how i need it from dynamo skript:
Thanks in advance
Hello everyone
I am new to dynamo, I wonder if there is a way to add tin Surface boundaries, to an existing surface.
This is how it looks like and how i need it from dynamo skript:
Thanks in advance
See this
Hi hosneyalaa
Thank you for your answer, but this is not, what i am looking for.
I need a use case, where my input is existing surface and 2D-polylines.
With dynamo i need to cut out the holes in surface.
So my first step was to add 2D-polylines as breaklines (it works), and next step should be add boundaries (boundary type: hide), but i can’t find node, where it would be possible.
@anton.opanasenko
Because I’m on vacation I can’t help you well but you need Make a new python script
And add borders through the link
It looks like, it should be the right way, but to be honest, i never did anything in python.
Here’s a Python script for you to try. I did it quickly and did not do extensive testing, so use at your own risk.
IN[0] = surface
IN[1] = boundary elements (e.g. Polylines)
IN[2] = mid-ordinate distance for curves
IN[3] = boundary type as a string, can be “Show”, “Hide”, “Outer”, or “DataClip”
IN[4] = boolean for whether to use non-destructive breaklines or not
import System
import clr
clr.AddReference('AcMgd')
clr.AddReference('AcDbMgd')
clr.AddReference('AeccDbMgd')
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *
from Autodesk.Civil import *
adoc = Application.DocumentManager.MdiActiveDocument
def AddSurfaceBoundaries(surface, boundaries, midOrdinateDistance, boundaryType, useNonDestructiveBreakline):
global adoc
if not isinstance(boundaries, list):
boundaries = [boundaries]
with adoc.LockDocument():
with adoc.Database as db:
with db.TransactionManager.StartTransaction() as t:
surfId = surface.InternalObjectId
surf = surfId.GetObject(OpenMode.ForWrite)
surfBoundaries = surf.BoundariesDefinition
# Create collection of boundary entity IDs
boundaryEntities = ObjectIdCollection()
for object in boundaries:
boundaryEntities.Add(object.InternalObjectId)
# Parse enumeration
boundaryType = System.Enum.Parse(SurfaceBoundaryType, boundaryType)
# Add boundary entities to surface boundary collection
surfBoundaries.AddBoundaries(boundaryEntities, midOrdinateDistance, boundaryType, useNonDestructiveBreakline)
surf.Rebuild()
t.Commit()
pass
return surface
OUT = AddSurfaceBoundaries(IN[0], IN[1], IN[2], IN[3], IN[4])
@zachri.jensen thanks
this option is very useful to me I am new to python & dynamo so kindly help me with How to load this python script.
I have pasted it directly in python script it is not working in my dynamo for civil3d
hi
The problem is in the word I put “Outer”
Could you please upload exp drawing file
no (3)
yes it is working changed 2 to 3 thank you
is there option for volume surface and quantity in dynamo for civil3d