debug blocFissure: problem GetInPlace

This commit is contained in:
Paul RASCLE 2016-12-06 14:50:48 +01:00
parent 596f40f598
commit 54a5b4f97e

View File

@ -96,8 +96,26 @@ def identifieEdgesPeau(edgesFissExtPipe,verticesPipePeau, facePeau, facesPeauSor
geompy.UnionList(groupEdgesBordPeau, edgesBords) geompy.UnionList(groupEdgesBordPeau, edgesBords)
bordsVifs = None bordsVifs = None
if aretesVivesC is not None: if aretesVivesC is not None:
logging.debug("identification des bords vifs par GetInPlace (old)") logging.debug("identification des bords vifs par GetInPlace")
bordsVifs = geompy.GetInPlace(facePeau, aretesVivesC) bordsVifs = geompy.GetInPlace(facePeau, aretesVivesC)
if bordsVifs is None:
logging.debug("pas d'identification des bords vifs par GetInPlace: test par distance")
edvifs = []
arvives = geompy.ExtractShapes(aretesVivesC, geompy.ShapeType["EDGE"], False)
edgs = geompy.ExtractShapes(facePeau, geompy.ShapeType["EDGE"], False)
for ed in edgs:
vxs = geompy.ExtractShapes(ed, geompy.ShapeType["VERTEX"], False)
for ar in arvives:
d = geompy.MinDistance(vxs[0], ar)
d += geompy.MinDistance(vxs[1], ar)
logging.debug("test distance bord face peau - arete vive: %s",d)
if d < 0.001:
edvifs.append(ed)
break
if len(edvifs) >0:
bordsVifs = geompy.CreateGroup(facePeau,geompy.ShapeType["EDGE"])
for ed in edvifs:
geompy.AddObject(bordsVifs, geompy.GetSubShapeID(facePeau, ed))
if bordsVifs is not None: if bordsVifs is not None:
geomPublishInFather(initLog.debug, facePeau, bordsVifs, "bordsVifs") geomPublishInFather(initLog.debug, facePeau, bordsVifs, "bordsVifs")
groupEdgesBordPeau = geompy.CutGroups(groupEdgesBordPeau, bordsVifs) groupEdgesBordPeau = geompy.CutGroups(groupEdgesBordPeau, bordsVifs)