mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
test traces conditionnelles
This commit is contained in:
parent
2475437e5d
commit
fd5ea41038
@ -4,10 +4,21 @@ import sys, traceback
|
||||
import logging
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu import initLog
|
||||
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
#initLog.setDebug()
|
||||
initLog.setVerbose()
|
||||
#initLog.setRelease()
|
||||
#initLog.setPerfTests()
|
||||
|
||||
# ---tous les cas en sequence, ou les cas selectionnés ...
|
||||
runall = True
|
||||
if runall:
|
||||
torun = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,]
|
||||
else: #prob 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27
|
||||
torun = [ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
|
||||
from blocFissure.gmu import geomsmesh
|
||||
from blocFissure.gmu.casStandard import casStandard
|
||||
|
||||
@ -125,13 +136,6 @@ cas=27
|
||||
from blocFissure.CasTests import cubeTransverse
|
||||
problemes.append(casStandard(cubeTransverse.dicoParams, cubeTransverse.referencesMaillageFissure, cas))
|
||||
|
||||
|
||||
# ---tous les cas en sequence, ou les cas selectionnés ...
|
||||
runall = True
|
||||
if runall:
|
||||
torun = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,]
|
||||
else: #prob 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27
|
||||
torun = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,]
|
||||
|
||||
for i in range(len(problemes)):
|
||||
if torun[i]:
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
import logging
|
||||
from geomsmesh import geompy
|
||||
from geomsmesh import geomPublish
|
||||
from geomsmesh import geomPublishInFather
|
||||
import initLog
|
||||
from orderEdgesFromWire import orderEdgesFromWire
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@ -23,15 +26,14 @@ def prolongeWire(aWire, extrem, norms, long):
|
||||
dists = [(geompy.MinDistance(v, aWire), i , v) for i, v in enumerate(exts)]
|
||||
dists.sort()
|
||||
v2 = dists[-1][-1]
|
||||
#v2 = geompy.MakeTranslationVectorDistance(v1, norms[i], long)
|
||||
edge = geompy.MakeEdge(v1, v2)
|
||||
edges.append(edge)
|
||||
edgesBout.append(edge)
|
||||
name = "extrem%d"%i
|
||||
geompy.addToStudy(edge,name)
|
||||
geomPublish(initLog.debug, edge, name)
|
||||
try:
|
||||
wireProlonge = geompy.MakeWire(edges)
|
||||
geompy.addToStudy(wireProlonge, "wireProlonge")
|
||||
geomPublish(initLog.debug, wireProlonge, "wireProlonge")
|
||||
except:
|
||||
logging.warning("probleme MakeWire, approche pas a pas")
|
||||
if uneSeuleEdge:
|
||||
@ -49,8 +51,8 @@ def prolongeWire(aWire, extrem, norms, long):
|
||||
wireProlonge = edgesBout[i0]
|
||||
for i in range(len(edgelist)):
|
||||
wireProlonge = geompy.MakeWire([wireProlonge, edgelist[accessList[i]]])
|
||||
geompy.addToStudy(wireProlonge, "wireProlonge_%d"%i)
|
||||
geomPublish(initLog.debug, wireProlonge, "wireProlonge_%d"%i)
|
||||
wireProlonge = geompy.MakeWire([wireProlonge,edgesBout[i1]])
|
||||
geompy.addToStudy(wireProlonge, "wireNonProlonge")
|
||||
geomPublish(initLog.debug, wireProlonge, "wireProlonge")
|
||||
logging.warning("prolongation wire pas a pas OK")
|
||||
return wireProlonge
|
||||
|
Loading…
Reference in New Issue
Block a user