Back to index

salome-geom  6.5.0
Classes | Typedefs | Enumerations | Functions
GEOM Namespace Reference

Classes

interface  GEOM_Object
 Interface of geometric object. More...
interface  GEOM_IOperations
 Basic methods of all geometric operations. More...
interface  GEOM_IBasicOperations
 Interface for basic geometry creation. More...
interface  GEOM_ITransformOperations
interface  GEOM_I3DPrimOperations
 Interface for 3D primitives creation. More...
interface  GEOM_IShapesOperations
 Interface for Shapes creation: More...
interface  GEOM_IBlocksOperations
 Interface for Blocks construction Face from points or edges, Block from faces, Blocks multi-translation and multi-rotation. More...
interface  GEOM_IBooleanOperations
 Interface for boolean operations (Cut, Fuse, Common) More...
interface  GEOM_ICurvesOperations
 Interface for curves creation. More...
interface  GEOM_ILocalOperations
 Interface for fillet and chamfer creation. More...
interface  GEOM_IHealingOperations
 Interface for shape healing operations. More...
interface  GEOM_IInsertOperations
 Interface for shape insert operations (like copy, import). More...
interface  GEOM_IKindOfShape
 Interface for shape_kind enumeration. More...
interface  GEOM_IMeasureOperations
 Interface for measurement (distance, whatis) and properties calculation (like Centre of Mass, Inertia, etc.). More...
interface  GEOM_IGroupOperations
 Interface for groups creation. More...
interface  GEOM_IAdvancedOperations
 Interface for advanced modeling functions. More...
interface  GEOM_Gen
 Interface to access other GEOM interfaces. More...
interface  GEOM_List
interface  GEOM_Superv
class  TPythonDump
class  GenericObjPtr
 A smart pointer for the SALOME GenericObj interface. More...

Typedefs

typedef sequence< string > string_array
typedef sequence< short > short_array
typedef sequence< boolean > ListOfBool
typedef sequence< long > ListOfLong
typedef sequence< double > ListOfDouble
typedef sequence< GEOM_ObjectListOfGO
typedef GenericObjPtr
< GEOM::GEOM_Object
GeomObjPtr
typedef GenericObjPtr
< GEOM::GEOM_IBasicOperations
BasicOpPtr
typedef GenericObjPtr
< GEOM::GEOM_ITransformOperations
TransformOpPtr
typedef GenericObjPtr
< GEOM::GEOM_I3DPrimOperations
I3DPrimOpPtr
typedef GenericObjPtr
< GEOM::GEOM_IShapesOperations
ShapesOpPtr
typedef GenericObjPtr
< GEOM::GEOM_IBlocksOperations
BlocksOpPtr
typedef GenericObjPtr
< GEOM::GEOM_IBooleanOperations
BooleanOpPtr
typedef GenericObjPtr
< GEOM::GEOM_ICurvesOperations
CurvesOpPtr
typedef GenericObjPtr
< GEOM::GEOM_ILocalOperations
LocalOpPtr
typedef GenericObjPtr
< GEOM::GEOM_IHealingOperations
HealingOpPtr
typedef GenericObjPtr
< GEOM::GEOM_IInsertOperations
InsertOpPtr
typedef GenericObjPtr
< GEOM::GEOM_IMeasureOperations
MeasureOpPtr
typedef GenericObjPtr
< GEOM::GEOM_IGroupOperations
GroupOpPtr
typedef GenericObjPtr
< GEOM::GEOM_IAdvancedOperations
AdvancedOpPtr

Enumerations

enum  shape_type {
  COMPOUND, COMPSOLID, SOLID, SHELL,
  FACE, WIRE, EDGE, VERTEX,
  SHAPE
}
 Topological types of shapes (like Open Cascade types) More...
enum  marker_type {
  MT_NONE, MT_POINT, MT_PLUS, MT_STAR,
  MT_O, MT_X, MT_O_POINT, MT_O_PLUS,
  MT_O_STAR, MT_O_X, MT_BALL, MT_RING1,
  MT_RING2, MT_RING3, MT_USER
}
 Marker type. More...
enum  marker_size {
  MS_NONE, MS_10, MS_15, MS_20,
  MS_25, MS_30, MS_35, MS_40,
  MS_45, MS_50, MS_55, MS_60,
  MS_65, MS_70
}
 /brief Marker size More...
enum  shape_state {
  ST_ON, ST_OUT, ST_ONOUT, ST_IN,
  ST_ONIN
}
 State of shape relatively geometrical surface like plane, sphere or cylinder. More...
enum  find_shape_method {
  FSM_GetInPlace, FSM_Transformed, FSM_GetSame, FSM_GetShapesOnShape,
  FSM_GetInPlaceByHistory, FSM_MultiTransformed
}
 Kind of method to find inside one main shape some sub-shapes, corresponding to other given shape (its argument) More...
enum  filling_oper_method { FOM_Default, FOM_UseOri, FOM_AutoCorrect }
 Kind of method to perform filling operation. More...
enum  curve_type { Polyline, Bezier, Interpolation }
 Kind of the curves. More...

Functions

 Handle (GEOM_Object) GetCreatedLast(const Handle(GEOM_Object)&theObj1
 Returns an object from two given, which has the latest entry.
void MeshShape (const TopoDS_Shape theShape, float &theDeflection, bool theForced)
void SetShape (const TopoDS_Shape &theShape, const TopTools_IndexedDataMapOfShapeListOfShape &theEdgeMap, bool theIsVector, GEOM_EdgeSource *theIsolatedEdgeSource, GEOM_EdgeSource *theOneFaceEdgeSource, GEOM_EdgeSource *theSharedEdgeSource, GEOM_WireframeFace *theWireframeFaceSource, GEOM_ShadingFace *theShadingFaceSource)

Class Documentation

interface GEOM::GEOM_List

Definition at line 32 of file GEOM_Superv.idl.


Typedef Documentation

Definition at line 231 of file GEOM_GenericObjPtr.h.

Definition at line 219 of file GEOM_GenericObjPtr.h.

Definition at line 223 of file GEOM_GenericObjPtr.h.

Definition at line 224 of file GEOM_GenericObjPtr.h.

Definition at line 225 of file GEOM_GenericObjPtr.h.

Definition at line 218 of file GEOM_GenericObjPtr.h.

Definition at line 230 of file GEOM_GenericObjPtr.h.

Definition at line 227 of file GEOM_GenericObjPtr.h.

Definition at line 221 of file GEOM_GenericObjPtr.h.

Definition at line 228 of file GEOM_GenericObjPtr.h.

typedef sequence<boolean> GEOM::ListOfBool

Definition at line 183 of file GEOM_Gen.idl.

typedef sequence<double> GEOM::ListOfDouble

Definition at line 185 of file GEOM_Gen.idl.

typedef sequence<GEOM_Object> GEOM::ListOfGO

Definition at line 187 of file GEOM_Gen.idl.

typedef sequence<long> GEOM::ListOfLong

Definition at line 184 of file GEOM_Gen.idl.

Definition at line 226 of file GEOM_GenericObjPtr.h.

Definition at line 229 of file GEOM_GenericObjPtr.h.

Definition at line 222 of file GEOM_GenericObjPtr.h.

typedef sequence<short> GEOM::short_array

Definition at line 182 of file GEOM_Gen.idl.

typedef sequence<string> GEOM::string_array

Definition at line 181 of file GEOM_Gen.idl.

Definition at line 220 of file GEOM_GenericObjPtr.h.


Enumeration Type Documentation

Kind of the curves.

Used in the functions GEOM_ICurvesOperations.MakeCurveParametric(), GEOM_ICurvesOperations.MakeCurveParametricNew()

Enumerator:
Polyline 

Polyline curve.

Bezier 

Bezier curve.

Interpolation 

Interpolation, curve.

Definition at line 169 of file GEOM_Gen.idl.

Kind of method to perform filling operation.

Is used in functions GEOM_I3DPrimOperations.MakeFilling()

Enumerator:
FOM_Default 

Default (standard behaviour)

FOM_UseOri 

Use edges orientation - orientation of edges is used: if the edge is reversed, the curve from this edge is reversed before using it in the filling algorithm.

FOM_AutoCorrect 

Auto-correct edges orientation - changes the orientation of the curves using minimization of sum of distances between the end points of the edges.

Definition at line 147 of file GEOM_Gen.idl.

Kind of method to find inside one main shape some sub-shapes, corresponding to other given shape (its argument)

Is used in functions GEOM_Gen.RestoreSubShapesO(), GEOM_Gen.RestoreSubShapesSO()

Enumerator:
FSM_GetInPlace 

Use GetInPlace functionality.

Suits all cases, except transformations

FSM_Transformed 

To be used only for transformation result, to find sub-shapes of argument.

Only this method can be used after transformation.

FSM_GetSame 

To find only shared sub-shapes, not modified by the operation.

FSM_GetShapesOnShape 

Use GetShapesOnShape method (can work only on solids)

FSM_GetInPlaceByHistory 

Use GetInPlaceByHistory method (can work only after Partition)

FSM_MultiTransformed 

To be used only for multi-transformation result.

Only this method can be used after multi-transformation.

Definition at line 117 of file GEOM_Gen.idl.

/brief Marker size

Enumerator:
MS_NONE 
MS_10 
MS_15 
MS_20 
MS_25 
MS_30 
MS_35 
MS_40 
MS_45 
MS_50 
MS_55 
MS_60 
MS_65 
MS_70 

Definition at line 70 of file GEOM_Gen.idl.

Marker type.

Enumerator:
MT_NONE 
MT_POINT 
MT_PLUS 
MT_STAR 
MT_O 
MT_X 
MT_O_POINT 
MT_O_PLUS 
MT_O_STAR 
MT_O_X 
MT_BALL 
MT_RING1 
MT_RING2 
MT_RING3 
MT_USER 

Definition at line 64 of file GEOM_Gen.idl.

State of shape relatively geometrical surface like plane, sphere or cylinder.

Is used in functions GEOM_IShapesOperations.GetShapesOn<xxx>()

Enumerator:
ST_ON 

Shape is on surface.

ST_OUT 

Shape is in the direction defined by the normal and not on surface.

For plane it means above the plane, For sphere and cylinder it means outside of volume, bounded by the surface.

ST_ONOUT 

Shape is in the direction defined by the normal and on surface.

ONOUT = ON || OUT

ST_IN 

Complementary to ONOUT.

For plane it means below the plane, For sphere and cylinder it means inside the volume, bounded by the surface (beyond axis and surface for cylinder and beyond cented and surface for sphere).

ST_ONIN 

Complementary to OUT.

ONIN = ON || IN

Definition at line 78 of file GEOM_Gen.idl.

Topological types of shapes (like Open Cascade types)

Enumerator:
COMPOUND 
COMPSOLID 

A collection of solids.

SOLID 

A part of 3D space bound by a shell.

SHELL 

A collection of faces connected by some edges of their wire boundaries.

FACE 

Part of a plane (in 2D geometry) or a surface (in 3D geometry) bounded by a close wire.

WIRE 

A sequence of edges connected by their vertices.

EDGE 

Edge, a shape corresponding to a curve, and bound by a vertex at each extremity.

VERTEX 

A zero-dimensional shape corresponding to a point in geometry.

SHAPE 

Definition at line 40 of file GEOM_Gen.idl.


Function Documentation

Returns an object from two given, which has the latest entry.

Returns an object from theObjects, which has the latest entry.

Definition at line 123 of file GEOM_PythonDump.cxx.

  {
    if (theObj1.IsNull()) return theObj2;
    if (theObj2.IsNull()) return theObj1;

    TColStd_ListOfInteger aTags1, aTags2;
    TDF_Tool::TagList(theObj1->GetEntry(), aTags1);
    TDF_Tool::TagList(theObj2->GetEntry(), aTags2);
    TColStd_ListIteratorOfListOfInteger aListIter1(aTags1), aListIter2(aTags2);
    for (; aListIter1.More(); aListIter1.Next(), aListIter2.Next()) {
      if (!aListIter2.More())
        return theObj1; // anObj1 is stored under anObj2

      if (aListIter1.Value() > aListIter2.Value())
        return theObj1;
      else if (aListIter1.Value() < aListIter2.Value())
        return theObj2;
    }
    return theObj1;
  }

Here is the caller graph for this function:

OCC2VTK_EXPORT void GEOM::MeshShape ( const TopoDS_Shape  theShape,
float &  theDeflection,
bool  theForced 
)

Definition at line 46 of file OCC2VTK_Tools.cxx.

                                  {
    
    Standard_Real aDeflection = theDeflection <= 0 ? DEFAULT_DEFLECTION : theDeflection;
    
    //If deflection <= 0, than return default deflection
    if(theDeflection <= 0)
      theDeflection = aDeflection;  
    
    // Is shape triangulated?
    Standard_Boolean alreadymeshed = Standard_True;
    TopExp_Explorer ex;
    TopLoc_Location aLoc;
    for (ex.Init(theShape, TopAbs_FACE); ex.More(); ex.Next()) {
      const TopoDS_Face& aFace = TopoDS::Face(ex.Current());
      Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc);
      if(aPoly.IsNull()) { 
       alreadymeshed = Standard_False; 
       break; 
      }
    }

    if(!alreadymeshed || theForced) {
      Bnd_Box B;
      BRepBndLib::Add(theShape, B);
      if ( B.IsVoid() )
       return; // NPAL15983 (Bug when displaying empty groups) 
      Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
      B.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);

      // This magic line comes from Prs3d_ShadedShape.gxx in OCCT
      aDeflection = MAX3(aXmax-aXmin, aYmax-aYmin, aZmax-aZmin) * aDeflection * 4;
      
      //Clean triangulation before compute incremental mesh
      BRepTools::Clean(theShape);
      
      //Compute triangulation
      BRepMesh_IncrementalMesh MESH(theShape,aDeflection); 
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

OCC2VTK_EXPORT void GEOM::SetShape ( const TopoDS_Shape &  theShape,
const TopTools_IndexedDataMapOfShapeListOfShape &  theEdgeMap,
bool  theIsVector,
GEOM_EdgeSource *  theIsolatedEdgeSource,
GEOM_EdgeSource *  theOneFaceEdgeSource,
GEOM_EdgeSource *  theSharedEdgeSource,
GEOM_WireframeFace *  theWireframeFaceSource,
GEOM_ShadingFace *  theShadingFaceSource 
)

Definition at line 88 of file OCC2VTK_Tools.cxx.

  {
    if (theShape.ShapeType() == TopAbs_COMPOUND) {
      TopoDS_Iterator anItr(theShape);
      for (; anItr.More(); anItr.Next()) {
        SetShape(anItr.Value(),theEdgeMap,theIsVector,
                 theIsolatedEdgeSource,
                 theOneFaceEdgeSource,
                 theSharedEdgeSource,
                 theWireframeFaceSource,
                 theShadingFaceSource);
      }
    }

    switch (theShape.ShapeType()) {
      case TopAbs_WIRE: {
        TopExp_Explorer anEdgeExp(theShape,TopAbs_EDGE);
        for (; anEdgeExp.More(); anEdgeExp.Next()){
          const TopoDS_Edge& anEdge = TopoDS::Edge(anEdgeExp.Current());
          if (!BRep_Tool::Degenerated(anEdge))
            theIsolatedEdgeSource->AddEdge(anEdge,theIsVector);
        }
        break;
      }
      case TopAbs_EDGE: {
        const TopoDS_Edge& anEdge = TopoDS::Edge(theShape);
        if (!BRep_Tool::Degenerated(anEdge))
          theIsolatedEdgeSource->AddEdge(anEdge,theIsVector);
        break;
      }
      case TopAbs_VERTEX: {
        break;
      }
      default: {
        TopExp_Explorer aFaceExp (theShape,TopAbs_FACE);
        for(; aFaceExp.More(); aFaceExp.Next()) {
          const TopoDS_Face& aFace = TopoDS::Face(aFaceExp.Current());
          theWireframeFaceSource->AddFace(aFace);
          theShadingFaceSource->AddFace(aFace);
          TopExp_Explorer anEdgeExp(aFaceExp.Current(), TopAbs_EDGE);
          for(; anEdgeExp.More(); anEdgeExp.Next()) {
            const TopoDS_Edge& anEdge = TopoDS::Edge(anEdgeExp.Current());
            if(!BRep_Tool::Degenerated(anEdge)){
              // compute the number of faces
              int aNbOfFaces = theEdgeMap.FindFromKey(anEdge).Extent();
              switch(aNbOfFaces){
              case 0:  // isolated edge
                theIsolatedEdgeSource->AddEdge(anEdge,theIsVector);
                break;
              case 1:  // edge in only one face
                theOneFaceEdgeSource->AddEdge(anEdge,theIsVector);
                break;
              default: // edge shared by at least two faces
                theSharedEdgeSource->AddEdge(anEdge,theIsVector);
              }
            }
          }
        }
      }
    }
  }

Here is the caller graph for this function: