The option remove_tiny_uv_edges was introduced in cbr/CEA_1537_remove_deprecated_precad as an advanced option but was lost during the merge in master.
This option is needed to completely disable preprocessing of the CAD.
void SetPreCADMergeEdges(in boolean toMergeEdges);
boolean GetPreCADMergeEdges();
- /*!
- * To remove tiny UV edges edges.
- */
- void SetPreCADRemoveTinyUVEdges(in boolean toRemoveTinyUVEdges);
- boolean GetPreCADRemoveTinyUVEdges();
-
/*!
* To remove duplicate CAD faces.
*/
self.Parameters().SetPreCADMergeEdges(toMergeEdges)
pass
- ## To remove tiny UV edges.
- # @param toRemoveTinyUVEdges "remove_tiny_uv_edges" flag value
- def SetPreCADRemoveTinyUVEdges(self, toRemoveTinyUVEdges=False):
- self.Parameters().SetPreCADRemoveTinyUVEdges(toRemoveTinyUVEdges)
- pass
-
## To remove duplicate CAD Faces
# @param toRemoveDuplicateCADFaces "remove_duplicate_cad_faces" flag value
def SetPreCADRemoveDuplicateCADFaces(self, toRemoveDuplicateCADFaces=False):
// PreCAD
//int _precadMergeEdges = BLSURFPlugin_Hypothesis::GetDefaultPreCADMergeEdges();
- int _precadRemoveTinyUVEdges = BLSURFPlugin_Hypothesis::GetDefaultPreCADRemoveTinyUVEdges();
//int _precadRemoveDuplicateCADFaces = BLSURFPlugin_Hypothesis::GetDefaultPreCADRemoveDuplicateCADFaces();
//int _precadProcess3DTopology = BLSURFPlugin_Hypothesis::GetDefaultPreCADProcess3DTopology();
//int _precadDiscardInput = BLSURFPlugin_Hypothesis::GetDefaultPreCADDiscardInput();
//_topology = (int) hyp->GetTopology();
// PreCAD
//_precadMergeEdges = hyp->GetPreCADMergeEdges();
- _precadRemoveTinyUVEdges = hyp->GetPreCADRemoveTinyUVEdges();
//_precadRemoveDuplicateCADFaces = hyp->GetPreCADRemoveDuplicateCADFaces();
//_precadProcess3DTopology = hyp->GetPreCADProcess3DTopology();
//_precadDiscardInput = hyp->GetPreCADDiscardInput();
}
// PreProcessor (formerly PreCAD) -- commented params are preCADoptions (since 0023307)
//set_param(css, "merge_edges", _precadMergeEdges ? "yes" : "no");
- set_param(css, "remove_tiny_uv_edges", _precadRemoveTinyUVEdges ? "yes" : "no");
//set_param(css, "remove_duplicate_cad_faces", _precadRemoveDuplicateCADFaces ? "yes" : "no");
//set_param(css, "process_3d_topology", _precadProcess3DTopology ? "1" : "0");
//set_param(css, "discard_input_topology", _precadDiscardInput ? "1" : "0");
_verb(GetDefaultVerbosity()),
_topology(GetDefaultTopology()),
_preCADMergeEdges(GetDefaultPreCADMergeEdges()),
- _preCADRemoveTinyUVEdges(GetDefaultPreCADRemoveTinyUVEdges()),
_preCADRemoveDuplicateCADFaces(GetDefaultPreCADRemoveDuplicateCADFaces()),
_preCADProcess3DTopology(GetDefaultPreCADProcess3DTopology()),
_preCADDiscardInput(GetDefaultPreCADDiscardInput()),
"debug", // default = 0
"process_3d_topology", // default = 1
// "remove_tiny_edges", // default = 0
+ // remove_tiny_uv_edges option is not documented
+ // but it is useful that the user can change it to disable all preprocessing options
+ "remove_tiny_uv_edges", // default = 1
"" // mark of end
};
const char* preCADintOptionNames[] = { // "manifold_geometry", // default = 0
_defaultOptionValues["respect_geometry" ] = "yes";
_defaultOptionValues["tiny_edge_avoid_surface_intersections" ] = "yes";
_defaultOptionValues["process_3d_topology" ] = "no";
+ _defaultOptionValues["remove_tiny_uv_edges" ] = "no";
_defaultOptionValues["closed_geometry" ] = "no";
_defaultOptionValues["debug" ] = "no";
_defaultOptionValues["discard_input_topology" ] = "no";
}
}
-//=============================================================================
-void BLSURFPlugin_Hypothesis::SetPreCADRemoveTinyUVEdges(bool theVal)
-{
- if (theVal != _preCADRemoveTinyUVEdges) {
- _preCADRemoveTinyUVEdges = theVal;
- NotifySubMeshesHypothesisModification();
- }
-}
-
//=============================================================================
void BLSURFPlugin_Hypothesis::SetPreCADRemoveDuplicateCADFaces(bool theVal)
{
save << " " << (int) _phySizeRel << " " << (int) _minSizeRel << " " << (int) _maxSizeRel << " " << _chordalError ;
save << " " << (int) _anisotropic << " " << _anisotropicRatio << " " << (int) _removeTinyEdges << " " << _tinyEdgeLength ;
save << " " << (int) _badElementRemoval << " " << _badElementAspectRatio << " " << (int) _optimizeMesh << " " << (int) _quadraticMesh ;
- save << " " << (int) _preCADProcess3DTopology << " " << (int) _preCADRemoveDuplicateCADFaces << " " << (int) _preCADRemoveTinyUVEdges;
+ save << " " << (int) _preCADProcess3DTopology << " " << (int) _preCADRemoveDuplicateCADFaces;
save << " " << (int)_optimiseTinyEdges << " " << _tinyEdgeOptimisationLength;
save << " " << (int)_correctSurfaceIntersec << " " << _corrSurfaceIntersCost;
save << " " << (int)_useGradation << " " << (int)_useVolumeGradation << " " << _volumeGradation;
else
load.clear(std::ios::badbit | load.rdstate());
- isOK = static_cast<bool>(load >> i);
- if (isOK)
- _preCADRemoveTinyUVEdges = (bool) i;
- else
- load.clear(std::ios::badbit | load.rdstate());
-
isOK = static_cast<bool>(load >> i);
if (isOK)
_optimiseTinyEdges = (bool) i;
void SetPreCADMergeEdges(bool theVal);
bool GetPreCADMergeEdges() const { return _preCADMergeEdges; }
- void SetPreCADRemoveTinyUVEdges(bool theVal);
- bool GetPreCADRemoveTinyUVEdges() const { return _preCADRemoveTinyUVEdges; }
-
void SetPreCADRemoveDuplicateCADFaces(bool theVal);
bool GetPreCADRemoveDuplicateCADFaces() const { return _preCADRemoveDuplicateCADFaces; }
static Topology GetDefaultTopology() { return FromCAD; }
// PreCAD
static bool GetDefaultPreCADMergeEdges() { return false; }
- static bool GetDefaultPreCADRemoveTinyUVEdges() { return false; }
static bool GetDefaultPreCADRemoveDuplicateCADFaces() { return false; }
static bool GetDefaultPreCADProcess3DTopology() { return false; }
static bool GetDefaultPreCADDiscardInput() { return false; }
Topology _topology;
bool _preCADMergeEdges;
- bool _preCADRemoveTinyUVEdges;
bool _preCADRemoveDuplicateCADFaces;
bool _preCADProcess3DTopology;
bool _preCADDiscardInput;
return this->GetImpl()->GetPreCADMergeEdges();
}
-//=============================================================================
-/*!
- * BLSURFPlugin_Hypothesis_i::SetPreCADRemoveTinyUVEdges
- *
- * Set true or false
- */
-//=============================================================================
-void BLSURFPlugin_Hypothesis_i::SetPreCADRemoveTinyUVEdges(CORBA::Boolean theValue) {
- // MESSAGE("BLSURFPlugin_Hypothesis_i::SetPreCADRemoveTinyUVEdges");
- ASSERT(myBaseImpl);
- this->GetImpl()->SetPreCADRemoveTinyUVEdges(theValue);
- std::string theValueStr = theValue ? "True" : "False";
- SMESH::TPythonDump() << _this() << ".SetPreCADRemoveTinyUVEdges( " << theValueStr.c_str() << " )";
-}
-
-//=============================================================================
-/*!
- * BLSURFPlugin_Hypothesis_i::GetPreCADRemoveTinyUVEdges
- *
- * Get true or false
- */
-//=============================================================================
-CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetPreCADRemoveTinyUVEdges() {
- // MESSAGE("BLSURFPlugin_Hypothesis_i::GetPreCADRemoveTinyUVEdges");
- ASSERT(myBaseImpl);
- return this->GetImpl()->GetPreCADRemoveTinyUVEdges();
-}
-
//=============================================================================
/*!
* BLSURFPlugin_Hypothesis_i::SetPreCADRemoveDuplicateCADFaces
else if ( name == "tiny_edge_optimisation_length" )
SetTinyEdgeOptimisationLength( GetImpl()->ToDbl( optionValue ));
- else if ( name == "remove_tiny_uv_edges" )
- SetPreCADRemoveTinyUVEdges( GetImpl()->ToBool( optionValue ));
-
else if ( name == "process_3d_topology" )
SetPreCADProcess3DTopology( GetImpl()->ToBool( optionValue ));
void SetPreCADMergeEdges(CORBA::Boolean theValue);
CORBA::Boolean GetPreCADMergeEdges();
- void SetPreCADRemoveTinyUVEdges(CORBA::Boolean theValue);
- CORBA::Boolean GetPreCADRemoveTinyUVEdges();
-
void SetPreCADRemoveDuplicateCADFaces(CORBA::Boolean theValue);
CORBA::Boolean GetPreCADRemoveDuplicateCADFaces();
<translation>Merge edges</translation>
</message>
<message>
- <source>BLSURF_PRECAD_REMOVE_TINY_UV_EDGES</source>
+ <source>remove_tiny_uv_edges</source>
<translation>Remove tiny UV edges</translation>
</message>
<message>
<translation>Fusionner des arêtes</translation>
</message>
<message>
- <source>BLSURF_PRECAD_REMOVE_TINY_UV_EDGES</source>
+ <source>remove_tiny_uv_edges</source>
<translation>Supprime les petites arêtes UV</translation>
</message>
<message>
<translation>エッジをマージします。</translation>
</message>
<message>
- <source>BLSURF_PRECAD_REMOVE_TINY_UV_EDGES</source>
+ <source>remove_tiny_uv_edges</source>
<translation>微小UVエッジの削除</translation>
</message>
<message>
BLSURF_Parameters.SetPhySize( 5 )
BLSURF_Parameters.SetPreCADMergeEdges( True )
BLSURF_Parameters.SetPreCADProcess3DTopology( True )
+BLSURF_Parameters.SetPreCADOptionValue( 'remove_tiny_uv_edges', 'yes' )
Mesh_1.Compute()