Geometry Intersect list with only points

I am trying to change nodes by code, but I had some problems, hope you can help me.

I have a list with surfaces that I am using as intersection axes and on the other hand I have perimeter curves of surfaces, what I am looking for is to find the intersection points between these.

The problem I have is that the result of the intersection gives me points and lines, for subsequent operations I only care about the points, so I would like your support to understand how I can filter my list so that it only gives me the points and omit the lines.

It would be of great help if you could give me your support, thank you very much in advance.

#Obtain the Exterior Columns
Ptse= []
for curve in BaseCurve:
	for grid in GridL:		
		Ptsg= Geometry.Intersect(curve, grid)
		Ptse.append(Ptsg)
		
PtseF = List.Flatten(Ptse)
ptseR = List.RestOfItems(PtseF)

You could check if the object type == line and then filter by boolmask

1 Like

Could you write the code of this conditional I was trying with type and with object,type and It does not work.

Ptse= []
for curve in BaseCurve:
	for grid in GridL:		
		Ptsg= Geometry.Intersect(curve, grid)
		Tptsg = Object.Type(Ptsg)
#		if Tptsg  == "Autodesk.DesignScript.Geometry.Point":
		Ptse.append(Tptsg)

Hi @Luiscko,

My approach was through DesignScript (in a code block)
I don’t know how to solve this in Python (sorry :frowning: )

1 Like