From a8bd0694f247ff64404cac9d60661022f38a117e Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 31 Oct 2016 16:16:25 +0300 Subject: [PATCH] 23368: [CEA 1865] Possibility to define faces to mesh as a single one: transpatch mesh --- .../images/blsurf_parameters_hyperpatch.png | Bin 0 -> 17005 bytes .../gui/BLSURFPLUGIN/input/blsurf_hypo.doc | 21 + idl/BLSURFPlugin_Algorithm.idl | 10 + src/BLSURFPlugin/BLSURFPluginBuilder.py | 32 ++ src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 45 +- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx | 246 +++++++--- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx | 10 + .../BLSURFPlugin_Hypothesis_i.cxx | 45 ++ .../BLSURFPlugin_Hypothesis_i.hxx | 3 + src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 440 ++++++++++++------ src/GUI/BLSURFPluginGUI_HypothesisCreator.h | 76 +-- src/GUI/BLSURFPlugin_msg_en.ts | 24 +- 12 files changed, 692 insertions(+), 260 deletions(-) create mode 100644 doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_hyperpatch.png diff --git a/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_hyperpatch.png b/doc/salome/gui/BLSURFPLUGIN/images/blsurf_parameters_hyperpatch.png new file mode 100644 index 0000000000000000000000000000000000000000..49904b9d4cf1f2f5eeed7aa3673e24b79d677428 GIT binary patch literal 17005 zcmeIacT`i^yFVNY78qev5T)vfq9C9kAYDPabV4sGf^-xJfly+Fk*ZYbA|;RjkzN8s zWgrUD36T;|sYytvp#%cI&CLDYy59EZyVi9rR?Oj)eRg@C=TkPXOpSGqaSCukAdqAF zdbiCXko|TL$Ugj$L*U30qpWyq^M|!pa;CvGJd9}~&ciMXh zZK}DyKh$vU!fN?@tmUV6lUtW1^q`2t6i%z?_jg+l zJ$qvFp|@iHA5U#4*-zf>-u@0E+hTf((#={bM zB`>cfXAMb(2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Wysm^$EC~J;CVj1!0q!}b%N^4XY=YspFVK}F8$J=j9dhTgshd7l2!VRnSxYs z9-S^cAB3A%$aGGFkB8`jeznlkI}Wr4lZBS8a*L2hkMPp`KuSZMt%hzr6CD>D%kz;emz`N;)?mGH(j?%Z} zP-3pIQh$55s$q7csv0~eCqqsb6zAr^r$~ISZ3uk&h9*7Pv&HB2Re~7isP1egC_)j7 zpQ5(M{UnRpDHK$WIc>-%S=_`4NFGi=eS)JciXZ*S8O3WxSB3!#l3>d)%c(2&Uh=Q&xI4B=X@soTeaOR{Tj;j=kG>2 zs@lN%WIkF;4_y3_cPC&QE?PaWfR_fA-Kq=)FKTtU?TXu;=U!OD&>ZZ_y6!)v2Wzgv zOl-|lvIUCTOCBe+r^5D>GyocCZT!xIZ?Cyzu@F+y#-Zyv9;{Ul0lA>keDA4ZGqhP% zpp0s6anym9WEZ45DW|d-g1gs;=%`>_6LG#tk3Ki(rccCHqXYILfH*W-U*3 z(=CxeL9}b|PdUUbB&NS7Jt*l?YW*l90+5eMvFbayaY~b`0XBX2^#sY)JyM^D<4y|v zF4_saCGtUI!9L_hC?Mq%fZe3%@uax>;*U?45BYDLG?_!L@0vI^j+eAX@obg#Q=6`}{JJiEv^-2B?LYsx|MZ$;=66F#A5t`$L^tfssnATLipK2K5hOHfJ#D#{;h z_WA_k@lKe$NB@lhpNwhzk+B8z1f^7O3E0qz)dd;ydZGXT~4;G4fN!T}B$Al5ryP29x4kwV9${o3$I0--Co8MD-cQoN}F0w-LrT zL=>+M`HT_^y{s>YiJhj~1f2v@raZZnQ4CE$gWYb_jlS~{qb7b3?eRz?T(s-!! zb1OZ)dw|3=fEz7yu(U6ov@D*rr62op9-u>rfF`Ho1x`kGMY>8jfnSYYaw4ez=qHfQa3-M?TxdlG7{wKm)-X)q{%`MX|0NaNl5Pfaq K+vS>fpZyHyper-patch IDs table - shows IDs of faces of defined hyper-patches. + +- Face selection - activates selection of faces in the VTK Viewer. + +- Group selection - activates selection of faces and groups of + faces in the Object Browser. + +- \b IDs - allows typing IDs of faces composing a hyper-patch and + shows IDs of faces selected in the Viewer or the Object Browser. + +- \b Add - adds a new row to the table and moves \b IDs there. + +- \b Remove - removes selected hyper-patches from the table. + \ref blsurf_top "Back to top" For more information on MeshGems-CADSurf, you can read its documentation at $MESHGEMS_ROOT_DIR/Docs/mg-cadsurf_user_manual.pdf diff --git a/idl/BLSURFPlugin_Algorithm.idl b/idl/BLSURFPlugin_Algorithm.idl index 9846997..1296ba1 100644 --- a/idl/BLSURFPlugin_Algorithm.idl +++ b/idl/BLSURFPlugin_Algorithm.idl @@ -119,6 +119,10 @@ module BLSURFPlugin }; typedef sequence TPeriodicityList; + + // Hyper-patches + typedef sequence THyperPatch; + typedef sequence THyperPatchList; /*! * BLSURFPlugin_BLSURF: interface of BLSURF algorithm @@ -430,6 +434,12 @@ module BLSURFPlugin void SetTags( in string howToTreat ) raises (SALOME::SALOME_Exception); string GetTags(); + /*! + * Set hyper-patches + */ + void SetHyperPatches(in THyperPatchList hpl); + THyperPatchList GetHyperPatches(); + /*! * To merges edges. */ diff --git a/src/BLSURFPlugin/BLSURFPluginBuilder.py b/src/BLSURFPlugin/BLSURFPluginBuilder.py index f61279b..9fd78e9 100644 --- a/src/BLSURFPlugin/BLSURFPluginBuilder.py +++ b/src/BLSURFPlugin/BLSURFPluginBuilder.py @@ -22,6 +22,7 @@ # Python API for the MG-CADSurf meshing plug-in module. from salome.smesh.smesh_algorithm import Mesh_Algorithm +import GEOM LIBRARY = "libBLSURFEngine.so" @@ -695,6 +696,37 @@ class BLSURF_Algorithm(Mesh_Algorithm): self.Parameters().AddPreCadEdgesPeriodicity(theEdge1, theEdge2) pass + #----------------------------------------- + # Hyper-Patches + #----------------------------------------- + + ## Defines hyper-patches. A hyper-patch is a set of adjacent faces meshed as a whole, + # ignoring edges between them + # @param hyperPatchList : list of hyper-patches. A hyper-patch is defined as a list of + # faces or groups of faces. A face can be identified either as a GEOM object or + # a face ID (returned e.g. by geompy.GetSubShapeID( mainShape, subShape )). + # + # Example: cadsurf.SetHyperPatches([[ Face_1, Group_2 ],[ 13, 23 ]]) + def SetHyperPatches(self, hyperPatchList): + hpl = [] + for patch in hyperPatchList: + ids = [] + for face in patch: + if isinstance( face, int ): + ids.append( face ) + elif isinstance( face, GEOM._objref_GEOM_Object): + faces = self.mesh.geompyD.SubShapeAll( face, self.mesh.geompyD.ShapeType["FACE"] ) + for f in faces: + ids.append( self.mesh.geompyD.GetSubShapeID( self.mesh.geom, f )) + else: + raise TypeError, \ + "Face of hyper-patch should be either ID or GEOM_Object, not %s" % type(face) + pass + hpl.append( ids ) + pass + self.Parameters().SetHyperPatches( hpl ) + return + #===================== # Obsolete methods #===================== diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 9c59492..8a91ab3 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -1940,10 +1940,6 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, f.Orientation(TopAbs_FORWARD); iface = fmap.Add(f); -// std::string aFileName = "fmap_face_"; -// aFileName.append(val_to_string(iface)); -// aFileName.append(".brep"); -// BRepTools::Write(f,aFileName.c_str()); surfaces.push_back(BRep_Tool::Surface(f)); @@ -1961,7 +1957,8 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, /* by default a face has no tag (color). The following call sets it to the same value as the Geom module ID : */ - const int faceTag = meshDS->ShapeToIndex(f); + int faceTag = meshDS->ShapeToIndex(f); + faceTag = BLSURFPlugin_Hypothesis::GetHyperPatchTag( faceTag, _hypothesis ); cad_face_set_tag(fce, faceTag); /* Set face orientation (optional if you want a well oriented output mesh)*/ @@ -2127,11 +2124,6 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, if (ic <= 0) ic = emap.Add(e); -// std::string aFileName = "fmap_edge_"; -// aFileName.append(val_to_string(ic)); -// aFileName.append(".brep"); -// BRepTools::Write(e,aFileName.c_str()); - double tmin,tmax; curves.push_back(BRep_Tool::CurveOnSurface(e, f, tmin, tmax)); @@ -2198,7 +2190,25 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, /* by default an edge has no tag (color). The following call sets it to the same value as the edge_id : */ - cad_edge_set_tag(edg, ic); + // IMP23368. Do not set tag to an EDGE shared by FACEs of a hyper-patch + bool isInHyperPatch = false; + { + std::set< int > faceTags; + PShapeIteratorPtr faceIf = helper.GetAncestors( e, aMesh, TopAbs_FACE ); + while ( const TopoDS_Shape* face = faceIf->next() ) + if ( helper.IsSubShape( *face, aShape )) + { + int faceTag = meshDS->ShapeToIndex( *face ); + int hpTag = BLSURFPlugin_Hypothesis::GetHyperPatchTag( faceTag, _hypothesis ); + if ( !faceTags.insert( hpTag ).second ) + { + isInHyperPatch = true; + break; + } + } + } + if ( !isInHyperPatch ) + cad_edge_set_tag(edg, ic); /* by default, an edge does not necessalry appear in the resulting mesh, unless the following property is set : @@ -2800,8 +2810,17 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, SMESH_subMesh* sm = aMesh.GetSubMesh( f ); if ( !sm->GetSubMeshDS() || sm->GetSubMeshDS()->NbElements() == 0 ) { - sm->GetComputeError().reset( new SMESH_ComputeError( err, _comment, this )); - badFaceFound = true; + int faceTag = sm->GetId(); + if ( faceTag != BLSURFPlugin_Hypothesis::GetHyperPatchTag( faceTag, _hypothesis )) + { + // triangles are assigned to the first face of hyper-patch + sm->SetIsAlwaysComputed( true ); + } + else + { + sm->GetComputeError().reset( new SMESH_ComputeError( err, _comment, this )); + badFaceFound = true; + } } } if ( err == COMPERR_WARNING ) diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index 7d2be5b..ca91973 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -684,6 +684,78 @@ std::string BLSURFPlugin_Hypothesis::GetTags() return GetPreCADOptionValue("tags", GET_DEFAULT()); } //============================================================================= +void BLSURFPlugin_Hypothesis::SetHyperPatches(const THyperPatchList& hpl) +{ + if ( hpl != _hyperPatchList ) + { + // join patches sharing tags + _hyperPatchList.clear(); + for ( size_t i = 0; i < hpl.size(); ++i ) + { + const THyperPatchTags& tags = hpl[i]; + if ( tags.size() < 2 ) continue; + + std::set iPatches; + if ( !_hyperPatchList.empty() ) + { + THyperPatchTags::iterator t = tags.begin(); + for ( ; t != tags.end(); ++t ) + { + int iPatch = -1; + GetHyperPatchTag( *t, this, &iPatch ); + if ( iPatch >= 0 ) + iPatches.insert( iPatch ); + } + } + + if ( iPatches.empty() ) + { + _hyperPatchList.push_back( tags ); + } + else + { + std::set::iterator iPatch = iPatches.begin(); + THyperPatchTags& mainPatch = _hyperPatchList[ *iPatch ]; + mainPatch.insert( tags.begin(), tags.end() ); + + for ( ++iPatch; iPatch != iPatches.end(); ++iPatch ) + { + mainPatch.insert( _hyperPatchList[ *iPatch ].begin(), _hyperPatchList[ *iPatch ].end() ); + _hyperPatchList[ *iPatch ].clear(); + } + if ( iPatches.size() > 1 ) + for ( int j = _hyperPatchList.size()-1; j > 0; --j ) + if ( _hyperPatchList[j].empty() ) + _hyperPatchList.erase( _hyperPatchList.begin() + j ); + } + } + NotifySubMeshesHypothesisModification(); + } +} +//============================================================================= +/*! + * \brief Return a tag of a face taking into account the hyper-patches. Optionally + * return an index of a patch including the face + */ +//================================================================================ + +int BLSURFPlugin_Hypothesis::GetHyperPatchTag( const int faceTag, + const BLSURFPlugin_Hypothesis* hyp, + int* iPatch) +{ + if ( hyp ) + { + const THyperPatchList& hpl = hyp->_hyperPatchList; + for ( size_t i = 0; i < hpl.size(); ++i ) + if ( hpl[i].count( faceTag )) + { + if ( iPatch ) *iPatch = i; + return *( hpl[i].begin() ); + } + } + return faceTag; +} +//============================================================================= void BLSURFPlugin_Hypothesis::SetPreCADMergeEdges(bool theVal) { if (theVal != ToBool( GetPreCADOptionValue("merge_edges", GET_DEFAULT()))) { @@ -753,6 +825,7 @@ bool BLSURFPlugin_Hypothesis::HasPreCADOptions(const BLSURFPlugin_Hypothesis* hy !hyp->_facesPeriodicityVector.empty() || !hyp->_edgesPeriodicityVector.empty() || !hyp->_verticesPeriodicityVector.empty() || + !hyp->GetHyperPatches().empty() || hyp->GetTopology() != FromCAD ); } @@ -1759,7 +1832,7 @@ void BLSURFPlugin_Hypothesis::ClearPreCadPeriodicityVectors() { //function : AddPreCadFacesPeriodicity //======================================================================= void BLSURFPlugin_Hypothesis::AddPreCadFacesPeriodicity(TEntry theFace1Entry, TEntry theFace2Entry, - std::vector &theSourceVerticesEntries, std::vector &theTargetVerticesEntries) { + std::vector &theSourceVerticesEntries, std::vector &theTargetVerticesEntries) { TPreCadPeriodicity preCadFacesPeriodicity; preCadFacesPeriodicity.shape1Entry = theFace1Entry; @@ -1790,37 +1863,38 @@ void BLSURFPlugin_Hypothesis::AddPreCadEdgesPeriodicity(TEntry theEdge1Entry, TE } //============================================================================= -std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save) { - // We must keep at least the same number of arguments when increasing the SALOME version - // When MG-CADSurf becomes CADMESH, some parameters were fused into a single one. Thus the same - // parameter can be written several times to keep the old global number of parameters. +std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save) +{ + // We must keep at least the same number of arguments when increasing the SALOME version + // When MG-CADSurf becomes CADMESH, some parameters were fused into a single one. Thus the same + // parameter can be written several times to keep the old global number of parameters. + + // Treat old options which are now in the advanced options + TOptionValues::iterator op_val; + int _decimesh = -1; + int _preCADRemoveNanoEdges = -1; + double _preCADEpsNano = -1.0; + op_val = _option2value.find("respect_geometry"); + if (op_val != _option2value.end()) { + std::string value = op_val->second; + if (!value.empty()) + _decimesh = value.compare("1") == 0 ? 1 : 0; + } + op_val = _preCADoption2value.find("remove_tiny_edges"); + if (op_val != _preCADoption2value.end()) { + std::string value = op_val->second; + if (!value.empty()) + _preCADRemoveNanoEdges = value.compare("1") == 0 ? 1 : 0; + } + op_val = _preCADoption2value.find("tiny_edge_length"); + if (op_val != _preCADoption2value.end()) { + std::string value = op_val->second; + if (!value.empty()) + _preCADEpsNano = strtod(value.c_str(), NULL); + } - // Treat old options which are now in the advanced options - TOptionValues::iterator op_val; - int _decimesh = -1; - int _preCADRemoveNanoEdges = -1; - double _preCADEpsNano = -1.0; - op_val = _option2value.find("respect_geometry"); - if (op_val != _option2value.end()) { - std::string value = op_val->second; - if (!value.empty()) - _decimesh = value.compare("1") == 0 ? 1 : 0; - } - op_val = _preCADoption2value.find("remove_tiny_edges"); - if (op_val != _preCADoption2value.end()) { - std::string value = op_val->second; - if (!value.empty()) - _preCADRemoveNanoEdges = value.compare("1") == 0 ? 1 : 0; - } - op_val = _preCADoption2value.find("tiny_edge_length"); - if (op_val != _preCADoption2value.end()) { - std::string value = op_val->second; - if (!value.empty()) - _preCADEpsNano = strtod(value.c_str(), NULL); - } - save << " " << (int) _topology << " " << (int) _physicalMesh << " " << (int) _geometricMesh << " " << _phySize << " " - << _angleMesh << " " << _gradation << " " << (int) _quadAllowed << " " << _decimesh; + << _angleMesh << " " << _gradation << " " << (int) _quadAllowed << " " << _decimesh; save << " " << _minSize << " " << _maxSize << " " << _angleMesh << " " << _minSize << " " << _maxSize << " " << _verb; save << " " << (int) _preCADMergeEdges << " " << _preCADRemoveNanoEdges << " " << (int) _preCADDiscardInput << " " << _preCADEpsNano ; save << " " << (int) _enforcedInternalVerticesAllFaces; @@ -1956,6 +2030,17 @@ std::ostream & BLSURFPlugin_Hypothesis::SaveTo(std::ostream & save) { SaveEdgesPeriodicity(save); SaveVerticesPeriodicity(save); + // HYPER-PATCHES + save << " " << _hyperPatchList.size() << " "; + for ( size_t i = 0; i < _hyperPatchList.size(); ++i ) + { + THyperPatchTags& patch = _hyperPatchList[i]; + save << patch.size() << " "; + THyperPatchTags::iterator tag = patch.begin(); + for ( ; tag != patch.end(); ++tag ) + save << *tag << " "; + } + return save; } @@ -2091,7 +2176,8 @@ void BLSURFPlugin_Hypothesis::SavePreCADPeriodicity(std::ostream & save, const c } //============================================================================= -std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { +std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) +{ bool isOK = true; int i; double val; @@ -2745,17 +2831,17 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { // __ENFORCED_VERTICES_BEGIN__ // __BEGIN_VERTEX__ => no name, no entry // __BEGIN_GROUP__ mon groupe __END_GROUP__ -// __BEGIN_COORDS__ 10 10 10 __END_COORDS__ -// __BEGIN_FACELIST__ 0:1:1:1:1 __END_FACELIST__ -// __END_VERTEX__ +// __BEGIN_COORDS__ 10 10 10 __END_COORDS__ +// __BEGIN_FACELIST__ 0:1:1:1:1 __END_FACELIST__ +// __END_VERTEX__ // __BEGIN_VERTEX__ => no coords -// __BEGIN_NAME__ mes points __END_NAME__ +// __BEGIN_NAME__ mes points __END_NAME__ // __BEGIN_ENTRY__ 0:1:1:4 __END_ENTRY__ // __BEGIN_GROUP__ mon groupe __END_GROUP__ // __BEGIN_FACELIST__ 0:1:1:1:3 __END_FACELIST__ -// __END_VERTEX__ +// __END_VERTEX__ // __ENFORCED_VERTICES_END__ -// +// std::string enfSeparator; std::string enfName; @@ -2764,27 +2850,28 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { TEntryList enfFaceEntryList; double enfCoords[3]; bool hasCoords = false; - + _faceEntryEnfVertexListMap.clear(); _enfVertexList.clear(); _faceEntryCoordsListMap.clear(); _coordsEnfVertexMap.clear(); _faceEntryEnfVertexEntryListMap.clear(); _enfVertexEntryEnfVertexMap.clear(); - - - while (isOK && hasEnforcedVertex) { + + + while (isOK && hasEnforcedVertex) + { isOK = static_cast(load >> enfSeparator); // __BEGIN_VERTEX__ TEnfVertex *enfVertex = new TEnfVertex(); if (enfSeparator == "__ENFORCED_VERTICES_END__") break; // __ENFORCED_VERTICES_END__ if (enfSeparator != "__BEGIN_VERTEX__") throw std::exception(); - + while (isOK) { isOK = static_cast(load >> enfSeparator); if (enfSeparator == "__END_VERTEX__") { - + enfVertex->name = enfName; enfVertex->geomEntry = enfGeomEntry; enfVertex->grpName = enfGroup; @@ -2792,9 +2879,9 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { if (hasCoords) enfVertex->coords.assign(enfCoords,enfCoords+3); enfVertex->faceEntries = enfFaceEntryList; - + _enfVertexList.insert(enfVertex); - + if (enfVertex->coords.size()) { _coordsEnfVertexMap[enfVertex->coords] = enfVertex; for (TEntryList::const_iterator it = enfVertex->faceEntries.begin() ; it != enfVertex->faceEntries.end(); ++it) { @@ -2809,7 +2896,7 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { _faceEntryEnfVertexListMap[(*it)].insert(enfVertex); } } - + enfName.clear(); enfGeomEntry.clear(); enfGroup.clear(); @@ -2817,7 +2904,7 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { hasCoords = false; break; // __END_VERTEX__ } - + if (enfSeparator == "__BEGIN_NAME__") { // __BEGIN_NAME__ while (isOK && (enfSeparator != "__END_NAME__")) { isOK = static_cast(load >> enfSeparator); @@ -2828,14 +2915,14 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { } } } - + if (enfSeparator == "__BEGIN_ENTRY__") { // __BEGIN_ENTRY__ isOK = static_cast(load >> enfGeomEntry); isOK = static_cast(load >> enfSeparator); // __END_ENTRY__ if (enfSeparator != "__END_ENTRY__") throw std::exception(); } - + if (enfSeparator == "__BEGIN_GROUP__") { // __BEGIN_GROUP__ while (isOK && (enfSeparator != "__END_GROUP__")) { isOK = static_cast(load >> enfSeparator); @@ -2846,15 +2933,15 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { } } } - + if (enfSeparator == "__BEGIN_COORDS__") { // __BEGIN_COORDS__ hasCoords = true; isOK = static_cast(load >> enfCoords[0] >> enfCoords[1] >> enfCoords[2]); isOK = static_cast(load >> enfSeparator); // __END_COORDS__ if (enfSeparator != "__END_COORDS__") throw std::exception(); - } - + } + if (enfSeparator == "__BEGIN_FACELIST__") { // __BEGIN_FACELIST__ while (isOK && (enfSeparator != "__END_FACELIST__")) { isOK = static_cast(load >> enfSeparator); @@ -2862,13 +2949,14 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { enfFaceEntryList.insert(enfSeparator); } } - } + } } } // PERIODICITY - if (hasPreCADFacesPeriodicity){ + if (hasPreCADFacesPeriodicity) + { LoadPreCADPeriodicity(load, "FACES"); isOK = static_cast(load >> option_or_sm); @@ -2884,7 +2972,8 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { } } - if (hasPreCADEdgesPeriodicity){ + if (hasPreCADEdgesPeriodicity) + { LoadPreCADPeriodicity(load, "EDGES"); isOK = static_cast(load >> option_or_sm); @@ -2898,8 +2987,9 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { } } - if (hasFacesPeriodicity){ - LoadFacesPeriodicity(load); + if (hasFacesPeriodicity) + { + LoadFacesPeriodicity(load); isOK = static_cast(load >> option_or_sm); if (isOK) { @@ -2910,8 +3000,9 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { } } - if (hasEdgesPeriodicity){ - LoadEdgesPeriodicity(load); + if (hasEdgesPeriodicity) + { + LoadEdgesPeriodicity(load); isOK = static_cast(load >> option_or_sm); if (isOK) @@ -2920,7 +3011,38 @@ std::istream & BLSURFPlugin_Hypothesis::LoadFrom(std::istream & load) { } if (hasVerticesPeriodicity) - LoadVerticesPeriodicity(load); + LoadVerticesPeriodicity(load); + + // HYPER-PATCHES + if ( !option_or_sm.empty() && option_or_sm[0] == '_' ) + isOK = static_cast(load >> option_or_sm); + if ( isOK && !option_or_sm.empty() ) + { + int nbPatches = atoi( option_or_sm.c_str() ); + if ( nbPatches >= 0 ) + { + _hyperPatchList.resize( nbPatches ); + for ( int iP = 0; iP < nbPatches && isOK; ++iP ) + { + isOK = static_cast(load >> i) && i >= 2; + if ( !isOK ) break; + int nbTags = i; + for ( int iT = 0; iT < nbTags; ++iT ) + { + if (( isOK = static_cast(load >> i))) + _hyperPatchList[ iP ].insert( i ); + else + break; + } + } + if ( !isOK ) // remove invalid patches + { + for ( i = nbPatches - 1; i >= 0; i-- ) + if ( _hyperPatchList[i].size() < 2 ) + _hyperPatchList.resize( i ); + } + } + } return load; } @@ -3050,8 +3172,8 @@ void BLSURFPlugin_Hypothesis::LoadEdgesPeriodicity(std::istream & load){ } } -void BLSURFPlugin_Hypothesis::LoadVerticesPeriodicity(std::istream & load){ - +void BLSURFPlugin_Hypothesis::LoadVerticesPeriodicity(std::istream & load) +{ bool isOK = true; std::string periodicitySeparator; diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx index f6e40b4..18ffa41 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx @@ -186,6 +186,14 @@ public: void SetTags( const std::string& howToTreat ) throw (std::invalid_argument); std::string GetTags(); + // Hyper-patches + typedef std::set< int > THyperPatchTags; + typedef std::vector< THyperPatchTags > THyperPatchList; + + void SetHyperPatches(const THyperPatchList& hpl); + const THyperPatchList& GetHyperPatches() const { return _hyperPatchList; } + static int GetHyperPatchTag( int faceTag, const BLSURFPlugin_Hypothesis* hyp, int* iPatch=0 ); + void SetPreCADMergeEdges(bool theVal); bool GetPreCADMergeEdges() const { return _preCADMergeEdges; } @@ -614,6 +622,8 @@ private: TEdgesPeriodicityVector _edgesPeriodicityVector; TVerticesPeriodicityVector _verticesPeriodicityVector; + THyperPatchList _hyperPatchList; + // Called by SaveTo to store content of _preCadFacesPeriodicityVector and _preCadEdgesPeriodicityVector void SavePreCADPeriodicity(std::ostream & save, const char* shapeType); diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx index c5cb677..3db9133 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx @@ -1059,6 +1059,51 @@ char* BLSURFPlugin_Hypothesis_i::GetTags() return CORBA::string_dup( this->GetImpl()->GetTags().c_str() ); } +//============================================================================= +void BLSURFPlugin_Hypothesis_i::SetHyperPatches(const BLSURFPlugin::THyperPatchList& hpl) +{ + ::BLSURFPlugin_Hypothesis::THyperPatchList patchList( hpl.length() ); + SMESH_Comment hplDump; + hplDump << "["; + for ( size_t i = 0; i < patchList.size(); ++i ) + { + hplDump << "[ "; + BLSURFPlugin::THyperPatch tags = hpl[ i ]; + for ( CORBA::ULong j = 0; j < tags.length(); ++j ) + { + patchList[ i ].insert( tags[ j ]); + hplDump << tags[ j ] << ( j+1 < tags.length() ? ", " : " ]" ); + } + hplDump << ( i+1 < patchList.size() ? "," : "]"); + } + if ( GetImpl()->GetHyperPatches() != patchList ) + { + GetImpl()->SetHyperPatches( patchList ); + SMESH::TPythonDump() << _this() << ".SetHyperPatches( " << hplDump << " )"; + } +} + +//============================================================================= +BLSURFPlugin::THyperPatchList* BLSURFPlugin_Hypothesis_i::GetHyperPatches() +{ + const ::BLSURFPlugin_Hypothesis::THyperPatchList& hpl = GetImpl()->GetHyperPatches(); + BLSURFPlugin::THyperPatchList* resHpl = new BLSURFPlugin::THyperPatchList(); + resHpl->length( hpl.size() ); + + ::BLSURFPlugin_Hypothesis::THyperPatchList::const_iterator hpIt = hpl.begin(); + for ( int i = 0; hpIt != hpl.end(); ++hpIt, ++i ) + { + const ::BLSURFPlugin_Hypothesis::THyperPatchTags& hp = *hpIt; + BLSURFPlugin::THyperPatch& resHp = (*resHpl)[ i ]; + resHp.length( hp.size() ); + + ::BLSURFPlugin_Hypothesis::THyperPatchTags::const_iterator tag = hp.begin(); + for ( int j = 0; tag != hp.end(); ++tag, ++j ) + resHp[ j ] = *tag; + } + return resHpl; +} + //============================================================================= /*! * BLSURFPlugin_Hypothesis_i::SetPreCADMergeEdges diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx index 5cfc3d9..ad283c9 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx @@ -163,6 +163,9 @@ public: void SetTags( const char* howToTreat ) throw (SALOME::SALOME_Exception); char* GetTags(); + void SetHyperPatches(const BLSURFPlugin::THyperPatchList& hpl); + BLSURFPlugin::THyperPatchList* GetHyperPatches(); + void SetPreCADMergeEdges(CORBA::Boolean theValue); CORBA::Boolean GetPreCADMergeEdges(); diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index d4075da..30d0cac 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -27,58 +27,54 @@ #include "BLSURFPluginGUI_HypothesisCreator.h" #include "BLSURFPluginGUI_Dlg.h" -#include "GeometryGUI.h" +#include -#include -#include #include -#include "SMESHGUI_SpinBox.h" -#include "SMESH_NumberFilter.hxx" +#include +#include +#include +#include +#include +#include +#include -#include +#include +#include #include #include +#include +#include #include #include #include #include #include -#include -#include #include #include +#include +#include #include #include #include +#include #include #include #include #include -#include -#include -#include #include - -#include #include +#include +#include +#include #include #include -#include - -#include -#include -#include -#include "SALOME_LifeCycleCORBA.hxx" +#include #include #include -#include -#include -#include -#include -#include -#include + +#include // Python using namespace std; @@ -88,6 +84,7 @@ enum { SMP_TAB, ENF_TAB, PERIODICITY_TAB, + HYPERPATCH_TAB, SMP_NAME_COLUMN =0, SMP_SIZEMAP_COLUMN, SMP_ENTRY_COLUMN, @@ -650,9 +647,7 @@ bool BLSURFPluginGUI_HypothesisCreator::checkParams(QString& msg) const QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() { QFrame* fr = new QFrame( 0 ); - // fr-> setMinimumSize(600,400); QVBoxLayout* lay = new QVBoxLayout( fr ); - // lay->setSizeConstraint(QLayout::SetDefaultConstraint); lay->setMargin( 5 ); lay->setSpacing( 0 ); @@ -681,14 +676,11 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() } aStdLayout->addWidget( myStdWidget, row++, 0, 1, 4 ); - //int maxrow = row; row = 0; if( isCreation() ) row = 1; -// row = max(row,maxrow)+1; aStdLayout->setRowStretch(row,1); aStdLayout->setColumnStretch(1,1); - //maxrow = row; // advanced parameters @@ -697,14 +689,12 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() anAdvLayout->setSpacing( 6 ); anAdvLayout->setMargin( 11 ); myAdvWidget = new BLSURFPluginGUI_AdvWidget(myAdvGroup); - //myAdvWidget->addBtn->setMenu( new QMenu() ); anAdvLayout->addWidget( myAdvWidget ); // Size Maps parameters mySmpGroup = new QWidget(); -// mySmpGroup->setMinimumWidth(500); //Layout QGridLayout* anSmpLayout = new QGridLayout(mySmpGroup); @@ -837,10 +827,6 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() // Enforced vertices parameters myEnfGroup = new QWidget(); QGridLayout* anEnfLayout = new QGridLayout(myEnfGroup); -// -// myEnforcedVertexWidget = new DlgBlSurfHyp_Enforced(myEnfGroup); -// anEnfLayout->addWidget(myEnforcedVertexWidget); -// myEnforcedVertexWidget = new DlgBlSurfHyp_Enforced(); myEnforcedTreeWidget = new QTreeWidget(myEnfGroup); myEnforcedTreeWidget->setColumnCount( ENF_VER_NB_COLUMNS ); @@ -869,7 +855,7 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() myEnforcedTreeWidget->hideColumn(ENF_VER_ENTRY_COLUMN); myEnforcedTreeWidget->setItemDelegate(new EnforcedTreeWidgetDelegate()); -// FACE AND VERTEX SELECTION + // FACE AND VERTEX SELECTION TColStd_MapOfInteger shapeTypes1, shapeTypes2; shapeTypes1.Add( TopAbs_FACE ); shapeTypes1.Add( TopAbs_COMPOUND ); @@ -909,9 +895,6 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() QLabel* myInternalEnforcedVerticesAllFacesGroupLabel = new QLabel( tr( "BLSURF_ENF_VER_GROUP_LABEL" ), myEnfGroup ); myInternalEnforcedVerticesAllFacesGroup = new QLineEdit(myEnfGroup); -// myGlobalGroupName = new QCheckBox(tr("BLSURF_ENF_VER_GROUPS"), myEnfGroup); -// myGlobalGroupName->setChecked(false); - anEnfLayout->addWidget(myEnforcedTreeWidget, 0, 0, ENF_VER_NB_LINES, 1); QGridLayout* anEnfLayout2 = new QGridLayout(myEnfGroup); // FACE AND VERTEX SELECTION @@ -925,17 +908,13 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() anEnfLayout2->addWidget(myZCoord, ENF_VER_Z_COORD, 1, 1, 1); anEnfLayout2->addWidget(myGroupNameLabel, ENF_VER_GROUP, 0, 1, 1); anEnfLayout2->addWidget(myGroupName, ENF_VER_GROUP, 1, 1, 1); -// anEnfLayout2->addWidget(myGlobalGroupName, ENF_VER_GROUP_CHECK, 0, 1, 2); -// anEnfLayout2->setRowStretch( ENF_VER_SPACE, 1); anEnfLayout2->addWidget(addVertexButton, ENF_VER_BTN, 0, 1, 1); anEnfLayout2->addWidget(removeVertexButton, ENF_VER_BTN, 1, 1, 1); anEnfLayout2->addWidget(myInternalEnforcedVerticesAllFaces, ENF_VER_INTERNAL_ALL_FACES, 0, 1, 2); anEnfLayout2->addWidget(myInternalEnforcedVerticesAllFacesGroupLabel, ENF_VER_INTERNAL_ALL_FACES_GROUP, 0, 1, 1); anEnfLayout2->addWidget(myInternalEnforcedVerticesAllFacesGroup, ENF_VER_INTERNAL_ALL_FACES_GROUP, 1, 1, 1); anEnfLayout2->setRowStretch(ENF_VER_NB_LINES+1, 1); -// anEnfLayout2->addWidget(makeGroupsCheck, ENF_VER_GROUP_CHECK, 0, 1, 2); anEnfLayout->addLayout(anEnfLayout2, 0,1,ENF_VER_NB_LINES+1,2); -// anEnfLayout->setRowStretch(1, 1); // --- // Periodicity parameters @@ -1128,12 +1107,49 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() myPeriodicitySelectionWidgets.append(myPeriodicityP3TargetWdg); avoidSimultaneousSelection(myPeriodicitySelectionWidgets); + // HyperPatch parameters + + QWidget* hpGroup = new QWidget(); + QGridLayout* hpLayout = new QGridLayout(hpGroup); + + myHyPatchTable = new QTableWidget( hpGroup ); + myHyPatchTable->setColumnCount(1); + myHyPatchTable->setHorizontalHeaderLabels( QStringList() << tr("BLSURF_HYPATCH_TBL_HEADER") ); + myHyPatchTable->setAlternatingRowColors(true); + myHyPatchTable->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::Stretch ); + + + QPixmap iconSelect (SUIT_Session::session()->resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT"))); + myHyPatchFaceSelBtn = new QPushButton( iconSelect, tr("BLSURF_HYPATCH_SEL_FACE"), hpGroup ); + myHyPatchGroupSelBtn = new QPushButton( iconSelect, tr("BLSURF_HYPATCH_SEL_GROUP"), hpGroup ); + myHyPatchFaceSelBtn->setCheckable( true ); + myHyPatchGroupSelBtn->setCheckable( true ); + + myHyPatchFaceSelector = new StdMeshersGUI_SubShapeSelectorWdg( hpGroup, TopAbs_FACE, /*toShowList=*/false ); + + QLabel* hpTagsLbl = new QLabel( tr("BLSURF_TAGS"), hpGroup ); + myHyPatchTagsLE = new QLineEdit( hpGroup ); + myHyPatchTagsLE->setValidator( new SMESHGUI_IdValidator( hpGroup )); + + QPushButton* hpAddBtn = new QPushButton( tr("BLSURF_SM_ADD"), hpGroup ); + QPushButton* hpRemBtn = new QPushButton( tr("BLSURF_SM_REMOVE"), hpGroup ); + + hpLayout->addWidget( myHyPatchTable, 0, 0, 5, 1 ); + hpLayout->addWidget( myHyPatchFaceSelBtn, 0, 1, 1, 2 ); + hpLayout->addWidget( myHyPatchGroupSelBtn, 0, 3, 1, 2 ); + hpLayout->addWidget( hpTagsLbl, 1, 1, 1, 1 ); + hpLayout->addWidget( myHyPatchTagsLE, 1, 2, 1, 3 ); + hpLayout->addWidget( hpAddBtn, 2, 1, 1, 2 ); + hpLayout->addWidget( hpRemBtn, 2, 3, 1, 2 ); + hpLayout->addWidget( myHyPatchFaceSelector, 3, 1, 1, 4 ); + // --- myTabWidget->insertTab( STD_TAB, myStdGroup, tr( "SMESH_ARGUMENTS" ) ); myTabWidget->insertTab( ADV_TAB, myAdvGroup, tr( "BLSURF_ADV_ARGS" ) ); myTabWidget->insertTab( SMP_TAB, mySmpGroup, tr( "LOCAL_SIZE" ) ); myTabWidget->insertTab( ENF_TAB, myEnfGroup, tr( "BLSURF_ENF_VER" ) ); myTabWidget->insertTab( PERIODICITY_TAB, myPeriodicityGroup, tr( "BLSURF_PERIODICITY" ) ); + myTabWidget->insertTab( HYPERPATCH_TAB, hpGroup, tr( "BLSURF_HYPERPATCH_TAB" )); myTabWidget->setCurrentIndex( STD_TAB ); @@ -1144,12 +1160,10 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() connect( addMapButton, SIGNAL( clicked()), this, SLOT( onAddMap() ) ); connect( removeMapButton, SIGNAL( clicked()), this, SLOT( onRemoveMap() ) ); connect( modifyMapButton, SIGNAL( clicked()), this, SLOT( onModifyMap() ) ); -// connect( mySizeMapTable, SIGNAL( cellChanged ( int, int )), this, SLOT( onSetSizeMap(int,int ) ) ); connect( mySizeMapTable, SIGNAL( itemClicked (QTreeWidgetItem *, int)),this, SLOT( onSmpItemClicked(QTreeWidgetItem *, int) ) ); connect( myGeomSelWdg2, SIGNAL( contentModified() ), this, SLOT( onMapGeomContentModified() ) ); connect( myGeomSelWdg1, SIGNAL( contentModified() ), this, SLOT( onMapGeomContentModified() ) ); connect( myAttSelWdg, SIGNAL( contentModified() ), this, SLOT( onMapGeomContentModified() ) ); -// connect( myAttractorGroup, SIGNAL( clicked(bool) ), this, SLOT( onAttractorGroupClicked(bool) ) ); connect( mySizeMapTable, SIGNAL( itemChanged (QTreeWidgetItem *, int)),this, SLOT( onSetSizeMap(QTreeWidgetItem *, int) ) ); connect( myAttractorCheck, SIGNAL( stateChanged ( int )), this, SLOT( onAttractorClicked( int ) ) ); connect( myConstSizeCheck, SIGNAL( stateChanged ( int )), this, SLOT( onConstSizeClicked( int ) ) ); @@ -1159,14 +1173,11 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() // Enforced vertices connect( myEnforcedTreeWidget,SIGNAL( itemClicked(QTreeWidgetItem *, int)), this, SLOT( synchronizeCoords() ) ); connect( myEnforcedTreeWidget,SIGNAL( itemChanged(QTreeWidgetItem *, int)), this, SLOT( updateEnforcedVertexValues(QTreeWidgetItem *, int) ) ); -// connect( myEnforcedTreeWidget,SIGNAL( itemChanged(QTreeWidgetItem *, int)), this, SLOT( update(QTreeWidgetItem *, int) ) ); connect( myEnforcedTreeWidget,SIGNAL( itemSelectionChanged() ), this, SLOT( synchronizeCoords() ) ); connect( addVertexButton, SIGNAL( clicked()), this, SLOT( onAddEnforcedVertices() ) ); connect( removeVertexButton, SIGNAL( clicked()), this, SLOT( onRemoveEnforcedVertex() ) ); connect( myEnfVertexWdg, SIGNAL( contentModified()), this, SLOT( onSelectEnforcedVertex() ) ); connect( myInternalEnforcedVerticesAllFaces, SIGNAL( stateChanged ( int )), this, SLOT( onInternalVerticesClicked( int ) ) ); -// connect( myEnfVertexWdg, SIGNAL( selectionActivated()), this, SLOT( onVertexSelectionActivated() ) ); -// connect( myEnfFaceWdg, SIGNAL( selectionActivated()), this, SLOT( onFaceSelectionActivated() ) ); // Periodicity connect( myPeriodicityAddButton, SIGNAL( clicked()), this, SLOT( onAddPeriodicity() ) ); @@ -1176,17 +1187,24 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() ListOfWidgets::const_iterator anIt = myPeriodicitySelectionWidgets.begin(); for (; anIt != myPeriodicitySelectionWidgets.end(); anIt++) - { - StdMeshersGUI_ObjectReferenceParamWdg * w1 = ( StdMeshersGUI_ObjectReferenceParamWdg* ) ( *anIt ); - connect( w1, SIGNAL(contentModified ()), this, SLOT(onPeriodicityContentModified())); + { + StdMeshersGUI_ObjectReferenceParamWdg * w1 = ( StdMeshersGUI_ObjectReferenceParamWdg* ) ( *anIt ); + connect( w1, SIGNAL(contentModified ()), this, SLOT(onPeriodicityContentModified())); + + } + + // HyperPatch + connect( myHyPatchFaceSelBtn, SIGNAL( toggled(bool) ), SLOT( onHyPatchFaceSelection(bool) )); + connect( myHyPatchGroupSelBtn, SIGNAL( toggled(bool) ), SLOT( onHyPatchGroupSelection(bool) )); + connect( myHyPatchFaceSelector, SIGNAL( shapeSelected() ), SLOT( onHyPatchSelectionChanged())); + connect( hpAddBtn, SIGNAL( clicked() ), SLOT( onHyPatchAdd())); + connect( hpRemBtn, SIGNAL( clicked() ), SLOT( onHyPatchRemove())); - } -// connect( myPeriodicitySourceFaceWdg, SIGNAL(contentModified()), this, SLOT(onPeriodicityContentModified())); return fr; } /** BLSURFPluginGUI_HypothesisCreator::deactivateSelection(QWidget*, QWidget*) -This method stop the selection of the widgets StdMeshersGUI_ObjectReferenceParamWdg + This method stop the selection of the widgets StdMeshersGUI_ObjectReferenceParamWdg */ // void BLSURFPluginGUI_HypothesisCreator::deactivateSelection(QWidget* old, QWidget* now) // { @@ -1215,12 +1233,12 @@ void BLSURFPluginGUI_HypothesisCreator::clearEnforcedVertexWidgets() myXCoord->setText(""); myYCoord->setText(""); myZCoord->setText(""); -// myGroupName->setText(""); + // myGroupName->setText(""); } /** BLSURFPluginGUI_HypothesisCreator::updateEnforcedVertexValues(item, column) -This method updates the tooltip of a modified item. The QLineEdit widgets content -is synchronized with the coordinates of the enforced vertex clicked in the tree widget. + This method updates the tooltip of a modified item. The QLineEdit widgets content + is synchronized with the coordinates of the enforced vertex clicked in the tree widget. */ void BLSURFPluginGUI_HypothesisCreator::updateEnforcedVertexValues(QTreeWidgetItem* item, int column) { QVariant vertexName = item->data(ENF_VER_NAME_COLUMN, Qt::EditRole); @@ -1418,42 +1436,26 @@ void BLSURFPluginGUI_HypothesisCreator::addEnforcedVertex(double x, double y, do /** BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() This method is called when a item is added into the enforced vertices tree widget */ -void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() { - +void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() +{ BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; getGeomSelectionTool()->selectionMgr()->clearFilters(); - //myEnfFaceWdg->deactivateSelection(); myEnfVertexWdg->deactivateSelection(); for (int column = 0; column < myEnforcedTreeWidget->columnCount(); ++column) myEnforcedTreeWidget->resizeColumnToContents(column); // Vertex selection - //int selEnfFace = myEnfFaceWdg->NbObjects(); int selEnfVertex = myEnfVertexWdg->NbObjects(); bool coordsEmpty = (myXCoord->text().isEmpty()) || (myYCoord->text().isEmpty()) || (myZCoord->text().isEmpty()); - // if (selEnfFace == 0) - // return; - if ((selEnfVertex == 0) && coordsEmpty) return; string entry, shapeName; - - //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); - - std::string groupName = myGroupName->text().toStdString(); - - if (boost::trim_copy(groupName).empty()) - groupName = ""; + std::string groupName = myGroupName->text().simplified().toStdString(); if (selEnfVertex <= 1) { @@ -1493,7 +1495,6 @@ void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices() { } } - //myEnfFaceWdg->SetObject(GEOM::GEOM_Object::_nil()); myEnfVertexWdg->SetObject(GEOM::GEOM_Object::_nil()); for (int column = 0; column < myEnforcedTreeWidget->columnCount(); ++column) @@ -1882,7 +1883,7 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const else { item->setData(SMP_SIZEMAP_COLUMN, Qt::EditRole, QVariant( sizeMap ) ); - } + } } mySizeMapTable->resizeColumnToContents( SMP_ENTRY_COLUMN ); mySizeMapTable->resizeColumnToContents( SMP_NAME_COLUMN ); @@ -1894,7 +1895,7 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const for ( ; evmIt != data.faceEntryEnfVertexListMap.end() ; ++evmIt) { TEntry entry = (*evmIt).first; std::string shapeName = myGeomToolSelected->getNameFromEntry(entry); - + //QTreeWidgetItem* faceItem = that->addEnforcedFace(entry, shapeName); TEnfVertexList evs = (*evmIt).second; @@ -1912,7 +1913,7 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const that->addEnforcedVertex(x, y, z, enfVertex->name, enfVertex->geomEntry, enfVertex->grpName); } } - + for (int column = 0; column < myEnforcedTreeWidget->columnCount(); ++column) myEnforcedTreeWidget->resizeColumnToContents(column); @@ -1922,22 +1923,25 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const // Periodicity - // Add an item in the tree widget for each association for (size_t i=0 ; iaddTopLevelItem(item); + item->setFlags( Qt::ItemIsSelectable |Qt::ItemIsEnabled ); + TPreCadPeriodicity periodicity_i = data.preCadPeriodicityVector[i]; + for (size_t k=0; kaddTopLevelItem(item); - item->setFlags( Qt::ItemIsSelectable |Qt::ItemIsEnabled ); - TPreCadPeriodicity periodicity_i = data.preCadPeriodicityVector[i]; - for (size_t k=0; kgetNameFromEntry(shapeEntry); - item->setData(k, Qt::EditRole, shapeName.c_str() ); - item->setData(k, Qt::UserRole, shapeEntry.c_str() ); - } + string shapeEntry = periodicity_i[k]; + string shapeName = myGeomToolSelected->getNameFromEntry(shapeEntry); + item->setData(k, Qt::EditRole, shapeName.c_str() ); + item->setData(k, Qt::UserRole, shapeEntry.c_str() ); } + } + + // Hyper patches + for ( int i = 0; i < data.hyperpatches.size(); ++i ) + that->addHyPatchToTable( data.hyperpatches[i] ); // update widgets that->myStdWidget->onPhysicalMeshChanged(); @@ -2138,6 +2142,21 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData BLSURFPlugin::TPeriodicityList_var preCadEdgePeriodicityVector = h->GetPreCadEdgesPeriodicityVector(); AddPreCadSequenceToVector(h_data, preCadEdgePeriodicityVector, false); + + // Hyper Patches + + h_data.hyperpatches.clear(); + BLSURFPlugin::THyperPatchList_var patchList = h->GetHyperPatches(); + for ( CORBA::ULong i = 0; i < patchList->length(); ++i ) + { + QString tags; + BLSURFPlugin::THyperPatch& patch = patchList[i]; + for ( CORBA::ULong j = 0; j < patch.length(); ++j ) + tags += QString::number( patch[j] ) + " "; + if ( !tags.isEmpty() ) + h_data.hyperpatches.append( tags ); + } + return true; } @@ -2266,7 +2285,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi h->SetOptimizeMesh( h_data.myOptimizeMesh ); if ( h->GetQuadraticMesh() != h_data.myQuadraticMesh ) - h->SetQuadraticMesh( h_data.myQuadraticMesh ); + h->SetQuadraticMesh( h_data.myQuadraticMesh ); if ( h->GetVerbosity() != h_data.myVerbosity ) h->SetVerbosity( h_data.myVerbosity ); @@ -2282,10 +2301,10 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi // options are set in checkParams() //h->SetOptionValues( myOptions ); // is set in readParamsFromWidgets() //h->SetPreCADOptionValues( myPreCADOptions ); // is set in readParamsFromWidgets() - + if ( h->GetGMFFile() != h_data.myGMFFileName ) -// || ( h->GetGMFFileMode() != h_data.myGMFFileMode ) ) -// h->SetGMFFile( h_data.myGMFFileName.c_str(), h_data.myGMFFileMode ); + // || ( h->GetGMFFileMode() != h_data.myGMFFileMode ) ) + // h->SetGMFFile( h_data.myGMFFileName.c_str(), h_data.myGMFFileMode ); h->SetGMFFile( h_data.myGMFFileName.c_str()); BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this; @@ -2302,7 +2321,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi h->SetAttractorEntry( entry.toLatin1().constData(), sizeMap.toLatin1().constData()); } else if (sizeMap.startsWith("def")) { -// h->SetCustomSizeMapEntry( entry.toLatin1().constData(), sizeMap.toLatin1().constData() ); + // h->SetCustomSizeMapEntry( entry.toLatin1().constData(), sizeMap.toLatin1().constData() ); } else { if (!myATTMap[entry].empty()){ @@ -2340,13 +2359,13 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi double x, y, z = 0; std::string enfName; /* TODO GROUPS - std::string groupName = ""; + std::string groupName = ""; */ TFaceEntryEnfVertexListMap::const_iterator evmIt = h_data.faceEntryEnfVertexListMap.begin(); // 1. Clear all enforced vertices in hypothesis // 2. Add new enforced vertex according to h_data - + if ( h->GetAllEnforcedVertices()->length() > 0 ) h->ClearAllEnforcedVertices(); TEnfName faceEntry; @@ -2377,65 +2396,73 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi // Periodicity if ( h->GetPreCadFacesPeriodicityVector()->length() > 0 || h->GetPreCadEdgesPeriodicityVector()->length() > 0 ) - h->ClearPreCadPeriodicityVectors(); + h->ClearPreCadPeriodicityVectors(); TPreCadPeriodicityVector::const_iterator pIt = h_data.preCadPeriodicityVector.begin(); for ( ; pIt != h_data.preCadPeriodicityVector.end() ; ++pIt) + { + TPreCadPeriodicity periodicity_i = *pIt; + TEntry source = periodicity_i[PERIODICITY_OBJ_SOURCE_COLUMN]; + TEntry target = periodicity_i[PERIODICITY_OBJ_TARGET_COLUMN]; + TEntry p1Source = periodicity_i[PERIODICITY_P1_SOURCE_COLUMN]; + TEntry p2Source = periodicity_i[PERIODICITY_P2_SOURCE_COLUMN]; + TEntry p3Source = periodicity_i[PERIODICITY_P3_SOURCE_COLUMN]; + TEntry p1Target = periodicity_i[PERIODICITY_P1_TARGET_COLUMN]; + TEntry p2Target = periodicity_i[PERIODICITY_P2_TARGET_COLUMN]; + TEntry p3Target = periodicity_i[PERIODICITY_P3_TARGET_COLUMN]; + bool onFace = (periodicity_i[PERIODICITY_SHAPE_TYPE]=="1") ? true : false; + + BLSURFPlugin::TEntryList_var sourceVertices = new BLSURFPlugin::TEntryList(); + if (! p1Source.empty()) { - TPreCadPeriodicity periodicity_i = *pIt; - TEntry source = periodicity_i[PERIODICITY_OBJ_SOURCE_COLUMN]; - TEntry target = periodicity_i[PERIODICITY_OBJ_TARGET_COLUMN]; - TEntry p1Source = periodicity_i[PERIODICITY_P1_SOURCE_COLUMN]; - TEntry p2Source = periodicity_i[PERIODICITY_P2_SOURCE_COLUMN]; - TEntry p3Source = periodicity_i[PERIODICITY_P3_SOURCE_COLUMN]; - TEntry p1Target = periodicity_i[PERIODICITY_P1_TARGET_COLUMN]; - TEntry p2Target = periodicity_i[PERIODICITY_P2_TARGET_COLUMN]; - TEntry p3Target = periodicity_i[PERIODICITY_P3_TARGET_COLUMN]; - bool onFace = (periodicity_i[PERIODICITY_SHAPE_TYPE]=="1") ? true : false; - - BLSURFPlugin::TEntryList_var sourceVertices = new BLSURFPlugin::TEntryList(); - if (! p1Source.empty()) - { - sourceVertices->length(3); - sourceVertices[0]=CORBA::string_dup(p1Source.c_str()); - sourceVertices[1]=CORBA::string_dup(p2Source.c_str()); - sourceVertices[2]=CORBA::string_dup(p3Source.c_str()); - } - + sourceVertices->length(3); + sourceVertices[0]=CORBA::string_dup(p1Source.c_str()); + sourceVertices[1]=CORBA::string_dup(p2Source.c_str()); + sourceVertices[2]=CORBA::string_dup(p3Source.c_str()); + } - BLSURFPlugin::TEntryList_var targetVertices = new BLSURFPlugin::TEntryList(); - if (! p1Target.empty()) - { - targetVertices->length(3); - targetVertices[0]=CORBA::string_dup(p1Target.c_str()); - targetVertices[1]=CORBA::string_dup(p2Target.c_str()); - targetVertices[2]=CORBA::string_dup(p3Target.c_str()); - } - if (onFace) - h->AddPreCadFacesPeriodicityEntry(source.c_str(), target.c_str(), sourceVertices, targetVertices); - else - h->AddPreCadEdgesPeriodicityEntry(source.c_str(), target.c_str(), sourceVertices, targetVertices); + BLSURFPlugin::TEntryList_var targetVertices = new BLSURFPlugin::TEntryList(); + if (! p1Target.empty()) + { + targetVertices->length(3); + targetVertices[0]=CORBA::string_dup(p1Target.c_str()); + targetVertices[1]=CORBA::string_dup(p2Target.c_str()); + targetVertices[2]=CORBA::string_dup(p3Target.c_str()); } + if (onFace) + h->AddPreCadFacesPeriodicityEntry(source.c_str(), target.c_str(), sourceVertices, targetVertices); + else + h->AddPreCadEdgesPeriodicityEntry(source.c_str(), target.c_str(), sourceVertices, targetVertices); + } + + // Hyper-patches + BLSURFPlugin::THyperPatchList_var hpl = new BLSURFPlugin::THyperPatchList(); + hpl->length( h_data.hyperpatches.size() ); + + for ( int i = 0; i < h_data.hyperpatches.size(); ++i ) + { + QStringList tags = h_data.hyperpatches[i].split(" ", QString::SkipEmptyParts); + BLSURFPlugin::THyperPatch& patch = hpl[ i ]; + patch.length( tags.size() ); + + for ( int j = 0; j < tags.size(); ++j ) + patch[ j ] = tags[ j ].toDouble(); + } + h->SetHyperPatches( hpl ); } // try - catch(const std::exception& ex) { - std::cout << "Exception: " << ex.what() << std::endl; - throw ex; - } -// catch(const SALOME::SALOME_Exception& ex) -// { -// throw ex; -// // SalomeApp_Tools::QtCatchCorbaException(ex); -// // ok = false; -// } + catch(...) { + ok = false; + } + return ok; } /** BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets(h_data) -Stores the widgets content to the hypothesis data. + Stores the widgets content to the hypothesis data. */ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothesisData& h_data ) const { @@ -2580,6 +2607,11 @@ QString BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothes guiHyp += "PERIODICITY = yes; "; } + // Hyper-patches + h_data.hyperpatches.clear(); + for ( int row = 0; row < myHyPatchTable->rowCount(); ++row ) + h_data.hyperpatches.append( myHyPatchTable->item( row, 0 )->text() ); + return guiHyp; } @@ -2707,7 +2739,6 @@ void BLSURFPluginGUI_HypothesisCreator::onTabChanged(int tab) myGeomSelWdg1 ->deactivateSelection(); myGeomSelWdg2 ->deactivateSelection(); myAttSelWdg ->deactivateSelection(); - //myEnfFaceWdg ->deactivateSelection(); myEnfVertexWdg ->deactivateSelection(); myPeriodicitySourceFaceWdg->deactivateSelection(); myPeriodicityTargetFaceWdg->deactivateSelection(); @@ -2717,6 +2748,10 @@ void BLSURFPluginGUI_HypothesisCreator::onTabChanged(int tab) myPeriodicityP1TargetWdg ->deactivateSelection(); myPeriodicityP2TargetWdg ->deactivateSelection(); myPeriodicityP3TargetWdg ->deactivateSelection(); + if ( myHyPatchFaceSelBtn->isChecked() ) + myHyPatchFaceSelBtn->toggle(); + if ( myHyPatchGroupSelBtn->isChecked() ) + myHyPatchGroupSelBtn->toggle(); return; } else if ( sender() == smpTab ) @@ -3237,6 +3272,121 @@ bool BLSURFPluginGUI_HypothesisCreator::sizeMapValidationFromEntry(QString myEnt return true; } +//================================================================================ +/*! + * \brief SLOT: Activate selection of faces in the Viewer + */ +//================================================================================ + +void BLSURFPluginGUI_HypothesisCreator::onHyPatchFaceSelection(bool on) +{ + if ( on && myHyPatchFaceSelector->GetMainShape().IsNull() ) + { + QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(); + QString aSubEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry(); + myHyPatchFaceSelector->SetGeomShapeEntry( aSubEntry, aMainEntry ); + } + myHyPatchFaceSelector->setVisible( on ); // show its buttons + myHyPatchFaceSelector->ShowPreview( on ); // show faces in the Viewer + // treat selection or not + myHyPatchFaceSelector->ActivateSelection( on || myHyPatchGroupSelBtn->isChecked() ); + + if ( on ) + myHyPatchGroupSelBtn->setChecked( false ); +} + +//================================================================================ +/*! + * \brief SLOT: Deactivate selection of faces in the Viewer + */ +//================================================================================ + +void BLSURFPluginGUI_HypothesisCreator::onHyPatchGroupSelection(bool on) +{ + if ( on && myHyPatchFaceSelector->GetMainShape().IsNull() ) + { + QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry(); + QString aSubEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry(); + myHyPatchFaceSelector->SetGeomShapeEntry( aSubEntry, aMainEntry ); + } + if ( !myHyPatchFaceSelBtn->isChecked() ) + { + myHyPatchFaceSelector->setVisible( false ); // show its buttons + myHyPatchFaceSelector->ShowPreview( false ); // show faces in the Viewer + } + // treat selection or not + myHyPatchFaceSelector->ActivateSelection( on || myHyPatchFaceSelBtn->isChecked() ); + + if ( on ) + myHyPatchFaceSelBtn->setChecked( false ); +} + +//================================================================================ +/*! + * \brief SLOT: show IDs of selected faces in Tags LineEdit + */ +//================================================================================ + +void BLSURFPluginGUI_HypothesisCreator::onHyPatchSelectionChanged() +{ + QString tagString; + const QList& tags = myHyPatchFaceSelector->GetSelectedIDs(); + for ( int i = 0; i < tags.size(); ++i ) + tagString += QString::number( tags[i] ) + " "; + + myHyPatchTagsLE->setText( tagString ); +} + +//================================================================================ +/*! + * \brief SLOT: Add the Tags to the HyperPatch table + */ +//================================================================================ + +void BLSURFPluginGUI_HypothesisCreator::onHyPatchAdd() +{ + QStringList tagList = myHyPatchTagsLE->text().split(" ", QString::SkipEmptyParts); + if ( tagList.size() > 1 ) + { + addHyPatchToTable( myHyPatchTagsLE->text() ); + myHyPatchTagsLE->setText(""); + } +} + +//================================================================================ +/*! + * \brief Add a row to myHyPatchTable + */ +//================================================================================ + +void BLSURFPluginGUI_HypothesisCreator::addHyPatchToTable(const QString& tags) +{ + if ( tags.isEmpty() ) return; + + QTableWidgetItem* cell = new QTableWidgetItem( tags ); + cell->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled ); + + int row = myHyPatchTable->rowCount(); + myHyPatchTable->insertRow( row ); + myHyPatchTable->setItem( row, 0, cell ); +} + +//================================================================================ +/*! + * \brief SLOT: remove selected rows from the HyperPatch table + */ +//================================================================================ + +void BLSURFPluginGUI_HypothesisCreator::onHyPatchRemove() +{ + QList items = myHyPatchTable->selectedItems(); + while ( !items.isEmpty() ) + { + myHyPatchTable->removeRow( items[0]->row() ); + items = myHyPatchTable->selectedItems(); + } +} + QString BLSURFPluginGUI_HypothesisCreator::caption() const { return tr( "BLSURF_TITLE" ); diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h index 8c0cdd4..91c959a 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h @@ -95,6 +95,7 @@ class SMESH_NumberFilter; class LightApp_SelectionMgr; class BLSURFPluginGUI_StdWidget; class BLSURFPluginGUI_AdvWidget; +class StdMeshersGUI_SubShapeSelectorWdg; // class DlgBlSurfHyp_Enforced; // Name @@ -178,6 +179,7 @@ typedef struct TGroupNameEnfVertexListMap groupNameEnfVertexListMap; */ TPreCadPeriodicityVector preCadPeriodicityVector; + QStringList hyperpatches; QString myName; } BlsurfHypothesisData; @@ -209,10 +211,7 @@ protected slots: void onStateChange(); // Advanced tab void onAddOption(); -// void onDeleteOption(); -// void onEditOption( int, int ); void onChangeOptionName( int, int ); -// void onOptionChosenInPopup( QAction* ); // Sizemap tab void onMapGeomContentModified(); void onSmpItemClicked( QTreeWidgetItem *, int ); @@ -226,22 +225,28 @@ protected slots: // Enforced vertices tab QTreeWidgetItem* addEnforcedFace(std::string theFaceEntry, std::string theFaceName); void addEnforcedVertex(double x=0, double y=0, double z=0, - std::string vertexName = "", std::string geomEntry = "", std::string groupName = ""); + std::string vertexName = "", + std::string geomEntry = "", + std::string groupName = ""); void onAddEnforcedVertices(); void onRemoveEnforcedVertex(); void synchronizeCoords(); void updateEnforcedVertexValues(QTreeWidgetItem* , int ); void onSelectEnforcedVertex(); -// void deactivateSelection(QWidget*, QWidget*); void clearEnforcedVertexWidgets(); void onInternalVerticesClicked(int); // Periodicity tab void onPeriodicityByVerticesChecked(bool); -// void onPeriodicityRadioButtonChanged(); void onAddPeriodicity(); void onRemovePeriodicity(); void onPeriodicityTreeClicked(QTreeWidgetItem*, int); void onPeriodicityContentModified(); + // HyperPatch tab + void onHyPatchFaceSelection(bool); + void onHyPatchGroupSelection(bool); + void onHyPatchSelectionChanged(); + void onHyPatchAdd(); + void onHyPatchRemove(); private: bool readParamsFromHypo( BlsurfHypothesisData& ) const; @@ -260,6 +265,7 @@ private: static LightApp_SelectionMgr* selectionMgr(); void avoidSimultaneousSelection(ListOfWidgets &myCustomWidgets) const; void AddPreCadSequenceToVector(BlsurfHypothesisData& h_data, BLSURFPlugin::TPeriodicityList_var preCadFacePeriodicityVector, bool onFace) const; + void addHyPatchToTable(const QString& tags); private: @@ -305,21 +311,17 @@ private: QWidget* myEnfGroup; -// TODO FACE AND VERTEX SELECTION StdMeshersGUI_ObjectReferenceParamWdg *myEnfFaceWdg; GEOM::GEOM_Object_var myEnfFace; StdMeshersGUI_ObjectReferenceParamWdg *myEnfVertexWdg; GEOM::GEOM_Object_var myEnfVertex; -// DlgBlSurfHyp_Enforced* myEnforcedVertexWidget; QTreeWidget* myEnforcedTreeWidget; SMESHGUI_SpinBox* myXCoord; SMESHGUI_SpinBox* myYCoord; SMESHGUI_SpinBox* myZCoord; QLineEdit* myGroupName; -// QGroupBox* makeGroupsCheck; -// QCheckBox* myGlobalGroupName; QPushButton* addVertexButton; QPushButton* removeVertexButton; @@ -330,41 +332,37 @@ private: // map = entry , size map QMap mySMPMap; // Map QMap myATTMap; // Map - // QMap myDistMap; // Map - // QMap myAttDistMap; // Map QMap mySMPShapeTypeMap; GeomSelectionTools* GeomToolSelected; LightApp_SelectionMgr* aSel; // Periodicity - QWidget* myPeriodicityGroup; - QSplitter* myPeriodicitySplitter; - QTreeWidget* myPeriodicityTreeWidget; - QWidget* myPeriodicityRightWidget; - QGridLayout* myPeriodicityRightGridLayout; - QGroupBox* myPeriodicityGroupBox1; - QGroupBox* myPeriodicityGroupBox2; + QWidget* myPeriodicityGroup; + QSplitter* myPeriodicitySplitter; + QTreeWidget* myPeriodicityTreeWidget; + QWidget* myPeriodicityRightWidget; + QGridLayout* myPeriodicityRightGridLayout; + QGroupBox* myPeriodicityGroupBox1; + QGroupBox* myPeriodicityGroupBox2; QGridLayout* aPeriodicityLayout1; - QGridLayout* myPeriodicityGroupBox1Layout; - QGridLayout* myPeriodicityGroupBox2Layout; + QGridLayout* myPeriodicityGroupBox1Layout; + QGridLayout* myPeriodicityGroupBox2Layout; QRadioButton* myPeriodicityOnFaceRadioButton; QRadioButton* myPeriodicityOnEdgeRadioButton; - QLabel* myPeriodicityMainSourceLabel; - QLabel* myPeriodicityMainTargetLabel; - QLabel* myPeriodicitySourceLabel; - QLabel* myPeriodicityTargetLabel; + QLabel* myPeriodicityMainSourceLabel; + QLabel* myPeriodicityMainTargetLabel; + QLabel* myPeriodicitySourceLabel; + QLabel* myPeriodicityTargetLabel; StdMeshersGUI_ObjectReferenceParamWdg* myPeriodicitySourceFaceWdg; -// StdMeshersGUI_ObjectReferenceParamWdg* myPeriodicitySourceEdgeWdg; GEOM::GEOM_Object_var myPeriodicityFace; StdMeshersGUI_ObjectReferenceParamWdg* myPeriodicityTargetFaceWdg; -// StdMeshersGUI_ObjectReferenceParamWdg* myPeriodicityTargetEdgeWdg; GEOM::GEOM_Object_var myPeriodicityEdge; - QLabel* myPeriodicityP1SourceLabel; - QLabel* myPeriodicityP2SourceLabel; - QLabel* myPeriodicityP3SourceLabel; - QLabel* myPeriodicityP1TargetLabel; - QLabel* myPeriodicityP2TargetLabel; - QLabel* myPeriodicityP3TargetLabel; + QLabel* myPeriodicityP1SourceLabel; + QLabel* myPeriodicityP2SourceLabel; + QLabel* myPeriodicityP3SourceLabel; + QLabel* myPeriodicityP1TargetLabel; + QLabel* myPeriodicityP2TargetLabel; + QLabel* myPeriodicityP3TargetLabel; StdMeshersGUI_ObjectReferenceParamWdg* myPeriodicityP1SourceWdg; StdMeshersGUI_ObjectReferenceParamWdg* myPeriodicityP2SourceWdg; StdMeshersGUI_ObjectReferenceParamWdg* myPeriodicityP3SourceWdg; @@ -372,9 +370,15 @@ private: StdMeshersGUI_ObjectReferenceParamWdg* myPeriodicityP2TargetWdg; StdMeshersGUI_ObjectReferenceParamWdg* myPeriodicityP3TargetWdg; ListOfWidgets myPeriodicitySelectionWidgets; - QPushButton* myPeriodicityAddButton; - QPushButton* myPeriodicityRemoveButton; - QSpacerItem* myPeriodicityVerticalSpacer; + QPushButton* myPeriodicityAddButton; + QPushButton* myPeriodicityRemoveButton; + QSpacerItem* myPeriodicityVerticalSpacer; + + QTableWidget* myHyPatchTable; + StdMeshersGUI_SubShapeSelectorWdg* myHyPatchFaceSelector; + QLineEdit* myHyPatchTagsLE; + QPushButton* myHyPatchFaceSelBtn; + QPushButton* myHyPatchGroupSelBtn; BLSURFPlugin::string_array_var myOptions, myPreCADOptions, myCustomOptions; diff --git a/src/GUI/BLSURFPlugin_msg_en.ts b/src/GUI/BLSURFPlugin_msg_en.ts index 5cda76b..80948d7 100644 --- a/src/GUI/BLSURFPlugin_msg_en.ts +++ b/src/GUI/BLSURFPlugin_msg_en.ts @@ -594,6 +594,26 @@ The smaller this distance is, the closer the mesh is to the exact surface (only BLSURF_PERIODICITY_SELECT_EDGE Edge + + BLSURF_HYPATCH_TBL_HEADER + Hyper-patch IDs + + + BLSURF_HYPATCH_SEL_FACE + Face selection + + + BLSURF_HYPATCH_SEL_GROUP + Group selection + + + BLSURF_TAGS + IDs + + + BLSURF_HYPERPATCH_TAB + Hyper-patch + BLSURFPluginGUI_AdvWidget @@ -661,9 +681,5 @@ The smaller this distance is, the closer the mesh is to the exact surface (only tags Tags - - - - -- 2.39.2