From 954619f5f0632bf86d23984f0fd005372d6628e8 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 26 Oct 2016 19:56:09 +0300 Subject: [PATCH] 23370: [CEA 632] Impose enforced vertices without indicate the face on which the node is --- .../blsurf_parameters_enforced_vertices.png | Bin 25267 -> 23342 bytes .../gui/BLSURFPLUGIN/input/blsurf_hypo.doc | 12 +- idl/BLSURFPlugin_Algorithm.idl | 23 +- resources/BLSURFPlugin.xml | 9 + src/BLSURFPlugin/BLSURFPluginBuilder.py | 36 ++ src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 446 ++++++++---------- src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx | 3 +- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx | 90 +--- .../BLSURFPlugin_Hypothesis_i.cxx | 299 ++++++++---- .../BLSURFPlugin_Hypothesis_i.hxx | 21 + src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 326 +++++-------- src/GUI/BLSURFPluginGUI_HypothesisCreator.h | 2 +- tests/test_enforced_vertex.py | 30 +- 13 files changed, 650 insertions(+), 647 deletions(-) diff --git a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_enforced_vertices.png b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_enforced_vertices.png index 8fa29543e6694bbe0455cd304320e1283056324e..1dbdd01c584baf08ca64c70fdea164fbba94c61a 100644 GIT binary patch literal 23342 zcma&O1z1&E)HaGqDWOOT2+}Eyq|)7;(%s!E-2&1jY*M-#q`SMjyJHjo+@AB*z4v?m zd!EMwY!`FQwdRO-yyG1P%18;nM8ZXagM)i1Dk2~U2lrSF4(?GC!gKJ+R}L2;@a3r; zpQr)?_|F|dKLGrUXf2{@2d+oU}LZq#>`2_vcu`c@co)nq%k7w zo45cHHSjk+Xk^5JF|ccV0`=L4)lT;>^RF+UeIbIdzav)emPxPJm_0nk-xE$P^o%tB z`@35ahUuAyebFz`&X;_L&wXLPzQFwabpgww=iv8e$STEO9ub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IN/input/blsurf_hypo.doc b/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc index 21b80db..ad2770a 100644 --- a/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc +++ b/doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc @@ -330,22 +330,22 @@ shape. The distance is the geodesic distance (i.e. calculated by following the s \image html blsurf_parameters_enforced_vertices.png It is possible to define some enforced vertices to MG-CADSurf algorithm. -An enforced vertex is defined on a Face or a Compound by +An enforced vertex is defined by - selecting an existing Vertex or Compound, -- or creating a new vertex given its coordinates. +- or by its coordinates. The enforced vertex is the projection of a point defined by its -(x,y,z) coordinates on the selected face. +(x,y,z) coordinates on the closest face found by the application. -- It is possible to define several enforced vertices on a face or a group of faces. +- It is possible to define several enforced vertices. - If the projected point is on the boundary or outside of the face, it will be ignored. -- If a group name is specified : If the group exists, the enforced nodes will be added in the existing group, if the group does not exist it will be created. +- If a group name is specified : if the group exists, the enforced nodes will be added in the existing group, if the group does not exist it will be created. -All the internal vertices of the faces can be considered as enforced vertices if the corresponding checkbox is checked. +All the internal vertices of faces can be considered as enforced vertices if the corresponding checkbox is checked. A group can optionnaly be defined on those enforced vertices. \sa Sample TUI Script of the \ref tui_blsurf "creation of a MG-CADSurf hypothesis", including enforced vertices. diff --git a/idl/BLSURFPlugin_Algorithm.idl b/idl/BLSURFPlugin_Algorithm.idl index d7f9c11..9846997 100644 --- a/idl/BLSURFPlugin_Algorithm.idl +++ b/idl/BLSURFPlugin_Algorithm.idl @@ -579,6 +579,7 @@ module BLSURFPlugin /*! * Set/get/unset an enforced vertex on geom face */ + // OBSOLETE boolean SetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception); boolean SetEnforcedVertexNamed(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfName theVertexName) raises (SALOME::SALOME_Exception); boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception); @@ -586,17 +587,27 @@ module BLSURFPlugin boolean SetEnforcedVertexNamedWithGroup(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfName theVertexName, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception); boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception); - TEnfVertexList GetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception); - boolean UnsetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception); boolean UnsetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception); boolean UnsetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception); - /*! - * Set/get/unset an enforced vertex on geom face given by entry - */ - boolean SetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z, + // NEW - no face + boolean AddEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception); + boolean AddEnforcedVertexNamed(in double x, in double y, in double z, in TEnfName theVertexName) raises (SALOME::SALOME_Exception); + boolean AddEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception); + boolean AddEnforcedVertexWithGroup(in double x, in double y, in double z, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception); + boolean AddEnforcedVertexNamedWithGroup(in double x, in double y, in double z, in TEnfName theVertexName, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception); + boolean AddEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theVertex, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception); + + boolean RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception); + boolean RemoveEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception); + boolean RemoveEnforcedVertices() raises (SALOME::SALOME_Exception); + + /*! + * Set/get/unset an enforced vertex on geom face given by entry + */ + boolean SetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z, in TEnfName theVertexName, in TEntry theVertexEntry, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception); TEnfVertexList GetEnforcedVerticesEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception); diff --git a/resources/BLSURFPlugin.xml b/resources/BLSURFPlugin.xml index 5fd562f..d436037 100644 --- a/resources/BLSURFPlugin.xml +++ b/resources/BLSURFPlugin.xml @@ -59,6 +59,15 @@ UnsetEnforcedVertex, UnsetEnforcedVertexGeom, UnsetEnforcedVertices, + AddEnforcedVertex, + AddEnforcedVertexNamed, + AddEnforcedVertexGeom, + AddEnforcedVertexWithGroup, + AddEnforcedVertexNamedWithGroup, + AddEnforcedVertexGeomWithGroup, + RemoveEnforcedVertex, + RemoveEnforcedVertexGeom, + RemoveEnforcedVertices, AddPreCadFacesPeriodicity diff --git a/src/BLSURFPlugin/BLSURFPluginBuilder.py b/src/BLSURFPlugin/BLSURFPluginBuilder.py index a1833a5..f61279b 100644 --- a/src/BLSURFPlugin/BLSURFPluginBuilder.py +++ b/src/BLSURFPlugin/BLSURFPluginBuilder.py @@ -495,6 +495,42 @@ class BLSURF_Algorithm(Mesh_Algorithm): return self.Parameters().SetEnforcedVertexGeomWithGroup(theFace, theVertex,groupName) pass + ## Set an enforced vertex on a face given the coordinates of a point. + # The face if found by the application. + # @param x : x coordinate + # @param y : y coordinate + # @param z : z coordinate + # @param vertexName : name of the enforced vertex + # @param groupName : name of the group + def AddEnforcedVertex(self, x, y, z, vertexName = "", groupName = ""): + from salome.smesh.smeshBuilder import AssureGeomPublished + if vertexName == "": + if groupName == "": + return self.Parameters().AddEnforcedVertex(x, y, z) + else: + return self.Parameters().AddEnforcedVertexWithGroup(x, y, z, groupName) + pass + else: + if groupName == "": + return self.Parameters().AddEnforcedVertexNamed(x, y, z, vertexName) + else: + return self.Parameters().AddEnforcedVertexNamedWithGroup( x, y, z, vertexName, groupName) + pass + pass + + ## To set an enforced vertex on a face given a GEOM vertex, group or compound. + # The face if found by the application. + # @param theVertex : GEOM vertex (or group, compound). + # @param groupName : name of the group + def AddEnforcedVertexGeom(self, theVertex, groupName = ""): + from salome.smesh.smeshBuilder import AssureGeomPublished + AssureGeomPublished( self.mesh, theVertex ) + if groupName == "": + return self.Parameters().AddEnforcedVertexGeom(theVertex) + else: + return self.Parameters().AddEnforcedVertexGeomWithGroup(theVertex,groupName) + pass + ## To remove an enforced vertex on a given GEOM face (or group, compound) given the coordinates. # @param theFace : GEOM face (or group, compound) on which to remove the enforced vertex # @param x : x coordinate diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 655aa9c..9c59492 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -242,8 +242,6 @@ BLSURFPlugin_BLSURF::BLSURFPlugin_BLSURF(int hypId, int studyId, SMESH_Gen* gen) : SMESH_2D_Algo(hypId, studyId, gen) { - MESSAGE("BLSURFPlugin_BLSURF::BLSURFPlugin_BLSURF"); - _name = "MG-CADSurf";//"BLSURF"; _shapeType = (1 << TopAbs_FACE); // 1 bit /shape type _compatibleHypothesis.push_back(BLSURFPlugin_Hypothesis::GetHypType()); @@ -257,12 +255,8 @@ BLSURFPlugin_BLSURF::BLSURFPlugin_BLSURF(int hypId, int studyId, CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/myStudyManager"); SALOMEDS::StudyManager_var aStudyMgr = SALOMEDS::StudyManager::_narrow(anObject); - MESSAGE("studyid = " << _studyId); - myStudy = NULL; myStudy = aStudyMgr->GetStudyByID(_studyId); - if ( !myStudy->_is_nil() ) - MESSAGE("myStudy->StudyId() = " << myStudy->StudyId()); /* Initialize the Python interpreter */ assert(Py_IsInitialized()); @@ -306,7 +300,6 @@ BLSURFPlugin_BLSURF::BLSURFPlugin_BLSURF(int hypId, int studyId, BLSURFPlugin_BLSURF::~BLSURFPlugin_BLSURF() { - MESSAGE("BLSURFPlugin_BLSURF::~BLSURFPlugin_BLSURF"); } @@ -442,34 +435,29 @@ double getT(const TopoDS_Edge& edge, const gp_Pnt& point) ///////////////////////////////////////////////////////// TopoDS_Shape BLSURFPlugin_BLSURF::entryToShape(std::string entry) { - MESSAGE("BLSURFPlugin_BLSURF::entryToShape "<FindObjectID( entry.c_str() ); - if (!aSObj->_is_nil()) { - CORBA::Object_var obj = aSObj->GetObject(); - aGeomObj = GEOM::GEOM_Object::_narrow(obj); - aSObj->UnRegister(); - } - if ( !aGeomObj->_is_nil() ) - S = smeshGen_i->GeomObjectToShape( aGeomObj.in() ); + TopoDS_Shape S; + if ( !entry.empty() ) + { + GEOM::GEOM_Object_var aGeomObj; + SALOMEDS::SObject_var aSObj = myStudy->FindObjectID( entry.c_str() ); + if (!aSObj->_is_nil()) { + CORBA::Object_var obj = aSObj->GetObject(); + aGeomObj = GEOM::GEOM_Object::_narrow(obj); + aSObj->UnRegister(); + } + if ( !aGeomObj->_is_nil() ) + S = smeshGen_i->GeomObjectToShape( aGeomObj.in() ); + } return S; } void _createEnforcedVertexOnFace(TopoDS_Face faceShape, gp_Pnt aPnt, BLSURFPlugin_Hypothesis::TEnfVertex *enfVertex) { BLSURFPlugin_Hypothesis::TEnfVertexCoords enf_coords, coords, s_coords; - enf_coords.clear(); - coords.clear(); - s_coords.clear(); // Get the (u,v) values of the enforced vertex on the face projectionPoint myPoint = getProjectionPoint(faceShape,aPnt); - MESSAGE("Enforced Vertex: " << aPnt.X() << ", " << aPnt.Y() << ", " << aPnt.Z()); - MESSAGE("Projected Vertex: " << myPoint.xyz.X() << ", " << myPoint.xyz.Y() << ", " << myPoint.xyz.Z()); - MESSAGE("Parametric coordinates: " << myPoint.uv.X() << ", " << myPoint.uv.Y() ); - enf_coords.push_back(aPnt.X()); enf_coords.push_back(aPnt.Y()); enf_coords.push_back(aPnt.Z()); @@ -485,10 +473,7 @@ void _createEnforcedVertexOnFace(TopoDS_Face faceShape, gp_Pnt aPnt, BLSURFPlugi s_coords.push_back(myPoint.xyz.Z()); // Save pair projected vertex / enf vertex - MESSAGE("Storing pair projected vertex / enf vertex:"); - MESSAGE("("<< myPoint.xyz.X() << ", " << myPoint.xyz.Y() << ", " << myPoint.xyz.Z() <<") / (" << aPnt.X() << ", " << aPnt.Y() << ", " << aPnt.Z()<<")"); EnfVertexCoords2ProjVertex[s_coords] = enf_coords; - MESSAGE("Group name is: \"" << enfVertex->grpName << "\""); pair ret; BLSURFPlugin_Hypothesis::TEnfVertexList::iterator it; ret = EnfVertexCoords2EnfVertexList[s_coords].insert(enfVertex); @@ -514,24 +499,121 @@ void _createEnforcedVertexOnFace(TopoDS_Face faceShape, gp_Pnt aPnt, BLSURFPlugi sameAttractor = true; if (FaceId2EnforcedVertexCoords.find(key) != FaceId2EnforcedVertexCoords.end()) { - MESSAGE("Map of enf. vertex has key " << key) - MESSAGE("Enf. vertex list size is: " << FaceId2EnforcedVertexCoords[key].size()) if (! sameAttractor) FaceId2EnforcedVertexCoords[key].insert(coords); // there should be no redondant coords here (see std::set management) - else - MESSAGE("An attractor node is already defined: I don't add the enforced vertex"); - MESSAGE("New Enf. vertex list size is: " << FaceId2EnforcedVertexCoords[key].size()) } else { - MESSAGE("Map of enf. vertex has not key " << key << ": creating it") if (! sameAttractor) { BLSURFPlugin_Hypothesis::TEnfVertexCoordsList ens; ens.insert(coords); FaceId2EnforcedVertexCoords[key] = ens; } + } +} + +/*! + * \brief Find geom faces supporting given points + */ +TopoDS_Shape BLSURFPlugin_BLSURF:: +findFaces( const BLSURFPlugin_Hypothesis::TEnfVertexList& enfVertexList ) +{ + // get points from enfVertexList + vector< gp_Pnt > points; + BLSURFPlugin_Hypothesis::TEnfVertexList::const_iterator enfVertexListIt = enfVertexList.begin(); + for( ; enfVertexListIt != enfVertexList.end() ; ++enfVertexListIt ) + { + BLSURFPlugin_Hypothesis::TEnfVertex * enfVertex = *enfVertexListIt; + if ( enfVertex->coords.size() >= 3 ) + { + points.push_back( gp_Pnt( enfVertex->coords[0], enfVertex->coords[1], enfVertex->coords[2])); + } else - MESSAGE("An attractor node is already defined: I don't add the enforced vertex"); + { + TopoDS_Shape GeomShape = entryToShape( enfVertex->geomEntry ); + if ( !GeomShape.IsNull() ) + { + if ( GeomShape.ShapeType() == TopAbs_VERTEX ) + points.push_back( BRep_Tool::Pnt( TopoDS::Vertex( GeomShape ))); + + else if ( GeomShape.ShapeType() == TopAbs_COMPOUND) + for (TopoDS_Iterator it (GeomShape); it.More(); it.Next()) + if ( it.Value().ShapeType() == TopAbs_VERTEX ) + points.push_back( BRep_Tool::Pnt( TopoDS::Vertex( it.Value() ))); + } + } } + + TopoDS_Shape resultShape, myShape = myHelper->GetSubShape(); + TopoDS_Compound compound; + + for ( size_t i = 0; i <= points.size(); ++i ) + { + TopoDS_Face foundFace; + TopTools_MapOfShape checkedFaces; + std::map< double, std::pair< TopoDS_Face, gp_Pnt2d > > dist2face; + + for ( TopExp_Explorer exp ( myShape, TopAbs_FACE ); exp.More(); exp.Next()) + { + const TopoDS_Face& face = TopoDS::Face( exp.Current() ); + if ( !checkedFaces.Add( face )) continue; + + // check distance to face + Handle(ShapeAnalysis_Surface) surface = myHelper->GetSurface( face ); + gp_Pnt2d uv = surface->ValueOfUV( points[i], Precision::Confusion()); + double distance = surface->Gap(); + if ( distance > Precision::Confusion() ) + { + // the face is far, store for future analysis + dist2face.insert( std::make_pair( distance, std::make_pair( face, uv ))); + } + else + { + // check location on the face + BRepClass_FaceClassifier FC( face, uv, Precision::Confusion()); + if ( FC.State() == TopAbs_IN ) + { + foundFace = face; + break; + } + } + } + if ( foundFace.IsNull() ) + { + // find the closest face + std::map< double, std::pair< TopoDS_Face, gp_Pnt2d > >::iterator d2f = dist2face.begin(); + for ( ; d2f != dist2face.end(); ++d2f ) + { + const TopoDS_Face& face = d2f->second.first; + const gp_Pnt2d & uv = d2f->second.second; + BRepClass_FaceClassifier FC( face, uv, Precision::Confusion()); + if ( FC.State() == TopAbs_IN ) + { + foundFace = face; + break; + } + } + } + // set the resultShape + if ( !foundFace.IsNull() ) + { + if ( resultShape.IsNull() ) + { + resultShape = foundFace; + } + else + { + BRep_Builder builder; + if ( compound.IsNull() ) + { + builder.MakeCompound( compound ); + resultShape = compound; + } + builder.Add( compound, foundFace ); + } + } + } // loop on points + + return resultShape; } ///////////////////////////////////////////////////////// @@ -574,7 +656,6 @@ void BLSURFPlugin_BLSURF::createEnforcedVertexOnFace(TopoDS_Shape faceShape, BLS ///////////////////////////////////////////////////////// void createAttractorOnFace(TopoDS_Shape GeomShape, std::string AttractorFunction, double defaultSize) { - MESSAGE("Attractor function: "<< AttractorFunction); double xa, ya, za; // Coordinates of attractor point double a, b; // Attractor parameter double d = 0.; @@ -622,7 +703,6 @@ void createAttractorOnFace(TopoDS_Shape GeomShape, std::string AttractorFunction pos2 = AttractorFunction.find(sep, pos1+1); if (pos2!=string::npos) { string createNodeStr = AttractorFunction.substr(pos1+1, pos2-pos1-1); - MESSAGE("createNode: " << createNodeStr); createNode = (AttractorFunction.substr(pos1+1, pos2-pos1-1) == "True"); pos1=pos2; } @@ -657,8 +737,6 @@ void createAttractorOnFace(TopoDS_Shape GeomShape, std::string AttractorFunction // of r-d where r is the distance to (u0,v0) attractorFunctionStream << "*exp(-(0.5*(sqrt((u-"< &theVerticesEntries, std::vector &theVerticesCoords) { for (std::vector::const_iterator it = theVerticesEntries.begin(); it != theVerticesEntries.end(); it++) - { - BLSURFPlugin_Hypothesis::TEntry theVertexEntry = *it; - MESSAGE("Vertex entry " << theVertexEntry); - addCoordsFromVertex(theVertexEntry, theVerticesCoords); - } + { + BLSURFPlugin_Hypothesis::TEntry theVertexEntry = *it; + addCoordsFromVertex(theVertexEntry, theVerticesCoords); + } } void BLSURFPlugin_BLSURF::addCoordsFromVertex(BLSURFPlugin_Hypothesis::TEntry theVertexEntry, std::vector &theVerticesCoords) { if (theVertexEntry!="") - { - TopoDS_Shape aShape = entryToShape(theVertexEntry); + { + TopoDS_Shape aShape = entryToShape(theVertexEntry); - gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); - double theX, theY, theZ; - theX = aPnt.X(); - theY = aPnt.Y(); - theZ = aPnt.Z(); + gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); + double theX, theY, theZ; + theX = aPnt.X(); + theY = aPnt.Y(); + theZ = aPnt.Z(); - theVerticesCoords.push_back(theX); - theVerticesCoords.push_back(theY); - theVerticesCoords.push_back(theZ); - } + theVerticesCoords.push_back(theX); + theVerticesCoords.push_back(theY); + theVerticesCoords.push_back(theZ); + } } ///////////////////////////////////////////////////////// void BLSURFPlugin_BLSURF::createPreCadFacesPeriodicity(TopoDS_Shape theGeomShape, const BLSURFPlugin_Hypothesis::TPreCadPeriodicity &preCadPeriodicity) { - MESSAGE("BLSURFPlugin_BLSURF::createPreCadFacesPeriodicity"); - TopoDS_Shape geomShape1 = entryToShape(preCadPeriodicity.shape1Entry); TopoDS_Shape geomShape2 = entryToShape(preCadPeriodicity.shape2Entry); @@ -779,26 +844,15 @@ void BLSURFPlugin_BLSURF::createPreCadFacesPeriodicity(TopoDS_Shape theGeomShape preCadFacesPeriodicityIDs.shape1IDs = theFace1_ids; preCadFacesPeriodicityIDs.shape2IDs = theFace2_ids; - MESSAGE("preCadPeriodicity.theSourceVerticesEntries.size(): " << preCadPeriodicity.theSourceVerticesEntries.size()); - MESSAGE("preCadPeriodicity.theTargetVerticesEntries.size(): " << preCadPeriodicity.theTargetVerticesEntries.size()); - addCoordsFromVertices(preCadPeriodicity.theSourceVerticesEntries, preCadFacesPeriodicityIDs.theSourceVerticesCoords); addCoordsFromVertices(preCadPeriodicity.theTargetVerticesEntries, preCadFacesPeriodicityIDs.theTargetVerticesCoords); - MESSAGE("preCadFacesPeriodicityIDs.theSourceVerticesCoords.size(): " << preCadFacesPeriodicityIDs.theSourceVerticesCoords.size()); - MESSAGE("preCadFacesPeriodicityIDs.theTargetVerticesCoords.size(): " << preCadFacesPeriodicityIDs.theTargetVerticesCoords.size()); - _preCadFacesIDsPeriodicityVector.push_back(preCadFacesPeriodicityIDs); - MESSAGE("_preCadFacesIDsPeriodicityVector.size() = " << _preCadFacesIDsPeriodicityVector.size()); - MESSAGE("BLSURFPlugin_BLSURF::createPreCadFacesPeriodicity END"); - } ///////////////////////////////////////////////////////// void BLSURFPlugin_BLSURF::createPreCadEdgesPeriodicity(TopoDS_Shape theGeomShape, const BLSURFPlugin_Hypothesis::TPreCadPeriodicity &preCadPeriodicity) { - MESSAGE("BLSURFPlugin_BLSURF::createPreCadEdgesPeriodicity"); - TopoDS_Shape geomShape1 = entryToShape(preCadPeriodicity.shape1Entry); TopoDS_Shape geomShape2 = entryToShape(preCadPeriodicity.shape2Entry); @@ -813,9 +867,6 @@ void BLSURFPlugin_BLSURF::createPreCadEdgesPeriodicity(TopoDS_Shape theGeomShape addCoordsFromVertices(preCadPeriodicity.theTargetVerticesEntries, preCadEdgesPeriodicityIDs.theTargetVerticesCoords); _preCadEdgesIDsPeriodicityVector.push_back(preCadEdgesPeriodicityIDs); - MESSAGE("_preCadEdgesIDsPeriodicityVector.size() = " << _preCadEdgesIDsPeriodicityVector.size()); - MESSAGE("BLSURFPlugin_BLSURF::createPreCadEdgesPeriodicity END"); - } @@ -871,7 +922,6 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, if (hyp) { - MESSAGE("BLSURFPlugin_BLSURF::SetParameters"); _physicalMesh = (int) hyp->GetPhysicalMesh(); _geometricMesh = (int) hyp->GetGeometricMesh(); if (hyp->GetPhySize() > 0) { @@ -930,21 +980,18 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, BLSURFPlugin_Hypothesis::TOptionValues::const_iterator opIt; for ( opIt = opts.begin(); opIt != opts.end(); ++opIt ) if ( !opIt->second.empty() ) { - MESSAGE("cadsurf_set_param(): " << opIt->first << " = " << opIt->second); set_param(css, opIt->first.c_str(), opIt->second.c_str()); } const BLSURFPlugin_Hypothesis::TOptionValues& custom_opts = hyp->GetCustomOptionValues(); for ( opIt = custom_opts.begin(); opIt != custom_opts.end(); ++opIt ) if ( !opIt->second.empty() ) { - MESSAGE("cadsurf_set_param(): " << opIt->first << " = " << opIt->second); set_param(css, opIt->first.c_str(), opIt->second.c_str()); } const BLSURFPlugin_Hypothesis::TOptionValues& preCADopts = hyp->GetPreCADOptionValues(); for ( opIt = preCADopts.begin(); opIt != preCADopts.end(); ++opIt ) if ( !opIt->second.empty() ) { - MESSAGE("cadsurf_set_param(): " << opIt->first << " = " << opIt->second); set_param(css, opIt->first.c_str(), opIt->second.c_str()); } } @@ -1053,22 +1100,20 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, if ( _verb > 0 ) std::cout << "_smp_phy_size = " << _smp_phy_size << std::endl; - if (_physicalMesh == BLSURFPlugin_Hypothesis::PhysicalLocalSize){ + if (_physicalMesh == BLSURFPlugin_Hypothesis::PhysicalLocalSize) + { TopoDS_Shape GeomShape; TopoDS_Shape AttShape; TopAbs_ShapeEnum GeomType; // // Standard Size Maps // - MESSAGE("Setting a Size Map"); const BLSURFPlugin_Hypothesis::TSizeMap sizeMaps = BLSURFPlugin_Hypothesis::GetSizeMapEntries(hyp); BLSURFPlugin_Hypothesis::TSizeMap::const_iterator smIt = sizeMaps.begin(); for ( ; smIt != sizeMaps.end(); ++smIt ) { if ( !smIt->second.empty() ) { - MESSAGE("cadsurf_set_sizeMap(): " << smIt->first << " = " << smIt->second); GeomShape = entryToShape(smIt->first); GeomType = GeomShape.ShapeType(); - MESSAGE("Geomtype is " << GeomType); int key = -1; // Group Management if (GeomType == TopAbs_COMPOUND) { @@ -1081,7 +1126,6 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, } else { key = FacesWithSizeMap.FindIndex(TopoDS::Face(it.Value())); -// MESSAGE("Face with key " << key << " already in map"); } FaceId2SizeMap[key] = smIt->second; } @@ -1094,7 +1138,6 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, } else { key = EdgesWithSizeMap.FindIndex(TopoDS::Edge(it.Value())); -// MESSAGE("Edge with key " << key << " already in map"); } EdgeId2SizeMap[key] = smIt->second; } @@ -1108,9 +1151,7 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, } else { key = VerticesWithSizeMap.FindIndex(TopoDS::Vertex(it.Value())); - MESSAGE("Group of vertices with key " << key << " already in map"); } - MESSAGE("Group of vertices with key " << key << " has a size map: " << smIt->second); VertexId2SizeMap[key] = smIt->second; } } @@ -1123,7 +1164,6 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, } else { key = FacesWithSizeMap.FindIndex(TopoDS::Face(GeomShape)); -// MESSAGE("Face with key " << key << " already in map"); } FaceId2SizeMap[key] = smIt->second; } @@ -1136,7 +1176,6 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, } else { key = EdgesWithSizeMap.FindIndex(TopoDS::Edge(GeomShape)); -// MESSAGE("Edge with key " << key << " already in map"); } EdgeId2SizeMap[key] = smIt->second; } @@ -1150,9 +1189,7 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, } else { key = VerticesWithSizeMap.FindIndex(TopoDS::Vertex(GeomShape)); - MESSAGE("Vertex with key " << key << " already in map"); } - MESSAGE("Vertex with key " << key << " has a size map: " << smIt->second); VertexId2SizeMap[key] = smIt->second; } } @@ -1162,13 +1199,11 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, // Attractors // // TODO appeler le constructeur des attracteurs directement ici - MESSAGE("Setting Attractors"); // if ( !_phySizeRel ) { const BLSURFPlugin_Hypothesis::TSizeMap attractors = BLSURFPlugin_Hypothesis::GetAttractorEntries(hyp); BLSURFPlugin_Hypothesis::TSizeMap::const_iterator atIt = attractors.begin(); for ( ; atIt != attractors.end(); ++atIt ) { if ( !atIt->second.empty() ) { - MESSAGE("cadsurf_set_attractor(): " << atIt->first << " = " << atIt->second); GeomShape = entryToShape(atIt->first); GeomType = GeomShape.ShapeType(); // Group Management @@ -1201,8 +1236,6 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, } } // } -// else -// MESSAGE("Impossible to create the attractors when the physical size is relative"); // Class Attractors // temporary commented out for testing @@ -1221,7 +1254,6 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, BLSURFPlugin_Hypothesis::TAttractorMap::const_iterator AtIt = class_attractors.begin(); for ( ; AtIt != class_attractors.end(); ++AtIt ) { if ( !AtIt->second->Empty() ) { - // MESSAGE("cadsurf_set_attractor(): " << AtIt->first << " = " << AtIt->second); GeomShape = entryToShape(AtIt->first); if ( !SMESH_MesherHelper::IsSubShape( GeomShape, theGeomShape )) continue; @@ -1260,15 +1292,19 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, // // Enforced Vertices // - MESSAGE("Setting Enforced Vertices"); const BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexListMap entryEnfVertexListMap = BLSURFPlugin_Hypothesis::GetAllEnforcedVerticesByFace(hyp); BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexListMap::const_iterator enfIt = entryEnfVertexListMap.begin(); for ( ; enfIt != entryEnfVertexListMap.end(); ++enfIt ) { if ( !enfIt->second.empty() ) { GeomShape = entryToShape(enfIt->first); - GeomType = GeomShape.ShapeType(); + if ( GeomShape.IsNull() ) + { + GeomShape = findFaces( enfIt->second ); + if ( GeomShape.IsNull() ) + continue; + } // Group Management - if (GeomType == TopAbs_COMPOUND){ + if ( GeomShape.ShapeType() == TopAbs_COMPOUND){ for (TopoDS_Iterator it (GeomShape); it.More(); it.Next()){ if (it.Value().ShapeType() == TopAbs_FACE){ HasSizeMapOnFace = true; @@ -1276,8 +1312,7 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, } } } - - if (GeomType == TopAbs_FACE){ + if ( GeomShape.ShapeType() == TopAbs_FACE){ HasSizeMapOnFace = true; createEnforcedVertexOnFace(GeomShape, enfIt->second); } @@ -1288,11 +1323,9 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, bool useInternalVertexAllFaces = BLSURFPlugin_Hypothesis::GetInternalEnforcedVertexAllFaces(hyp); if (useInternalVertexAllFaces) { std::string grpName = BLSURFPlugin_Hypothesis::GetInternalEnforcedVertexAllFacesGroup(hyp); - MESSAGE("Setting Internal Enforced Vertices"); gp_Pnt aPnt; TopExp_Explorer exp (theGeomShape, TopAbs_FACE); for (; exp.More(); exp.Next()){ - MESSAGE("Iterating shapes. Shape type is " << exp.Current().ShapeType()); TopExp_Explorer exp_face (exp.Current(), TopAbs_VERTEX, TopAbs_EDGE); for (; exp_face.More(); exp_face.Next()) { @@ -1300,7 +1333,6 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, // Check if current coords is already in enfVertexList // If coords not in enfVertexList, add new enfVertex aPnt = BRep_Tool::Pnt(TopoDS::Vertex(exp_face.Current())); - MESSAGE("Found vertex on face at " << aPnt.X() <<", "<coords.push_back(aPnt.X()); enfVertex->coords.push_back(aPnt.Y()); @@ -1316,15 +1348,12 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, } } - MESSAGE("Setting Size Map on FACES "); cadsurf_set_sizemap_iso_cad_face(css, size_on_surface, &_smp_phy_size); if (HasSizeMapOnEdge){ - MESSAGE("Setting Size Map on EDGES "); cadsurf_set_sizemap_iso_cad_edge(css, size_on_edge, &_smp_phy_size); } if (HasSizeMapOnVertex){ - MESSAGE("Setting Size Map on VERTICES "); cadsurf_set_sizemap_iso_cad_point(css, size_on_vertex, &_smp_phy_size); } } @@ -1335,24 +1364,17 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, _preCadFacesIDsPeriodicityVector.clear(); _preCadEdgesIDsPeriodicityVector.clear(); - MESSAGE("SetParameters preCadFacesPeriodicityVector"); const BLSURFPlugin_Hypothesis::TPreCadPeriodicityVector preCadFacesPeriodicityVector = BLSURFPlugin_Hypothesis::GetPreCadFacesPeriodicityVector(hyp); for (std::size_t i = 0; i TSubMeshSet; @@ -1868,11 +1888,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, // an object that correctly deletes all cadsurf objects at destruction BLSURF_Cleaner cleaner( ctx,css,c,dcad ); - MESSAGE("BEGIN SetParameters"); SetParameters(_hypothesis, css, aShape); - MESSAGE("END SetParameters"); - - MESSAGE("_preCadFacesIDsPeriodicityVector.size() = " << _preCadFacesIDsPeriodicityVector.size()); haveQuadraticSubMesh = haveQuadraticSubMesh || (_hypothesis != NULL && _hypothesis->GetQuadraticMesh()); helper.SetIsQuadratic( haveQuadraticSubMesh ); @@ -1962,8 +1978,8 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, faceKey = FacesWithSizeMap.FindIndex(f); - if (FaceId2SizeMap.find(faceKey)!=FaceId2SizeMap.end()) { - MESSAGE("A size map is defined on face :"< >::iterator attractor_iter = FaceId2AttractorCoords.begin(); for (; attractor_iter != FaceId2AttractorCoords.end(); ++attractor_iter) { - if (attractor_iter->first == faceKey) { - MESSAGE("Face indice: " << iface); - MESSAGE("Adding attractor"); - + if (attractor_iter->first == faceKey) + { double xyzCoords[3] = {attractor_iter->second[2], attractor_iter->second[3], attractor_iter->second[4]}; - MESSAGE("Check position of vertex =(" << xyzCoords[0] << "," << xyzCoords[1] << "," << xyzCoords[2] << ")"); gp_Pnt P(xyzCoords[0],xyzCoords[1],xyzCoords[2]); BRepClass_FaceClassifier scl(f,P,1e-7); - // OCC 6.3sp6 : scl.Perform() is bugged. The function was rewritten - // BRepClass_FaceClassifierPerform(&scl,f,P,1e-7); - // OCC 6.5.2: scl.Perform() is not bugged anymore scl.Perform(f, P, 1e-7); TopAbs_State result = scl.State(); - MESSAGE("Position of point on face: "<second[0],attractor_iter->second[1]}; ienf++; - MESSAGE("Add cad point on (u,v)=(" << uvCoords[0] << "," << uvCoords[1] << ") with id = " << ienf); cad_point_t* point_p = cad_point_new(fce, ienf, uvCoords); cad_point_set_tag(point_p, ienf); } @@ -2026,8 +2033,6 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, // ----------------- TId2ClsAttractorVec::iterator clAttractor_iter = FaceId2ClassAttractor.find(faceKey); if (clAttractor_iter != FaceId2ClassAttractor.end()){ - MESSAGE("Face indice: " << iface); - MESSAGE("Adding attractor"); std::vector< BLSURFPlugin_Attractor* > & attVec = clAttractor_iter->second; for ( size_t i = 0; i < attVec.size(); ++i ) if ( !attVec[i]->IsMapBuilt() ) { @@ -2045,19 +2050,14 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, faceKey = FacesWithEnforcedVertices.FindIndex(f); std::map::const_iterator evmIt = FaceId2EnforcedVertexCoords.find(faceKey); if (evmIt != FaceId2EnforcedVertexCoords.end()) { - MESSAGE("Some enforced vertices are defined"); BLSURFPlugin_Hypothesis::TEnfVertexCoordsList evl; - MESSAGE("Face indice: " << iface); - MESSAGE("Adding enforced vertices"); evl = evmIt->second; - MESSAGE("Number of vertices to add: "<< evl.size()); BLSURFPlugin_Hypothesis::TEnfVertexCoordsList::const_iterator evlIt = evl.begin(); for (; evlIt != evl.end(); ++evlIt) { BLSURFPlugin_Hypothesis::TEnfVertexCoords xyzCoords; xyzCoords.push_back(evlIt->at(2)); xyzCoords.push_back(evlIt->at(3)); xyzCoords.push_back(evlIt->at(4)); - MESSAGE("Check position of vertex =(" << xyzCoords[0] << "," << xyzCoords[1] << "," << xyzCoords[2] << ")"); gp_Pnt P(xyzCoords[0],xyzCoords[1],xyzCoords[2]); BRepClass_FaceClassifier scl(f,P,1e-7); // OCC 6.3sp6 : scl.Perform() is bugged. The function was rewritten @@ -2065,9 +2065,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, // OCC 6.5.2: scl.Perform() is not bugged anymore scl.Perform(f, P, 1e-7); TopAbs_State result = scl.State(); - MESSAGE("Position of point on face: "<at(0),evlIt->at(1)}; ienf++; - MESSAGE("Add cad point on (u,v)=(" << uvCoords[0] << "," << uvCoords[1] << ") with id = " << ienf); cad_point_t* point_p = cad_point_new(fce, ienf, uvCoords); int tag = 0; std::map< BLSURFPlugin_Hypothesis::TEnfVertexCoords, BLSURFPlugin_Hypothesis::TEnfVertexList >::const_iterator enfCoordsIt = EnfVertexCoords2EnfVertexList.find(xyzCoords); @@ -2143,8 +2137,8 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, if (HasSizeMapOnEdge){ edgeKey = EdgesWithSizeMap.FindIndex(e); - if (EdgeId2SizeMap.find(edgeKey)!=EdgeId2SizeMap.end()) { - MESSAGE("Sizemap defined on edge with index " << edgeKey); + if (EdgeId2SizeMap.find(edgeKey)!=EdgeId2SizeMap.end()) + { theSizeMapStr = EdgeId2SizeMap[edgeKey]; if (theSizeMapStr.find(bad_end) == (theSizeMapStr.size()-bad_end.size()-1)) continue; @@ -2280,7 +2274,6 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, vertexKey = VerticesWithSizeMap.FindIndex(v); if (VertexId2SizeMap.find(vertexKey)!=VertexId2SizeMap.end()){ theSizeMapStr = VertexId2SizeMap[vertexKey]; - //MESSAGE("VertexId2SizeMap[faceKey]: " << VertexId2SizeMap[vertexKey]); if (theSizeMapStr.find(bad_end) == (theSizeMapStr.size()-bad_end.size()-1)) continue; // Expr To Python function, verification is performed at validation in GUI @@ -2356,10 +2349,8 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, // PERIODICITY // /////////////////////// - MESSAGE("BEFORE PERIODICITY"); - MESSAGE("_preCadFacesIDsPeriodicityVector.size() = " << _preCadFacesIDsPeriodicityVector.size()); - if (! _preCadFacesIDsPeriodicityVector.empty()) { - MESSAGE("INTO PRECAD FACES PERIODICITY"); + if (! _preCadFacesIDsPeriodicityVector.empty()) + { for (std::size_t i=0; i < _preCadFacesIDsPeriodicityVector.size(); i++){ std::vector theFace1_ids = _preCadFacesIDsPeriodicityVector[i].shape1IDs; std::vector theFace2_ids = _preCadFacesIDsPeriodicityVector[i].shape2IDs; @@ -2373,43 +2364,33 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, for (std::size_t j=0; j < theFace2_ids.size(); j++) o << theFace2_ids[j] << ", "; o << "]"; - MESSAGE(o.str()); - MESSAGE("theFace1_ids.size(): " << theFace1_ids.size()); - MESSAGE("theFace2_ids.size(): " << theFace2_ids.size()); if (_preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords.empty()) - { - // If no source points, call peridoicity without transformation function - MESSAGE("periodicity without transformation function"); - meshgems_cad_periodicity_transformation_t periodicity_transformation = NULL; - status = cad_add_face_multiple_periodicity_with_transformation_function(c, theFace1_ids_c, theFace1_ids.size(), - theFace2_ids_c, theFace2_ids.size(), periodicity_transformation, NULL); - if(status != STATUS_OK) - cout << "cad_add_face_multiple_periodicity_with_transformation_function failed with error code " << status << "\n"; - } + { + // If no source points, call peridoicity without transformation function + meshgems_cad_periodicity_transformation_t periodicity_transformation = NULL; + status = cad_add_face_multiple_periodicity_with_transformation_function(c, theFace1_ids_c, theFace1_ids.size(), + theFace2_ids_c, theFace2_ids.size(), periodicity_transformation, NULL); + if(status != STATUS_OK) + cout << "cad_add_face_multiple_periodicity_with_transformation_function failed with error code " << status << "\n"; + } else - { - // get the transformation vertices - MESSAGE("periodicity with transformation vertices"); - double* theSourceVerticesCoords_c = &_preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords[0]; - double* theTargetVerticesCoords_c = &_preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords[0]; - int nbSourceVertices = _preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3; - int nbTargetVertices = _preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3; - - MESSAGE("nbSourceVertices: " << nbSourceVertices << ", nbTargetVertices: " << nbTargetVertices); - - status = cad_add_face_multiple_periodicity_with_transformation_function_by_points(c, theFace1_ids_c, theFace1_ids.size(), - theFace2_ids_c, theFace2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices); - if(status != STATUS_OK) - cout << "cad_add_face_multiple_periodicity_with_transformation_function_by_points failed with error code " << status << "\n"; - } + { + // get the transformation vertices + double* theSourceVerticesCoords_c = &_preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords[0]; + double* theTargetVerticesCoords_c = &_preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords[0]; + int nbSourceVertices = _preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3; + int nbTargetVertices = _preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3; + + status = cad_add_face_multiple_periodicity_with_transformation_function_by_points(c, theFace1_ids_c, theFace1_ids.size(), + theFace2_ids_c, theFace2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices); + if(status != STATUS_OK) + cout << "cad_add_face_multiple_periodicity_with_transformation_function_by_points failed with error code " << status << "\n"; + } } - - MESSAGE("END PRECAD FACES PERIODICITY"); } - MESSAGE("_preCadEdgesIDsPeriodicityVector.size() = " << _preCadEdgesIDsPeriodicityVector.size()); - if (! _preCadEdgesIDsPeriodicityVector.empty()) { - MESSAGE("INTO PRECAD EDGES PERIODICITY"); + if (! _preCadEdgesIDsPeriodicityVector.empty()) + { for (std::size_t i=0; i < _preCadEdgesIDsPeriodicityVector.size(); i++){ std::vector theEdge1_ids = _preCadEdgesIDsPeriodicityVector[i].shape1IDs; std::vector theEdge2_ids = _preCadEdgesIDsPeriodicityVector[i].shape2IDs; @@ -2425,41 +2406,30 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, for (std::size_t j=0; j < theEdge2_ids.size(); j++) o << theEdge2_ids[j] << ", "; o << "]"; - MESSAGE(o.str()); - MESSAGE("theEdge1_ids.size(): " << theEdge1_ids.size()); - MESSAGE("theEdge2_ids.size(): " << theEdge2_ids.size()); if (_preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords.empty()) - { - // If no source points, call peridoicity without transformation function - MESSAGE("periodicity without transformation function"); - meshgems_cad_periodicity_transformation_t periodicity_transformation = NULL; - status = cad_add_edge_multiple_periodicity_with_transformation_function(c, theEdge1_ids_c, theEdge1_ids.size(), - theEdge2_ids_c, theEdge2_ids.size(), periodicity_transformation, NULL); - if(status != STATUS_OK) - cout << "cad_add_edge_multiple_periodicity_with_transformation_function failed with error code " << status << "\n"; - } + { + // If no source points, call peridoicity without transformation function + meshgems_cad_periodicity_transformation_t periodicity_transformation = NULL; + status = cad_add_edge_multiple_periodicity_with_transformation_function(c, theEdge1_ids_c, theEdge1_ids.size(), + theEdge2_ids_c, theEdge2_ids.size(), periodicity_transformation, NULL); + if(status != STATUS_OK) + cout << "cad_add_edge_multiple_periodicity_with_transformation_function failed with error code " << status << "\n"; + } else - { - // get the transformation vertices - MESSAGE("periodicity with transformation vertices"); - double* theSourceVerticesCoords_c = &_preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords[0]; - double* theTargetVerticesCoords_c = &_preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords[0]; - int nbSourceVertices = _preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3; - int nbTargetVertices = _preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3; - - MESSAGE("nbSourceVertices: " << nbSourceVertices << ", nbTargetVertices: " << nbTargetVertices); - - status = cad_add_edge_multiple_periodicity_with_transformation_function_by_points(c, theEdge1_ids_c, theEdge1_ids.size(), - theEdge2_ids_c, theEdge2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices); - if(status != STATUS_OK) - cout << "cad_add_edge_multiple_periodicity_with_transformation_function_by_points failed with error code " << status << "\n"; - else - MESSAGE("cad_add_edge_multiple_periodicity_with_transformation_function_by_points succeeded.\n"); - } + { + // get the transformation vertices + double* theSourceVerticesCoords_c = &_preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords[0]; + double* theTargetVerticesCoords_c = &_preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords[0]; + int nbSourceVertices = _preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3; + int nbTargetVertices = _preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3; + + status = cad_add_edge_multiple_periodicity_with_transformation_function_by_points(c, theEdge1_ids_c, theEdge1_ids.size(), + theEdge2_ids_c, theEdge2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices); + if(status != STATUS_OK) + cout << "cad_add_edge_multiple_periodicity_with_transformation_function_by_points failed with error code " << status << "\n"; + } } - - MESSAGE("END PRECAD EDGES PERIODICITY"); } @@ -2565,8 +2535,8 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, projVertex.push_back((double)xyz[1]); projVertex.push_back((double)xyz[2]); std::map< BLSURFPlugin_Hypothesis::TEnfVertexCoords, BLSURFPlugin_Hypothesis::TEnfVertexList >::const_iterator enfCoordsIt = EnfVertexCoords2EnfVertexList.find(projVertex); - if (enfCoordsIt != EnfVertexCoords2EnfVertexList.end()) { - MESSAGE("Found enforced vertex @ " << xyz[0] << ", " << xyz[1] << ", " << xyz[2]); + if (enfCoordsIt != EnfVertexCoords2EnfVertexList.end()) + { BLSURFPlugin_Hypothesis::TEnfVertexList::const_iterator enfListIt = enfCoordsIt->second.begin(); BLSURFPlugin_Hypothesis::TEnfVertex *currentEnfVertex; for (; enfListIt != enfCoordsIt->second.end(); ++enfListIt) { @@ -2574,25 +2544,17 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, if (currentEnfVertex->grpName != "") { bool groupDone = false; SMESH_Mesh::GroupIteratorPtr grIt = aMesh.GetGroups(); - MESSAGE("currentEnfVertex->grpName: " << currentEnfVertex->grpName); - MESSAGE("Parsing the groups of the mesh"); while (grIt->more()) { SMESH_Group * group = grIt->next(); if ( !group ) continue; - MESSAGE("Group: " << group->GetName()); SMESHDS_GroupBase* groupDS = group->GetGroupDS(); if ( !groupDS ) continue; - MESSAGE("group->SMDSGroup().GetType(): " << (groupDS->GetType())); - MESSAGE("group->SMDSGroup().GetType()==SMDSAbs_Node: " << (groupDS->GetType()==SMDSAbs_Node)); - MESSAGE("currentEnfVertex->grpName.compare(group->GetStoreName())==0: " << (currentEnfVertex->grpName.compare(group->GetName())==0)); if ( groupDS->GetType()==SMDSAbs_Node && currentEnfVertex->grpName.compare(group->GetName())==0) { SMESHDS_Group* aGroupDS = static_cast( groupDS ); aGroupDS->SMDSGroup().Add(nodes[iv]); - MESSAGE("Node ID: " << nodes[iv]->GetID()); // How can I inform the hypothesis ? // _hypothesis->AddEnfVertexNodeID(currentEnfVertex->grpName,nodes[iv]->GetID()); groupDone = true; - MESSAGE("Successfully added enforced vertex to existing group " << currentEnfVertex->grpName); break; } } @@ -2603,7 +2565,6 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, aGroup->SetName( currentEnfVertex->grpName.c_str() ); SMESHDS_Group* aGroupDS = static_cast( aGroup->GetGroupDS() ); aGroupDS->SMDSGroup().Add(nodes[iv]); - MESSAGE("Successfully created enforced vertex group " << currentEnfVertex->grpName); groupDone = true; } if (!groupDone) @@ -2869,7 +2830,6 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, FacesWithEnforcedVertices.Statistics(std::cout); */ - MESSAGE("END OF BLSURFPlugin_BLSURF::Compute()"); return ( status == STATUS_OK && !quadraticSubMeshAndViscousLayer ); } @@ -3027,7 +2987,7 @@ status_t size_on_surface(integer face_id, real *uv, real *size, void *user_data) if ( pyresult != NULL) { result = PyFloat_AsDouble(pyresult); Py_DECREF(pyresult); -// *size = result; + // *size = result; } else{ fflush(stderr); @@ -3045,10 +3005,8 @@ status_t size_on_surface(integer face_id, real *uv, real *size, void *user_data) *size = result; PyGILState_Release(gstate); } - else if (( f2attVec = FaceIndex2ClassAttractor.find(face_id)) != FaceIndex2ClassAttractor.end() && !f2attVec->second.empty()){ -// MESSAGE("attractor used on face :"<Empty()) + else if (( f2attVec = FaceIndex2ClassAttractor.find(face_id)) != FaceIndex2ClassAttractor.end() && !f2attVec->second.empty()) + { real result = 0; result = 1e100; std::vector< BLSURFPlugin_Attractor* > & attVec = f2attVec->second; @@ -3061,10 +3019,9 @@ status_t size_on_surface(integer face_id, real *uv, real *size, void *user_data) *size = result; } else { - // MESSAGE("List of attractor is empty !!!") *size = *((real*)user_data); } -// std::cout << "Size_on_surface sur la face " << face_id << " donne une size de: " << *size << std::endl; + // std::cout << "Size_on_surface sur la face " << face_id << " donne une size de: " << *size << std::endl; return STATUS_OK; } @@ -3222,7 +3179,6 @@ bool BLSURFPlugin_BLSURF::Evaluate(SMESH_Mesh& aMesh, //0020968: EDF1545 SMESH: Problem in the creation of a mesh group on geometry // GetDefaultPhySize() sometimes leads to computation failure _phySize = aMesh.GetShapeDiagonalSize() / _gen->GetBoundaryBoxSegmentation(); - MESSAGE("BLSURFPlugin_BLSURF::SetParameters using defaults"); } bool IsQuadratic = _quadraticMesh; diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx index 1a98332..5f162cf 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx @@ -148,6 +148,7 @@ class BLSURFPlugin_BLSURF: public SMESH_2D_Algo { TopoDS_Shape entryToShape(std::string entry); void addCoordsFromVertices(const std::vector &theVerticesEntries, std::vector &theVerticesCoords); void addCoordsFromVertex(BLSURFPlugin_Hypothesis::TEntry theVertexEntry, std::vector &theVerticesCoords); + TopoDS_Shape findFaces( const BLSURFPlugin_Hypothesis::TEnfVertexList& enfVertexList ); void createEnforcedVertexOnFace(TopoDS_Shape FaceShape, BLSURFPlugin_Hypothesis::TEnfVertexList enfVertexList); void createPreCadFacesPeriodicity(TopoDS_Shape theGeomShape, const BLSURFPlugin_Hypothesis::TPreCadPeriodicity &preCadPeriodicity); void createPreCadEdgesPeriodicity(TopoDS_Shape theGeomShape, const BLSURFPlugin_Hypothesis::TPreCadPeriodicity &preCadPeriodicity); @@ -157,7 +158,7 @@ class BLSURFPlugin_BLSURF: public SMESH_2D_Algo { private: PyObject * main_mod; PyObject * main_dict; - SMESH_Mesh* myMesh; + SMESH_MesherHelper* myHelper; SALOMEDS::Study_var myStudy; SMESH_Gen_i* smeshGen_i; diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index 5e8c8cd..7d2be5b 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -244,7 +244,6 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, int studyId, SMESH_G TopoDS_Shape BLSURFPlugin_Hypothesis::entryToShape(std::string entry) { - MESSAGE("BLSURFPlugin_Hypothesis::entryToShape "<GetCurrentStudy(); @@ -290,7 +289,6 @@ void BLSURFPlugin_Hypothesis::SetPhySize(double theVal, bool isRelative) { _phySizeRel = isRelative; if (theVal == 0) { _phySize = GetMaxSize(); - MESSAGE("Warning: nul physical size is not allowed"); } else _phySize = theVal; @@ -1228,7 +1226,6 @@ void BLSURFPlugin_Hypothesis::ClearEntry(const std::string& entry, ++it_clAt; } while ( it_clAt != _classAttractors.end() ); - MESSAGE("_classAttractors.size() = "<<_classAttractors.size()) NotifySubMeshesHypothesisModification(); } else @@ -1255,7 +1252,6 @@ void BLSURFPlugin_Hypothesis::ClearSizeMaps() { // bool toEnforceInternalVertices, // TEnfGroupName theGroupName) { -// MESSAGE("BLSURFPlugin_Hypothesis::SetInternalEnforcedVertex("<< theFaceEntry << ", " // << toEnforceInternalVertices << ", " << theGroupName << ")"); // TFaceEntryInternalVerticesList::iterator it = _faceEntryInternalVerticesList.find(theFaceEntry); @@ -1278,15 +1274,14 @@ void BLSURFPlugin_Hypothesis::ClearSizeMaps() { //======================================================================= //function : SetEnforcedVertex //======================================================================= -bool BLSURFPlugin_Hypothesis::SetEnforcedVertex(TEntry theFaceEntry, TEnfName theVertexName, TEntry theVertexEntry, - TEnfGroupName theGroupName, double x, double y, double z) { - - MESSAGE("BLSURFPlugin_Hypothesis::SetEnforcedVertex("<< theFaceEntry << ", " - << x << ", " << y << ", " << z << ", " << theVertexName << ", " << theVertexEntry << ", " << theGroupName << ")"); - +bool BLSURFPlugin_Hypothesis::SetEnforcedVertex(TEntry theFaceEntry, + TEnfName theVertexName, + TEntry theVertexEntry, + TEnfGroupName theGroupName, + double x, double y, double z) +{ SetPhysicalMesh(PhysicalLocalSize); - // TEnfVertexList::iterator it; bool toNotify = false; bool toCreate = true; @@ -1303,27 +1298,23 @@ bool BLSURFPlugin_Hypothesis::SetEnforcedVertex(TEntry theFaceEntry, TEnfName th newEnfVertex->grpName = theGroupName; newEnfVertex->faceEntries.clear(); newEnfVertex->faceEntries.insert(theFaceEntry); - - + + // update _enfVertexList TEnfVertexList::iterator it = _enfVertexList.find(newEnfVertex); if (it != _enfVertexList.end()) { toCreate = false; oldEnVertex = (*it); - MESSAGE("Enforced Vertex was found => Update"); if (oldEnVertex->name != theVertexName) { - MESSAGE("Update name from \"" << oldEnVertex->name << "\" to \"" << theVertexName << "\""); oldEnVertex->name = theVertexName; toNotify = true; } if (oldEnVertex->grpName != theGroupName) { - MESSAGE("Update group name from \"" << oldEnVertex->grpName << "\" to \"" << theGroupName << "\""); oldEnVertex->grpName = theGroupName; toNotify = true; } TEntryList::iterator it_faceEntries = oldEnVertex->faceEntries.find(theFaceEntry); if (it_faceEntries == oldEnVertex->faceEntries.end()) { - MESSAGE("Update face list by adding \"" << theFaceEntry << "\""); oldEnVertex->faceEntries.insert(theFaceEntry); _faceEntryEnfVertexListMap[theFaceEntry].insert(oldEnVertex); toNotify = true; @@ -1346,7 +1337,6 @@ bool BLSURFPlugin_Hypothesis::SetEnforcedVertex(TEntry theFaceEntry, TEnfName th // //////// CREATE //////////// if (toCreate) { toNotify = true; - MESSAGE("Creating new enforced vertex"); _faceEntryEnfVertexListMap[theFaceEntry].insert(newEnfVertex); _enfVertexList.insert(newEnfVertex); if (theVertexEntry == "") { @@ -1362,7 +1352,6 @@ bool BLSURFPlugin_Hypothesis::SetEnforcedVertex(TEntry theFaceEntry, TEnfName th if (toNotify) NotifySubMeshesHypothesisModification(); - MESSAGE("BLSURFPlugin_Hypothesis::SetEnforcedVertex END"); return toNotify; } @@ -1476,7 +1465,6 @@ bool BLSURFPlugin_Hypothesis::ClearEnforcedVertex(const TEntry& theFaceEntry, do TEnfVertexEntryEnfVertexMap::iterator it_enfVertexEntry = _enfVertexEntryEnfVertexMap.find(theVertexEntry); if (it_enfVertexEntry != _enfVertexEntryEnfVertexMap.end()) { // Success - MESSAGE("Found enforced vertex with geom entry " << theVertexEntry); oldEnfVertex = it_enfVertexEntry->second; _enfVertexEntryEnfVertexMap.erase(it_enfVertexEntry); @@ -1498,7 +1486,6 @@ bool BLSURFPlugin_Hypothesis::ClearEnforcedVertex(const TEntry& theFaceEntry, do TCoordsEnfVertexMap::iterator it_coords_enf = _coordsEnfVertexMap.find(coords); if (it_coords_enf != _coordsEnfVertexMap.end()) { // Success - MESSAGE("Found enforced vertex with coords " << x << ", " << y << ", " << z); oldEnfVertex = it_coords_enf->second; _coordsEnfVertexMap.erase(it_coords_enf); @@ -1521,8 +1508,6 @@ bool BLSURFPlugin_Hypothesis::ClearEnforcedVertex(const TEntry& theFaceEntry, do } } - MESSAGE("Remove enf vertex from _enfVertexList"); - // update _enfVertexList TEnfVertexList::iterator it = _enfVertexList.find(oldEnfVertex); if (it != _enfVertexList.end()) { @@ -1531,7 +1516,6 @@ bool BLSURFPlugin_Hypothesis::ClearEnforcedVertex(const TEntry& theFaceEntry, do _enfVertexList.erase(it); toNotify = true; } - MESSAGE("Done"); } // update _faceEntryEnfVertexListMap @@ -1539,9 +1523,7 @@ bool BLSURFPlugin_Hypothesis::ClearEnforcedVertex(const TEntry& theFaceEntry, do currentEnfVertexList.erase(oldEnfVertex); if (currentEnfVertexList.size() == 0) { - MESSAGE("Remove _faceEntryEnfVertexListMap[" << theFaceEntry <<"]"); _faceEntryEnfVertexListMap.erase(theFaceEntry); - MESSAGE("Done"); } if (toNotify) @@ -1576,7 +1558,6 @@ bool BLSURFPlugin_Hypothesis::ClearEnforcedVertices(const TEntry& theFaceEntry) _enfVertexList.erase(it); toNotify = true; } - MESSAGE("Done"); } } _faceEntryCoordsListMap.erase(it_entry_coords); @@ -1600,7 +1581,6 @@ bool BLSURFPlugin_Hypothesis::ClearEnforcedVertices(const TEntry& theFaceEntry) _enfVertexList.erase(it); toNotify = true; } - MESSAGE("Done"); } } _faceEntryEnfVertexEntryListMap.erase(it_entry_entry); @@ -1920,7 +1900,6 @@ std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save) { } save << " " << "__NEW_ATTRACTORS_END__"; test << " " << "__NEW_ATTRACTORS_END__"; - MESSAGE(" Attractor hypothesis saved as "<faceEntries.end(); ++faceEntriesIt) - save << " " << (*faceEntriesIt); + if ( faceEntriesIt->empty() ) + save << " _no_face_"; + else + save << " " << (*faceEntriesIt); if (hasFaces) save << " " << "__END_FACELIST__"; save << " " << "__END_VERTEX__"; @@ -1981,7 +1963,6 @@ void BLSURFPlugin_Hypothesis::SaveFacesPeriodicity(std::ostream & save){ TFacesPeriodicityVector::const_iterator it_faces_periodicity = _facesPeriodicityVector.begin(); if (it_faces_periodicity != _facesPeriodicityVector.end()) { - MESSAGE("__FACES_PERIODICITY_BEGIN__"); save << " " << "__FACES_PERIODICITY_BEGIN__"; for (; it_faces_periodicity != _facesPeriodicityVector.end(); ++it_faces_periodicity) { TFacesPeriodicity periodicity_i = (*it_faces_periodicity); @@ -1995,7 +1976,6 @@ void BLSURFPlugin_Hypothesis::SaveFacesPeriodicity(std::ostream & save){ save << " " << "__END_PERIODICITY_DESCRIPTION__"; } save << " " << "__FACES_PERIODICITY_END__"; - MESSAGE("__FACES_PERIODICITY_END__"); } } @@ -2004,7 +1984,6 @@ void BLSURFPlugin_Hypothesis::SaveEdgesPeriodicity(std::ostream & save){ TEdgesPeriodicityVector::const_iterator it_edges_periodicity = _edgesPeriodicityVector.begin(); if (it_edges_periodicity != _edgesPeriodicityVector.end()) { save << " " << "__EDGES_PERIODICITY_BEGIN__"; - MESSAGE("__EDGES_PERIODICITY_BEGIN__"); for (; it_edges_periodicity != _edgesPeriodicityVector.end(); ++it_edges_periodicity) { TEdgePeriodicity periodicity_i = (*it_edges_periodicity); save << " " << "__BEGIN_PERIODICITY_DESCRIPTION__"; @@ -2030,7 +2009,6 @@ void BLSURFPlugin_Hypothesis::SaveEdgesPeriodicity(std::ostream & save){ save << " " << "__END_PERIODICITY_DESCRIPTION__"; } save << " " << "__EDGES_PERIODICITY_END__"; - MESSAGE("__EDGES_PERIODICITY_END__"); } } @@ -2038,7 +2016,6 @@ void BLSURFPlugin_Hypothesis::SaveVerticesPeriodicity(std::ostream & save){ TVerticesPeriodicityVector::const_iterator it_vertices_periodicity = _verticesPeriodicityVector.begin(); if (it_vertices_periodicity != _verticesPeriodicityVector.end()) { - MESSAGE("__VERTICES_PERIODICITY_BEGIN__"); save << " " << "__VERTICES_PERIODICITY_BEGIN__"; for (; it_vertices_periodicity != _verticesPeriodicityVector.end(); ++it_vertices_periodicity) { TVertexPeriodicity periodicity_i = (*it_vertices_periodicity); @@ -2058,7 +2035,6 @@ void BLSURFPlugin_Hypothesis::SaveVerticesPeriodicity(std::ostream & save){ save << " " << "__END_PERIODICITY_DESCRIPTION__"; } save << " " << "__VERTICES_PERIODICITY_END__"; - MESSAGE("__VERTICES_PERIODICITY_END__"); } } @@ -2735,7 +2711,6 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { isOK = static_cast(load >> attParams[0]>>attParams[1]>>attParams[2]>>attParams[3]); //>>step); } if (isOK) { - MESSAGE(" LOADING ATTRACTOR HYPOTHESIS ") const TopoDS_Shape attractorShape = BLSURFPlugin_Hypothesis::entryToShape(newAtShapeEntry); const TopoDS_Face faceShape = TopoDS::Face(BLSURFPlugin_Hypothesis::entryToShape(newAtFaceEntry)); BLSURFPlugin_Attractor* attractor = new BLSURFPlugin_Attractor(faceShape, attractorShape, newAtShapeEntry);//, step); @@ -2801,7 +2776,6 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { while (isOK && hasEnforcedVertex) { isOK = static_cast(load >> enfSeparator); // __BEGIN_VERTEX__ TEnfVertex *enfVertex = new TEnfVertex(); -// MESSAGE("enfSeparator: " <(load >> enfSeparator); - MESSAGE("enfSeparator: " <name = enfName; @@ -2854,7 +2827,6 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { enfName += enfSeparator; } } - MESSAGE("enfName: " <(load >> enfSeparator); // __END_ENTRY__ if (enfSeparator != "__END_ENTRY__") throw std::exception(); - MESSAGE("enfGeomEntry: " <(load >> enfSeparator); // __END_COORDS__ if (enfSeparator != "__END_COORDS__") throw std::exception(); - MESSAGE("enfCoords: " << enfCoords[0] <<","<< enfCoords[1] <<","<< enfCoords[2]); } if (enfSeparator == "__BEGIN_FACELIST__") { // __BEGIN_FACELIST__ @@ -2891,7 +2860,6 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { isOK = static_cast(load >> enfSeparator); if (enfSeparator != "__END_FACELIST__") { enfFaceEntryList.insert(enfSeparator); - MESSAGE(enfSeparator << " was inserted into enfFaceEntryList"); } } } @@ -2969,18 +2937,15 @@ void BLSURFPlugin_Hypothesis::LoadFacesPeriodicity(std::istream & load){ while (isOK) { isOK = static_cast(load >> periodicitySeparator); // __BEGIN_PERIODICITY_DESCRIPTION__ - MESSAGE("periodicitySeparator 1: " <(load >> periodicitySeparator); - MESSAGE("periodicitySeparator 2: " <first = shape1Entry; @@ -2996,7 +2961,6 @@ void BLSURFPlugin_Hypothesis::LoadFacesPeriodicity(std::istream & load){ isOK = static_cast(load >> periodicitySeparator); // __END_ENTRY1__ if (periodicitySeparator != "__END_ENTRY1__") throw std::exception(); - MESSAGE("shape1Entry: " <(load >> periodicitySeparator); // __END_ENTRY2__ if (periodicitySeparator != "__END_ENTRY2__") throw std::exception(); - MESSAGE("shape2Entry: " <(load >> periodicitySeparator); // __BEGIN_PERIODICITY_DESCRIPTION__ - MESSAGE("periodicitySeparator 1: " <(load >> periodicitySeparator); - MESSAGE("periodicitySeparator 2: " <theFace1Entry = theFace1Entry; @@ -3053,13 +3013,10 @@ void BLSURFPlugin_Hypothesis::LoadEdgesPeriodicity(std::istream & load){ if (periodicitySeparator == "__BEGIN_FACE1__") { // __BEGIN_FACE1__ isOK = static_cast(load >> theFace1Entry); - MESSAGE("//" << theFace1Entry << "//"); isOK = static_cast(load >> periodicitySeparator); // __END_FACE1__ if (periodicitySeparator != "__END_FACE1__"){ - MESSAGE("//" << periodicitySeparator << "//"); throw std::exception(); } - MESSAGE("theFace1Entry: " <(load >> periodicitySeparator); // __END_EDGE1__ if (periodicitySeparator != "__END_EDGE1__") throw std::exception(); - MESSAGE("theEdge1Entry: " <(load >> periodicitySeparator); // __END_FACE2__ if (periodicitySeparator != "__END_FACE2__") throw std::exception(); - MESSAGE("theFace2Entry: " <(load >> periodicitySeparator); // __END_EDGE2__ if (periodicitySeparator != "__END_EDGE2__") throw std::exception(); - MESSAGE("theEdge2Entry: " <(load >> periodicitySeparator); // __END_EDGE_ORIENTATION__ if (periodicitySeparator != "__END_EDGE_ORIENTATION__") throw std::exception(); - MESSAGE("edge_orientation: " <(load >> periodicitySeparator); // __BEGIN_PERIODICITY_DESCRIPTION__ - MESSAGE("periodicitySeparator 1: " <(load >> periodicitySeparator); - MESSAGE("periodicitySeparator 2: " <theEdge1Entry = theEdge1Entry; @@ -3140,7 +3090,6 @@ void BLSURFPlugin_Hypothesis::LoadVerticesPeriodicity(std::istream & load){ isOK = static_cast(load >> periodicitySeparator); // __END_EDGE1__ if (periodicitySeparator != "__END_EDGE1__") throw std::exception(); - MESSAGE("theEdge1Entry: " <(load >> periodicitySeparator); // __END_VERTEX1__ if (periodicitySeparator != "__END_VERTEX1__") throw std::exception(); - MESSAGE("theVertex1Entry: " <(load >> periodicitySeparator); // __END_EDGE2__ if (periodicitySeparator != "__END_EDGE2__") throw std::exception(); - MESSAGE("theEdge2Entry: " <(load >> periodicitySeparator); // __END_VERTEX2__ if (periodicitySeparator != "__END_VERTEX2__") throw std::exception(); - MESSAGE("theVertex2Entry: " <(load >> periodicitySeparator); // __BEGIN_PERIODICITY_DESCRIPTION__ - MESSAGE("periodicitySeparator 1: " <(load >> periodicitySeparator); - MESSAGE("periodicitySeparator 2: " <shape1Entry = shape1Entry; periodicity_i->shape2Entry = shape2Entry; - MESSAGE("theSourceVerticesEntries.size(): " << theSourceVerticesEntries.size()); - MESSAGE("theTargetVerticesEntries.size(): " << theTargetVerticesEntries.size()); - if (hasSourceVertices) periodicity_i->theSourceVerticesEntries = theSourceVerticesEntries; if (hasTargetVertices) @@ -3236,7 +3174,6 @@ void BLSURFPlugin_Hypothesis::LoadPreCADPeriodicity(std::istream & load, const c isOK = static_cast(load >> periodicitySeparator); // __END_ENTRY1__ if (periodicitySeparator != "__END_ENTRY1__") throw std::exception(); - MESSAGE("shape1Entry: " <(load >> periodicitySeparator); // __END_ENTRY2__ if (periodicitySeparator != "__END_ENTRY2__") throw std::exception(); - MESSAGE("shape2Entry: " <(load >> periodicitySeparator); if (periodicitySeparator != "__END_SOURCE_VERTICES_LIST__") { theSourceVerticesEntries.push_back(periodicitySeparator); - MESSAGE("theSourceVerticesEntries: " <(load >> periodicitySeparator); if (periodicitySeparator != "__END_TARGET_VERTICES_LIST__") { theTargetVerticesEntries.push_back(periodicitySeparator); - MESSAGE("theTargetVerticesEntries: " <GetShapeType() != GEOM::VERTEX) && (theVertex->GetShapeType() != GEOM::COMPOUND)) { + MESSAGE("theVertex shape type is not VERTEX or COMPOUND"); + THROW_SALOME_CORBA_EXCEPTION("theVertex shape type is not VERTEX or COMPOUND", SALOME::BAD_PARAM); + } + string theVertexEntry = theVertex->GetStudyEntry(); + + GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine(); + SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen(); + string aName; + + if (theVertexEntry.empty()) { + if (theVertex->GetShapeType() == GEOM::VERTEX) + aName = "Vertex_"; + if (theVertex->GetShapeType() == GEOM::COMPOUND) + aName = "Compound_"; + aName += theVertex->GetEntry(); + SALOMEDS::SObject_wrap theSVertex = geomGen->PublishInStudy(smeshGen->GetCurrentStudy(), NULL, theVertex, aName.c_str()); + if (!theSVertex->_is_nil()) + theVertexEntry = theSVertex->GetID(); + } + if (theVertexEntry.empty()) + THROW_SALOME_CORBA_EXCEPTION( "Geom object is not published in study" ,SALOME::BAD_PARAM ); + + string theVertexName = theVertex->GetName(); + try { + return SetEnforcedVertexEntry("", 0, 0, 0, theVertexName.c_str(), theVertexEntry.c_str()); + } catch (SALOME_Exception& ex) { + THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); + } +} + +/*! + * Set an enforced vertex with group name on face + */ +bool BLSURFPlugin_Hypothesis_i::AddEnforcedVertexWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theGroupName) + throw (SALOME::SALOME_Exception) +{ + ASSERT(myBaseImpl); + + try { + return SetEnforcedVertexEntry("", x, y, z, "", "", theGroupName); + } catch (SALOME_Exception& ex) { + THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); + } +} + +/*! + * Set an enforced vertex with name and group name on face + */ +bool BLSURFPlugin_Hypothesis_i::AddEnforcedVertexNamedWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, + const char* theVertexName, const char* theGroupName) + throw (SALOME::SALOME_Exception) +{ ASSERT(myBaseImpl); - MESSAGE("IDL : SetEnforcedVertexEntry(" << theFaceEntry << ", " << x << ", " << y << ", " << z << ", \"" << theVertexName << "\", \"" << theVertexEntry << "\", \"" << theGroupName << "\")"); + + try { + return SetEnforcedVertexEntry("", x, y, z, theVertexName, "", theGroupName); + } catch (SALOME_Exception& ex) { + THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); + } +} + +/*! + * Set an enforced vertex with geom entry and group name on face + */ +bool BLSURFPlugin_Hypothesis_i::AddEnforcedVertexGeomWithGroup(GEOM::GEOM_Object_ptr theVertex, const char* theGroupName) + throw (SALOME::SALOME_Exception) +{ + if ((theVertex->GetShapeType() != GEOM::VERTEX) && (theVertex->GetShapeType() != GEOM::COMPOUND)) { + MESSAGE("theVertex shape type is not VERTEX or COMPOUND"); + THROW_SALOME_CORBA_EXCEPTION("theVertex shape type is not VERTEX or COMPOUND", SALOME::BAD_PARAM); + } + + string theVertexEntry = theVertex->GetStudyEntry(); + + GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine(); + SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen(); + string aName; + + if (theVertexEntry.empty()) { + if (theVertex->GetShapeType() == GEOM::VERTEX) + aName = "Vertex_"; + if (theVertex->GetShapeType() == GEOM::COMPOUND) + aName = "Compound_"; + aName += theVertex->GetEntry(); + SALOMEDS::SObject_wrap theSVertex = geomGen->PublishInStudy(smeshGen->GetCurrentStudy(), NULL, theVertex, aName.c_str()); + if (!theSVertex->_is_nil()) + theVertexEntry = theSVertex->GetID(); + } + if (theVertexEntry.empty()) + THROW_SALOME_CORBA_EXCEPTION( "Geom object is not published in study" ,SALOME::BAD_PARAM ); + + string theVertexName = theVertex->GetName(); + try { + return SetEnforcedVertexEntry("", 0, 0, 0, theVertexName.c_str(), theVertexEntry.c_str(), theGroupName); + } catch (SALOME_Exception& ex) { + THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); + } +} + +bool BLSURFPlugin_Hypothesis_i::RemoveEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception) +{ + try { + return UnsetEnforcedVertexEntry("", x, y, z); + } catch (SALOME_Exception& ex) { + THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); + } +} + +bool BLSURFPlugin_Hypothesis_i::RemoveEnforcedVertexGeom(GEOM::GEOM_Object_ptr theVertex) + throw (SALOME::SALOME_Exception) +{ + if ((theVertex->GetShapeType() != GEOM::VERTEX) && (theVertex->GetShapeType() != GEOM::COMPOUND)) { + MESSAGE("theVertex shape type is not VERTEX or COMPOUND"); + THROW_SALOME_CORBA_EXCEPTION("theVertex shape type is not VERTEX or COMPOUND", SALOME::BAD_PARAM); + } + std::string theVertexEntry = theVertex->GetStudyEntry(); + + GEOM::GEOM_Gen_ptr geomGen = SMESH_Gen_i::GetGeomEngine(); + SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen(); + string aName; + + if (theVertexEntry.empty()) { + if (theVertex->GetShapeType() == GEOM::VERTEX) + aName = "Vertex_"; + if (theVertex->GetShapeType() == GEOM::COMPOUND) + aName = "Compound_"; + aName += theVertex->GetEntry(); + SALOMEDS::SObject_wrap theSVertex = geomGen->PublishInStudy(smeshGen->GetCurrentStudy(), NULL, theVertex, aName.c_str()); + if (!theSVertex->_is_nil()) + theVertexEntry = theSVertex->GetID(); + } + if (theVertexEntry.empty()) + THROW_SALOME_CORBA_EXCEPTION( "Geom object is not published in study" ,SALOME::BAD_PARAM ); + + try { + return UnsetEnforcedVertexEntry("", 0, 0, 0, theVertexEntry.c_str()); + } catch (SALOME_Exception& ex) { + THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); + } +} + +bool BLSURFPlugin_Hypothesis_i::RemoveEnforcedVertices() throw (SALOME::SALOME_Exception) +{ + try { + return UnsetEnforcedVerticesEntry(""); + } catch (SALOME_Exception& ex) { + THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); + } +} + +/*! + * Set/get/unset an enforced vertex on geom object given by entry + */ +bool BLSURFPlugin_Hypothesis_i::SetEnforcedVertexEntry(const char* theFaceEntry, + CORBA::Double x, + CORBA::Double y, + CORBA::Double z, + const char* theVertexName, + const char* theVertexEntry, + const char* theGroupName) + throw (SALOME::SALOME_Exception) +{ bool newValue = false; if (string(theVertexEntry).empty()) { try { @@ -2999,37 +3186,29 @@ bool BLSURFPlugin_Hypothesis_i::SetEnforcedVertexEntry(const char* theFaceEntry, coords.push_back(y); coords.push_back(z); if (coordsList.find(coords) == coordsList.end()) { - MESSAGE("Coords not found: add it in coordsList"); newValue = true; } else { - MESSAGE("Coords already found, compare names"); ::BLSURFPlugin_Hypothesis::TEnfVertex *enfVertex = this->GetImpl()->GetEnfVertex(coords); if ((enfVertex->name != theVertexName) || (enfVertex->grpName != theGroupName)) { - MESSAGE("The names are different: update"); - // this->GetImpl()->ClearEnforcedVertex(theFaceEntry, x, y, z); newValue = true; } - else { - MESSAGE("The names are identical"); - } } } catch (const std::invalid_argument& ex) { // no enforced vertex for entry - MESSAGE("Face entry not found : add it to the list"); newValue = true; } if (newValue) { if (string(theVertexName).empty()) { if (string(theGroupName).empty()) - SMESH::TPythonDump() << _this() << ".SetEnforcedVertex(" << theFaceEntry << ", " << x << ", " << y << ", " << z << ")"; + SMESH::TPythonDump() << _this() << ".AddEnforcedVertex(" << x << ", " << y << ", " << z << ")"; else - SMESH::TPythonDump() << _this() << ".SetEnforcedVertexWithGroup(" << theFaceEntry << ", " << x << ", " << y << ", " << z << ", \"" << theGroupName << "\")"; + SMESH::TPythonDump() << _this() << ".AddEnforcedVertexWithGroup(" << theFaceEntry << ", " << x << ", " << y << ", " << z << ", \"" << theGroupName << "\")"; } else { if (string(theGroupName).empty()) - SMESH::TPythonDump() << _this() << ".SetEnforcedVertexNamed(" << theFaceEntry << ", " << x << ", " << y << ", " << z << ", \"" << theVertexName << "\")"; + SMESH::TPythonDump() << _this() << ".AddEnforcedVertexNamed(" << x << ", " << y << ", " << z << ", \"" << theVertexName << "\")"; else - SMESH::TPythonDump() << _this() << ".SetEnforcedVertexNamedWithGroup(" << theFaceEntry << ", " << x << ", " << y << ", " << z << ", \"" + SMESH::TPythonDump() << _this() << ".AddEnforcedVertexNamedWithGroup(" << x << ", " << y << ", " << z << ", \"" << theVertexName << "\", \"" << theGroupName << "\")"; } } @@ -3038,58 +3217,35 @@ bool BLSURFPlugin_Hypothesis_i::SetEnforcedVertexEntry(const char* theFaceEntry, ::BLSURFPlugin_Hypothesis::TEntryList enfVertexEntryList = this->GetImpl()->GetEnfVertexEntryList(theFaceEntry); ::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it = enfVertexEntryList.find(theVertexEntry); if ( it == enfVertexEntryList.end()) { - MESSAGE("Geom entry not found: add it in enfVertexEntryList"); newValue = true; } else { - MESSAGE("Geom entry already found, compare names"); ::BLSURFPlugin_Hypothesis::TEnfVertex *enfVertex = this->GetImpl()->GetEnfVertex((*it)); if ((enfVertex->name != theVertexName) || (enfVertex->grpName != theGroupName)) { - MESSAGE("The names are different: update"); -// this->GetImpl()->ClearEnforcedVertex(theFaceEntry, x, y, z); newValue = true; } - else { - MESSAGE("The names are identical"); - } } } catch (const std::invalid_argument& ex) { // no enforced vertex for entry - MESSAGE("Face entry not found : add it to the list"); newValue = true; } if (newValue) { if (string(theGroupName).empty()) - SMESH::TPythonDump() << _this() << ".SetEnforcedVertexGeom(" << theFaceEntry << ", " << theVertexEntry << ")"; + SMESH::TPythonDump() << _this() << ".AddEnforcedVertexGeom(" << theVertexEntry << ")"; else - SMESH::TPythonDump() << _this() << ".SetEnforcedVertexGeomWithGroup(" << theFaceEntry << ", " << theVertexEntry << ", \"" << theGroupName << "\")"; + SMESH::TPythonDump() << _this() << ".AddEnforcedVertexGeomWithGroup(" << theVertexEntry << ", \"" << theGroupName << "\")"; } } if (newValue) this->GetImpl()->SetEnforcedVertex(theFaceEntry, theVertexName, theVertexEntry, theGroupName, x, y, z); - MESSAGE("IDL : SetEnforcedVertexEntry END"); return newValue; } -//Enable internal enforced vertices on specific face if requested by user -//CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetInternalEnforcedVertexEntry(const char* theFaceEntry) -// throw (SALOME::SALOME_Exception) { -// ASSERT(myBaseImpl); -// try { -// return this->GetImpl()->GetInternalEnforcedVertex(theFaceEntry); -// } catch (const std::exception& ex) { -// std::cout << "Exception: " << ex.what() << std::endl; -// THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); -// } -//} - BLSURFPlugin::TEnfVertexList* BLSURFPlugin_Hypothesis_i::GetEnforcedVerticesEntry(const char* entry) - throw (SALOME::SALOME_Exception) { - ASSERT(myBaseImpl); - MESSAGE("ENGINE : GetEnforcedVerticesEntry START ENTRY : " << entry); - + throw (SALOME::SALOME_Exception) +{ try { BLSURFPlugin::TEnfVertexList_var vertexList = new BLSURFPlugin::TEnfVertexList(); ::BLSURFPlugin_Hypothesis::TEnfVertexList _vList = this->GetImpl()->GetEnfVertexList(entry); @@ -3138,20 +3294,19 @@ BLSURFPlugin::TEnfVertexList* BLSURFPlugin_Hypothesis_i::GetEnforcedVerticesEntr } } -bool BLSURFPlugin_Hypothesis_i::UnsetEnforcedVertexEntry(const char* theFaceEntry, CORBA::Double x, CORBA::Double y, - CORBA::Double z, const char* theVertexEntry) throw (SALOME::SALOME_Exception) { +bool BLSURFPlugin_Hypothesis_i::UnsetEnforcedVertexEntry(const char* theFaceEntry, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexEntry) throw (SALOME::SALOME_Exception) +{ ASSERT(myBaseImpl); - MESSAGE("IDL : UnsetEnforcedVertexEntry(" << theFaceEntry << "," << x << "," << y << "," << z << ", " << theVertexEntry << ")"); bool res = false; try { res = this->GetImpl()->ClearEnforcedVertex(theFaceEntry, x, y, z, theVertexEntry); if (string(theVertexEntry).empty()) - SMESH::TPythonDump() << "isDone = " << _this() << ".UnsetEnforcedVertex(" << theFaceEntry << ", " << x << ", " << y << ", " << z + SMESH::TPythonDump() << "isDone = " << _this() << ".RemoveEnforcedVertex(" << x << ", " << y << ", " << z << ")"; else - SMESH::TPythonDump() << "isDone = " << _this() << ".UnsetEnforcedVertexGeom(" << theFaceEntry << ", " << theVertexEntry << ")"; + SMESH::TPythonDump() << "isDone = " << _this() << ".RemoveEnforcedVertexGeom(" << theVertexEntry << ")"; } catch (const std::invalid_argument& ex) { return false; @@ -3163,41 +3318,19 @@ bool BLSURFPlugin_Hypothesis_i::UnsetEnforcedVertexEntry(const char* theFaceEntr MESSAGE("ENGINE : UnsetEnforcedVertexEntry END ENTRY : " << theFaceEntry); return res; } - -//bool BLSURFPlugin_Hypothesis_i::UnsetEnforcedVertexEntryWithPoint(const char* theFaceEntry, const char* theVertexEntry, -// CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception) { -// MESSAGE("IDL : UnsetEnforcedVertexEntryWithPoint START theFaceEntry=" << theFaceEntry << ", theVertexEntry=" << theVertexEntry); -// -// bool ret = false; -// -// try { -// ret = _unsetEnfVertex(theFaceEntry, x, y, z); -// } catch (SALOME_Exception& ex) { -// THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); -// } -// -// if (ret) -// SMESH::TPythonDump() << _this() << ".UnsetEnforcedVertexWithPoint(" << theFaceEntry << ", " << theVertexEntry -// << ")"; -// -// MESSAGE("IDL : UnsetEnforcedVertexEntryWithPoint END ENTRY : " << theFaceEntry); -// return ret; -//} - -bool BLSURFPlugin_Hypothesis_i::UnsetEnforcedVerticesEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception) { +bool BLSURFPlugin_Hypothesis_i::UnsetEnforcedVerticesEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception) +{ ASSERT(myBaseImpl); - MESSAGE("IDL : UnsetEnforcedVerticesEntry(" << theFaceEntry << ")"); try { this->GetImpl()->ClearEnforcedVertices(theFaceEntry); - SMESH::TPythonDump() << _this() << ".UnsetEnforcedVertices(" << theFaceEntry << ")"; + SMESH::TPythonDump() << _this() << ".RemoveEnforcedVertices()"; } catch (const std::invalid_argument& ex) { return false; } catch (const std::exception& ex) { THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM ); } - MESSAGE("IDL : UnsetEnforcedVerticesEntry END ENTRY : " << theFaceEntry); return true; } @@ -3208,8 +3341,8 @@ bool BLSURFPlugin_Hypothesis_i::UnsetEnforcedVerticesEntry(const char* theFaceEn * Set true or false */ //============================================================================= -void BLSURFPlugin_Hypothesis_i::SetInternalEnforcedVertexAllFaces(CORBA::Boolean theValue) { - MESSAGE("BLSURFPlugin_Hypothesis_i::SetInternalEnforcedVertexAllFaces"); +void BLSURFPlugin_Hypothesis_i::SetInternalEnforcedVertexAllFaces(CORBA::Boolean theValue) +{ ASSERT(myBaseImpl); this->GetImpl()->SetInternalEnforcedVertexAllFaces(theValue); std::string theValueStr = theValue ? "True" : "False"; @@ -3223,8 +3356,8 @@ void BLSURFPlugin_Hypothesis_i::SetInternalEnforcedVertexAllFaces(CORBA::Boolean * Get true or false */ //============================================================================= -CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetInternalEnforcedVertexAllFaces() { - MESSAGE("BLSURFPlugin_Hypothesis_i::GetInternalEnforcedVertexAllFaces"); +CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetInternalEnforcedVertexAllFaces() +{ ASSERT(myBaseImpl); return this->GetImpl()->_GetInternalEnforcedVertexAllFaces(); } @@ -3236,8 +3369,8 @@ CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetInternalEnforcedVertexAllFaces() { * Set group name */ //============================================================================= -void BLSURFPlugin_Hypothesis_i::SetInternalEnforcedVertexAllFacesGroup(const char* groupName) { - MESSAGE("BLSURFPlugin_Hypothesis_i::SetInternalEnforcedVertexAllFacesGroup"); +void BLSURFPlugin_Hypothesis_i::SetInternalEnforcedVertexAllFacesGroup(const char* groupName) +{ ASSERT(myBaseImpl); this->GetImpl()->SetInternalEnforcedVertexAllFacesGroup(groupName); SMESH::TPythonDump() << _this() << ".SetInternalEnforcedVertexAllFacesGroup( \"" << groupName << "\" )"; @@ -3250,8 +3383,8 @@ void BLSURFPlugin_Hypothesis_i::SetInternalEnforcedVertexAllFacesGroup(const cha * Get group name */ //============================================================================= -char* BLSURFPlugin_Hypothesis_i::GetInternalEnforcedVertexAllFacesGroup() { - MESSAGE("BLSURFPlugin_Hypothesis_i::GetInternalEnforcedVertexAllFacesGroup"); +char* BLSURFPlugin_Hypothesis_i::GetInternalEnforcedVertexAllFacesGroup() +{ ASSERT(myBaseImpl); return CORBA::string_dup(this->GetImpl()->_GetInternalEnforcedVertexAllFacesGroup().c_str()); } diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx index eeb20c3..5cfc3d9 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx @@ -276,6 +276,7 @@ public: /*! * Set/get/unset an enforced vertex on geom object */ + // OBSOLETE bool SetEnforcedVertex(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception); bool SetEnforcedVertexNamed(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName) @@ -297,6 +298,26 @@ public: throw (SALOME::SALOME_Exception); bool UnsetEnforcedVertices(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception); + // NEW - no face + bool AddEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) + throw (SALOME::SALOME_Exception); + bool AddEnforcedVertexNamed(CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName) + throw (SALOME::SALOME_Exception); + bool AddEnforcedVertexGeom(GEOM::GEOM_Object_ptr theVertex) + throw (SALOME::SALOME_Exception); + bool AddEnforcedVertexWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theGroupName) + throw (SALOME::SALOME_Exception); + bool AddEnforcedVertexNamedWithGroup(CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName, const char* theGroupName) + throw (SALOME::SALOME_Exception); + bool AddEnforcedVertexGeomWithGroup(GEOM::GEOM_Object_ptr theVertex, const char* theGroupName) + throw (SALOME::SALOME_Exception); + + bool RemoveEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) + throw (SALOME::SALOME_Exception); + bool RemoveEnforcedVertexGeom(GEOM::GEOM_Object_ptr theVertex) + throw (SALOME::SALOME_Exception); + bool RemoveEnforcedVertices() throw (SALOME::SALOME_Exception); + /*! * Set/get/unset an enforced vertex on geom object given by entry */ diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index e8c27d1..d4075da 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -163,7 +163,7 @@ enum { // Enforced vertices inputs enum { ENF_VER_FACE = 0, - ENF_VER_VERTEX, + ENF_VER_VERTEX = 0, ENF_VER_X_COORD, ENF_VER_Y_COORD, ENF_VER_Z_COORD, @@ -443,7 +443,6 @@ bool EnforcedTreeWidgetDelegate::vertexExists(QAbstractItemModel *model, BLSURFPluginGUI_HypothesisCreator::BLSURFPluginGUI_HypothesisCreator( const QString& theHypType ) : SMESHGUI_GenericHypothesisCreator( theHypType ) { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::BLSURFPluginGUI_HypothesisCreator"); this->mySMPMap.clear(); GeomToolSelected = NULL; @@ -518,7 +517,6 @@ void BLSURFPluginGUI_HypothesisCreator::avoidSimultaneousSelection(ListOfWidgets bool BLSURFPluginGUI_HypothesisCreator::checkParams(QString& msg) const { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::checkParams"); bool ok = true; BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = @@ -590,19 +588,12 @@ bool BLSURFPluginGUI_HypothesisCreator::checkParams(QString& msg) const { QString entry = mySizeMapTable->topLevelItem( row )->data(SMP_ENTRY_COLUMN, Qt::EditRole).toString(); QString sizeMap = mySizeMapTable->topLevelItem( row )->data(SMP_SIZEMAP_COLUMN, Qt::EditRole).toString(); - MESSAGE("entry ="<sizeMapValidationFromRow(row)) { try { - MESSAGE("entry ="< setMinimumSize(600,400); QVBoxLayout* lay = new QVBoxLayout( fr ); @@ -851,7 +840,6 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() // // myEnforcedVertexWidget = new DlgBlSurfHyp_Enforced(myEnfGroup); // anEnfLayout->addWidget(myEnforcedVertexWidget); -// MESSAGE("Creating DlgBlSurfHyp_Enforced widget instance"); // myEnforcedVertexWidget = new DlgBlSurfHyp_Enforced(); myEnforcedTreeWidget = new QTreeWidget(myEnfGroup); @@ -888,15 +876,15 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() shapeTypes2.Add( TopAbs_VERTEX ); shapeTypes2.Add( TopAbs_COMPOUND ); - SMESH_NumberFilter* faceFilter = new SMESH_NumberFilter("GEOM", TopAbs_FACE, 0, shapeTypes1); - myEnfFaceWdg = new StdMeshersGUI_ObjectReferenceParamWdg( faceFilter, 0, /*multiSel=*/true); - myEnfFaceWdg->SetDefaultText(tr("BLS_SEL_FACES"), "QLineEdit { color: grey }"); + // SMESH_NumberFilter* faceFilter = new SMESH_NumberFilter("GEOM", TopAbs_FACE, 0, shapeTypes1); + // myEnfFaceWdg = new StdMeshersGUI_ObjectReferenceParamWdg( faceFilter, 0, /*multiSel=*/true); + // myEnfFaceWdg->SetDefaultText(tr("BLS_SEL_FACES"), "QLineEdit { color: grey }"); SMESH_NumberFilter* vertexFilter = new SMESH_NumberFilter("GEOM", TopAbs_SHAPE, 1, shapeTypes2); myEnfVertexWdg = new StdMeshersGUI_ObjectReferenceParamWdg( vertexFilter, 0, /*multiSel=*/true); myEnfVertexWdg->SetDefaultText(tr("BLS_SEL_VERTICES"), "QLineEdit { color: grey }"); - myEnfVertexWdg->AvoidSimultaneousSelection(myEnfFaceWdg); + //myEnfVertexWdg->AvoidSimultaneousSelection(myEnfFaceWdg); QLabel* myXCoordLabel = new QLabel( tr( "BLSURF_ENF_VER_X_LABEL" ), myEnfGroup ); myXCoord = new SMESHGUI_SpinBox(myEnfGroup); @@ -927,7 +915,7 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() anEnfLayout->addWidget(myEnforcedTreeWidget, 0, 0, ENF_VER_NB_LINES, 1); QGridLayout* anEnfLayout2 = new QGridLayout(myEnfGroup); // FACE AND VERTEX SELECTION - anEnfLayout2->addWidget(myEnfFaceWdg, ENF_VER_FACE, 0, 1, 2); + //anEnfLayout2->addWidget(myEnfFaceWdg, ENF_VER_FACE, 0, 1, 2); anEnfLayout2->addWidget(myEnfVertexWdg, ENF_VER_VERTEX, 0, 1, 2); anEnfLayout2->addWidget(myXCoordLabel, ENF_VER_X_COORD, 0, 1, 1); anEnfLayout2->addWidget(myXCoord, ENF_VER_X_COORD, 1, 1, 1); @@ -1235,7 +1223,6 @@ This method updates the tooltip of a modified item. The QLineEdit widgets conten is synchronized with the coordinates of the enforced vertex clicked in the tree widget. */ void BLSURFPluginGUI_HypothesisCreator::updateEnforcedVertexValues(QTreeWidgetItem* item, int column) { -// MESSAGE("BLSURFPluginGUI_HypothesisCreator::updateEnforcedVertexValues"); QVariant vertexName = item->data(ENF_VER_NAME_COLUMN, Qt::EditRole); QVariant x = item->data(ENF_VER_X_COLUMN, Qt::EditRole); QVariant y = item->data(ENF_VER_Y_COLUMN, Qt::EditRole); @@ -1348,62 +1335,45 @@ QTreeWidgetItem* BLSURFPluginGUI_HypothesisCreator::addEnforcedFace(std::string } /** BLSURFPluginGUI_HypothesisCreator::addEnforcedVertex(entry, shapeName, x, y, z) -This method adds an enforced vertex (x,y,z) to shapeName in the tree widget. + This method adds an enforced vertex (x,y,z) to shapeName in the tree widget. */ -void BLSURFPluginGUI_HypothesisCreator::addEnforcedVertex(QTreeWidgetItem* theItem, double x, double y, double z, - std::string vertexName, std::string geomEntry, std::string groupName) { - - std::string theFaceName = theItem->data(ENF_VER_NAME_COLUMN,Qt::EditRole).toString().toStdString(); -// MESSAGE("theItemName is " << theItem->text(ENF_VER_NAME_COLUMN).toStdString()); +void BLSURFPluginGUI_HypothesisCreator::addEnforcedVertex(double x, double y, double z, + std::string vertexName, + std::string geomEntry, + std::string groupName) +{ bool okToCreate = true; - const int nbVert = theItem->childCount(); -// MESSAGE("Number of child rows: " << nbVert); - if (nbVert >0) { - double childValueX,childValueY,childValueZ; - QString childEntry, childGroupName; - QTreeWidgetItem* child; - for (int row = 0;rowchild(row); - childGroupName = child->data(ENF_VER_GROUP_COLUMN,Qt::EditRole).toString(); - childEntry = child->data(ENF_VER_ENTRY_COLUMN,Qt::EditRole).toString(); - childValueX = child->data(ENF_VER_X_COLUMN,Qt::EditRole).toDouble(); - childValueY = child->data(ENF_VER_Y_COLUMN,Qt::EditRole).toDouble(); - childValueZ = child->data(ENF_VER_Z_COLUMN,Qt::EditRole).toDouble(); - if (((childValueX == x) && (childValueY == y) && (childValueZ == z)) || ( (childEntry.toStdString() != "") && (childEntry.toStdString() == geomEntry))) { - // update group name - if (childGroupName.toStdString() != groupName) { - MESSAGE("Group is updated from \"" << childGroupName.toStdString() << "\" to \"" << groupName << "\""); - child->setData(ENF_VER_GROUP_COLUMN, Qt::EditRole, QVariant(groupName.c_str())); - } - okToCreate = false; - break; - } // if - } // for - } // if + const int nbVert = myEnforcedTreeWidget->topLevelItemCount(); + for (int row = 0; row < nbVert; row++ ) + { + QTreeWidgetItem* child = myEnforcedTreeWidget->topLevelItem( row ); + QString childGroupName = child->data(ENF_VER_GROUP_COLUMN,Qt::EditRole).toString(); + QString childEntry = child->data(ENF_VER_ENTRY_COLUMN,Qt::EditRole).toString(); + double childX = child->data(ENF_VER_X_COLUMN,Qt::EditRole).toDouble(); + double childY = child->data(ENF_VER_Y_COLUMN,Qt::EditRole).toDouble(); + double childZ = child->data(ENF_VER_Z_COLUMN,Qt::EditRole).toDouble(); + if (((childEntry.isEmpty()) && (childX == x) && (childY == y) && (childZ == z)) || + ( !childEntry.isEmpty() && childEntry == geomEntry.c_str() )) + { + // update group name + if ( childGroupName != groupName.c_str() ) { + child->setData(ENF_VER_GROUP_COLUMN, Qt::EditRole, QVariant(groupName.c_str())); + } + okToCreate = false; + break; + } // if + } // for if (!okToCreate) { - if (geomEntry.empty()) { - MESSAGE("In " << theFaceName << " vertex with coords " << x << ", " << y << ", " << z << " already exist: dont create again"); - } - else { - MESSAGE("In " << theFaceName << " vertex with entry " << geomEntry << " already exist: dont create again"); - } return; } - - if (geomEntry.empty()) { - MESSAGE("In " << theFaceName << " vertex with coords " << x << ", " << y << ", " << z<< " is created"); - } - else { - MESSAGE("In " << theFaceName << " vertex with geom entry " << geomEntry << " is created"); - } - QTreeWidgetItem *vertexItem = new QTreeWidgetItem( theItem); + QTreeWidgetItem *vertexItem = new QTreeWidgetItem( myEnforcedTreeWidget ); vertexItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled); QPixmap iconSelect (SUIT_Session::session()->resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT"))); QSize iconSize = iconSelect.size()*0.7; - - int vertexIndex=myEnforcedTreeWidget->indexOfTopLevelItem(theItem); + + int vertexIndex=nbVert; QString myVertexName; int indexRef = -1; while(indexRef != vertexIndex) { @@ -1414,7 +1384,7 @@ void BLSURFPluginGUI_HypothesisCreator::addEnforcedVertex(QTreeWidgetItem* theIt myVertexName = QString(vertexName.c_str()); for (int row = 0;rowchild(row)->data(ENF_VER_NAME_COLUMN,Qt::EditRole).toString(); + QString name = myEnforcedTreeWidget->topLevelItem(row)->data(ENF_VER_NAME_COLUMN,Qt::EditRole).toString(); if (myVertexName == name) { vertexIndex++; break; @@ -1434,17 +1404,14 @@ void BLSURFPluginGUI_HypothesisCreator::addEnforcedVertex(QTreeWidgetItem* theIt if (groupName != "") vertexItem->setData( ENF_VER_GROUP_COLUMN, Qt::EditRole, QVariant(groupName.c_str())); - QString toolTip = QString(theFaceName.c_str())+QString(": ")+myVertexName; + QString toolTip = myVertexName; if (geomEntry.empty()) { - toolTip += QString(" (%1, ").arg(x); - toolTip += QString("%1, ").arg(y); - toolTip += QString("%1)").arg(z); + toolTip += QString(" (%1, %2, %3").arg(x).arg(y).arg(z); } if (groupName != "") toolTip += QString(" [%1]").arg(groupName.c_str()); vertexItem->setToolTip(ENF_VER_NAME_COLUMN,toolTip); - theItem->setExpanded(true); myEnforcedTreeWidget->setCurrentItem(vertexItem,ENF_VER_NAME_COLUMN); } @@ -1452,36 +1419,36 @@ void BLSURFPluginGUI_HypothesisCreator::addEnforcedVertex(QTreeWidgetItem* theIt This method is called when a item is added into the enforced vertices tree widget */ void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() { -// MESSAGE("BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices"); BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; getGeomSelectionTool()->selectionMgr()->clearFilters(); - myEnfFaceWdg->deactivateSelection(); + //myEnfFaceWdg->deactivateSelection(); myEnfVertexWdg->deactivateSelection(); for (int column = 0; column < myEnforcedTreeWidget->columnCount(); ++column) myEnforcedTreeWidget->resizeColumnToContents(column); // Vertex selection - int selEnfFace = myEnfFaceWdg->NbObjects(); + //int selEnfFace = myEnfFaceWdg->NbObjects(); int selEnfVertex = myEnfVertexWdg->NbObjects(); bool coordsEmpty = (myXCoord->text().isEmpty()) || (myYCoord->text().isEmpty()) || (myZCoord->text().isEmpty()); - if (selEnfFace == 0) - return; + // if (selEnfFace == 0) + // return; if ((selEnfVertex == 0) && coordsEmpty) return; string entry, shapeName; - for (int i = 0 ; i < selEnfFace ; i++) { - myEnfFace = myEnfFaceWdg->GetObject< GEOM::GEOM_Object >(i); - entry = myEnfFace->GetStudyEntry(); - shapeName = myEnfFace->GetName(); + //for (int i = 0 ; i < selEnfVertex + !coordsEmpty; i++) + { + //myEnfFace = myEnfFaceWdg->GetObject< GEOM::GEOM_Object >(i); + //entry = myEnfFace->GetStudyEntry(); + //shapeName = myEnfFace->GetName(); - QTreeWidgetItem * faceItem = addEnforcedFace(entry, shapeName); + //QTreeWidgetItem * faceItem = addEnforcedFace(entry, shapeName); std::string groupName = myGroupName->text().toStdString(); @@ -1496,10 +1463,10 @@ void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() { z = myZCoord->GetValue(); if (selEnfVertex == 1) { myEnfVertex = myEnfVertexWdg->GetObject< GEOM::GEOM_Object >(); - addEnforcedVertex(faceItem, x, y, z, myEnfVertex->GetName(),myEnfVertex->GetStudyEntry(), groupName); + addEnforcedVertex(x, y, z, myEnfVertex->GetName(),myEnfVertex->GetStudyEntry(), groupName); } else - addEnforcedVertex(faceItem, x, y, z, "", "", groupName); + addEnforcedVertex(x, y, z, "", "", groupName); } else { @@ -1518,15 +1485,15 @@ void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() { if (myEnfVertex->GetShapeType() == GEOM::VERTEX) { measureOp->PointCoordinates (myEnfVertex, x, y, z); if ( measureOp->IsDone() ) - addEnforcedVertex(faceItem, x, y, z, myEnfVertex->GetName(),myEnfVertex->GetStudyEntry(), groupName); + addEnforcedVertex(x, y, z, myEnfVertex->GetName(),myEnfVertex->GetStudyEntry(), groupName); } else if (myEnfVertex->GetShapeType() == GEOM::COMPOUND) { - addEnforcedVertex(faceItem, 0, 0, 0, myEnfVertex->GetName(),myEnfVertex->GetStudyEntry(), groupName); + addEnforcedVertex(0, 0, 0, myEnfVertex->GetName(),myEnfVertex->GetStudyEntry(), groupName); } } } } - myEnfFaceWdg->SetObject(GEOM::GEOM_Object::_nil()); + //myEnfFaceWdg->SetObject(GEOM::GEOM_Object::_nil()); myEnfVertexWdg->SetObject(GEOM::GEOM_Object::_nil()); for (int column = 0; column < myEnforcedTreeWidget->columnCount(); ++column) @@ -1542,7 +1509,6 @@ void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() { This method is called when a item is removed from the enforced vertices tree widget */ void BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex() { -// MESSAGE("BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex"); QList selectedItems = myEnforcedTreeWidget->selectedItems(); QList selectedVertices; QSet selectedEntries; @@ -1563,10 +1529,10 @@ void BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex() { foreach(item,selectedVertices) { QTreeWidgetItem* parent = item->parent(); -// MESSAGE("From geometry "<< parent->text(ENF_VER_NAME_COLUMN).toStdString()<<" remove " << item->text(ENF_VER_NAME_COLUMN).toStdString()); - parent->removeChild(item); + if ( parent ) + parent->removeChild(item); delete item; - if (parent->childCount() == 0) { + if ( parent && parent->childCount() == 0) { if (selectedEntries.contains(parent)) selectedEntries.remove(parent); delete parent; @@ -1574,7 +1540,6 @@ void BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex() { } foreach(item,selectedEntries) { -// MESSAGE("Remove " << item->text(ENF_VER_NAME_COLUMN).toStdString()); delete item; } @@ -1591,7 +1556,6 @@ void BLSURFPluginGUI_HypothesisCreator::onInternalVerticesClicked(int state) This method is called when a item is added into the periodicity table widget */ void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() { -// MESSAGE("BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices"); BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; @@ -1673,12 +1637,10 @@ void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() { This method is called when a item is removed from the periodicity tree widget */ void BLSURFPluginGUI_HypothesisCreator::onRemovePeriodicity() { -// MESSAGE("BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex"); QList selectedItems = myPeriodicityTreeWidget->selectedItems(); QTreeWidgetItem* item; foreach(item,selectedItems) { - MESSAGE("Remove " << item->text(0).toStdString()); delete item; } @@ -1708,7 +1670,6 @@ This method enable the proper shape selection widget to Face or Edge shapes //{ // if (myPeriodicityOnFaceRadioButton->isChecked()) // { -// MESSAGE("Show Face"); // myPeriodicitySourceEdgeWdg->hide(); // myPeriodicityTargetEdgeWdg->hide(); // myPeriodicitySourceFaceWdg->show(); @@ -1716,7 +1677,6 @@ This method enable the proper shape selection widget to Face or Edge shapes // } // else // { -// MESSAGE("Show Edge"); // myPeriodicitySourceFaceWdg->hide(); // myPeriodicityTargetFaceWdg->hide(); // myPeriodicitySourceEdgeWdg->show(); @@ -1790,7 +1750,6 @@ This method updates the GUI widgets with the hypothesis data */ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::retrieveParams"); BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; BlsurfHypothesisData data; @@ -1887,7 +1846,6 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const // myGMFFileMode->setChecked(data.myGMFFileMode); // Sizemaps - MESSAGE("retrieveParams():that->mySMPMap.size() = " << that->mySMPMap.size()); QMapIterator i(that->mySMPMap); GeomSelectionTools* myGeomToolSelected = that->getGeomSelectionTool(); while (i.hasNext()) { @@ -1931,16 +1889,13 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const mySizeMapTable->resizeColumnToContents(SMP_SIZEMAP_COLUMN); // Enforced vertices - MESSAGE("retrieveParams(): data.entryCoordsListMap.size() = " << data.faceEntryEnfVertexListMap.size()); TFaceEntryEnfVertexListMap::const_iterator evmIt = data.faceEntryEnfVertexListMap.begin(); for ( ; evmIt != data.faceEntryEnfVertexListMap.end() ; ++evmIt) { TEntry entry = (*evmIt).first; std::string shapeName = myGeomToolSelected->getNameFromEntry(entry); - MESSAGE("Face entry: " << entry); - MESSAGE("Face name: " << shapeName); - QTreeWidgetItem* faceItem = that->addEnforcedFace(entry, shapeName); + //QTreeWidgetItem* faceItem = that->addEnforcedFace(entry, shapeName); TEnfVertexList evs = (*evmIt).second; @@ -1948,14 +1903,13 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const TEnfVertex *enfVertex; for ( ; evsIt != evs.end() ; ++evsIt) { enfVertex = (*evsIt); - MESSAGE("Name: " << enfVertex->name); double x = 0, y = 0, z = 0; if (enfVertex->coords.size()) { x = enfVertex->coords[0]; y = enfVertex->coords[1]; z = enfVertex->coords[2]; } - that->addEnforcedVertex(faceItem, x, y, z, enfVertex->name, enfVertex->geomEntry, enfVertex->grpName); + that->addEnforcedVertex(x, y, z, enfVertex->name, enfVertex->geomEntry, enfVertex->grpName); } } @@ -1967,7 +1921,6 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const myInternalEnforcedVerticesAllFacesGroup->setEnabled(data.myInternalEnforcedVerticesAllFaces); // Periodicity - MESSAGE("retrieveParams(): periodicity "); // Add an item in the tree widget for each association @@ -1997,7 +1950,6 @@ This method updates the hypothesis data with the GUI widgets content. */ QString BLSURFPluginGUI_HypothesisCreator::storeParams() const { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::storeParams"); BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; BlsurfHypothesisData data; @@ -2012,7 +1964,6 @@ Updates the hypothesis data from hypothesis values. */ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData& h_data ) const { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo"); BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( initParamsHypothesis() ); @@ -2077,18 +2028,15 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData // classic size maps BLSURFPlugin::string_array_var mySizeMaps = h->GetSizeMapEntries(); -// MESSAGE("mySizeMaps->length() = " << mySizeMaps->length()); QString fullSizeMaps; QStringList fullSizeMapList; GeomSelectionTools* myGeomToolSelected = that->getGeomSelectionTool(); for ( CORBA::ULong i = 0;ilength(); ++i ) { fullSizeMaps = mySizeMaps[i].in(); -// MESSAGE("fullSizeMaps: " << fullSizeMaps.toStdString()); fullSizeMapList = fullSizeMaps.split( "|", QString::KeepEmptyParts ); if ( fullSizeMapList.count() > 1 ) { string fullSizeMap = fullSizeMapList[1].toStdString(); int pos = fullSizeMap.find("return")+7; -// MESSAGE("pos:" << pos); QString sizeMap; try { sizeMap = QString::fromStdString(fullSizeMap.substr(pos, fullSizeMap.size()-pos)); @@ -2097,16 +2045,13 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData continue; } that->mySMPMap[fullSizeMapList[0]] = sizeMap; -// MESSAGE("mySMPMap[" << fullSizeMapList[0].toStdString() << "] = " << sizeMap.toStdString()); that->mySMPShapeTypeMap[fullSizeMapList[0]] = myGeomToolSelected->entryToShapeType(fullSizeMapList[0].toStdString()); -// MESSAGE("mySMPShapeTypeMap[" << fullSizeMapList[0].toStdString() << "] = " << that->mySMPShapeTypeMap[fullSizeMapList[0]]); } } // custom size maps /* BLSURFPlugin::string_array_var myCustomSizeMaps = h->GetCustomSizeMapEntries(); - MESSAGE("myCustomSizeMaps->length() = " << myCustomSizeMaps->length()); for ( int i = 0;ilength(); ++i ) { QString fullCustomSizeMaps = myCustomSizeMaps[i].in(); @@ -2114,14 +2059,11 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData if ( fullCustomSizeMapList.count() > 1 ) { that->mySMPMap[fullCustomSizeMapList[0]] = fullCustomSizeMapList[1]; that->mySMPShapeTypeMap[fullCustomSizeMapList[0]] = GeomToolSelected->entryToShapeType(fullCustomSizeMapList[0].toStdString()); - MESSAGE("mySMPMap[" << fullCustomSizeMapList[0].toStdString() << "] = " << fullCustomSizeMapList[1].toStdString()); - MESSAGE("mySMPShapeTypeMap[" << fullCustomSizeMapList[0].toStdString() << "] = " << that->mySMPShapeTypeMap[fullCustomSizeMapList[0]]); } } */ // attractor BLSURFPlugin::string_array_var allMyAttractors = h->GetAttractorEntries(); -// MESSAGE("myAttractors->length() = " << allMyAttractors->length()); for ( CORBA::ULong i = 0;ilength(); ++i ) { QString myAttractors = allMyAttractors[i].in(); @@ -2129,19 +2071,15 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData if ( myAttractorList.count() > 1 ) { that->mySMPMap[myAttractorList[0]] = myAttractorList[1]; that->mySMPShapeTypeMap[myAttractorList[0]] = myGeomToolSelected->entryToShapeType(myAttractorList[0].toStdString()); -// MESSAGE("mySMPMap[" << myAttractorList[0].toStdString() << "] = " << myAttractorList[1].toStdString()); -// MESSAGE("mySMPShapeTypeMap[" << myAttractorList[0].toStdString() << "] = " << that->mySMPShapeTypeMap[myAttractorList[0]]); } } // attractor new version - MESSAGE("readParamsFromHypo, Attractors") BLSURFPlugin::TAttParamsMap_var allMyAttractorParams = h->GetAttractorParams(); for ( CORBA::ULong i = 0;ilength(); ++i ) { BLSURFPlugin::TAttractorParams myAttractorParams = allMyAttractorParams[i]; QString faceEntry = myAttractorParams.faceEntry.in(); QString attEntry = myAttractorParams.attEntry.in(); - MESSAGE("attEntry = "<mySMPMap[faceEntry] = QString::number( myAttractorParams.startSize, 'g', 6 ); // TODO utiliser les préférences ici (cf. sketcher) that->mySMPShapeTypeMap[faceEntry] = myGeomToolSelected->entryToShapeType(faceEntry.toStdString()); that->myATTMap[faceEntry].push_back( TAttractor( myAttractorParams.attEntry.in(), @@ -2158,22 +2096,18 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData */ BLSURFPlugin::TFaceEntryEnfVertexListMap_var faceEntryEnfVertexListMap = h->GetAllEnforcedVerticesByFace(); - MESSAGE("faceEntryEnfVertexListMap->length() = " << faceEntryEnfVertexListMap->length()); - for ( CORBA::ULong i = 0;ilength(); ++i ) { - std::string entry = faceEntryEnfVertexListMap[i].faceEntry.in(); -// BLSURFPlugin::TEnfVertexList vertexList = faceEntryEnfVertexListMap[i].enfVertexList.in(); + for ( CORBA::ULong i = 0;ilength(); ++i ) + { + std::string entry = faceEntryEnfVertexListMap[i].faceEntry.in(); BLSURFPlugin::TEnfVertexList vertexList = faceEntryEnfVertexListMap[i].enfVertexList; -// BLSURFPlugin::TEnfVertexList_var vertexList = h->GetEnforcedVerticesEntry(entry.c_str()); - -// TEnfVertexList& enfVertexList = h_data.faceEntryEnfVertexListMap[entry]; - for (CORBA::ULong j=0 ; jname = CORBA::string_dup(vertexList[j].name.in()); - enfVertex->geomEntry = CORBA::string_dup(vertexList[j].geomEntry.in()); - enfVertex->grpName = CORBA::string_dup(vertexList[j].grpName.in()); + enfVertex->name = vertexList[j].name.in(); + enfVertex->geomEntry = vertexList[j].geomEntry.in(); + enfVertex->grpName = vertexList[j].grpName.in(); for (CORBA::ULong k=0 ; k< vertexList[j].coords.length();k++) enfVertex->coords.push_back(vertexList[j].coords[k]); @@ -2196,7 +2130,6 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData h_data.myInternalEnforcedVerticesAllFacesGroup = h->GetInternalEnforcedVertexAllFacesGroup(); // Periodicity - MESSAGE("readParamsFromHypo, Periodicity") h_data.preCadPeriodicityVector.clear(); @@ -2249,7 +2182,6 @@ Saves the hypothesis data to hypothesis values. */ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesisData& h_data ) const { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo"); BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( hypothesis() ); @@ -2364,15 +2296,12 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi const QString sizeMap = i.value(); if (sizeMap == "__TO_DELETE__") { - MESSAGE("Delete entry " << entry.toStdString() << " from engine"); h->UnsetEntry(entry.toLatin1().constData()); } else if (sizeMap.startsWith("ATTRACTOR")) { -// MESSAGE("SetAttractorEntry(" << entry.toStdString() << ")= " << sizeMap.toStdString()); h->SetAttractorEntry( entry.toLatin1().constData(), sizeMap.toLatin1().constData()); } else if (sizeMap.startsWith("def")) { -// MESSAGE("SetCustomSizeMapEntry(" << entry.toStdString() << ")= " << sizeMap.toStdString()); // h->SetCustomSizeMapEntry( entry.toLatin1().constData(), sizeMap.toLatin1().constData() ); } else { @@ -2401,7 +2330,6 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi fullSizeMap = QString("def f(t): return ") + sizeMap; else if (that->mySMPShapeTypeMap[entry] == TopAbs_VERTEX) fullSizeMap = QString("def f(): return ") + sizeMap; - MESSAGE("SetSizeMapEntry("<SetSizeMapEntry( entry.toLatin1().constData(), fullSizeMap.toLatin1().constData() ); } } @@ -2428,7 +2356,6 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi { faceEntry = evmIt->first; evs = evmIt->second; - MESSAGE("Number of enforced vertices for face entry " << faceEntry << ": " << evs.size()); evsIt = evs.begin(); for ( ; evsIt != evs.end() ; ++evsIt) { @@ -2452,7 +2379,6 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi if ( h->GetPreCadFacesPeriodicityVector()->length() > 0 || h->GetPreCadEdgesPeriodicityVector()->length() > 0 ) h->ClearPreCadPeriodicityVectors(); - MESSAGE("h_data.preCadPeriodicityVector.size(): " << h_data.preCadPeriodicityVector.size()); TPreCadPeriodicityVector::const_iterator pIt = h_data.preCadPeriodicityVector.begin(); for ( ; pIt != h_data.preCadPeriodicityVector.end() ; ++pIt) { @@ -2492,7 +2418,6 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi h->AddPreCadEdgesPeriodicityEntry(source.c_str(), target.c_str(), sourceVertices, targetVertices); } - MESSAGE("BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo end periodicity"); } // try @@ -2506,7 +2431,6 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi // // SalomeApp_Tools::QtCatchCorbaException(ex); // // ok = false; // } - MESSAGE("BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo end"); return ok; } @@ -2515,7 +2439,6 @@ Stores the widgets content to the hypothesis data. */ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothesisData& h_data ) const { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets"); h_data.myName = myName ? myName->text() : ""; h_data.myPhysicalMesh = myStdWidget->myPhysicalMesh->currentIndex(); h_data.myGeometricMesh = myStdWidget->myGeometricMesh->currentIndex(); @@ -2588,9 +2511,9 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes int row = 0, nbRows = mySizeMapTable->topLevelItemCount(); for ( ; row < nbRows; ++row ) { - QString entry = mySizeMapTable->topLevelItem(row)->data(SMP_ENTRY_COLUMN ,Qt::EditRole).toString(); - if ( that->mySMPMap.contains(entry) ) - guiHyp += "SetSizeMapEntry(" + entry + ", " + that->mySMPMap[entry] + "); "; + QString entry = mySizeMapTable->topLevelItem(row)->data(SMP_ENTRY_COLUMN ,Qt::EditRole).toString(); + if ( that->mySMPMap.contains(entry) ) + guiHyp += "SetSizeMapEntry(" + entry + ", " + that->mySMPMap[entry] + "); "; } // Enforced vertices @@ -2598,54 +2521,42 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes h_data.faceEntryEnfVertexListMap.clear(); int nbEnforcedShapes = myEnforcedTreeWidget->topLevelItemCount(); - int nbEnforcedVertices = 0; - std::string groupName = ""; -// MESSAGE("Nb of enforced shapes: " << nbEnforcedShapes); - for (int i=0 ; itopLevelItem(i); - if (shapeItem) { - std::string faceEntry = shapeItem->data(ENF_VER_FACE_ENTRY_COLUMN,Qt::EditRole).toString().toStdString(); - nbEnforcedVertices = shapeItem->childCount(); - if (nbEnforcedVertices >0) { - double childValueX,childValueY,childValueZ; - std::string childName, vertexEntry; - QTreeWidgetItem* child; - TEnfVertexList evs; - evs.clear(); - for (row = 0;rowchild(row); - childName = child->data(ENF_VER_NAME_COLUMN,Qt::EditRole).toString().toStdString(); - childValueX = child->data(ENF_VER_X_COLUMN,Qt::EditRole).toDouble(); - childValueY = child->data(ENF_VER_Y_COLUMN,Qt::EditRole).toDouble(); - childValueZ = child->data(ENF_VER_Z_COLUMN,Qt::EditRole).toDouble(); - vertexEntry = child->data(ENF_VER_ENTRY_COLUMN,Qt::EditRole).toString().toStdString(); -// if (myGlobalGroupName->isChecked()) -// groupName = myGlobalGroupName->text().toStdString(); -// else - groupName = child->data(ENF_VER_GROUP_COLUMN,Qt::EditRole).toString().toStdString(); - - TEnfVertex *enfVertex = new TEnfVertex(); - enfVertex->name = childName; - if (vertexEntry.empty()) { - enfVertex->coords.push_back(childValueX); - enfVertex->coords.push_back(childValueY); - enfVertex->coords.push_back(childValueZ); - } - else - enfVertex->geomEntry = vertexEntry; - enfVertex->grpName = groupName; -// TEnfVertexList::iterator it = h_data.enfVertexList.find(enfVertex); -// if (it == h_data.enfVertexList.end()) - h_data.enfVertexList.insert(enfVertex); - evs.insert(enfVertex); - /* TODO GROUPS - if (groupName != "") - h_data.groupNameEnfVertexListMap[groupName].insert(vertex); - */ - } - h_data.faceEntryEnfVertexListMap[faceEntry] = evs; - } + std::string groupName = "", faceEntry = ""; + for (int i=0 ; itopLevelItem(i); + childName = child->data(ENF_VER_NAME_COLUMN,Qt::EditRole).toString().toStdString(); + childValueX = child->data(ENF_VER_X_COLUMN,Qt::EditRole).toDouble(); + childValueY = child->data(ENF_VER_Y_COLUMN,Qt::EditRole).toDouble(); + childValueZ = child->data(ENF_VER_Z_COLUMN,Qt::EditRole).toDouble(); + vertexEntry = child->data(ENF_VER_ENTRY_COLUMN,Qt::EditRole).toString().toStdString(); + // if (myGlobalGroupName->isChecked()) + // groupName = myGlobalGroupName->text().toStdString(); + // else + groupName = child->data(ENF_VER_GROUP_COLUMN,Qt::EditRole).toString().toStdString(); + + TEnfVertex *enfVertex = new TEnfVertex(); + enfVertex->name = childName; + if (vertexEntry.empty()) { + enfVertex->coords.push_back(childValueX); + enfVertex->coords.push_back(childValueY); + enfVertex->coords.push_back(childValueZ); } + else + enfVertex->geomEntry = vertexEntry; + enfVertex->grpName = groupName; + // TEnfVertexList::iterator it = h_data.enfVertexList.find(enfVertex); + // if (it == h_data.enfVertexList.end()) + h_data.enfVertexList.insert(enfVertex); + /* TODO GROUPS + if (groupName != "") + h_data.groupNameEnfVertexListMap[groupName].insert(vertex); + */ + h_data.faceEntryEnfVertexListMap[faceEntry].insert( enfVertex ); } h_data.myInternalEnforcedVerticesAllFaces = myInternalEnforcedVerticesAllFaces->isChecked(); @@ -2661,9 +2572,7 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes if (item) { for (int k=0; kcolumnCount(); ++k) { - MESSAGE(k); std::string entry = item->data(k, Qt::UserRole).toString().toStdString(); - MESSAGE(entry); periodicity_i.push_back(entry); } h_data.preCadPeriodicityVector.push_back(periodicity_i); @@ -2671,7 +2580,6 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes guiHyp += "PERIODICITY = yes; "; } - MESSAGE("guiHyp : " << guiHyp.toLatin1().data()); return guiHyp; } @@ -2726,7 +2634,6 @@ void BLSURFPluginGUI_HypothesisCreator::onMapGeomContentModified() void BLSURFPluginGUI_HypothesisCreator::onSmpItemClicked(QTreeWidgetItem * item, int col) { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::onSmpItemClicked("<data( SMP_ENTRY_COLUMN, Qt::EditRole ).toString(); @@ -2800,7 +2707,7 @@ void BLSURFPluginGUI_HypothesisCreator::onTabChanged(int tab) myGeomSelWdg1 ->deactivateSelection(); myGeomSelWdg2 ->deactivateSelection(); myAttSelWdg ->deactivateSelection(); - myEnfFaceWdg ->deactivateSelection(); + //myEnfFaceWdg ->deactivateSelection(); myEnfVertexWdg ->deactivateSelection(); myPeriodicitySourceFaceWdg->deactivateSelection(); myPeriodicityTargetFaceWdg->deactivateSelection(); @@ -2892,7 +2799,6 @@ void BLSURFPluginGUI_HypothesisCreator::onConstSizeClicked(int state) void BLSURFPluginGUI_HypothesisCreator::onRemoveMap() { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::onRemoveMap()"); QList selectedRows; QList selected = mySizeMapTable->selectedItems(); QTreeWidgetItem* item; @@ -2940,15 +2846,11 @@ void BLSURFPluginGUI_HypothesisCreator::onRemoveMap() void BLSURFPluginGUI_HypothesisCreator::onSetSizeMap(QTreeWidgetItem* item, int col) { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::onSetSizeMap("<< col << ")"); - MESSAGE("mySMPMap.size() = "<data(SMP_ENTRY_COLUMN, Qt::EditRole).toString(); QString sizeMap = item->data(SMP_SIZEMAP_COLUMN, Qt::EditRole).toString(); - MESSAGE("entry: " << entry.toStdString() << ", sizeMap: " << sizeMap.toStdString()); if (! that->mySMPShapeTypeMap.contains(entry)) - MESSAGE("no such entry in mySMPShapeTypeMap") return; if (that->mySMPMap.contains(entry)) if (that->mySMPMap[entry] == sizeMap @@ -2961,7 +2863,6 @@ void BLSURFPluginGUI_HypothesisCreator::onSetSizeMap(QTreeWidgetItem* item, int sizeMapValidationFromEntry(entry); } else { - MESSAGE("Size map empty: reverse to precedent value" ); item->setData(SMP_SIZEMAP_COLUMN, Qt::EditRole, QVariant(that->mySMPMap[entry]) ); } mySizeMapTable->resizeColumnToContents(SMP_SIZEMAP_COLUMN); @@ -3007,7 +2908,6 @@ void BLSURFPluginGUI_HypothesisCreator::onAddMap() void BLSURFPluginGUI_HypothesisCreator::onModifyMap() { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::onModifyMap()"); bool res = false; if ( smpTab->currentIndex() == ATT_TAB ){ if ( myGeomSelWdg2->IsObjectSelected() && myAttSelWdg->IsObjectSelected() ){ @@ -3045,7 +2945,6 @@ void BLSURFPluginGUI_HypothesisCreator::onModifyMap() bool BLSURFPluginGUI_HypothesisCreator::insertElement(GEOM::GEOM_Object_var anObject, bool modify) { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::insertElement()"); // BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = // BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( initParamsHypothesis()); @@ -3054,7 +2953,6 @@ bool BLSURFPluginGUI_HypothesisCreator::insertElement(GEOM::GEOM_Object_var anOb TopAbs_ShapeEnum shapeType; string entry, shapeName; entry = (string) anObject->GetStudyEntry(); - MESSAGE("entry = "<GetName(); shapeType = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( anObject ).ShapeType(); // Group management : the type of entities in the group is stored in the SMPShapeTypeMap @@ -3092,7 +2990,6 @@ bool BLSURFPluginGUI_HypothesisCreator::insertElement(GEOM::GEOM_Object_var anOb else{ if (that->mySMPMap.contains(shapeEntry)) { if (that->mySMPMap[shapeEntry] != "__TO_DELETE__") { - // MESSAGE("Size map for shape with name(entry): "<< shapeName << "(" << entry << ")"); return false; } } @@ -3119,7 +3016,6 @@ bool BLSURFPluginGUI_HypothesisCreator::insertElement(GEOM::GEOM_Object_var anOb bool BLSURFPluginGUI_HypothesisCreator::insertAttractor(GEOM::GEOM_Object_var aFace, GEOM::GEOM_Object_var anAttractor, bool modify) { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::insertAttractor()"); BLSURFPlugin::BLSURFPlugin_Hypothesis_var h = BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( initParamsHypothesis()); @@ -3180,7 +3076,6 @@ bool BLSURFPluginGUI_HypothesisCreator::insertAttractor(GEOM::GEOM_Object_var aF else{ // if (that->mySMPMap.contains(shapeEntry)) { // if (that->mySMPMap[shapeEntry] != "__TO_DELETE__") { - // // MESSAGE("Size map for shape with name(entry): "<< shapeName << "(" << entry << ")"); // return false; // } // } @@ -3232,13 +3127,11 @@ bool BLSURFPluginGUI_HypothesisCreator::insertAttractor(GEOM::GEOM_Object_var aF myStdWidget->myPhysicalMesh->setCurrentIndex( PhysicalLocalSize ); myStdWidget->onPhysicalMeshChanged(); } - MESSAGE("mySMPMap.size() = "<topLevelItemCount(); for ( ; row < nbRows; ++row ) if (! sizeMapValidationFromRow(row)) @@ -3248,7 +3141,6 @@ bool BLSURFPluginGUI_HypothesisCreator::sizeMapsValidation() bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromRow(int myRow, bool displayError) { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromRow(), row = "<topLevelItem( myRow )->data( SMP_ENTRY_COLUMN, Qt::EditRole ).toString(); bool res = sizeMapValidationFromEntry(myEntry,displayError); mySizeMapTable->setFocus(); @@ -3257,28 +3149,22 @@ bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromRow(int myRow, bool bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry(QString myEntry, bool displayError) { - MESSAGE("BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry()"); - MESSAGE("myEntry = "<mySMPMap.contains(myEntry)) { -// MESSAGE("Geometry with entry "<mySMPShapeTypeMap.contains(myEntry)) { -// MESSAGE("Shape type with entry "<mySMPMap[myEntry].startsWith("def")) { -// MESSAGE("custom function" ); expr = that->mySMPMap[myEntry].toStdString(); } else if (that->mySMPMap[myEntry].startsWith("ATTRACTOR")) { -// MESSAGE("Attractor" ); if ((that->mySMPMap[myEntry].count(QRegExp("^ATTRACTOR\\((?:(-?0(\\.\\d*)*|-?[1-9]+\\d*(\\.\\d*)*|-?\\.(\\d)+);){5}(True|False)(?:;(-?0(\\.\\d*)*|-?[1-9]+\\d*(\\.\\d*)*|-?\\.(\\d)+))?\\)$")) != 1)) { if (displayError) @@ -3347,7 +3233,6 @@ bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry(QString myEnt PyGILState_Release(gstate); -// MESSAGE("SizeMap expression "<