mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Nommage - suite
This commit is contained in:
parent
c018079f7f
commit
93f22a734d
@ -27,7 +27,8 @@ from .geomsmesh import geompy
|
|||||||
from .geomsmesh import geomPublish
|
from .geomsmesh import geomPublish
|
||||||
from .geomsmesh import geomPublishInFather
|
from .geomsmesh import geomPublishInFather
|
||||||
|
|
||||||
def identifieFacesEdgesFissureExterne(fsFissuExt, edFisExtPe, edFisExtPi, edgesPipeFiss):
|
def identifieFacesEdgesFissureExterne(fsFissuExt, edFisExtPe, edFisExtPi, edgesPipeFiss, \
|
||||||
|
nro_cas=None):
|
||||||
"""Identification des faces et edges de fissure externe pour maillage"""
|
"""Identification des faces et edges de fissure externe pour maillage"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
|
||||||
@ -75,9 +76,10 @@ def identifieFacesEdgesFissureExterne(fsFissuExt, edFisExtPe, edFisExtPi, edgesP
|
|||||||
edgesPeauFissureExterneC = geompy.MakeCompound(edgesFissExtPeau)
|
edgesPeauFissureExterneC = geompy.MakeCompound(edgesFissExtPeau)
|
||||||
edgesPipeFissureExterneC = geompy.MakeCompound(edgesFissExtPipe)
|
edgesPipeFissureExterneC = geompy.MakeCompound(edgesFissExtPipe)
|
||||||
|
|
||||||
|
geomPublish(initLog.always, faceFissureExterne, "faceFissureExterne", nro_cas)
|
||||||
|
geomPublishInFather(initLog.always, faceFissureExterne, edgesPeauFissureExterneC, "edgesPeauFissureExterne", nro_cas)
|
||||||
|
geomPublishInFather(initLog.always, faceFissureExterne, edgesPipeFissureExterneC, "edgesPipeFissureExterne", nro_cas)
|
||||||
|
|
||||||
wirePipeFissureExterne = geompy.MakeWire(geompy.ExtractShapes(edgesPipeFissureExterneC, geompy.ShapeType["EDGE"], False))
|
wirePipeFissureExterne = geompy.MakeWire(geompy.ExtractShapes(edgesPipeFissureExterneC, geompy.ShapeType["EDGE"], False))
|
||||||
geomPublish(initLog.debug, faceFissureExterne, "faceFissureExterne")
|
|
||||||
geomPublishInFather(initLog.debug, faceFissureExterne, edgesPeauFissureExterneC, "edgesPeauFissureExterne")
|
|
||||||
geomPublishInFather(initLog.debug, faceFissureExterne, edgesPipeFissureExterneC, "edgesPipeFissureExterne")
|
|
||||||
|
|
||||||
return (faceFissureExterne, edgesPipeFissureExterneC, wirePipeFissureExterne, edgesPeauFissureExterneC)
|
return (faceFissureExterne, edgesPipeFissureExterneC, wirePipeFissureExterne, edgesPeauFissureExterneC)
|
||||||
|
@ -103,7 +103,7 @@ def insereFissureLongue(geometriesSaines, \
|
|||||||
insereFissureLongue_a (facePorteFissure, WirePorteFondFissure, \
|
insereFissureLongue_a (facePorteFissure, WirePorteFondFissure, \
|
||||||
fillingFaceExterne, \
|
fillingFaceExterne, \
|
||||||
pipefiss, rayonPipe, \
|
pipefiss, rayonPipe, \
|
||||||
mailleur )
|
mailleur, nro_cas )
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# --- pipe de fond de fissure
|
# --- pipe de fond de fissure
|
||||||
pipeFondFiss, disques, rayons, \
|
pipeFondFiss, disques, rayons, \
|
||||||
|
@ -40,7 +40,7 @@ from .substractSubShapes import substractSubShapes
|
|||||||
def insereFissureLongue_a(facePorteFissure, WirePorteFondFissure, \
|
def insereFissureLongue_a(facePorteFissure, WirePorteFondFissure, \
|
||||||
fillingFaceExterne, \
|
fillingFaceExterne, \
|
||||||
pipefiss, rayonPipe, \
|
pipefiss, rayonPipe, \
|
||||||
mailleur="MeshGems"):
|
mailleur="MeshGems", nro_cas=None):
|
||||||
"""procedure complete fissure longue"""
|
"""procedure complete fissure longue"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
logging.info("Usage du mailleur %s", mailleur)
|
logging.info("Usage du mailleur %s", mailleur)
|
||||||
@ -51,7 +51,7 @@ def insereFissureLongue_a(facePorteFissure, WirePorteFondFissure, \
|
|||||||
|
|
||||||
# --- partition peau defaut - face de fissure prolongee - wire de fond de fissure prolongée
|
# --- partition peau defaut - face de fissure prolongee - wire de fond de fissure prolongée
|
||||||
partitionPeauFissFond = geompy.MakePartition([facePorteFissure, WirePorteFondFissure, fillingFaceExterne], list(), list(), list(), geompy.ShapeType["FACE"], 0, list(), 0)
|
partitionPeauFissFond = geompy.MakePartition([facePorteFissure, WirePorteFondFissure, fillingFaceExterne], list(), list(), list(), geompy.ShapeType["FACE"], 0, list(), 0)
|
||||||
geomPublish(initLog.debug, partitionPeauFissFond, 'partitionPeauFissFond' )
|
geomPublish(initLog.debug, partitionPeauFissFond, 'partitionPeauFissFond', nro_cas )
|
||||||
|
|
||||||
edges = geompy.ExtractShapes(WirePorteFondFissure, geompy.ShapeType["EDGE"], False)
|
edges = geompy.ExtractShapes(WirePorteFondFissure, geompy.ShapeType["EDGE"], False)
|
||||||
|
|
||||||
@ -64,49 +64,49 @@ def insereFissureLongue_a(facePorteFissure, WirePorteFondFissure, \
|
|||||||
lgmax = longueur
|
lgmax = longueur
|
||||||
imax = i_aux
|
imax = i_aux
|
||||||
edgemax = edges[imax]
|
edgemax = edges[imax]
|
||||||
geomPublish(initLog.debug, edgemax, 'edgemax')
|
geomPublish(initLog.debug, edgemax, 'edgemax', nro_cas)
|
||||||
centreFondFiss = geompy.MakeVertexOnCurve(edgemax, 0.5)
|
centreFondFiss = geompy.MakeVertexOnCurve(edgemax, 0.5)
|
||||||
geomPublish(initLog.debug, centreFondFiss, 'centreFondFiss')
|
geomPublish(initLog.debug, centreFondFiss, 'centreFondFiss', nro_cas)
|
||||||
tangentFondFiss = geompy.MakeTangentOnCurve(edgemax, 0.5)
|
tangentFondFiss = geompy.MakeTangentOnCurve(edgemax, 0.5)
|
||||||
geomPublish(initLog.debug, tangentFondFiss, 'tangentFondFiss')
|
geomPublish(initLog.debug, tangentFondFiss, 'tangentFondFiss', nro_cas)
|
||||||
|
|
||||||
bord1FondFiss = geompy.MakeVertexOnCurve(edgemax, 0.0)
|
bord1FondFiss = geompy.MakeVertexOnCurve(edgemax, 0.0)
|
||||||
geomPublish(initLog.debug, bord1FondFiss, 'bord1FondFiss')
|
geomPublish(initLog.debug, bord1FondFiss, 'bord1FondFiss', nro_cas)
|
||||||
tangentBord1FondFiss = geompy.MakeTangentOnCurve(edgemax, 0.0)
|
tangentBord1FondFiss = geompy.MakeTangentOnCurve(edgemax, 0.0)
|
||||||
geomPublish(initLog.debug, tangentBord1FondFiss, 'tangentBord1FondFiss')
|
geomPublish(initLog.debug, tangentBord1FondFiss, 'tangentBord1FondFiss', nro_cas)
|
||||||
|
|
||||||
bord2FondFiss = geompy.MakeVertexOnCurve(edgemax, 1.0)
|
bord2FondFiss = geompy.MakeVertexOnCurve(edgemax, 1.0)
|
||||||
geomPublish(initLog.debug, bord2FondFiss, 'bord2FondFiss')
|
geomPublish(initLog.debug, bord2FondFiss, 'bord2FondFiss', nro_cas)
|
||||||
tangentBord2FondFiss = geompy.MakeTangentOnCurve(edgemax, 1.0)
|
tangentBord2FondFiss = geompy.MakeTangentOnCurve(edgemax, 1.0)
|
||||||
geomPublish(initLog.debug, tangentBord2FondFiss, 'tangentBord2FondFiss')
|
geomPublish(initLog.debug, tangentBord2FondFiss, 'tangentBord2FondFiss', nro_cas)
|
||||||
|
|
||||||
planBord1 = geompy.MakePlane(bord1FondFiss, tangentBord1FondFiss, 3*rayonPipe)
|
planBord1 = geompy.MakePlane(bord1FondFiss, tangentBord1FondFiss, 3*rayonPipe)
|
||||||
planBord2 = geompy.MakePlane(bord2FondFiss, tangentBord2FondFiss, 3*rayonPipe)
|
planBord2 = geompy.MakePlane(bord2FondFiss, tangentBord2FondFiss, 3*rayonPipe)
|
||||||
geomPublish(initLog.debug, planBord1, 'planBord1')
|
geomPublish(initLog.debug, planBord1, 'planBord1', nro_cas)
|
||||||
geomPublish(initLog.debug, planBord2, 'planBord2')
|
geomPublish(initLog.debug, planBord2, 'planBord2', nro_cas)
|
||||||
|
|
||||||
[edgesInside, _, _] = extractionOrientee(fillingFaceExterne, partitionPeauFissFond, centreFondFiss, "EDGE", 1.e-3)
|
[edgesInside, _, _] = extractionOrientee(fillingFaceExterne, partitionPeauFissFond, centreFondFiss, "EDGE", 1.e-3)
|
||||||
[facesInside, _, facesOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissFond, centreFondFiss, "FACE", 1.e-3)
|
[facesInside, _, facesOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissFond, centreFondFiss, "FACE", 1.e-3)
|
||||||
|
|
||||||
# --- partition peau -face fissure - pipe fond de fissure prolongé
|
# --- partition peau -face fissure - pipe fond de fissure prolongé
|
||||||
partitionPeauFissByPipe = geompy.MakePartition([facesInside[0], facesOnside[0]], [pipefiss], list(), list(), geompy.ShapeType["FACE"], 0, list(), 0)
|
partitionPeauFissByPipe = geompy.MakePartition([facesInside[0], facesOnside[0]], [pipefiss], list(), list(), geompy.ShapeType["FACE"], 0, list(), 0)
|
||||||
geomPublish(initLog.debug, partitionPeauFissByPipe, 'partitionPeauFissByPipe' )
|
geomPublish(initLog.debug, partitionPeauFissByPipe, 'partitionPeauFissByPipe', nro_cas )
|
||||||
|
|
||||||
# --- identification face de peau
|
# --- identification face de peau
|
||||||
[facesPeauFissInside, _, facesPeauFissOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissByPipe, centreFondFiss, "FACE", 0.1, "peauFiss_bord_")
|
[facesPeauFissInside, _, facesPeauFissOnside] = extractionOrientee(fillingFaceExterne, partitionPeauFissByPipe, centreFondFiss, "FACE", 0.1, "peauFiss_bord_")
|
||||||
facesPeauSorted, _, _ = sortFaces(facesPeauFissOnside) # 4 demi disques, une grande face
|
facesPeauSorted, _, _ = sortFaces(facesPeauFissOnside) # 4 demi disques, une grande face
|
||||||
facePeau = facesPeauSorted[-1] # la plus grande face
|
facePeau = facesPeauSorted[-1] # la plus grande face
|
||||||
geomPublishInFather(initLog.debug,partitionPeauFissByPipe, facePeau, "facePeau")
|
geomPublishInFather(initLog.debug,partitionPeauFissByPipe, facePeau, "facePeau", nro_cas)
|
||||||
|
|
||||||
# --- identification edges de bord face peau
|
# --- identification edges de bord face peau
|
||||||
edgesFilling = geompy.ExtractShapes(fillingFaceExterne, geompy.ShapeType["EDGE"], False)
|
edgesFilling = geompy.ExtractShapes(fillingFaceExterne, geompy.ShapeType["EDGE"], False)
|
||||||
edgesBords = list()
|
edgesBords = list()
|
||||||
for i, edge in enumerate(edgesFilling):
|
for edge in edgesFilling:
|
||||||
edgepeau = geompy.GetInPlace(facePeau, edge)
|
edgepeau = geompy.GetInPlace(facePeau, edge)
|
||||||
edgesBords.append(edgepeau)
|
edgesBords.append(edgepeau)
|
||||||
groupEdgesBordPeau = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
|
groupEdgesBordPeau = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionList(groupEdgesBordPeau, edgesBords)
|
geompy.UnionList(groupEdgesBordPeau, edgesBords)
|
||||||
geomPublishInFather(initLog.debug,facePeau, groupEdgesBordPeau , "EdgesBords")
|
geomPublishInFather(initLog.debug,facePeau, groupEdgesBordPeau , "EdgesBords", nro_cas)
|
||||||
|
|
||||||
# --- identification face fissure externe au pipe et edge commune peau fissure
|
# --- identification face fissure externe au pipe et edge commune peau fissure
|
||||||
for face in facesPeauFissInside:
|
for face in facesPeauFissInside:
|
||||||
@ -115,9 +115,9 @@ def insereFissureLongue_a(facePorteFissure, WirePorteFondFissure, \
|
|||||||
if sharedEdges is not None:
|
if sharedEdges is not None:
|
||||||
faceFiss = face
|
faceFiss = face
|
||||||
edgePeauFiss = sharedEdges[0]
|
edgePeauFiss = sharedEdges[0]
|
||||||
geomPublishInFather(initLog.debug,partitionPeauFissByPipe, faceFiss, "faceFiss")
|
geomPublishInFather(initLog.debug,partitionPeauFissByPipe, faceFiss, "faceFiss", nro_cas)
|
||||||
geomPublishInFather(initLog.debug,faceFiss, edgePeauFiss, "edgePeauFiss")
|
geomPublishInFather(initLog.debug,faceFiss, edgePeauFiss, "edgePeauFiss", nro_cas)
|
||||||
geomPublishInFather(initLog.debug,facePeau, edgePeauFiss, "edgePeauFiss")
|
geomPublishInFather(initLog.debug,facePeau, edgePeauFiss, "edgePeauFiss", nro_cas)
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
@ -130,16 +130,16 @@ def insereFissureLongue_a(facePorteFissure, WirePorteFondFissure, \
|
|||||||
verticesDemiCerclesPeau = list()
|
verticesDemiCerclesPeau = list()
|
||||||
for i_aux, edge in enumerate(demiCerclesPeau):
|
for i_aux, edge in enumerate(demiCerclesPeau):
|
||||||
name = "demiCerclePeau_{}".format(i_aux)
|
name = "demiCerclePeau_{}".format(i_aux)
|
||||||
geomPublishInFather(initLog.debug,facePeau, edge, name)
|
geomPublishInFather(initLog.debug,facePeau, edge, name, nro_cas)
|
||||||
verticesDemiCerclesPeau += geompy.ExtractShapes(edge, geompy.ShapeType["VERTEX"], False)
|
verticesDemiCerclesPeau += geompy.ExtractShapes(edge, geompy.ShapeType["VERTEX"], False)
|
||||||
verticesDemiCerclesPeau = eliminateDoubles(facePeau, verticesDemiCerclesPeau)
|
verticesDemiCerclesPeau = eliminateDoubles(facePeau, verticesDemiCerclesPeau)
|
||||||
for i_aux, vertex in enumerate(verticesDemiCerclesPeau):
|
for i_aux, vertex in enumerate(verticesDemiCerclesPeau):
|
||||||
name = "verticesDemiCerclesPeau_{}".format(i_aux)
|
name = "verticesDemiCerclesPeau_{}".format(i_aux)
|
||||||
geomPublishInFather(initLog.debug,facePeau, vertex, name)
|
geomPublishInFather(initLog.debug,facePeau, vertex, name, nro_cas)
|
||||||
verticesOutCercles = substractSubShapes(facePeau, verticesDemiCerclesPeau, verticesEdgePeauFiss)
|
verticesOutCercles = substractSubShapes(facePeau, verticesDemiCerclesPeau, verticesEdgePeauFiss)
|
||||||
for i_aux, vertex in enumerate(verticesOutCercles):
|
for i_aux, vertex in enumerate(verticesOutCercles):
|
||||||
name = "verticesOutCercles_{}".format(i_aux)
|
name = "verticesOutCercles_{}".format(i_aux)
|
||||||
geomPublishInFather(initLog.debug,facePeau, vertex, name)
|
geomPublishInFather(initLog.debug,facePeau, vertex, name, nro_cas)
|
||||||
|
|
||||||
# --- demi cercles regroupés
|
# --- demi cercles regroupés
|
||||||
groupsDemiCerclesPeau = list()
|
groupsDemiCerclesPeau = list()
|
||||||
@ -151,7 +151,7 @@ def insereFissureLongue_a(facePorteFissure, WirePorteFondFissure, \
|
|||||||
group = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
|
group = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionList(group, demis)
|
geompy.UnionList(group, demis)
|
||||||
name = "Cercle{}".format(i_aux)
|
name = "Cercle{}".format(i_aux)
|
||||||
geomPublishInFather(initLog.debug,facePeau, group , name)
|
geomPublishInFather(initLog.debug,facePeau, group , name, nro_cas)
|
||||||
groupsDemiCerclesPeau.append(group)
|
groupsDemiCerclesPeau.append(group)
|
||||||
|
|
||||||
# --- identification edges commune pipe face fissure externe au pipe
|
# --- identification edges commune pipe face fissure externe au pipe
|
||||||
@ -162,10 +162,10 @@ def insereFissureLongue_a(facePorteFissure, WirePorteFondFissure, \
|
|||||||
if geompy.GetSubShapeID(partitionPeauFissByPipe, edge) != edgePeauFissId:
|
if geompy.GetSubShapeID(partitionPeauFissByPipe, edge) != edgePeauFissId:
|
||||||
edgesFaceFissPipe.append(edge)
|
edgesFaceFissPipe.append(edge)
|
||||||
name = "edgeFaceFissPipe_%d"%len(edgesFaceFissPipe)
|
name = "edgeFaceFissPipe_%d"%len(edgesFaceFissPipe)
|
||||||
geomPublishInFather(initLog.debug,faceFiss, edge, name)
|
geomPublishInFather(initLog.debug,faceFiss, edge, name, nro_cas)
|
||||||
groupEdgesFaceFissPipe = geompy.CreateGroup(faceFiss, geompy.ShapeType["EDGE"])
|
groupEdgesFaceFissPipe = geompy.CreateGroup(faceFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionList(groupEdgesFaceFissPipe, edgesFaceFissPipe)
|
geompy.UnionList(groupEdgesFaceFissPipe, edgesFaceFissPipe)
|
||||||
geomPublishInFather(initLog.debug,faceFiss, groupEdgesFaceFissPipe, "edgesFaceFissPipe")
|
geomPublishInFather(initLog.debug,faceFiss, groupEdgesFaceFissPipe, "edgesFaceFissPipe", nro_cas)
|
||||||
|
|
||||||
return edgesInside, centreFondFiss, tangentFondFiss, \
|
return edgesInside, centreFondFiss, tangentFondFiss, \
|
||||||
planBord1, planBord2, \
|
planBord1, planBord2, \
|
||||||
|
@ -32,7 +32,8 @@ from .findWireEndVertices import findWireEndVertices
|
|||||||
from .prolongeWire import prolongeWire
|
from .prolongeWire import prolongeWire
|
||||||
from .fissError import fissError
|
from .fissError import fissError
|
||||||
|
|
||||||
def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe):
|
def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe, \
|
||||||
|
nro_cas=None):
|
||||||
"""
|
"""
|
||||||
pipe de fond de fissure, prolongé, partition face fissure par pipe
|
pipe de fond de fissure, prolongé, partition face fissure par pipe
|
||||||
identification des edges communes pipe et face fissure
|
identification des edges communes pipe et face fissure
|
||||||
@ -47,14 +48,14 @@ def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe):
|
|||||||
plan = geompy.MakePlane(centreFondFiss, tgtCentre, 10000)
|
plan = geompy.MakePlane(centreFondFiss, tgtCentre, 10000)
|
||||||
shapeDefaut = geompy.MakePartition([shapeDefaut], [plan], [], [], geompy.ShapeType["FACE"], 0, [], 0)
|
shapeDefaut = geompy.MakePartition([shapeDefaut], [plan], [], [], geompy.ShapeType["FACE"], 0, [], 0)
|
||||||
#fondFissCoupe = geompy.GetInPlaceByHistory(shapeDefaut, fondFiss) #= inutile
|
#fondFissCoupe = geompy.GetInPlaceByHistory(shapeDefaut, fondFiss) #= inutile
|
||||||
geomPublish(initLog.debug, shapeDefaut, 'shapeDefaut_coupe')
|
geomPublish(initLog.debug, shapeDefaut, 'shapeDefaut_coupe', nro_cas)
|
||||||
#geomPublishInFather(initLog.debug,shapeDefaut, fondFissCoupe, 'fondFiss_coupe')
|
#geomPublishInFather(initLog.debug,shapeDefaut, fondFissCoupe, 'fondFiss_coupe', nro_cas)
|
||||||
|
|
||||||
extrem, norms = findWireEndVertices(fondFiss, True)
|
extrem, norms = findWireEndVertices(fondFiss, True)
|
||||||
logging.debug("extrem: %s, norm: %s",extrem, norms)
|
logging.debug("extrem: %s, norm: %s",extrem, norms)
|
||||||
cercle = geompy.MakeCircle(extrem[0], norms[0], rayonPipe)
|
cercle = geompy.MakeCircle(extrem[0], norms[0], rayonPipe)
|
||||||
cercle = geompy.MakeRotation(cercle, norms[0], math.pi/3.0 ) # éviter d'avoir l'arête de couture du pipe presque confondue avec la face fissure
|
cercle = geompy.MakeRotation(cercle, norms[0], math.pi/3.0 ) # éviter d'avoir l'arête de couture du pipe presque confondue avec la face fissure
|
||||||
geomPublish(initLog.debug, cercle, 'cercle')
|
geomPublish(initLog.debug, cercle, 'cercle', nro_cas)
|
||||||
fondFissProlonge = prolongeWire(fondFiss, extrem, norms, 2*rayonPipe)
|
fondFissProlonge = prolongeWire(fondFiss, extrem, norms, 2*rayonPipe)
|
||||||
try:
|
try:
|
||||||
pipeFiss = geompy.MakePipe(cercle, fondFissProlonge)
|
pipeFiss = geompy.MakePipe(cercle, fondFissProlonge)
|
||||||
@ -62,24 +63,24 @@ def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe):
|
|||||||
texte = "génération du pipe le long de la ligne de fond de fissure prolongée impossible. "
|
texte = "génération du pipe le long de la ligne de fond de fissure prolongée impossible. "
|
||||||
texte += "Cause possible : la ligne s'autointersecte lorsqu'on la prolonge."
|
texte += "Cause possible : la ligne s'autointersecte lorsqu'on la prolonge."
|
||||||
raise fissError(traceback.extract_stack(),texte)
|
raise fissError(traceback.extract_stack(),texte)
|
||||||
geomPublish(initLog.debug, pipeFiss, 'pipeFiss')
|
geomPublish(initLog.debug, pipeFiss, 'pipeFiss', nro_cas)
|
||||||
partFissPipe = geompy.MakePartition([shapeDefaut, pipeFiss], [], [], [], geompy.ShapeType["FACE"], 0, [], 1)
|
partFissPipe = geompy.MakePartition([shapeDefaut, pipeFiss], [], [], [], geompy.ShapeType["FACE"], 0, [], 1)
|
||||||
geomPublish(initLog.debug, partFissPipe, 'partFissPipe')
|
geomPublish(initLog.debug, partFissPipe, 'partFissPipe', nro_cas)
|
||||||
fissPipe = geompy.GetInPlaceByHistory(partFissPipe, shapeDefaut)
|
fissPipe = geompy.GetInPlaceByHistory(partFissPipe, shapeDefaut)
|
||||||
geomPublish(initLog.debug, fissPipe, 'fissPipe')
|
geomPublish(initLog.debug, fissPipe, 'fissPipe', nro_cas)
|
||||||
partPipe = geompy.GetInPlaceByHistory(partFissPipe, pipeFiss)
|
partPipe = geompy.GetInPlaceByHistory(partFissPipe, pipeFiss)
|
||||||
geomPublish(initLog.debug, partPipe, 'partPipe')
|
geomPublish(initLog.debug, partPipe, 'partPipe', nro_cas)
|
||||||
|
|
||||||
edgesPipeFiss = geompy.GetSharedShapesMulti([fissPipe, partPipe], geompy.ShapeType["EDGE"])
|
edgesPipeFiss = geompy.GetSharedShapesMulti([fissPipe, partPipe], geompy.ShapeType["EDGE"])
|
||||||
for i_aux, edge in enumerate(edgesPipeFiss):
|
for i_aux, edge in enumerate(edgesPipeFiss):
|
||||||
name = "edgePipe{}".format(i_aux)
|
name = "edgePipe{}".format(i_aux)
|
||||||
geomPublishInFather(initLog.debug,fissPipe, edge, name)
|
geomPublishInFather(initLog.debug,fissPipe, edge, name, nro_cas)
|
||||||
try:
|
try:
|
||||||
wirePipeFiss = geompy.MakeWire(edgesPipeFiss)
|
wirePipeFiss = geompy.MakeWire(edgesPipeFiss)
|
||||||
except:
|
except:
|
||||||
wirePipeFiss = geompy.MakeCompound(edgesPipeFiss)
|
wirePipeFiss = geompy.MakeCompound(edgesPipeFiss)
|
||||||
logging.debug("wirePipeFiss construit sous forme de compound")
|
logging.debug("wirePipeFiss construit sous forme de compound")
|
||||||
geomPublish(initLog.debug, wirePipeFiss, "wirePipeFiss")
|
geomPublish(initLog.always, wirePipeFiss, "wirePipeFiss", nro_cas)
|
||||||
|
|
||||||
wireFondFiss = geompy.GetInPlace(partFissPipe,fondFiss)
|
wireFondFiss = geompy.GetInPlace(partFissPipe,fondFiss)
|
||||||
edgesFondFiss = geompy.GetSharedShapesMulti([fissPipe, wireFondFiss], geompy.ShapeType["EDGE"])
|
edgesFondFiss = geompy.GetSharedShapesMulti([fissPipe, wireFondFiss], geompy.ShapeType["EDGE"])
|
||||||
@ -87,6 +88,6 @@ def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe):
|
|||||||
name = "edgeFondFiss{}".format(i_aux)
|
name = "edgeFondFiss{}".format(i_aux)
|
||||||
geomPublishInFather(initLog.debug,fissPipe, edge, name)
|
geomPublishInFather(initLog.debug,fissPipe, edge, name)
|
||||||
wireFondFiss = geompy.MakeWire(edgesFondFiss)
|
wireFondFiss = geompy.MakeWire(edgesFondFiss)
|
||||||
geomPublish(initLog.debug, wireFondFiss,"wireFondFiss")
|
geomPublish(initLog.always, wireFondFiss, "wireFondFiss", nro_cas)
|
||||||
|
|
||||||
return (fissPipe, edgesPipeFiss, edgesFondFiss, wirePipeFiss, wireFondFiss)
|
return (fissPipe, edgesPipeFiss, edgesFondFiss, wirePipeFiss, wireFondFiss)
|
||||||
|
Loading…
Reference in New Issue
Block a user