mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Merge branch 'V8_2_BR'
This commit is contained in:
commit
c7d720eb8a
@ -57,7 +57,7 @@ class cubeAngle(fissureGenerique):
|
||||
|
||||
shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"), "BREP")
|
||||
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(fondFiss, [4])
|
||||
geompy.UnionIDs(fondFiss, [3])
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
|
@ -6,7 +6,7 @@ from blocFissure import gmu
|
||||
dicoParams = dict(nomCas = 'cubeCoin',
|
||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/cubeFin.med'),
|
||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Coin.brep"),
|
||||
edgeFissIds = [7],
|
||||
edgeFissIds = [6],
|
||||
lgInfluence = 50,
|
||||
meshBrep = (5,10),
|
||||
rayonPipe = 10,
|
||||
|
@ -6,7 +6,7 @@ from blocFissure import gmu
|
||||
dicoParams = dict(nomCas = 'cubeMilieu',
|
||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/cubeFin.med'),
|
||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Milieu.brep"),
|
||||
edgeFissIds = [7],
|
||||
edgeFissIds = [6],
|
||||
lgInfluence = 50,
|
||||
meshBrep = (5,10),
|
||||
rayonPipe = 10,
|
||||
|
@ -61,7 +61,7 @@ class cylindre(fissureGenerique):
|
||||
|
||||
shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre2.brep"), "BREP")
|
||||
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(fondFiss, [7])
|
||||
geompy.UnionIDs(fondFiss, [6])
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
|
@ -6,7 +6,7 @@ from blocFissure import gmu
|
||||
dicoParams = dict(nomCas = 'disque',
|
||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/disque.med'),
|
||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/ellipse_disque.brep"),
|
||||
edgeFissIds = [4],
|
||||
edgeFissIds = [3],
|
||||
lgInfluence = 10,
|
||||
meshBrep = (0.5,2.5),
|
||||
rayonPipe = 1.0,
|
||||
|
@ -65,7 +65,7 @@ class ellipse_1(fissureGenerique):
|
||||
|
||||
shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/ellipse1.brep"), "BREP")
|
||||
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(fondFiss, [4])
|
||||
geompy.UnionIDs(fondFiss, [3])
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
|
@ -37,7 +37,7 @@ class ellipse_2(ellipse_1):
|
||||
|
||||
shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/ellipse1_pb.brep"), "BREP")
|
||||
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(fondFiss, [4])
|
||||
geompy.UnionIDs(fondFiss, [3])
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
|
@ -140,10 +140,11 @@ class fissure_Coude(fissureGenerique):
|
||||
|
||||
# --- peau tube exterieur (PEAUEXT)
|
||||
|
||||
cercle1 = geompy.MakeCircle(centre, OZ, de/2.)
|
||||
extru1 = geompy.MakePrismVecH(cercle1, OZ, l_tube_p1)
|
||||
revol1 = geompy.MakeRevolution(cercle1, axe, angleCoude*math.pi/180.0)
|
||||
rot1 = geompy.MakeRotation(cercle1, axe, angleCoude*math.pi/180.0)
|
||||
Disk_3 = geompy.MakeDiskPntVecR(centre, OZ, de/2. +epais)
|
||||
couronne1 = geompy.MakeCut(Disk_3, Disk_1)
|
||||
extru1 = geompy.MakePrismVecH(couronne1, OZ, l_tube_p1)
|
||||
revol1 = geompy.MakeRevolution(couronne1, axe, angleCoude*math.pi/180.0)
|
||||
rot1 = geompy.MakeRotation(couronne1, axe, angleCoude*math.pi/180.0)
|
||||
extru2 = geompy.MakePrismVecH(rot1, Rotation_2, -l_tube_p2)
|
||||
externe = geompy.MakeFuse(extru1, revol1)
|
||||
externe = geompy.MakeFuse(extru2, externe)
|
||||
|
@ -59,7 +59,7 @@ class vis_1(fissureGenerique):
|
||||
|
||||
shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/visFiss.brep"), "BREP")
|
||||
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(fondFiss, [7, 9])
|
||||
geompy.UnionIDs(fondFiss, [6, 8])
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
|
@ -82,24 +82,45 @@ def construitEdgesRadialesDebouchantes(idisklim, idiskout, gptsdisks, raydisks,
|
||||
else:
|
||||
maxl = geompy.BasicProperties(edge)[0]
|
||||
if maxl < 0.01: # problème MakeSection
|
||||
logging.debug("problème MakeSection recherche edge radiale %s, longueur trop faible: %s, utilisation partition", k, maxl)
|
||||
logging.info("problème MakeSection recherche edge radiale %s, longueur trop faible: %s, utilisation partition", k, maxl)
|
||||
partNappeFace = geompy.MakePartition([face, nappes[k]], [] , [], [], geompy.ShapeType["FACE"], 0, [], 0)
|
||||
edps= geompy.ExtractShapes(partNappeFace, geompy.ShapeType["EDGE"], False)
|
||||
ednouv = []
|
||||
for ii, ed in enumerate(edps):
|
||||
dmax=100.
|
||||
vxs = geompy.ExtractShapes(ed, geompy.ShapeType["VERTEX"], False)
|
||||
distx = [geompy.MinDistance(vx, face) for vx in vxs]
|
||||
distx += [geompy.MinDistance(vx, nappes[k]) for vx in vxs]
|
||||
dmax = max(distx)
|
||||
logging.debug(" dmax %s",dmax)
|
||||
if dmax < 0.01:
|
||||
lgedge = geompy.BasicProperties(ed)[0]
|
||||
logging.debug(" dmax %s, longueur edge %s",dmax, lgedge)
|
||||
if dmax < 0.01 and lgedge > 0.01:
|
||||
ednouv.append(ed)
|
||||
logging.debug(" edges issues de la partition: %s", ednouv)
|
||||
for ii, ed in enumerate(ednouv):
|
||||
geomPublish(initLog.debug, ed, "ednouv%d"%ii)
|
||||
[edsorted, minl,maxl] = sortEdges(ednouv)
|
||||
logging.debug(" longueur edge trouvée: %s", maxl)
|
||||
edge = edsorted[-1]
|
||||
if (len(ednouv) > 0):
|
||||
logging.debug(" edges issues de la partition: %s", ednouv)
|
||||
for ii, ed in enumerate(ednouv):
|
||||
geomPublish(initLog.debug, ed, "ednouv%d"%ii)
|
||||
[edsorted, minl,maxl] = sortEdges(ednouv)
|
||||
logging.debug(" longueur edge trouvée: %s", maxl)
|
||||
edge = edsorted[-1]
|
||||
else:
|
||||
logging.info("problème partition recherche edge radiale %s", k)
|
||||
vxs = geompy.ExtractShapes(partNappeFace, geompy.ShapeType["VERTEX"], False)
|
||||
vxnouv=[]
|
||||
for ii,vx in enumerate(vxs):
|
||||
distx = geompy.MinDistance(vx, face)
|
||||
distx += geompy.MinDistance(vx, nappes[k])
|
||||
logging.debug("vertex distance: %s", distx)
|
||||
if distx < 0.005:
|
||||
vxnouv.append(vx)
|
||||
logging.debug("nombre vertex candidats %s", len(vxnouv))
|
||||
if len(vxnouv) >= 2:
|
||||
eds = [geompy.MakeEdge(vxnouv[j],vxnouv[(j+1)%len(vxnouv)]) for j in range(len(vxnouv))]
|
||||
[edsorted2, minl,maxl] = sortEdges(eds)
|
||||
edge = edsorted2[-1]
|
||||
logging.debug("lg edge: %s", maxl)
|
||||
else:
|
||||
logging.debug("problème recherche edge radiale %s non résolu", k)
|
||||
edges.append(edge)
|
||||
name = 'edgeEndPipe%d'%k
|
||||
geomPublish(initLog.debug, edge, name)
|
||||
|
@ -178,10 +178,10 @@ class fissureCoude(fissureGenerique):
|
||||
|
||||
# --- peau tube exterieur (PEAUEXT)
|
||||
|
||||
cercle1 = geompy.MakeCircle(centre, OZ, de/2.)
|
||||
extru1 = geompy.MakePrismVecH(cercle1, OZ, l_tube_p1)
|
||||
revol1 = geompy.MakeRevolution(cercle1, axe, angleCoude*math.pi/180.0)
|
||||
rot1 = geompy.MakeRotation(cercle1, axe, angleCoude*math.pi/180.0)
|
||||
Disk_3 = geompy.MakeDiskPntVecR(centre, OZ, de/2. +epais)
|
||||
extru1 = geompy.MakePrismVecH(Disk_3, OZ, l_tube_p1)
|
||||
revol1 = geompy.MakeRevolution(Disk_3, axe, angleCoude*math.pi/180.0)
|
||||
rot1 = geompy.MakeRotation(Disk_3, axe, angleCoude*math.pi/180.0)
|
||||
extru2 = geompy.MakePrismVecH(rot1, Rotation_2, -l_tube_p2)
|
||||
externe = geompy.MakeFuse(extru1, revol1)
|
||||
externe = geompy.MakeFuse(extru2, externe)
|
||||
|
@ -96,8 +96,26 @@ def identifieEdgesPeau(edgesFissExtPipe,verticesPipePeau, facePeau, facesPeauSor
|
||||
geompy.UnionList(groupEdgesBordPeau, edgesBords)
|
||||
bordsVifs = 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)
|
||||
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:
|
||||
geomPublishInFather(initLog.debug, facePeau, bordsVifs, "bordsVifs")
|
||||
groupEdgesBordPeau = geompy.CutGroups(groupEdgesBordPeau, bordsVifs)
|
||||
|
Loading…
Reference in New Issue
Block a user