Hi!
I have been trying to find a way to confirm one surface is included in other surface.
Can anyone help me to solve the problem.
Thank you in advance!!!
Following is the code:
import rhinoscriptsyntax as rs
arrWindows = rs.ObjectsByLayer("Windows")
surface = rs.ObjectsByLayer("wall")
def sel_window(surface,arrWindows):
for window in arrWindows:
arrCurves=extractCurves(window)
allptonsurface=True
arrPoints=[]
for curve in arrCurves:
arrPoint = rs.CurveStartPoint(curve)
if rs.IsPointInSurface(surface,arrPoint,True,0.1):
arrPoints.append(arrPoint)
else:
allptonsurface=False
break
if allptonsurface==True:
return window
def extractCurves(obj):
arrBorders = rs.DuplicateSurfaceBorder(obj)
arrCurves = rs.ExplodeCurves(arrBorders)
rs.DeleteObjects(arrBorders)
return arrCurves
sel_window(surface,arrWindows)