mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 01:40:33 +05:00
IPAL54104: Wrong prismatic mesh
Fix sub-shape association of FACEs with a seam in a propagation case + Remember a state of "Show IDs" check-box in Mesh Info / Element info
This commit is contained in:
parent
096485adbe
commit
9ecacf41d1
@ -77,22 +77,24 @@
|
||||
|
||||
namespace {
|
||||
|
||||
const int SPACING = 6;
|
||||
const int MARGIN = 9;
|
||||
const int MAXITEMS = 10;
|
||||
const int GROUPS_ID = 100;
|
||||
const int SUBMESHES_ID = 200;
|
||||
const int SPACING_INFO = 2;
|
||||
const int SPACING = 6;
|
||||
const int MARGIN = 9;
|
||||
const int MAXITEMS = 10;
|
||||
const int GROUPS_ID = 100;
|
||||
const int SUBMESHES_ID = 200;
|
||||
const int SPACING_INFO = 2;
|
||||
|
||||
enum InfoRole {
|
||||
TypeRole = Qt::UserRole + 10,
|
||||
IdRole,
|
||||
};
|
||||
const char* id_preview_resource = "id_preview_resource";
|
||||
|
||||
enum InfoType {
|
||||
NodeConnectivity = 100,
|
||||
ElemConnectivity,
|
||||
};
|
||||
enum InfoRole {
|
||||
TypeRole = Qt::UserRole + 10,
|
||||
IdRole,
|
||||
};
|
||||
|
||||
enum InfoType {
|
||||
NodeConnectivity = 100,
|
||||
ElemConnectivity,
|
||||
};
|
||||
} // namesapce
|
||||
|
||||
/*!
|
||||
@ -2942,6 +2944,8 @@ SMESHGUI_MeshInfoDlg::SMESHGUI_MeshInfoDlg( QWidget* parent, int page )
|
||||
connect( myElemInfo, SIGNAL( itemInfo( int )), this, SLOT( showItemInfo( int )));
|
||||
connect( myElemInfo, SIGNAL( itemInfo( QString )), this, SLOT( showItemInfo( QString )));
|
||||
|
||||
myIDPreviewCheck->setChecked( SMESHGUI::resourceMgr()->booleanValue( "SMESH", id_preview_resource, false ));
|
||||
|
||||
updateSelection();
|
||||
}
|
||||
|
||||
@ -3189,6 +3193,7 @@ void SMESHGUI_MeshInfoDlg::idChanged()
|
||||
void SMESHGUI_MeshInfoDlg::idPreviewChange( bool isOn )
|
||||
{
|
||||
myIDPreview->SetPointsLabeled( isOn && !myID->text().simplified().isEmpty() );
|
||||
SMESHGUI::resourceMgr()->setValue("SMESH", id_preview_resource, isOn );
|
||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow() )
|
||||
aViewWindow->Repaint();
|
||||
}
|
||||
|
@ -36,8 +36,11 @@ import os
|
||||
# Values
|
||||
# ------
|
||||
|
||||
tmpDir = os.getenv('SALOME_TMP_DIR', '/tmp')
|
||||
print "Output directory:", tmpDir
|
||||
|
||||
# Path for ".med" files
|
||||
path = "/tmp/ex29_%s_" % os.getenv('USER','unknown')
|
||||
path = os.path.join( tmpDir, "ex29_%s_" % os.getenv('USER','unknown'))
|
||||
|
||||
# Name of the shape and the mesh
|
||||
name = "Carre"
|
||||
|
@ -1100,6 +1100,11 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
|
||||
// take care of proper association of propagated edges
|
||||
bool same1 = edge1.IsSame( edges1.front() );
|
||||
bool same2 = edge2.IsSame( edges2.front() );
|
||||
if ( !same1 && !same2 )
|
||||
{
|
||||
same1 = ( edges1.back().Orientation() == edge1.Orientation() );
|
||||
same2 = ( edges2.back().Orientation() == edge2.Orientation() );
|
||||
}
|
||||
if ( same1 != same2 )
|
||||
{
|
||||
reverseEdges(edges2, nbE);
|
||||
|
@ -1380,11 +1380,12 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
|
||||
TopoDS_Edge srcE1 = srcEdges.front(), tgtE1 = tgtEdges.front();
|
||||
TopoDS_Shape srcE1bis = shape2ShapeMap( tgtE1 );
|
||||
reverse = ( ! srcE1.IsSame( srcE1bis ));
|
||||
if ( reverse &&
|
||||
//_sourceHypo->HasVertexAssociation() &&
|
||||
if ( ( reverse || srcE1.Orientation() != srcE1bis.Orientation() ) &&
|
||||
nbEdgesInWires.front() > 2 &&
|
||||
helper.IsRealSeam( tgtEdges.front() ))
|
||||
{
|
||||
if ( srcE1.Orientation() != srcE1bis.Orientation() )
|
||||
reverse = true;
|
||||
// projection to a face with seam EDGE; pb is that GetOrderedEdges()
|
||||
// always puts a seam EDGE first (if possible) and as a result
|
||||
// we can't use only theReverse flag to correctly associate source
|
||||
|
Loading…
Reference in New Issue
Block a user