mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-25 04:00:33 +05:00
23570: EDF17299 - Problem with filters
+ fix persistence of Group on Filter + minor fix of docs
This commit is contained in:
parent
f816f204d3
commit
074862c213
@ -4,7 +4,7 @@ salome.salome_init()
|
||||
### create geometry
|
||||
|
||||
from salome.geom import geomBuilder
|
||||
geompy = geomBuilder.New(salome.myStudy)
|
||||
geompy = geomBuilder.New()
|
||||
|
||||
Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||
geompy.addToStudy( Box_1, 'Box_1' )
|
||||
@ -13,7 +13,7 @@ geompy.addToStudy( Box_1, 'Box_1' )
|
||||
|
||||
import SMESH
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New(salome.myStudy)
|
||||
smesh = smeshBuilder.New()
|
||||
|
||||
Mesh_1 = smesh.Mesh( Box_1 )
|
||||
Mesh_1.Segment().NumberOfSegments(15)
|
||||
|
@ -4,9 +4,9 @@ import salome
|
||||
salome.salome_init()
|
||||
|
||||
from salome.geom import geomBuilder
|
||||
geompy = geomBuilder.New(salome.myStudy)
|
||||
geompy = geomBuilder.New()
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New(salome.myStudy)
|
||||
smesh = smeshBuilder.New()
|
||||
|
||||
# mesh a hexahedral mesh
|
||||
box = geompy.MakeBoxDXDYDZ (1, 1, 1 )
|
||||
|
@ -3,10 +3,10 @@
|
||||
import salome
|
||||
salome.salome_init()
|
||||
from salome.geom import geomBuilder
|
||||
geompy = geomBuilder.New(salome.myStudy)
|
||||
geompy = geomBuilder.New()
|
||||
import SMESH
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New(salome.myStudy)
|
||||
smesh = smeshBuilder.New()
|
||||
|
||||
# Create geometry: hollow sphere
|
||||
|
||||
|
@ -15,7 +15,9 @@ different meshing parameters than those assigned to the main shape.
|
||||
Structurally, the sub-mesh is a mesh on a certain sub-shape, or a group of
|
||||
sub-shapes, possibly generated using different meshing algorithms
|
||||
and/or hypotheses than those used to generate the mesh on other
|
||||
sub-shapes.
|
||||
sub-shapes. Elements generated on a sub-shape can be retrieved without
|
||||
explicit creation of a sub-mesh by creating a *Group on Geometry* using
|
||||
:ref:`Create Groups from Geometry <create_groups_from_geometry_page>` dialog.
|
||||
|
||||
Creation of a sub-mesh allows to control individually meshing of a
|
||||
certain sub-shape, thus to get a locally coarser or finer mesh, to get
|
||||
|
@ -11,7 +11,7 @@ Documentation of SALOME Mesh module Python API is available in two forms:
|
||||
|
||||
- :doc:`Structured documentation <modules>`, where all methods and classes are grouped by their functionality.
|
||||
|
||||
- :ref:`Linear documentation <modindex>` grouped only by classes, declared in the :mod:`smeshBuilder` and :mod:`StdMeshersBuilder` Python packages.
|
||||
- :ref:`Linear documentation <modindex>` grouped only by classes, declared in the :mod:`smeshBuilder` Python module.
|
||||
|
||||
With SALOME 7.2, the Python interface for Mesh has been slightly modified to offer new functionality.
|
||||
You may have to modify your scripts generated with SALOME 6 or older versions.
|
||||
@ -73,7 +73,7 @@ by calling *dir()* Python built-in function.
|
||||
|
||||
All methods of the Mesh Group can be found in :ref:`tui_create_standalone_group` sample script.
|
||||
|
||||
An example below demonstrates usage of the Python API for 3d mesh
|
||||
An example below demonstrates usage of the Python API for 3D mesh
|
||||
generation and for retrieving information on mesh nodes and elements.
|
||||
|
||||
.. _example_3d_mesh:
|
||||
|
@ -4567,6 +4567,7 @@ ElementsOnShape::Classifier::~Classifier()
|
||||
|
||||
bool ElementsOnShape::Classifier::isOutOfSolid (const gp_Pnt& p)
|
||||
{
|
||||
if ( isOutOfBox( p )) return true;
|
||||
mySolidClfr->Perform( p, myTol );
|
||||
return ( mySolidClfr->State() != TopAbs_IN && mySolidClfr->State() != TopAbs_ON );
|
||||
}
|
||||
@ -4578,6 +4579,7 @@ bool ElementsOnShape::Classifier::isOutOfBox (const gp_Pnt& p)
|
||||
|
||||
bool ElementsOnShape::Classifier::isOutOfFace (const gp_Pnt& p)
|
||||
{
|
||||
if ( isOutOfBox( p )) return true;
|
||||
myProjFace.Perform( p );
|
||||
if ( myProjFace.IsDone() && myProjFace.LowerDistance() <= myTol )
|
||||
{
|
||||
@ -4594,6 +4596,7 @@ bool ElementsOnShape::Classifier::isOutOfFace (const gp_Pnt& p)
|
||||
|
||||
bool ElementsOnShape::Classifier::isOutOfEdge (const gp_Pnt& p)
|
||||
{
|
||||
if ( isOutOfBox( p )) return true;
|
||||
myProjEdge.Perform( p );
|
||||
return ! ( myProjEdge.NbPoints() > 0 && myProjEdge.LowerDistance() <= myTol );
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ using namespace std;
|
||||
|
||||
namespace
|
||||
{
|
||||
enum { GroupOnFilter_OutOfDate = -1 };
|
||||
enum { GroupOnFilter_OutOfDate = -777 };
|
||||
|
||||
// count not yet loaded meshes
|
||||
static int theMeshCounter = 0;
|
||||
@ -254,7 +254,7 @@ namespace
|
||||
std::vector<int> data;
|
||||
|
||||
for ( size_t i = 0; i < meshInfo->length(); ++i )
|
||||
if ( meshInfo[i] > 0 )
|
||||
if ( meshInfo[i] > 0 || meshInfo[i] == GroupOnFilter_OutOfDate )
|
||||
{
|
||||
data.push_back( DriverMED::GetMedGeoType( SMDSAbs_EntityType( i ))); //medTypes[ i ] );
|
||||
data.push_back( meshInfo[ i ] );
|
||||
|
@ -74,6 +74,7 @@ class Mesh_Algorithm:
|
||||
"""
|
||||
Finds a hypothesis in the study by its type name and parameters.
|
||||
Finds only the hypotheses created in smeshBuilder engine.
|
||||
|
||||
Returns:
|
||||
:class:`~SMESH.SMESH_Hypothesis`
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user