I am trying to develop a Dynamo script to automatically retriangulate a TIN surface between some added COGO-POINTS in an specific order. In other words, in an existing TIN SURFACE, where some COGO POINTS were added, using the AddSurfaceLine command between them in a logical way.
In a first moment, this could lead to a chaotic triangulation if the points were not sorted before introduced to the triangulation process.
In my case I am trying to add north-south lines between points which have the same X coordinate (easting). That’s why my first step was to develop an script to create a List of the cogo points involved in the process and sort them by their coordinates X (easting) - image attached. Each pair of points included in the list [0,1], [2,3], [4,5],… would be in this example the end points of the new lines.
This part of the script can be find in the next image.
Attached you can find an example of what I am trying to do:
01_EXISTING_SURFACE: The TIN surface is defined by an existing group of points 01_SUP_DYN.
An additional and independent group of points is added to the surface 02_MT_DYN.
As you can see in a first instance, the TIN surface triangulates the closests points automatically.
My goal is too create an script to triangulate the group of points 02_MT_DYN in the surface between them in a certain logic.
With which logic? Creating E-W or N-S axis. In this case N-S (blue lines).
For this purpose, I created an script to create a list of points from the COGO Points Group (02_MT_DYN) and sorting them by coordinate X (in order to have the N-S axis).
The problem I am facing now is that I can’t find any node in the library to edit the surface and triangulate them.
Get the vertex of the TIN Surface at this coordinates.
Create the API you linked in order to make a void and triangulate between those vertex.
Is it so?
The API you pointed:
public SurfaceOperationAddLine AddLine(
TinSurfaceVertex vertex1,
TinSurfaceVertex vertex2
)
Requires getting the vertex of the surface. In Dynamo, the node Vertex.Pointgeometry indicates the point at a vertex location. However in this case, I believe we require the opposite process: getting the vertex from a TIN Surface at a point location.
Any idea of how could I get the vertex from the surface at the coordinates I got from the listed sorted points?
Good morning Mr Jensen.
I am going for the first step which would be finding the Vertex.
I’ve been researching on some web tutorials:
From my understanding, we are going for a method, so my expression should be conform to this:
Method (modify a thing) → Object.Function() → TinSurfaceVertex FindVertexAtXY(X,Y)
For this, I should define two INPUTS, my surface and my sorted list from where i should extract the X,Y.
The inputs to this node will be stored as a list in the IN variables.
SortedList = IN [0]
TINSurface = IN [1]