mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-15 00:30:33 +05:00
PAL14419 (IMP: a filter predicate to find nodes/elements lying on any
kind of geom surface needed) BelongToGenSurface predicate created
This commit is contained in:
parent
a901ac3222
commit
7a9f3cc854
@ -55,6 +55,7 @@ module SMESH
|
|||||||
FT_BelongToGeom,
|
FT_BelongToGeom,
|
||||||
FT_BelongToPlane,
|
FT_BelongToPlane,
|
||||||
FT_BelongToCylinder,
|
FT_BelongToCylinder,
|
||||||
|
FT_BelongToGenSurface,
|
||||||
FT_LyingOnGeom,
|
FT_LyingOnGeom,
|
||||||
FT_RangeOfIds,
|
FT_RangeOfIds,
|
||||||
FT_BadOrientedVolume,
|
FT_BadOrientedVolume,
|
||||||
@ -158,7 +159,8 @@ module SMESH
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Logical functor (predicate) "Belong To Surface".
|
* Logical functor (predicate) "Belong To Surface".
|
||||||
* Base interface for "belong to plane" and "belong to cylinder interfaces"
|
* Base interface for "belong to plane" and "belong to cylinder"
|
||||||
|
* and "Belong To Generic Surface" interfaces
|
||||||
*/
|
*/
|
||||||
interface BelongToSurface: Predicate
|
interface BelongToSurface: Predicate
|
||||||
{
|
{
|
||||||
@ -168,12 +170,17 @@ module SMESH
|
|||||||
void SetShape( in string theID, in string theName, in ElementType theType );
|
void SetShape( in string theID, in string theName, in ElementType theType );
|
||||||
string GetShapeName();
|
string GetShapeName();
|
||||||
string GetShapeID();
|
string GetShapeID();
|
||||||
|
/*!
|
||||||
|
* Limit surface extent to bounding box of boundaries (edges)
|
||||||
|
* in surface parametric space. Boundaries are ignored by default
|
||||||
|
*/
|
||||||
|
void SetUseBoundaries( in boolean theUseBndRestrictions );
|
||||||
|
boolean GetUseBoundaries();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Logical functor (predicate) "Belong To Plane".
|
* Logical functor (predicate) "Belong To Plane".
|
||||||
* Verify whether mesh element lie in pointed Geom planar object
|
* Verify whether mesh element lie on pointed Geom planar object
|
||||||
*/
|
*/
|
||||||
interface BelongToPlane: BelongToSurface
|
interface BelongToPlane: BelongToSurface
|
||||||
{
|
{
|
||||||
@ -181,14 +188,23 @@ module SMESH
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Logical functor (predicate) "Belong To Culinder".
|
* Logical functor (predicate) "Belong To Cylinder".
|
||||||
* Verify whether mesh element lie in pointed Geom cylindrical object
|
* Verify whether mesh element lie on pointed Geom cylindrical object
|
||||||
*/
|
*/
|
||||||
interface BelongToCylinder: BelongToSurface
|
interface BelongToCylinder: BelongToSurface
|
||||||
{
|
{
|
||||||
void SetCylinder( in GEOM::GEOM_Object theGeom, in ElementType theType );
|
void SetCylinder( in GEOM::GEOM_Object theGeom, in ElementType theType );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Logical functor (predicate) "Belong To Generic Surface".
|
||||||
|
* Verify whether mesh element lie in pointed Geom cylindrical object
|
||||||
|
*/
|
||||||
|
interface BelongToGenSurface: BelongToSurface
|
||||||
|
{
|
||||||
|
void SetSurface( in GEOM::GEOM_Object theGeom, in ElementType theType );
|
||||||
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Logical functor (predicate) "Lying On Geometry".
|
* Logical functor (predicate) "Lying On Geometry".
|
||||||
* Verify whether mesh element or node lying or partially lying on the pointed Geom Object
|
* Verify whether mesh element or node lying or partially lying on the pointed Geom Object
|
||||||
@ -391,6 +407,7 @@ module SMESH
|
|||||||
BelongToGeom CreateBelongToGeom();
|
BelongToGeom CreateBelongToGeom();
|
||||||
BelongToPlane CreateBelongToPlane();
|
BelongToPlane CreateBelongToPlane();
|
||||||
BelongToCylinder CreateBelongToCylinder();
|
BelongToCylinder CreateBelongToCylinder();
|
||||||
|
BelongToGenSurface CreateBelongToGenSurface();
|
||||||
|
|
||||||
LyingOnGeom CreateLyingOnGeom();
|
LyingOnGeom CreateLyingOnGeom();
|
||||||
|
|
||||||
|
@ -21,25 +21,27 @@
|
|||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <gp_Ax3.hxx>
|
|
||||||
#include <gp_Cylinder.hxx>
|
|
||||||
#include <gp_Dir.hxx>
|
|
||||||
#include <gp_Pnt.hxx>
|
|
||||||
#include <gp_Pln.hxx>
|
|
||||||
#include <gp_Vec.hxx>
|
|
||||||
#include <gp_XYZ.hxx>
|
|
||||||
#include <Geom_Plane.hxx>
|
|
||||||
#include <Geom_CylindricalSurface.hxx>
|
#include <Geom_CylindricalSurface.hxx>
|
||||||
|
#include <Geom_Plane.hxx>
|
||||||
|
#include <Geom_Surface.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
#include <TColgp_Array1OfXYZ.hxx>
|
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
|
||||||
#include <TColStd_MapOfInteger.hxx>
|
#include <TColStd_MapOfInteger.hxx>
|
||||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||||
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
|
#include <TColgp_Array1OfXYZ.hxx>
|
||||||
#include <TopAbs.hxx>
|
#include <TopAbs.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#include <gp_Ax3.hxx>
|
||||||
|
#include <gp_Cylinder.hxx>
|
||||||
|
#include <gp_Dir.hxx>
|
||||||
|
#include <gp_Pln.hxx>
|
||||||
|
#include <gp_Pnt.hxx>
|
||||||
|
#include <gp_Vec.hxx>
|
||||||
|
#include <gp_XYZ.hxx>
|
||||||
|
|
||||||
#include "SMDS_Mesh.hxx"
|
#include "SMDS_Mesh.hxx"
|
||||||
#include "SMDS_Iterator.hxx"
|
#include "SMDS_Iterator.hxx"
|
||||||
@ -2527,6 +2529,7 @@ ElementsOnSurface::ElementsOnSurface()
|
|||||||
myType = SMDSAbs_All;
|
myType = SMDSAbs_All;
|
||||||
mySurf.Nullify();
|
mySurf.Nullify();
|
||||||
myToler = Precision::Confusion();
|
myToler = Precision::Confusion();
|
||||||
|
myUseBoundaries = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ElementsOnSurface::~ElementsOnSurface()
|
ElementsOnSurface::~ElementsOnSurface()
|
||||||
@ -2539,7 +2542,6 @@ void ElementsOnSurface::SetMesh( const SMDS_Mesh* theMesh )
|
|||||||
if ( myMesh == theMesh )
|
if ( myMesh == theMesh )
|
||||||
return;
|
return;
|
||||||
myMesh = theMesh;
|
myMesh = theMesh;
|
||||||
myIds.Clear();
|
|
||||||
process();
|
process();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2555,8 +2557,14 @@ void ElementsOnSurface::SetTolerance( const double theToler )
|
|||||||
{ myToler = theToler; }
|
{ myToler = theToler; }
|
||||||
|
|
||||||
double ElementsOnSurface::GetTolerance() const
|
double ElementsOnSurface::GetTolerance() const
|
||||||
|
{ return myToler; }
|
||||||
|
|
||||||
|
void ElementsOnSurface::SetUseBoundaries( bool theUse )
|
||||||
{
|
{
|
||||||
return myToler;
|
bool diff = ( myUseBoundaries != theUse );
|
||||||
|
myUseBoundaries = theUse;
|
||||||
|
if ( diff )
|
||||||
|
SetSurface( mySurf, myType );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElementsOnSurface::SetSurface( const TopoDS_Shape& theShape,
|
void ElementsOnSurface::SetSurface( const TopoDS_Shape& theShape,
|
||||||
@ -2565,12 +2573,17 @@ void ElementsOnSurface::SetSurface( const TopoDS_Shape& theShape,
|
|||||||
myType = theType;
|
myType = theType;
|
||||||
mySurf.Nullify();
|
mySurf.Nullify();
|
||||||
if ( theShape.IsNull() || theShape.ShapeType() != TopAbs_FACE )
|
if ( theShape.IsNull() || theShape.ShapeType() != TopAbs_FACE )
|
||||||
{
|
|
||||||
mySurf.Nullify();
|
|
||||||
return;
|
return;
|
||||||
}
|
mySurf = TopoDS::Face( theShape );
|
||||||
TopoDS_Face aFace = TopoDS::Face( theShape );
|
BRepAdaptor_Surface SA( mySurf, myUseBoundaries );
|
||||||
mySurf = BRep_Tool::Surface( aFace );
|
Standard_Real
|
||||||
|
u1 = SA.FirstUParameter(),
|
||||||
|
u2 = SA.LastUParameter(),
|
||||||
|
v1 = SA.FirstVParameter(),
|
||||||
|
v2 = SA.LastVParameter();
|
||||||
|
Handle(Geom_Surface) surf = BRep_Tool::Surface( mySurf );
|
||||||
|
myProjector.Init( surf, u1,u2, v1,v2 );
|
||||||
|
process();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ElementsOnSurface::process()
|
void ElementsOnSurface::process()
|
||||||
@ -2584,6 +2597,7 @@ void ElementsOnSurface::process()
|
|||||||
|
|
||||||
if ( myType == SMDSAbs_Face || myType == SMDSAbs_All )
|
if ( myType == SMDSAbs_Face || myType == SMDSAbs_All )
|
||||||
{
|
{
|
||||||
|
myIds.ReSize( myMesh->NbFaces() );
|
||||||
SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
|
SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
|
||||||
for(; anIter->more(); )
|
for(; anIter->more(); )
|
||||||
process( anIter->next() );
|
process( anIter->next() );
|
||||||
@ -2591,6 +2605,7 @@ void ElementsOnSurface::process()
|
|||||||
|
|
||||||
if ( myType == SMDSAbs_Edge || myType == SMDSAbs_All )
|
if ( myType == SMDSAbs_Edge || myType == SMDSAbs_All )
|
||||||
{
|
{
|
||||||
|
myIds.ReSize( myMesh->NbEdges() );
|
||||||
SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
|
SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
|
||||||
for(; anIter->more(); )
|
for(; anIter->more(); )
|
||||||
process( anIter->next() );
|
process( anIter->next() );
|
||||||
@ -2598,6 +2613,7 @@ void ElementsOnSurface::process()
|
|||||||
|
|
||||||
if ( myType == SMDSAbs_Node )
|
if ( myType == SMDSAbs_Node )
|
||||||
{
|
{
|
||||||
|
myIds.ReSize( myMesh->NbNodes() );
|
||||||
SMDS_NodeIteratorPtr anIter = myMesh->nodesIterator();
|
SMDS_NodeIteratorPtr anIter = myMesh->nodesIterator();
|
||||||
for(; anIter->more(); )
|
for(; anIter->more(); )
|
||||||
process( anIter->next() );
|
process( anIter->next() );
|
||||||
@ -2621,32 +2637,34 @@ void ElementsOnSurface::process( const SMDS_MeshElement* theElemPtr )
|
|||||||
myIds.Add( theElemPtr->GetID() );
|
myIds.Add( theElemPtr->GetID() );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ElementsOnSurface::isOnSurface( const SMDS_MeshNode* theNode ) const
|
bool ElementsOnSurface::isOnSurface( const SMDS_MeshNode* theNode )
|
||||||
{
|
{
|
||||||
if ( mySurf.IsNull() )
|
if ( mySurf.IsNull() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
gp_Pnt aPnt( theNode->X(), theNode->Y(), theNode->Z() );
|
gp_Pnt aPnt( theNode->X(), theNode->Y(), theNode->Z() );
|
||||||
double aToler2 = myToler * myToler;
|
// double aToler2 = myToler * myToler;
|
||||||
if ( mySurf->IsKind(STANDARD_TYPE(Geom_Plane)))
|
// if ( mySurf->IsKind(STANDARD_TYPE(Geom_Plane)))
|
||||||
{
|
// {
|
||||||
gp_Pln aPln = Handle(Geom_Plane)::DownCast(mySurf)->Pln();
|
// gp_Pln aPln = Handle(Geom_Plane)::DownCast(mySurf)->Pln();
|
||||||
if ( aPln.SquareDistance( aPnt ) > aToler2 )
|
// if ( aPln.SquareDistance( aPnt ) > aToler2 )
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else if ( mySurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)))
|
// else if ( mySurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)))
|
||||||
{
|
// {
|
||||||
gp_Cylinder aCyl = Handle(Geom_CylindricalSurface)::DownCast(mySurf)->Cylinder();
|
// gp_Cylinder aCyl = Handle(Geom_CylindricalSurface)::DownCast(mySurf)->Cylinder();
|
||||||
double aRad = aCyl.Radius();
|
// double aRad = aCyl.Radius();
|
||||||
gp_Ax3 anAxis = aCyl.Position();
|
// gp_Ax3 anAxis = aCyl.Position();
|
||||||
gp_XYZ aLoc = aCyl.Location().XYZ();
|
// gp_XYZ aLoc = aCyl.Location().XYZ();
|
||||||
double aXDist = anAxis.XDirection().XYZ() * ( aPnt.XYZ() - aLoc );
|
// double aXDist = anAxis.XDirection().XYZ() * ( aPnt.XYZ() - aLoc );
|
||||||
double aYDist = anAxis.YDirection().XYZ() * ( aPnt.XYZ() - aLoc );
|
// double aYDist = anAxis.YDirection().XYZ() * ( aPnt.XYZ() - aLoc );
|
||||||
if ( fabs(aXDist*aXDist + aYDist*aYDist - aRad*aRad) > aToler2 )
|
// if ( fabs(aXDist*aXDist + aYDist*aYDist - aRad*aRad) > aToler2 )
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
return false;
|
// return false;
|
||||||
|
myProjector.Perform( aPnt );
|
||||||
|
bool isOn = ( myProjector.IsDone() && myProjector.LowerDistance() <= myToler );
|
||||||
|
|
||||||
return true;
|
return isOn;
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,12 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <gp_XYZ.hxx>
|
#include <gp_XYZ.hxx>
|
||||||
#include <Geom_Surface.hxx>
|
//#include <Geom_Surface.hxx>
|
||||||
|
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
||||||
#include <TColStd_SequenceOfInteger.hxx>
|
#include <TColStd_SequenceOfInteger.hxx>
|
||||||
#include <TColStd_MapOfInteger.hxx>
|
#include <TColStd_MapOfInteger.hxx>
|
||||||
#include <TCollection_AsciiString.hxx>
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
#include <TopoDS_Face.hxx>
|
||||||
|
|
||||||
#include "SMDSAbs_ElementType.hxx"
|
#include "SMDSAbs_ElementType.hxx"
|
||||||
#include "SMDS_MeshNode.hxx"
|
#include "SMDS_MeshNode.hxx"
|
||||||
@ -44,7 +46,7 @@ class SMESHDS_Mesh;
|
|||||||
class SMESHDS_SubMesh;
|
class SMESHDS_SubMesh;
|
||||||
|
|
||||||
class gp_Pnt;
|
class gp_Pnt;
|
||||||
class TopoDS_Shape;
|
//class TopoDS_Shape;
|
||||||
|
|
||||||
|
|
||||||
namespace SMESH{
|
namespace SMESH{
|
||||||
@ -612,18 +614,23 @@ namespace SMESH{
|
|||||||
double GetTolerance() const;
|
double GetTolerance() const;
|
||||||
void SetSurface( const TopoDS_Shape& theShape,
|
void SetSurface( const TopoDS_Shape& theShape,
|
||||||
const SMDSAbs_ElementType theType );
|
const SMDSAbs_ElementType theType );
|
||||||
|
void SetUseBoundaries( bool theUse );
|
||||||
|
bool GetUseBoundaries() const { return myUseBoundaries; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void process();
|
void process();
|
||||||
void process( const SMDS_MeshElement* theElem );
|
void process( const SMDS_MeshElement* theElem );
|
||||||
bool isOnSurface( const SMDS_MeshNode* theNode ) const;
|
bool isOnSurface( const SMDS_MeshNode* theNode );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const SMDS_Mesh* myMesh;
|
const SMDS_Mesh* myMesh;
|
||||||
TColStd_MapOfInteger myIds;
|
TColStd_MapOfInteger myIds;
|
||||||
SMDSAbs_ElementType myType;
|
SMDSAbs_ElementType myType;
|
||||||
Handle(Geom_Surface) mySurf;
|
//Handle(Geom_Surface) mySurf;
|
||||||
|
TopoDS_Face mySurf;
|
||||||
double myToler;
|
double myToler;
|
||||||
|
bool myUseBoundaries;
|
||||||
|
GeomAPI_ProjectPointOnSurf myProjector;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef boost::shared_ptr<ElementsOnSurface> ElementsOnSurfacePtr;
|
typedef boost::shared_ptr<ElementsOnSurface> ElementsOnSurfacePtr;
|
||||||
|
@ -1276,7 +1276,7 @@ bool SMDS_VolumeTool::IsFreeFace( int faceIndex )
|
|||||||
continue; // opposite side
|
continue; // opposite side
|
||||||
}
|
}
|
||||||
// remove a volume from volNbShared map
|
// remove a volume from volNbShared map
|
||||||
volNbShared.erase( vNbIt );
|
volNbShared.erase( vNbIt-- );
|
||||||
}
|
}
|
||||||
|
|
||||||
// here volNbShared contains only volumes laying on the
|
// here volNbShared contains only volumes laying on the
|
||||||
|
@ -676,6 +676,7 @@ bool SMESHGUI_FilterTable::IsValid (const bool theMess, const int theEntityType)
|
|||||||
aCriterion == FT_BelongToGeom ||
|
aCriterion == FT_BelongToGeom ||
|
||||||
aCriterion == FT_BelongToPlane ||
|
aCriterion == FT_BelongToPlane ||
|
||||||
aCriterion == FT_BelongToCylinder ||
|
aCriterion == FT_BelongToCylinder ||
|
||||||
|
aCriterion == FT_BelongToGenSurface ||
|
||||||
aCriterion == FT_LyingOnGeom) {
|
aCriterion == FT_LyingOnGeom) {
|
||||||
if (aTable->text(i, 2).isEmpty()) {
|
if (aTable->text(i, 2).isEmpty()) {
|
||||||
if (theMess)
|
if (theMess)
|
||||||
@ -786,6 +787,7 @@ void SMESHGUI_FilterTable::GetCriterion (const int theRow,
|
|||||||
aCriterionType != FT_BelongToGeom &&
|
aCriterionType != FT_BelongToGeom &&
|
||||||
aCriterionType != FT_BelongToPlane &&
|
aCriterionType != FT_BelongToPlane &&
|
||||||
aCriterionType != FT_BelongToCylinder &&
|
aCriterionType != FT_BelongToCylinder &&
|
||||||
|
aCriterionType != FT_BelongToGenSurface &&
|
||||||
aCriterionType != FT_LyingOnGeom)
|
aCriterionType != FT_LyingOnGeom)
|
||||||
{
|
{
|
||||||
theCriterion.Compare = ((ComboItem*)aTable->item(theRow, 1))->GetValue();
|
theCriterion.Compare = ((ComboItem*)aTable->item(theRow, 1))->GetValue();
|
||||||
@ -836,6 +838,7 @@ void SMESHGUI_FilterTable::SetCriterion (const int theRow,
|
|||||||
theCriterion.Type != FT_BelongToGeom &&
|
theCriterion.Type != FT_BelongToGeom &&
|
||||||
theCriterion.Type != FT_BelongToPlane &&
|
theCriterion.Type != FT_BelongToPlane &&
|
||||||
theCriterion.Type != FT_BelongToCylinder &&
|
theCriterion.Type != FT_BelongToCylinder &&
|
||||||
|
theCriterion.Type != FT_BelongToGenSurface &&
|
||||||
theCriterion.Type != FT_LyingOnGeom &&
|
theCriterion.Type != FT_LyingOnGeom &&
|
||||||
theCriterion.Type != FT_FreeBorders &&
|
theCriterion.Type != FT_FreeBorders &&
|
||||||
theCriterion.Type != FT_FreeEdges &&
|
theCriterion.Type != FT_FreeEdges &&
|
||||||
@ -850,7 +853,8 @@ void SMESHGUI_FilterTable::SetCriterion (const int theRow,
|
|||||||
|
|
||||||
if (theCriterion.Compare == FT_EqualTo ||
|
if (theCriterion.Compare == FT_EqualTo ||
|
||||||
theCriterion.Type == FT_BelongToPlane ||
|
theCriterion.Type == FT_BelongToPlane ||
|
||||||
theCriterion.Type == FT_BelongToCylinder)
|
theCriterion.Type == FT_BelongToCylinder ||
|
||||||
|
theCriterion.Type == FT_BelongToGenSurface)
|
||||||
{
|
{
|
||||||
QTableItem* anItem = aTable->item(theRow, 0);
|
QTableItem* anItem = aTable->item(theRow, 0);
|
||||||
if (!myAddWidgets.contains(anItem))
|
if (!myAddWidgets.contains(anItem))
|
||||||
@ -1081,6 +1085,7 @@ void SMESHGUI_FilterTable::onCriterionChanged (const int row, const int col, con
|
|||||||
aCriterionType == SMESH::FT_BelongToGeom ||
|
aCriterionType == SMESH::FT_BelongToGeom ||
|
||||||
aCriterionType == SMESH::FT_BelongToPlane ||
|
aCriterionType == SMESH::FT_BelongToPlane ||
|
||||||
aCriterionType == SMESH::FT_BelongToCylinder ||
|
aCriterionType == SMESH::FT_BelongToCylinder ||
|
||||||
|
aCriterionType == SMESH::FT_BelongToGenSurface ||
|
||||||
aCriterionType == SMESH::FT_LyingOnGeom)
|
aCriterionType == SMESH::FT_LyingOnGeom)
|
||||||
{
|
{
|
||||||
QMap<int, QString> aMap;
|
QMap<int, QString> aMap;
|
||||||
@ -1275,6 +1280,7 @@ const QMap<int, QString>& SMESHGUI_FilterTable::getCriteria (const int theType)
|
|||||||
aCriteria[ SMESH::FT_BelongToGeom ] = tr("BELONG_TO_GEOM");
|
aCriteria[ SMESH::FT_BelongToGeom ] = tr("BELONG_TO_GEOM");
|
||||||
aCriteria[ SMESH::FT_BelongToPlane ] = tr("BELONG_TO_PLANE");
|
aCriteria[ SMESH::FT_BelongToPlane ] = tr("BELONG_TO_PLANE");
|
||||||
aCriteria[ SMESH::FT_BelongToCylinder ] = tr("BELONG_TO_CYLINDER");
|
aCriteria[ SMESH::FT_BelongToCylinder ] = tr("BELONG_TO_CYLINDER");
|
||||||
|
aCriteria[ SMESH::FT_BelongToGenSurface]= tr("BELONG_TO_GENSURFACE");
|
||||||
aCriteria[ SMESH::FT_LyingOnGeom ] = tr("LYING_ON_GEOM");
|
aCriteria[ SMESH::FT_LyingOnGeom ] = tr("LYING_ON_GEOM");
|
||||||
}
|
}
|
||||||
return aCriteria;
|
return aCriteria;
|
||||||
@ -1291,6 +1297,7 @@ const QMap<int, QString>& SMESHGUI_FilterTable::getCriteria (const int theType)
|
|||||||
aCriteria[ SMESH::FT_BelongToGeom ] = tr("BELONG_TO_GEOM");
|
aCriteria[ SMESH::FT_BelongToGeom ] = tr("BELONG_TO_GEOM");
|
||||||
aCriteria[ SMESH::FT_BelongToPlane ] = tr("BELONG_TO_PLANE");
|
aCriteria[ SMESH::FT_BelongToPlane ] = tr("BELONG_TO_PLANE");
|
||||||
aCriteria[ SMESH::FT_BelongToCylinder ] = tr("BELONG_TO_CYLINDER");
|
aCriteria[ SMESH::FT_BelongToCylinder ] = tr("BELONG_TO_CYLINDER");
|
||||||
|
aCriteria[ SMESH::FT_BelongToGenSurface]= tr("BELONG_TO_GENSURFACE");
|
||||||
aCriteria[ SMESH::FT_LyingOnGeom ] = tr("LYING_ON_GEOM");
|
aCriteria[ SMESH::FT_LyingOnGeom ] = tr("LYING_ON_GEOM");
|
||||||
}
|
}
|
||||||
return aCriteria;
|
return aCriteria;
|
||||||
@ -1311,6 +1318,7 @@ const QMap<int, QString>& SMESHGUI_FilterTable::getCriteria (const int theType)
|
|||||||
aCriteria[ SMESH::FT_BelongToGeom ] = tr("BELONG_TO_GEOM");
|
aCriteria[ SMESH::FT_BelongToGeom ] = tr("BELONG_TO_GEOM");
|
||||||
aCriteria[ SMESH::FT_BelongToPlane ] = tr("BELONG_TO_PLANE");
|
aCriteria[ SMESH::FT_BelongToPlane ] = tr("BELONG_TO_PLANE");
|
||||||
aCriteria[ SMESH::FT_BelongToCylinder ] = tr("BELONG_TO_CYLINDER");
|
aCriteria[ SMESH::FT_BelongToCylinder ] = tr("BELONG_TO_CYLINDER");
|
||||||
|
aCriteria[ SMESH::FT_BelongToGenSurface]= tr("BELONG_TO_GENSURFACE");
|
||||||
aCriteria[ SMESH::FT_LyingOnGeom ] = tr("LYING_ON_GEOM");
|
aCriteria[ SMESH::FT_LyingOnGeom ] = tr("LYING_ON_GEOM");
|
||||||
aCriteria[ SMESH::FT_Length2D ] = tr("LENGTH2D");
|
aCriteria[ SMESH::FT_Length2D ] = tr("LENGTH2D");
|
||||||
aCriteria[ SMESH::FT_MultiConnection2D] = tr("MULTI2D_BORDERS");
|
aCriteria[ SMESH::FT_MultiConnection2D] = tr("MULTI2D_BORDERS");
|
||||||
@ -2106,6 +2114,7 @@ bool SMESHGUI_FilterDlg::isValid() const
|
|||||||
if (aType == FT_BelongToGeom ||
|
if (aType == FT_BelongToGeom ||
|
||||||
aType == FT_BelongToPlane ||
|
aType == FT_BelongToPlane ||
|
||||||
aType == FT_BelongToCylinder ||
|
aType == FT_BelongToCylinder ||
|
||||||
|
aType == FT_BelongToGenSurface ||
|
||||||
aType == FT_LyingOnGeom) {
|
aType == FT_LyingOnGeom) {
|
||||||
QString aName;
|
QString aName;
|
||||||
myTable->GetThreshold(i, aName);
|
myTable->GetThreshold(i, aName);
|
||||||
@ -2118,7 +2127,9 @@ bool SMESHGUI_FilterDlg::isValid() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aType == FT_BelongToCylinder || aType == FT_BelongToPlane) {
|
if (aType == FT_BelongToCylinder ||
|
||||||
|
aType == FT_BelongToPlane ||
|
||||||
|
aType == FT_BelongToGenSurface ) {
|
||||||
CORBA::Object_var anObject = SMESH::SObjectToObject(aList[ 0 ]);
|
CORBA::Object_var anObject = SMESH::SObjectToObject(aList[ 0 ]);
|
||||||
//GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(aList[ 0 ]->GetObject());
|
//GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(aList[ 0 ]->GetObject());
|
||||||
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(anObject);
|
GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(anObject);
|
||||||
@ -2514,6 +2525,7 @@ void SMESHGUI_FilterDlg::onSelectionDone()
|
|||||||
myTable->GetCriterionType(aRow) != FT_BelongToGeom &&
|
myTable->GetCriterionType(aRow) != FT_BelongToGeom &&
|
||||||
myTable->GetCriterionType(aRow) != FT_BelongToPlane &&
|
myTable->GetCriterionType(aRow) != FT_BelongToPlane &&
|
||||||
myTable->GetCriterionType(aRow) != FT_BelongToCylinder &&
|
myTable->GetCriterionType(aRow) != FT_BelongToCylinder &&
|
||||||
|
myTable->GetCriterionType(aRow) != FT_BelongToGenSurface &&
|
||||||
myTable->GetCriterionType(aRow) != FT_LyingOnGeom)
|
myTable->GetCriterionType(aRow) != FT_LyingOnGeom)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2569,9 +2581,11 @@ void SMESHGUI_FilterDlg::updateSelection()
|
|||||||
(myTable->GetCriterionType(aRow) == FT_BelongToGeom ||
|
(myTable->GetCriterionType(aRow) == FT_BelongToGeom ||
|
||||||
myTable->GetCriterionType(aRow) == FT_BelongToPlane ||
|
myTable->GetCriterionType(aRow) == FT_BelongToPlane ||
|
||||||
myTable->GetCriterionType(aRow) == FT_BelongToCylinder ||
|
myTable->GetCriterionType(aRow) == FT_BelongToCylinder ||
|
||||||
|
myTable->GetCriterionType(aRow) == FT_BelongToGenSurface ||
|
||||||
myTable->GetCriterionType(aRow) == FT_LyingOnGeom)) {
|
myTable->GetCriterionType(aRow) == FT_LyingOnGeom)) {
|
||||||
|
|
||||||
if (myTable->GetCriterionType(aRow) == FT_BelongToGeom ||
|
if (myTable->GetCriterionType(aRow) == FT_BelongToGeom ||
|
||||||
|
myTable->GetCriterionType(aRow) == FT_BelongToGenSurface ||
|
||||||
myTable->GetCriterionType(aRow) == FT_LyingOnGeom) {
|
myTable->GetCriterionType(aRow) == FT_LyingOnGeom) {
|
||||||
|
|
||||||
mySelectionMgr->installFilter(new GEOM_SelectionFilter( aStudy, true ));
|
mySelectionMgr->installFilter(new GEOM_SelectionFilter( aStudy, true ));
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR Free Software Foundation, Inc.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"PO-Revision-Date: 2006-12-29 11:56+0300\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=CHARSET\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
# Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
#
|
#
|
||||||
@ -1139,6 +1154,9 @@ msgstr "Belong to Plane"
|
|||||||
msgid "SMESHGUI_FilterTable::BELONG_TO_CYLINDER"
|
msgid "SMESHGUI_FilterTable::BELONG_TO_CYLINDER"
|
||||||
msgstr "Belong to Cylinder"
|
msgstr "Belong to Cylinder"
|
||||||
|
|
||||||
|
msgid "SMESHGUI_FilterTable::BELONG_TO_GENSURFACE"
|
||||||
|
msgstr "Belong to Surface"
|
||||||
|
|
||||||
msgid "SMESHGUI_FilterTable::LYING_ON_GEOM"
|
msgid "SMESHGUI_FilterTable::LYING_ON_GEOM"
|
||||||
msgstr "Lying on Geom"
|
msgstr "Lying on Geom"
|
||||||
|
|
||||||
|
@ -231,6 +231,7 @@ namespace SMESH
|
|||||||
case FT_BelongToGeom: myStream<< "aBelongToGeom"; break;
|
case FT_BelongToGeom: myStream<< "aBelongToGeom"; break;
|
||||||
case FT_BelongToPlane: myStream<< "aBelongToPlane"; break;
|
case FT_BelongToPlane: myStream<< "aBelongToPlane"; break;
|
||||||
case FT_BelongToCylinder: myStream<< "aBelongToCylinder"; break;
|
case FT_BelongToCylinder: myStream<< "aBelongToCylinder"; break;
|
||||||
|
case FT_BelongToGenSurface:myStream<<"aBelongToGenSurface";break;
|
||||||
case FT_LyingOnGeom: myStream<< "aLyingOnGeom"; break;
|
case FT_LyingOnGeom: myStream<< "aLyingOnGeom"; break;
|
||||||
case FT_RangeOfIds: myStream<< "aRangeOfIds"; break;
|
case FT_RangeOfIds: myStream<< "aRangeOfIds"; break;
|
||||||
case FT_BadOrientedVolume:myStream<< "aBadOrientedVolume";break;
|
case FT_BadOrientedVolume:myStream<< "aBadOrientedVolume";break;
|
||||||
|
@ -885,7 +885,6 @@ void BelongToSurface_i::SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType t
|
|||||||
}
|
}
|
||||||
|
|
||||||
myElementsOnSurfacePtr->SetSurface( TopoDS_Shape(), (SMDSAbs_ElementType)theType );
|
myElementsOnSurfacePtr->SetSurface( TopoDS_Shape(), (SMDSAbs_ElementType)theType );
|
||||||
TPythonDump()<<this<<".SetSurface("<<theGeom<<",'"<<theType<<"')";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BelongToSurface_i::SetShapeName( const char* theName, ElementType theType )
|
void BelongToSurface_i::SetShapeName( const char* theName, ElementType theType )
|
||||||
@ -933,6 +932,18 @@ CORBA::Double BelongToSurface_i::GetTolerance()
|
|||||||
return myElementsOnSurfacePtr->GetTolerance();
|
return myElementsOnSurfacePtr->GetTolerance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BelongToSurface_i::SetUseBoundaries( CORBA::Boolean theUseBndRestrictions )
|
||||||
|
{
|
||||||
|
myElementsOnSurfacePtr->SetUseBoundaries( theUseBndRestrictions );
|
||||||
|
TPythonDump()<<this<<".SetUseBoundaries( " << theUseBndRestrictions << " )";
|
||||||
|
}
|
||||||
|
|
||||||
|
CORBA::Boolean BelongToSurface_i::GetUseBoundaries()
|
||||||
|
{
|
||||||
|
return myElementsOnSurfacePtr->GetUseBoundaries();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : BelongToPlane_i
|
Class : BelongToPlane_i
|
||||||
Description : Verify whether mesh element lie in pointed Geom planar object
|
Description : Verify whether mesh element lie in pointed Geom planar object
|
||||||
@ -975,6 +986,33 @@ FunctorType BelongToCylinder_i::GetFunctorType()
|
|||||||
return FT_BelongToCylinder;
|
return FT_BelongToCylinder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Class : BelongToGenSurface_i
|
||||||
|
Description : Verify whether mesh element lie in pointed Geom planar object
|
||||||
|
*/
|
||||||
|
|
||||||
|
BelongToGenSurface_i::BelongToGenSurface_i()
|
||||||
|
: BelongToSurface_i( STANDARD_TYPE( Geom_CylindricalSurface ) )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void BelongToGenSurface_i::SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType theType )
|
||||||
|
{
|
||||||
|
if ( theGeom->_is_nil() )
|
||||||
|
return;
|
||||||
|
TopoDS_Shape aLocShape = SMESH_Gen_i::GetSMESHGen()->GeomObjectToShape( theGeom );
|
||||||
|
if ( !aLocShape.IsNull() && aLocShape.ShapeType() != TopAbs_FACE )
|
||||||
|
aLocShape.Nullify();
|
||||||
|
|
||||||
|
BelongToSurface_i::myElementsOnSurfacePtr->SetSurface( aLocShape, (SMDSAbs_ElementType)theType );
|
||||||
|
TPythonDump()<<this<<".SetGenSurface("<<theGeom<<","<<theType<<")";
|
||||||
|
}
|
||||||
|
|
||||||
|
FunctorType BelongToGenSurface_i::GetFunctorType()
|
||||||
|
{
|
||||||
|
return FT_BelongToGenSurface;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : LyingOnGeom_i
|
Class : LyingOnGeom_i
|
||||||
Description : Predicate for selection on geometrical support
|
Description : Predicate for selection on geometrical support
|
||||||
@ -1556,6 +1594,14 @@ BelongToCylinder_ptr FilterManager_i::CreateBelongToCylinder()
|
|||||||
return anObj._retn();
|
return anObj._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BelongToGenSurface_ptr FilterManager_i::CreateBelongToGenSurface()
|
||||||
|
{
|
||||||
|
SMESH::BelongToGenSurface_i* aServant = new SMESH::BelongToGenSurface_i();
|
||||||
|
SMESH::BelongToGenSurface_var anObj = aServant->_this();
|
||||||
|
TPythonDump()<<aServant<<" = "<<this<<".CreateBelongToGenSurface()";
|
||||||
|
return anObj._retn();
|
||||||
|
}
|
||||||
|
|
||||||
LyingOnGeom_ptr FilterManager_i::CreateLyingOnGeom()
|
LyingOnGeom_ptr FilterManager_i::CreateLyingOnGeom()
|
||||||
{
|
{
|
||||||
SMESH::LyingOnGeom_i* aServant = new SMESH::LyingOnGeom_i();
|
SMESH::LyingOnGeom_i* aServant = new SMESH::LyingOnGeom_i();
|
||||||
@ -1854,6 +1900,7 @@ static inline bool getCriteria( Predicate_i* thePred,
|
|||||||
}
|
}
|
||||||
case FT_BelongToPlane:
|
case FT_BelongToPlane:
|
||||||
case FT_BelongToCylinder:
|
case FT_BelongToCylinder:
|
||||||
|
case FT_BelongToGenSurface:
|
||||||
{
|
{
|
||||||
BelongToSurface_i* aPred = dynamic_cast<BelongToSurface_i*>( thePred );
|
BelongToSurface_i* aPred = dynamic_cast<BelongToSurface_i*>( thePred );
|
||||||
|
|
||||||
@ -2006,7 +2053,7 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
|
|||||||
ElementType aTypeOfElem = theCriteria[ i ].TypeOfElement;
|
ElementType aTypeOfElem = theCriteria[ i ].TypeOfElement;
|
||||||
long aPrecision = theCriteria[ i ].Precision;
|
long aPrecision = theCriteria[ i ].Precision;
|
||||||
|
|
||||||
TPythonDump()<<"aCriteria.append(SMESH.Filter.Criterion("<<
|
TPythonDump()<<"aCriterion = SMESH.Filter.Criterion("<<
|
||||||
aCriterion<<","<<aCompare<<","<<aThreshold<<",'"<<aThresholdStr<<"','"<<aThresholdID<<"',"<<
|
aCriterion<<","<<aCompare<<","<<aThreshold<<",'"<<aThresholdStr<<"','"<<aThresholdID<<"',"<<
|
||||||
aUnary<<","<<aBinary<<","<<aTolerance<<","<<aTypeOfElem<<","<<aPrecision<<"))";
|
aUnary<<","<<aBinary<<","<<aTolerance<<","<<aTypeOfElem<<","<<aPrecision<<"))";
|
||||||
|
|
||||||
@ -2072,12 +2119,17 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
|
|||||||
break;
|
break;
|
||||||
case SMESH::FT_BelongToPlane:
|
case SMESH::FT_BelongToPlane:
|
||||||
case SMESH::FT_BelongToCylinder:
|
case SMESH::FT_BelongToCylinder:
|
||||||
|
case SMESH::FT_BelongToGenSurface:
|
||||||
{
|
{
|
||||||
SMESH::BelongToSurface_ptr tmpPred;
|
SMESH::BelongToSurface_ptr tmpPred;
|
||||||
if ( aCriterion == SMESH::FT_BelongToPlane )
|
switch ( aCriterion ) {
|
||||||
tmpPred = aFilterMgr->CreateBelongToPlane();
|
case SMESH::FT_BelongToPlane:
|
||||||
else
|
tmpPred = aFilterMgr->CreateBelongToPlane(); break;
|
||||||
tmpPred = aFilterMgr->CreateBelongToCylinder();
|
case SMESH::FT_BelongToCylinder:
|
||||||
|
tmpPred = aFilterMgr->CreateBelongToCylinder(); break;
|
||||||
|
default:
|
||||||
|
tmpPred = aFilterMgr->CreateBelongToGenSurface();
|
||||||
|
}
|
||||||
tmpPred->SetShape( aThresholdID, aThresholdStr, aTypeOfElem );
|
tmpPred->SetShape( aThresholdID, aThresholdStr, aTypeOfElem );
|
||||||
tmpPred->SetTolerance( aTolerance );
|
tmpPred->SetTolerance( aTolerance );
|
||||||
aPredicate = tmpPred;
|
aPredicate = tmpPred;
|
||||||
@ -2148,6 +2200,7 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
|
|||||||
// logical op
|
// logical op
|
||||||
aPredicates.push_back( aPredicate );
|
aPredicates.push_back( aPredicate );
|
||||||
aBinaries.push_back( aBinary );
|
aBinaries.push_back( aBinary );
|
||||||
|
TPythonDump()<<"aCriteria.append(aCriterion)";
|
||||||
|
|
||||||
} // end of for
|
} // end of for
|
||||||
TPythonDump()<<this<<".SetCriteria(aCriteria)";
|
TPythonDump()<<this<<".SetCriteria(aCriteria)";
|
||||||
@ -2308,6 +2361,7 @@ static inline LDOMString toString( CORBA::Long theType )
|
|||||||
case FT_BelongToGeom : return "Belong to Geom";
|
case FT_BelongToGeom : return "Belong to Geom";
|
||||||
case FT_BelongToPlane : return "Belong to Plane";
|
case FT_BelongToPlane : return "Belong to Plane";
|
||||||
case FT_BelongToCylinder: return "Belong to Cylinder";
|
case FT_BelongToCylinder: return "Belong to Cylinder";
|
||||||
|
case FT_BelongToGenSurface: return "Belong to Generic Surface";
|
||||||
case FT_LyingOnGeom : return "Lying on Geom";
|
case FT_LyingOnGeom : return "Lying on Geom";
|
||||||
case FT_BadOrientedVolume: return "Bad Oriented Volume";
|
case FT_BadOrientedVolume: return "Bad Oriented Volume";
|
||||||
case FT_RangeOfIds : return "Range of IDs";
|
case FT_RangeOfIds : return "Range of IDs";
|
||||||
@ -2344,6 +2398,7 @@ static inline SMESH::FunctorType toFunctorType( const LDOMString& theStr )
|
|||||||
else if ( theStr.equals( "Belong to Geom" ) ) return FT_BelongToGeom;
|
else if ( theStr.equals( "Belong to Geom" ) ) return FT_BelongToGeom;
|
||||||
else if ( theStr.equals( "Belong to Plane" ) ) return FT_BelongToPlane;
|
else if ( theStr.equals( "Belong to Plane" ) ) return FT_BelongToPlane;
|
||||||
else if ( theStr.equals( "Belong to Cylinder" ) ) return FT_BelongToCylinder;
|
else if ( theStr.equals( "Belong to Cylinder" ) ) return FT_BelongToCylinder;
|
||||||
|
else if ( theStr.equals( "Belong to Generic Surface" ) ) return FT_BelongToGenSurface;
|
||||||
else if ( theStr.equals( "Lying on Geom" ) ) return FT_LyingOnGeom;
|
else if ( theStr.equals( "Lying on Geom" ) ) return FT_LyingOnGeom;
|
||||||
else if ( theStr.equals( "Free borders" ) ) return FT_FreeBorders;
|
else if ( theStr.equals( "Free borders" ) ) return FT_FreeBorders;
|
||||||
else if ( theStr.equals( "Free edges" ) ) return FT_FreeEdges;
|
else if ( theStr.equals( "Free edges" ) ) return FT_FreeEdges;
|
||||||
|
@ -391,6 +391,9 @@ namespace SMESH
|
|||||||
void SetTolerance( CORBA::Double );
|
void SetTolerance( CORBA::Double );
|
||||||
CORBA::Double GetTolerance();
|
CORBA::Double GetTolerance();
|
||||||
|
|
||||||
|
void SetUseBoundaries( CORBA::Boolean theUseBndRestrictions );
|
||||||
|
CORBA::Boolean GetUseBoundaries();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Controls::ElementsOnSurfacePtr myElementsOnSurfacePtr;
|
Controls::ElementsOnSurfacePtr myElementsOnSurfacePtr;
|
||||||
char* myShapeName;
|
char* myShapeName;
|
||||||
@ -424,6 +427,19 @@ namespace SMESH
|
|||||||
FunctorType GetFunctorType();
|
FunctorType GetFunctorType();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
Class : BelongToGenSurface_i
|
||||||
|
Description : Verify whether mesh element lie on pointed Geom surfasic object
|
||||||
|
*/
|
||||||
|
class BelongToGenSurface_i: public virtual POA_SMESH::BelongToGenSurface,
|
||||||
|
public virtual BelongToSurface_i
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BelongToGenSurface_i();
|
||||||
|
void SetSurface( GEOM::GEOM_Object_ptr theGeom, ElementType theType );
|
||||||
|
FunctorType GetFunctorType();
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : LyingOnGeom_i
|
Class : LyingOnGeom_i
|
||||||
Description : Predicate for selection on geometrical support(lying or partially lying)
|
Description : Predicate for selection on geometrical support(lying or partially lying)
|
||||||
@ -770,6 +786,7 @@ namespace SMESH
|
|||||||
BelongToGeom_ptr CreateBelongToGeom();
|
BelongToGeom_ptr CreateBelongToGeom();
|
||||||
BelongToPlane_ptr CreateBelongToPlane();
|
BelongToPlane_ptr CreateBelongToPlane();
|
||||||
BelongToCylinder_ptr CreateBelongToCylinder();
|
BelongToCylinder_ptr CreateBelongToCylinder();
|
||||||
|
BelongToGenSurface_ptr CreateBelongToGenSurface();
|
||||||
|
|
||||||
LyingOnGeom_ptr CreateLyingOnGeom();
|
LyingOnGeom_ptr CreateLyingOnGeom();
|
||||||
|
|
||||||
|
@ -241,11 +241,17 @@ def GetCriterion(elementType,
|
|||||||
|
|
||||||
if Compare in [FT_LessThan, FT_MoreThan, FT_EqualTo]:
|
if Compare in [FT_LessThan, FT_MoreThan, FT_EqualTo]:
|
||||||
aCriterion.Compare = EnumToLong(Compare)
|
aCriterion.Compare = EnumToLong(Compare)
|
||||||
|
elif Compare == "=" or Compare == "==":
|
||||||
|
aCriterion.Compare = EnumToLong(FT_EqualTo)
|
||||||
|
elif Compare == "<":
|
||||||
|
aCriterion.Compare = EnumToLong(FT_LessThan)
|
||||||
|
elif Compare == ">":
|
||||||
|
aCriterion.Compare = EnumToLong(FT_MoreThan)
|
||||||
else:
|
else:
|
||||||
aCriterion.Compare = EnumToLong(FT_EqualTo)
|
aCriterion.Compare = EnumToLong(FT_EqualTo)
|
||||||
aTreshold = Compare
|
aTreshold = Compare
|
||||||
|
|
||||||
if CritType in [FT_BelongToGeom, FT_BelongToPlane,
|
if CritType in [FT_BelongToGeom, FT_BelongToPlane, FT_BelongToGenSurface,
|
||||||
FT_BelongToCylinder, FT_LyingOnGeom]:
|
FT_BelongToCylinder, FT_LyingOnGeom]:
|
||||||
# Check treshold
|
# Check treshold
|
||||||
if isinstance(aTreshold, geompy.GEOM._objref_GEOM_Object):
|
if isinstance(aTreshold, geompy.GEOM._objref_GEOM_Object):
|
||||||
|
Loading…
Reference in New Issue
Block a user