mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 17:00:34 +05:00
IPAL52860: Free Edges control mis-location and mis-visibility
IPAL19098: Confusing "Precision" of "Average Length" implemented for NPAL17873
This commit is contained in:
parent
1774f77443
commit
18e7b9c752
BIN
doc/salome/gui/SMESH/images/free_borders1.png
Executable file → Normal file
BIN
doc/salome/gui/SMESH/images/free_borders1.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 1.8 KiB |
@ -144,12 +144,17 @@ composing your geometrical object. Definition of this hypothesis
|
||||
consists of setting the \b length of segments, which will approximate these
|
||||
edges, and the \b precision of rounding.
|
||||
|
||||
The \b precision parameter is used to round a number of segments,
|
||||
calculated by dividing the edge length by the specified \b length of
|
||||
segment, to the higher integer if the remainder exceeds the precision
|
||||
and to the lower integer otherwise. Use value 0.5 to provide rounding
|
||||
to the nearest integer, 1.0 for the lower integer, 0.0 for the higher
|
||||
integer. Default value is 1e-07.
|
||||
The \b precision parameter is used to round a <em>number of segments</em>,
|
||||
calculated by dividing the <em>edge length</em> by the specified \b length of
|
||||
segment, to the higher integer if the \a remainder exceeds the \b precision
|
||||
and to the lower integer otherwise. <br>
|
||||
Use value 0.5 to provide rounding to the nearest integer, 1.0 for the lower integer, 0.0 for the higher integer. Default value is 1e-07.
|
||||
|
||||
For example: if <em>edge length</em> is 10.0 and the segment \b length
|
||||
is 3.0 then their division gives 10./3. = 3.33(3) and the \a remainder is 0.33(3).
|
||||
If \b precision is less than 0.33(3) then the edge is divided into 3 segments.
|
||||
If \b precision is more than 0.33(3) then the edge is divided into 4 segments.
|
||||
|
||||
|
||||
\image html image41.gif
|
||||
|
||||
|
@ -24,7 +24,6 @@ Node quality controls:
|
||||
|
||||
Edge quality controls:
|
||||
<ul>
|
||||
<li>\subpage free_edges_page "Free edges"</li>
|
||||
<li>\subpage free_borders_page "Free borders"</li>
|
||||
<li>\subpage length_page "Length"</li>
|
||||
<li>\subpage borders_at_multi_connection_page "Borders at multi-connection"</li>
|
||||
@ -33,6 +32,7 @@ Edge quality controls:
|
||||
|
||||
Face quality controls:
|
||||
<ul>
|
||||
<li>\subpage free_edges_page "Free edges"</li>
|
||||
<li>\subpage free_faces_page "Free faces"</li>
|
||||
<li>\subpage bare_border_faces_page "Bare border faces"</li>
|
||||
<li>\subpage over_constrained_faces_page "Over-constrained faces"</li>
|
||||
|
@ -2,14 +2,16 @@
|
||||
|
||||
\page free_borders_page Free borders
|
||||
|
||||
\n This mesh quality control highlights borders of faces consisting of
|
||||
1D elements (segments) belonging to one face only.
|
||||
\n This mesh quality control highlights 1D elements (segments)
|
||||
belonging to one element (face or volume) only.
|
||||
|
||||
\image html free_borders1.png
|
||||
|
||||
In this picture the free borders are displayed in white.
|
||||
In this picture the free borders are displayed in red. (Faces are
|
||||
explicitly shown via <em>Display Entity</em> menu as all elements but
|
||||
segments are hidden upon this control activation).
|
||||
|
||||
<br><b>See Also</b> a sample TUI Script of a
|
||||
\ref tui_free_borders "Free Borders quality control" operation.
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
\page free_edges_page Free edges
|
||||
|
||||
\n This mesh quality control highlights borders of faces
|
||||
consisting of node links belonging to one face only.
|
||||
(links between nodes, not mesh segments) belonging to one face only.
|
||||
|
||||
\image html free_edges.png
|
||||
<center>In this picture some elements of mesh have been deleted and
|
||||
|
@ -2,9 +2,11 @@
|
||||
|
||||
\page selection_filter_library_page Selection filter library
|
||||
|
||||
\n Selection filter library is a powerful tool enabling to create
|
||||
filters to be used on meshes. You can access to it from the Main Menu
|
||||
via <b>Tools / Selection filter library</b>.
|
||||
\n Selection filter library allows creating and storing in files
|
||||
filters that can be later reused for operations on meshes. You can
|
||||
access to it from the Main Menu via <b>Tools / Selection filter library</b>.
|
||||
It is also possible to save any filter by invoking the filter library
|
||||
from \a Filter dialog launched from any mesh operation.
|
||||
|
||||
\image html selectionfilterlibrary.png
|
||||
|
||||
@ -20,7 +22,9 @@ filter. By default it is prefixed with the corresponding entity type.
|
||||
|
||||
When we use filters during a group creation or another operation (by
|
||||
clicking <b>Set Filter</b> button in the corresponding dialog), the
|
||||
menu for setting filters looks as shown below.
|
||||
dialog for setting filters looks as shown below.
|
||||
|
||||
\image html a-filteronfaces.png
|
||||
|
||||
The \b Add button creates a new criterion at the end of the list of
|
||||
criteria. The \b Insert button creates a new criterion before the
|
||||
@ -56,8 +60,6 @@ in the Library.
|
||||
is no selected mesh in the Object Browser and the filter can not be
|
||||
created. You have to select the mesh and the button will be enabled.
|
||||
|
||||
\image html a-filteronfaces.png
|
||||
|
||||
Some criteria are applicable to all <b>Entity types</b>:
|
||||
<ul><li>
|
||||
<b>Belong to Geom</b> selects entities whose all nodes lie on the
|
||||
@ -133,7 +135,7 @@ See also \ref tui_double_nodes_control "Double Nodes quality control".
|
||||
The following criteria allow selecting mesh <b>Edges</b>:
|
||||
<ul><li>
|
||||
<b>Free Borders</b> selects free 1D mesh elements, i.e. edges belonging to
|
||||
one face only. See also a
|
||||
one element (face or volume) only. See also a
|
||||
\ref free_borders_page "Free Borders quality control".
|
||||
</li><li>
|
||||
<b>Double edges</b> selects 1D mesh elements basing on the same set of nodes.
|
||||
@ -177,8 +179,8 @@ The following criteria allow selecting mesh <b>Faces</b>:
|
||||
\ref area_page "Area quality control"), which is more, less or equal (within a given
|
||||
<b>Tolerance</b>) to the predefined <b>Threshold Value</b>.
|
||||
</li><li>
|
||||
<b>Free edges</b> selects 2D mesh elements consisting of edges belonging to
|
||||
one element of mesh only. See also a
|
||||
<b>Free edges</b> selects 2D mesh elements having at least one of its
|
||||
edges not shared with other faces. See also a
|
||||
\ref free_edges_page "Free Edges quality control".
|
||||
</li><li>
|
||||
<b>Free faces</b> selects 2D mesh elements, which belong to less than two volumes.
|
||||
|
@ -135,8 +135,8 @@ namespace {
|
||||
int aResult0 = 0, aResult1 = 0;
|
||||
// last node, it is a medium one in a quadratic edge
|
||||
const SMDS_MeshNode* aLastNode = anEdge->GetNode( anEdge->NbNodes() - 1 );
|
||||
const SMDS_MeshNode* aNode0 = anEdge->GetNode( 0 );
|
||||
const SMDS_MeshNode* aNode1 = anEdge->GetNode( 1 );
|
||||
const SMDS_MeshNode* aNode0 = anEdge->GetNode( 0 );
|
||||
const SMDS_MeshNode* aNode1 = anEdge->GetNode( 1 );
|
||||
if ( aNode1 == aLastNode ) aNode1 = 0;
|
||||
|
||||
SMDS_ElemIteratorPtr anElemIter = aLastNode->GetInverseElementIterator();
|
||||
@ -2429,26 +2429,15 @@ bool FreeEdges::IsSatisfy( long theId )
|
||||
if ( aFace == 0 || aFace->GetType() != SMDSAbs_Face || aFace->NbNodes() < 3 )
|
||||
return false;
|
||||
|
||||
SMDS_ElemIteratorPtr anIter;
|
||||
if ( aFace->IsQuadratic() ) {
|
||||
anIter = dynamic_cast<const SMDS_VtkFace*>
|
||||
(aFace)->interlacedNodesElemIterator();
|
||||
}
|
||||
else {
|
||||
anIter = aFace->nodesIterator();
|
||||
}
|
||||
SMDS_NodeIteratorPtr anIter = aFace->interlacedNodesIterator();
|
||||
if ( !anIter )
|
||||
return false;
|
||||
|
||||
int i = 0, nbNodes = aFace->NbNodes();
|
||||
std::vector <const SMDS_MeshNode*> aNodes( nbNodes+1 );
|
||||
while( anIter->more() )
|
||||
{
|
||||
const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next();
|
||||
if ( aNode == 0 )
|
||||
if ( ! ( aNodes[ i++ ] = anIter->next() ))
|
||||
return false;
|
||||
aNodes[ i++ ] = aNode;
|
||||
}
|
||||
aNodes[ nbNodes ] = aNodes[ 0 ];
|
||||
|
||||
for ( i = 0; i < nbNodes; i++ )
|
||||
|
@ -1677,7 +1677,7 @@ namespace
|
||||
if(!anIO.IsNull()){
|
||||
_PTR(SObject) SO = aStudy->FindObjectID( It.Value()->getEntry() );
|
||||
if ( SO ) {
|
||||
CORBA::Object_var aObject = SMESH::SObjectToObject( SO );
|
||||
CORBA::Object_var aObject = SMESH::SObjectToObject( SO );
|
||||
SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( aObject );
|
||||
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( aObject );
|
||||
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aObject );
|
||||
@ -4366,7 +4366,8 @@ void SMESHGUI::initialize( CAM_Application* app )
|
||||
hasElems0d("({'Elem0d'} in elemTypes)"),
|
||||
hasEdges("({'Edge'} in elemTypes)"),
|
||||
hasFaces("({'Face'} in elemTypes)"),
|
||||
hasVolumes("({'Volume'} in elemTypes)");
|
||||
hasVolumes("({'Volume'} in elemTypes)"),
|
||||
hasFacesOrVolumes("(({'Face'} in elemTypes) || ({'Volume'} in elemTypes)) ");
|
||||
|
||||
createPopupItem( SMESHOp::OpFileInformation, OB, mesh, "&& selcount=1 && isImported" );
|
||||
createPopupItem( SMESHOp::OpCreateSubMesh, OB, mesh, "&& isComputable");
|
||||
@ -4577,12 +4578,8 @@ void SMESHGUI::initialize( CAM_Application* app )
|
||||
|
||||
aSubId = popupMgr()->insert( tr( "MEN_EDGE_CTRL" ), anId, -1 ); // EDGE CONTROLS
|
||||
|
||||
popupMgr()->insert( action( SMESHOp::OpFreeEdge ), aSubId, -1 );
|
||||
popupMgr()->setRule( action( SMESHOp::OpFreeEdge ), aMeshInVtkHasEdges, QtxPopupMgr::VisibleRule );
|
||||
popupMgr()->setRule( action( SMESHOp::OpFreeEdge ), "controlMode = 'eFreeEdges'", QtxPopupMgr::ToggleRule );
|
||||
|
||||
popupMgr()->insert( action( SMESHOp::OpFreeBorder ), aSubId, -1 );
|
||||
popupMgr()->setRule( action( SMESHOp::OpFreeBorder ), aMeshInVtkHasEdges, QtxPopupMgr::VisibleRule );
|
||||
popupMgr()->setRule( action( SMESHOp::OpFreeBorder ), aMeshInVTK + "&&" + hasEdges + "&&" + hasFacesOrVolumes, QtxPopupMgr::VisibleRule );
|
||||
popupMgr()->setRule( action( SMESHOp::OpFreeBorder ), "controlMode = 'eFreeBorders'", QtxPopupMgr::ToggleRule );
|
||||
|
||||
popupMgr()->insert( action( SMESHOp::OpLength ), aSubId, -1 );
|
||||
@ -4598,6 +4595,10 @@ void SMESHGUI::initialize( CAM_Application* app )
|
||||
|
||||
aSubId = popupMgr()->insert( tr( "MEN_FACE_CTRL" ), anId, -1 ); // FACE CONTROLS
|
||||
|
||||
popupMgr()->insert( action( SMESHOp::OpFreeEdge ), aSubId, -1 );
|
||||
popupMgr()->setRule( action( SMESHOp::OpFreeEdge ), aMeshInVtkHasFaces, QtxPopupMgr::VisibleRule );
|
||||
popupMgr()->setRule( action( SMESHOp::OpFreeEdge ), "controlMode = 'eFreeEdges'", QtxPopupMgr::ToggleRule );
|
||||
|
||||
popupMgr()->insert ( action( SMESHOp::OpFreeFace ), aSubId, -1 );
|
||||
popupMgr()->setRule( action( SMESHOp::OpFreeFace ), aMeshInVtkHasFaces /*aMeshInVtkHasVolumes*/,
|
||||
QtxPopupMgr::VisibleRule );
|
||||
|
@ -1260,7 +1260,7 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh,
|
||||
double maxSegSize = 0;
|
||||
|
||||
// get points to check distance to the face
|
||||
EdgeData::TPntIter pIt2 = eData.myPoints.begin(), pIt1 = pIt2++;
|
||||
EdgeData::TPntIter pIt2 = eData.myPoints.begin(), pIt1 = pIt2++, pItLast;
|
||||
maxSegSize = pIt1->mySegSize = Min( pIt1->mySegSize, sizeTree.GetSize( pIt1->myP ));
|
||||
for ( ; pIt2 != eData.myPoints.end(); )
|
||||
{
|
||||
@ -1290,6 +1290,7 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh,
|
||||
//cout << "E " << theMesh.GetMeshDS()->ShapeToIndex( eData.Edge() ) << endl;
|
||||
sizeDecreased = false;
|
||||
const gp_Pnt* avoidPnt = & eData.First().myP;
|
||||
pItLast = --eData.myPoints.end();
|
||||
for ( pIt1 = eData.myPoints.begin(); pIt1 != eData.myPoints.end(); )
|
||||
{
|
||||
double distToFace =
|
||||
@ -1316,7 +1317,7 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh,
|
||||
pIt1->mySegSize = allowedSize;
|
||||
}
|
||||
++pIt1;
|
||||
if ( & (*pIt1) == & eData.Last() )
|
||||
if ( pIt1 == pItLast )
|
||||
avoidPnt = & eData.Last().myP;
|
||||
else
|
||||
avoidPnt = NULL;
|
||||
|
@ -657,7 +657,7 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
|
||||
}
|
||||
//
|
||||
// 2. Make pentahedrons
|
||||
int aID0, k , aJ[3];
|
||||
int aID0, k , aJ[4];
|
||||
vector<const SMDS_MeshNode*> aN;
|
||||
//
|
||||
SMDS_ElemIteratorPtr itf, aItNodes;
|
||||
|
@ -5072,8 +5072,10 @@ int StdMeshers_Quadrangle_2D::splitQuad(FaceQuadStruct::Ptr quad, int I, int J)
|
||||
// << " L " << &quad->side[ QUAD_LEFT_SIDE ] << " "<< quad->side[ QUAD_LEFT_SIDE].NbPoints()
|
||||
// << " R " << &quad->side[ QUAD_RIGHT_SIDE ] << " "<< quad->side[ QUAD_RIGHT_SIDE].NbPoints()<< endl;
|
||||
|
||||
newQuad->side[ QUAD_RIGHT_SIDE ].to = iRgt+1;
|
||||
newQuad->side[ QUAD_LEFT_SIDE ].to = iLft+1;
|
||||
bool rRev = newQuad->side[ QUAD_RIGHT_SIDE ].IsReversed();
|
||||
bool lRev = newQuad->side[ QUAD_LEFT_SIDE ].IsReversed();
|
||||
newQuad->side[ QUAD_RIGHT_SIDE ].to = iRgt + ( rRev ? -1 : +1 );
|
||||
newQuad->side[ QUAD_LEFT_SIDE ].to = iLft + ( lRev ? -1 : +1 );
|
||||
newQuad->name = ( TComm("Below J=") << J );
|
||||
|
||||
quad->side[ QUAD_RIGHT_SIDE ].from = iRgt;
|
||||
|
@ -930,8 +930,7 @@ bool StdMeshers_RadialQuadrangle_1D2D::Compute(SMESH_Mesh& aMesh,
|
||||
//cout<<"Angles.Length() = "<<Angles.Length()<<" Points.Length() = "<<Points.Length()<<endl;
|
||||
//cout<<"Nodes1.size() = "<<Nodes1.size()<<" Pnts2d1.Length() = "<<Pnts2d1.Length()<<endl;
|
||||
for(; i<Angles.Length(); i++) {
|
||||
vector< const SMDS_MeshNode* > tmpNodes;
|
||||
tmpNodes.reserve(Nodes1.size());
|
||||
vector< const SMDS_MeshNode* > tmpNodes(Nodes1.size());
|
||||
gp_Trsf aTrsf;
|
||||
gp_Ax1 theAxis(P0,gp_Dir(Axis));
|
||||
aTrsf.SetRotation( theAxis, Angles.Value(i) );
|
||||
|
Loading…
Reference in New Issue
Block a user