Retriangulate TIN Surface - Add Surface TIN Lines from selected CogoPoints

Dear all,

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.

I added an image to make it more comprehensible.

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.

Unfortunately once the list is created and sorted, I can’t find any node in the library to edit a surface and add lines between introduced points.

Any idea of how to approach it?

Much appreciated,

Hi , as an idea
Can you make surfaces from groups? then add it to the base surface from copy surface

Hi there!

The problem with this metod would be that lines would not be created in an specific way.

LOOK AT THIS

Hi again @hosneyalaa !

I had a look at the post (which I found very interesting btw) but I could not think of a way to link it with the retriangulation script.

Do you mean that the solution may be to create a python script?

I will be on sites visits for the a few days, apologies if I take some time to reply.

Much appreciated

I can’t help you well You did not share a dynamo file or an AutoCAD drawing, for example
In any case Can you add a rectangle SurfaceBreakline

Hi @hosneyalaa !

I am back from site surveys, sorry for the delay.

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.

I hope its more comprehensible.

Much appreciated,
2022_09_29_DYN_TRIANG.dwg (899.8 KB)
00_MT_TIN_ADDLINE_v1.dyn (29.5 KB)

HI
According to my understanding
Drawing lines on the surface is according to height, not according to location

If you want to connect the POINTS by location
Arrange the points without height and connect them WITHOUT USING surface

LOOK AT THIS

1 Like

There isn’t one that I know of, so you will need to utilize the API for this.

1 Like

Thanks for your reply @zachri.jensen

If I understood correctly, the idea would be to:

    1. Create a sorted list of points by coordinates.
    1. Get the vertex of the TIN Surface at this coordinates.
    1. 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?

Much appreciated

I would use the FindVertexAtXY() method.

https://help.autodesk.com/view/CIV3D/2023/ENU/?guid=33cc949e-8066-9565-a553-73086bac553c

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]

I think I have to define two variables to use the function:

  • px = First value of my sorted list.
  • py = Second value of my sorted list.

And then use the function:
TINSurface FindVertexAtXY(px,py)
OUT = FindVertexAtXY(px,py)

My first issue is how to get the values of an existing sorted list in Python.
And my second issue is how to call to the function.

Can you give me a hand on how to proceed?

Much appreciated.