-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <cstring>
#include <sstream>
#include <utilities.h>
+#include <smIdType.hxx>
#include "BLSURFPlugin_Attractor.hxx"
// Parameters for work of MG-CADSurf
void SetJacobianRectification( bool allowRectification );
bool GetJacobianRectification();
- void SetMaxNumberOfPointsPerPatch( int nb ) throw (std::invalid_argument);
+ void SetMaxNumberOfPointsPerPatch( int nb );
int GetMaxNumberOfPointsPerPatch();
- void SetMaxNumberOfThreads( int nb ) throw (std::invalid_argument);
+ void SetMaxNumberOfThreads( int nb );
int GetMaxNumberOfThreads();
void SetRespectGeometry( bool toRespect );
void SetDebug( bool isDebug );
bool GetDebug();
- void SetPeriodicTolerance( double tol ) throw (std::invalid_argument);
+ void SetPeriodicTolerance( double tol );
double GetPeriodicTolerance();
- void SetRequiredEntities( const std::string& howToTreat ) throw (std::invalid_argument);
+ void SetRequiredEntities( const std::string& howToTreat );
std::string GetRequiredEntities();
- void SetSewingTolerance( double tol ) throw (std::invalid_argument);
+ void SetSewingTolerance( double tol );
double GetSewingTolerance();
- void SetTags( const std::string& howToTreat ) throw (std::invalid_argument);
+ void SetTags( const std::string& howToTreat );
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; }
+ typedef std::set< std::string > THyperPatchEntries;
+ typedef std::vector< THyperPatchEntries > THyperPatchEntriesList;
+
+ void SetHyperPatches(const THyperPatchList& hpl, bool notifyMesh=true);
+ void SetHyperPatches(const THyperPatchEntriesList& hpl);
+ void SetHyperPatchIDsByEntry( const TopoDS_Shape& mainShape,
+ const std::map< std::string, TopoDS_Shape >& entryToShape);
+ const THyperPatchList& GetHyperPatches() const { return _hyperPatchList; }
+ const THyperPatchEntriesList& GetHyperPatchEntries() const { return _hyperPatchEntriesList; }
static int GetHyperPatchTag( int faceTag, const BLSURFPlugin_Hypothesis* hyp, int* iPatch=0 );
+
void SetPreCADMergeEdges(bool theVal);
bool GetPreCADMergeEdges() const { return _preCADMergeEdges; }
// Map Vertex entry / Enforced vertex
typedef std::map< TEntry, TEnfVertex* > TEnfVertexEntryEnfVertexMap;
- typedef std::map< TEnfGroupName, std::set<int> > TGroupNameNodeIDMap;
+ typedef std::map< TEnfGroupName, std::set<smIdType> > TGroupNameNodeIDMap;
/* TODO GROUPS
// Map Group Name / List of enforced vertices
typedef std::map< TEnfGroupName , TEnfVertexList > TGroupNameEnfVertexListMap;
bool SetEnforcedVertex(TEntry theFaceEntry, TEnfName theVertexName, TEntry theVertexEntry, TEnfGroupName theGroupName,
double x = 0.0, double y = 0.0, double z = 0.0);
- TEnfVertexList GetEnfVertexList(const TEntry& theFaceEntry) throw (std::invalid_argument);
- TEnfVertexCoordsList GetEnfVertexCoordsList(const TEntry& theFaceEntry) throw (std::invalid_argument);
- TEntryList GetEnfVertexEntryList (const TEntry& theFaceEntry) throw (std::invalid_argument);
- TEnfVertex* GetEnfVertex(TEnfVertexCoords coords) throw (std::invalid_argument);
- TEnfVertex* GetEnfVertex(const TEntry& theEnfVertexEntry) throw (std::invalid_argument);
- void AddEnfVertexNodeID(TEnfGroupName theGroupName,int theNodeID);
- std::set<int> GetEnfVertexNodeIDs(TEnfGroupName theGroupName) throw (std::invalid_argument);
- void RemoveEnfVertexNodeID(TEnfGroupName theGroupName,int theNodeID) throw (std::invalid_argument);
+ TEnfVertexList GetEnfVertexList(const TEntry& theFaceEntry);
+ TEnfVertexCoordsList GetEnfVertexCoordsList(const TEntry& theFaceEntry);
+ TEntryList GetEnfVertexEntryList (const TEntry& theFaceEntry);
+ TEnfVertex* GetEnfVertex(TEnfVertexCoords coords);
+ TEnfVertex* GetEnfVertex(const TEntry& theEnfVertexEntry);
+ void AddEnfVertexNodeID(TEnfGroupName theGroupName,smIdType theNodeID);
+ std::set<smIdType> GetEnfVertexNodeIDs(TEnfGroupName theGroupName);
+ void RemoveEnfVertexNodeID(TEnfGroupName theGroupName,smIdType theNodeID);
- bool ClearEnforcedVertex(const TEntry& theFaceEntry, double x = 0.0, double y = 0.0, double z = 0.0, const TEntry& theVertexEntry="") throw (std::invalid_argument);
- bool ClearEnforcedVertices(const TEntry& theFaceEntry) throw (std::invalid_argument);
+ bool ClearEnforcedVertex(const TEntry& theFaceEntry, double x = 0.0, double y = 0.0, double z = 0.0, const TEntry& theVertexEntry="");
+ bool ClearEnforcedVertices(const TEntry& theFaceEntry);
void ClearAllEnforcedVertices();
void AddEnforcedVertex( const TEntry& theFaceEntry, TEnfVertex * theEnfVertex );
* \brief Internal enforced vertices
*/
void SetInternalEnforcedVertexAllFaces(bool toEnforceInternalVertices);
- const bool _GetInternalEnforcedVertexAllFaces() const { return _enforcedInternalVerticesAllFaces; }
+ bool _GetInternalEnforcedVertexAllFaces() const { return _enforcedInternalVerticesAllFaces; }
static bool GetInternalEnforcedVertexAllFaces( const BLSURFPlugin_Hypothesis* hyp );
void SetInternalEnforcedVertexAllFacesGroup(TEnfGroupName theGroupName);
const TEnfGroupName _GetInternalEnforcedVertexAllFacesGroup() const { return _enforcedInternalVerticesAllFacesGroup; }
typedef std::set< std::string > TOptionNames;
void SetOptionValue(const std::string& optionName,
- const std::string& optionValue) throw (std::invalid_argument);
+ const std::string& optionValue);
void SetPreCADOptionValue(const std::string& optionName,
- const std::string& optionValue) throw (std::invalid_argument);
- std::string GetOptionValue(const std::string& optionName, bool* isDefault=0) const throw (std::invalid_argument);
- std::string GetPreCADOptionValue(const std::string& optionName, bool* isDefault=0) const throw (std::invalid_argument);
+ const std::string& optionValue);
+ std::string GetOptionValue(const std::string& optionName, bool* isDefault=0) const;
+ std::string GetPreCADOptionValue(const std::string& optionName, bool* isDefault=0) const;
void ClearOption(const std::string& optionName);
void ClearPreCADOption(const std::string& optionName);
TOptionValues GetOptionValues() const;
std::string GetOption(const std::string& optionName) const;
std::string GetPreCADOption(const std::string& optionName) const;
- static bool ToBool(const std::string& str, bool* isOk=0) throw (std::invalid_argument);
- static double ToDbl(const std::string& str, bool* isOk=0) throw (std::invalid_argument);
- static int ToInt(const std::string& str, bool* isOk=0) throw (std::invalid_argument);
+ static bool ToBool(const std::string& str, bool* isOk=0);
+ static double ToDbl(const std::string& str, bool* isOk=0);
+ static int ToInt(const std::string& str, bool* isOk=0);
/*!
* Sets the file for export resulting mesh in GMF format
TPreCadPeriodicityVector _preCadFacesPeriodicityVector;
TPreCadPeriodicityVector _preCadEdgesPeriodicityVector;
- TFacesPeriodicityVector _facesPeriodicityVector;
- TEdgesPeriodicityVector _edgesPeriodicityVector;
+ TFacesPeriodicityVector _facesPeriodicityVector;
+ TEdgesPeriodicityVector _edgesPeriodicityVector;
TVerticesPeriodicityVector _verticesPeriodicityVector;
- THyperPatchList _hyperPatchList;
+ THyperPatchList _hyperPatchList;
+ THyperPatchEntriesList _hyperPatchEntriesList;
// Called by SaveTo to store content of _preCadFacesPeriodicityVector and _preCadEdgesPeriodicityVector
void SavePreCADPeriodicity(std::ostream & save, const char* shapeType);