### 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' )
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)
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 )
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
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
- :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.
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:
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 );
}
bool ElementsOnShape::Classifier::isOutOfFace (const gp_Pnt& p)
{
+ if ( isOutOfBox( p )) return true;
myProjFace.Perform( p );
if ( myProjFace.IsDone() && myProjFace.LowerDistance() <= myTol )
{
bool ElementsOnShape::Classifier::isOutOfEdge (const gp_Pnt& p)
{
+ if ( isOutOfBox( p )) return true;
myProjEdge.Perform( p );
return ! ( myProjEdge.NbPoints() > 0 && myProjEdge.LowerDistance() <= myTol );
}
namespace
{
- enum { GroupOnFilter_OutOfDate = -1 };
+ enum { GroupOnFilter_OutOfDate = -777 };
// count not yet loaded meshes
static int theMeshCounter = 0;
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 ] );
"""
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`
"""