From: Paul RASCLE Date: Wed, 10 Dec 2014 16:37:21 +0000 (+0100) Subject: test traces conditionnelles X-Git-Tag: V7_8_0a1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fd5ea4103869e7f849c55c341bbff77e6c1013c8;p=modules%2Fsmesh.git test traces conditionnelles --- diff --git a/src/Tools/blocFissure/CasTests/execution_Cas.py b/src/Tools/blocFissure/CasTests/execution_Cas.py index 580861961..3fa7f7f06 100644 --- a/src/Tools/blocFissure/CasTests/execution_Cas.py +++ b/src/Tools/blocFissure/CasTests/execution_Cas.py @@ -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]: diff --git a/src/Tools/blocFissure/gmu/prolongeWire.py b/src/Tools/blocFissure/gmu/prolongeWire.py index 916a8433c..52b3991b4 100644 --- a/src/Tools/blocFissure/gmu/prolongeWire.py +++ b/src/Tools/blocFissure/gmu/prolongeWire.py @@ -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