Back to index

salome-geom  6.5.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes
GEOMImpl_IShapesOperations Class Reference

#include <GEOMImpl_IShapesOperations.hxx>

Inheritance diagram for GEOMImpl_IShapesOperations:
Inheritance graph
[legend]
Collaboration diagram for GEOMImpl_IShapesOperations:
Collaboration graph
[legend]

List of all members.

Classes

struct  CompareShapes
 Sort shapes in the list by their coordinates. More...

Public Types

enum  ExplodeType { EXPLODE_OLD_INCLUDE_MAIN, EXPLODE_NEW_INCLUDE_MAIN, EXPLODE_NEW_EXCLUDE_MAIN }

Public Member Functions

Standard_EXPORT GEOMImpl_IShapesOperations (GEOM_Engine *theEngine, int theDocID)
 constructor:
Standard_EXPORT ~GEOMImpl_IShapesOperations ()
 destructor
Standard_EXPORT Handle (GEOM_Object) MakeEdge(Handle(GEOM_Object) thePoint1
Standard_EXPORT Handle (GEOM_Object) thePoint2)
Standard_EXPORT Handle (GEOM_Object) MakeEdgeOnCurveByLength(Handle(GEOM_Object) theCurve
Standard_EXPORT const Standard_Real Handle (GEOM_Object) theStartPoint)
Standard_EXPORT Handle (GEOM_Object) MakeEdgeWire(Handle(GEOM_Object) theWire
Standard_EXPORT Handle (GEOM_Object) MakeGlueFacesByList(Handle(GEOM_Object) theShape
Standard_EXPORT Handle (GEOM_Object) MakeGlueEdges(Handle(GEOM_Object) theShape
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetGlueShapes(Handle(GEOM_Object) theShape
Standard_EXPORT Handle (GEOM_Object) MakeGlueEdgesByList(Handle(GEOM_Object) theShape
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetExistingSubObjects(Handle(GEOM_Object) theShape
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) MakeExplode(Handle(GEOM_Object) theShape
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) SubShapeAllIDs(Handle(GEOM_Object) theShape
Standard_EXPORT Handle (GEOM_Object) GetSubShape(Handle(GEOM_Object) theMainShape
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) MakeSubShapes(Handle(GEOM_Object) theMainShape
Standard_EXPORT Handle (TColStd_HArray1OfInteger) theIndices)
Standard_EXPORT Standard_Integer GetSubShapeIndex (Handle(GEOM_Object) theMainShape, Handle(GEOM_Object) theSubShape)
 GetSubShapeIndex.
Standard_EXPORT Standard_Integer GetTopologyIndex (Handle(GEOM_Object) theMainShape, Handle(GEOM_Object) theSubShape)
 GetTopologyIndex.
Standard_EXPORT
TCollection_AsciiString 
GetShapeTypeString (Handle(GEOM_Object) theShape)
 GetShapeTypeString.
Standard_EXPORT Standard_Integer NumberOfSubShapes (Handle(GEOM_Object) theShape, const Standard_Integer theShapeType)
 NumberOfSubShapes.
Standard_EXPORT Handle (GEOM_Object) ReverseShape(Handle(GEOM_Object) theShapes)
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetFreeFacesIDs(Handle(GEOM_Object) theShape)
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetSharedShapes(Handle(GEOM_Object) theShape1
Standard_EXPORT Handle (GEOM_Object) theShape2
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetShapesOnPlaneWithLocation(const Handle(GEOM_Object)&theShape
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theAx1
Standard_EXPORT const
Standard_Integer const const 
Handle (GEOM_Object)&thePnt
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetShapesOnCylinder(const Handle(GEOM_Object)&theShape
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theAxis
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetShapesOnCylinderWithLocation(const Handle(GEOM_Object)&theShape
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theAxis
Standard_EXPORT const
Standard_Integer const const 
Handle (GEOM_Object)&thePnt
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetShapesOnSphere(const Handle(GEOM_Object)&theShape
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theCenter
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetShapesOnPlaneIDs(const Handle(GEOM_Object)&theShape
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theAx1
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetShapesOnPlaneWithLocationIDs(const Handle(GEOM_Object)&theShape
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theAx1
Standard_EXPORT const
Standard_Integer const const 
Handle (GEOM_Object)&thePnt
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetShapesOnCylinderIDs(const Handle(GEOM_Object)&theShape
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theAxis
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetShapesOnCylinderWithLocationIDs(const Handle(GEOM_Object)&theShape
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theAxis
Standard_EXPORT const
Standard_Integer const const 
Handle (GEOM_Object)&thePnt
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetShapesOnSphereIDs(const Handle(GEOM_Object)&theShape
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theCenter
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetShapesOnQuadrangle(const Handle(GEOM_Object)&theShape
 Find sub-shapes complying with given status about quadrangle.
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theTopLeftPoint
Standard_EXPORT const
Standard_Integer const const 
Handle (GEOM_Object)&theTopRigthPoint
Standard_EXPORT const
Standard_Integer const const
const 
Handle (GEOM_Object)&theBottomLeftPoint
Standard_EXPORT const
Standard_Integer const const
const const 
Handle (GEOM_Object)&theBottomRigthPoint
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetShapesOnQuadrangleIDs(const Handle(GEOM_Object)&theShape
 Find IDs of sub-shapes complying with given status about quadrangle.
Standard_EXPORT const
Standard_Integer const 
Handle (GEOM_Object)&theTopLeftPoint
Standard_EXPORT const
Standard_Integer const const 
Handle (GEOM_Object)&theTopRigthPoint
Standard_EXPORT const
Standard_Integer const const
const 
Handle (GEOM_Object)&theBottomLeftPoint
Standard_EXPORT const
Standard_Integer const const
const const 
Handle (GEOM_Object)&theBottomRigthPoint
Standard_EXPORT Handle (GEOM_Object) GetShapesOnCylinderOld(Handle(GEOM_Object) theShape
Standard_EXPORT const
Standard_Integer 
Handle (GEOM_Object) theAxis
Standard_EXPORT Handle (GEOM_Object) GetShapesOnSphereOld(Handle(GEOM_Object) theShape
Standard_EXPORT const
Standard_Integer 
Handle (GEOM_Object) theCenter
void GetShapeProperties (const TopoDS_Shape aShape, Standard_Real propertiesArray[], gp_Pnt &aPnt)
 GetShapeProperties.
Standard_EXPORT Handle (GEOM_Object) GetInPlace(Handle(GEOM_Object) theShapeWhere
Standard_EXPORT Handle (GEOM_Object) theShapeWhat)
Standard_EXPORT Handle (GEOM_Object) GetInPlaceOld(Handle(GEOM_Object) theShapeWhere
Standard_EXPORT Handle (GEOM_Object) theShapeWhat)
Standard_EXPORT Handle (GEOM_Object) GetInPlaceByHistory(Handle(GEOM_Object) theShapeWhere
Standard_EXPORT Handle (GEOM_Object) theShapeWhat)
Standard_EXPORT Handle (GEOM_Object) GetSame(const Handle(GEOM_Object)&theShapeWhere
 Searches a shape equal to theWhat in the context of theWhere.
Standard_EXPORT const Handle (GEOM_Object)&theShapeWhat)
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetSameIDs(const Handle(GEOM_Object)&theShapeWhere
 Searches a shape equal to theWhat in the context of theWhere.
Standard_EXPORT const Handle (GEOM_Object)&theShapeWhat)
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetShapesOnBoxIDs(const Handle(GEOM_Object)&theBox
 Find IDs of sub-shapes complying with given status about surface.
Standard_EXPORT const Handle (GEOM_Object)&theShape
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetShapesOnBox(const Handle(GEOM_Object)&theBox
 Find sub-shapes complying with given status about surface.
Standard_EXPORT const Handle (GEOM_Object)&theShape
Standard_EXPORT Handle (TColStd_HSequenceOfInteger) GetShapesOnShapeIDs(const Handle(GEOM_Object)&theCheckShape
 Find IDs of sub-shapes complying with given status about surface.
Standard_EXPORT const Handle (GEOM_Object)&theShape
Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetShapesOnShape(const Handle(GEOM_Object)&theCheckShape
 Find sub-shapes complying with given status about surface.
Standard_EXPORT const Handle (GEOM_Object)&theShape
Standard_EXPORT Handle (GEOM_Object) GetShapesOnShapeAsCompound(const Handle(GEOM_Object)&theCheckShape
Standard_EXPORT const Handle (GEOM_Object)&theShape
Standard_EXPORT void StartOperation ()
 StartOperation.
Standard_EXPORT void FinishOperation ()
 FinishOperation.
Standard_EXPORT void AbortOperation ()
 AbortOperation.
Standard_EXPORT bool IsDone ()
 IsDone.
Standard_EXPORT void SetNotDone ()
Standard_EXPORT void SetErrorCode (const TCollection_AsciiString &theErrorCode)
Standard_EXPORT char * GetErrorCode ()
Standard_EXPORT GEOM_EngineGetEngine ()
Standard_EXPORT GEOM_SolverGetSolver ()
Standard_EXPORT int GetDocID ()

Static Public Member Functions

static Standard_EXPORT void SortShapes (TopTools_ListOfShape &SL, const Standard_Boolean isOldSorting=Standard_True)
static Standard_EXPORT TopoDS_Shape CompsolidToCompound (const TopoDS_Shape &theCompsolid)
 Convert TopoDS_COMPSOLID to TopoDS_COMPOUND.
static Standard_EXPORT bool CheckTriangulation (const TopoDS_Shape &theShape)
 Build a triangulation on theShape if it is absent.
static Standard_EXPORT
TopAbs_ShapeEnum 
GetTypeOfSimplePart (const TopoDS_Shape &theShape)
 Return type of shape for explode.

Public Attributes

Standard_EXPORT const Standard_Real theLength
Standard_EXPORT const Standard_Real theLinearTolerance
Standard_EXPORT const
Standard_Real const
Standard_Real 
theAngularTolerance
Standard_EXPORT Handle(GEOM_Object)
MakeWire(std Standard_EXPORT
const bool 
isPlanarWanted
Standard_EXPORT Handle(GEOM_Object)
MakeFaceWires(std
Standard_EXPORT Handle(GEOM_Object)
MakeShell(std Standard_EXPORT
Handle(GEOM_Object)
MakeSolidShells(std
Standard_EXPORT Handle(GEOM_Object)
MakeCompound(std
Standard_EXPORT const
Standard_Real 
theTolerance
Standard_EXPORT Handle(GEOM_Object)
MakeFaceWires(std
Standard_EXPORT Handle(GEOM_Object)
MakeShell(std Standard_EXPORT
Handle(GEOM_Object)
MakeSolidShells(std
Standard_EXPORT Handle(GEOM_Object)
MakeCompound(std
Standard_EXPORT const
Standard_Real const
Standard_Boolean 
doKeepNonSolids
Standard_EXPORT const Standard_Real theTolerance
Standard_EXPORT const
Standard_Real std::list
< Handle(GEOM_Object)> 
theFaces
Standard_EXPORT const
Standard_Real std::list
< Handle(GEOM_Object)> const
Standard_Boolean 
doKeepNonSolids
Standard_EXPORT const
Standard_Real std::list
< Handle(GEOM_Object)> const
Standard_Boolean const
Standard_Boolean 
doGlueAllEdges
Standard_EXPORT const
Standard_Real const
TopAbs_ShapeEnum 
theType
Standard_EXPORT const
Standard_Real std::list
< Handle(GEOM_Object)> 
theEdges
Standard_EXPORT const
Standard_Boolean 
theGroupsOnly
Standard_EXPORT const
Standard_Integer 
theShapeType
Standard_EXPORT const
Standard_Integer const
Standard_Boolean 
isSorted
Standard_EXPORT const
Standard_Integer const
Standard_Boolean const
ExplodeType 
theExplodeType = EXPLODE_NEW_INCLUDE_MAIN)
Standard_EXPORT const
Standard_Integer 
theID
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
GetSharedShapes(std
Standard_EXPORT const
Standard_Integer 
theShapeType
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
GetSharedShapes(std
Standard_EXPORT const
Standard_Integer const const
GEOMAlgo_State 
theState
Standard_EXPORT const
Standard_Integer const const
const GEOMAlgo_State 
theState
Standard_EXPORT const
Standard_Integer const const
Standard_Real 
theRadius
Standard_EXPORT const
Standard_Integer const const
Standard_Real const
GEOMAlgo_State 
theState
Standard_EXPORT const
Standard_Integer const const
const Standard_Real 
theRadius
Standard_EXPORT const
Standard_Integer const const
const Standard_Real const
GEOMAlgo_State 
theState
Standard_EXPORT const
Standard_Integer const const
GEOMAlgo_State 
theState
Standard_EXPORT const
Standard_Integer const const
const const const
GEOMAlgo_State 
theState
Standard_EXPORT const
Standard_Integer const
Standard_Real 
theRadius
Standard_EXPORT const const
Standard_Integer 
theShapeType
Standard_EXPORT const const
Standard_Integer
GEOMAlgo_State 
theState

Private Member Functions

 Handle (Geom_Surface) makePlane(const TopoDS_Shape &theAx1)
 Creates Geom_Plane.
 Handle (Geom_Surface) makeCylinder(const TopoDS_Shape &theAx1
 Creates Geom_CylindricalSurface.
 Handle (TColStd_HSequenceOfInteger) getShapesOnSurfaceIDs(const Handle(Geom_Surface)&theSurface
 Find IDs of sub-shapes complying with given status about surface.
 Handle (TColStd_HSequenceOfTransient) getShapesOnSurface(const Handle(Geom_Surface)&theSurface
 Find sub-shapes complying with given status about surface.
const Handle (GEOM_Object)&theShape
 Handle (TColStd_HSequenceOfInteger) getShapesOnQuadrangleIDs(const Handle(GEOM_Object)&theShape
 Find IDs of sub-shapes complying with given status about quadrangle.
const Standard_Integer const Handle (GEOM_Object)&theTopLeftPoint
const Standard_Integer const const Handle (GEOM_Object)&theTopRigthPoint
const Standard_Integer const
const const 
Handle (GEOM_Object)&theBottomLeftPoint
const Standard_Integer const
const const const 
Handle (GEOM_Object)&theBottomRigthPoint
 Handle (TColStd_HSequenceOfInteger) getShapesOnBoxIDs(const Handle(GEOM_Object)&theBox
 Find IDs of sub-shapes complying with given status about surface.
const Handle (GEOM_Object)&theShape
 Handle (TColStd_HSequenceOfInteger) getShapesOnShapeIDs(const Handle(GEOM_Object)&theCheckShape
 Find IDs of sub-shapes complying with given status about surface.
const Handle (GEOM_Object)&theShape
 Handle (TColStd_HSequenceOfTransient) getObjectsShapesOn(const Handle(GEOM_Object)&theShape
 Find shape objects and their entries by their ids.
const Handle (TColStd_HSequenceOfInteger)&theShapeIDs
static const Handle (GEOM_Object)&theObj2)

Static Private Member Functions

static Handle (GEOM_Object) getCreatedLast(const Handle(GEOM_Object)&theObj1
 Select the object created last.

Private Attributes

const Standard_Real theRadius
const TopoDS_Shape & theShape
const TopoDS_Shape TopAbs_ShapeEnum theShapeType
const TopoDS_Shape
TopAbs_ShapeEnum
GEOMAlgo_State 
theState
const TopAbs_ShapeEnum theShapeType
const TopAbs_ShapeEnum
GEOMAlgo_State 
theState
const TopAbs_ShapeEnum
GEOMAlgo_State
TCollection_AsciiString & 
theShapeEntries
const Standard_Integer theShapeType
const Standard_Integer const
const const const const
GEOMAlgo_State 
theState
const const Standard_Integer theShapeType
const const Standard_Integer
GEOMAlgo_State 
theState
const TCollection_AsciiString & theShapeEntries

Detailed Description

Definition at line 59 of file GEOMImpl_IShapesOperations.hxx.


Member Enumeration Documentation

Enumerator:
EXPLODE_OLD_INCLUDE_MAIN 
EXPLODE_NEW_INCLUDE_MAIN 
EXPLODE_NEW_EXCLUDE_MAIN 

Definition at line 118 of file GEOMImpl_IShapesOperations.hxx.


Constructor & Destructor Documentation

constructor:

Definition at line 152 of file GEOMImpl_IShapesOperations.cxx.

: GEOM_IOperations(theEngine, theDocID)
{
  MESSAGE("GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations");
}

destructor

Definition at line 163 of file GEOMImpl_IShapesOperations.cxx.

{
  MESSAGE("GEOMImpl_IShapesOperations::~GEOMImpl_IShapesOperations");
}

Member Function Documentation

void GEOM_IOperations::AbortOperation ( ) [inherited]

AbortOperation.

Definition at line 89 of file GEOM_IOperations.cxx.

{
  Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
  aDoc->AbortCommand();
}

Here is the call graph for this function:

bool GEOMImpl_IShapesOperations::CheckTriangulation ( const TopoDS_Shape &  theShape) [static]

Build a triangulation on theShape if it is absent.

Parameters:
theShapeThe shape to check/build triangulation on.
Return values:
boolReturns false if the shape has no faces, i.e. impossible to build triangulation.

Definition at line 4539 of file GEOMImpl_IShapesOperations.cxx.

{
  bool isTriangulation = true;

  TopExp_Explorer exp (aShape, TopAbs_FACE);
  if (exp.More())
  {
    TopLoc_Location aTopLoc;
    Handle(Poly_Triangulation) aTRF;
    aTRF = BRep_Tool::Triangulation(TopoDS::Face(exp.Current()), aTopLoc);
    if (aTRF.IsNull()) {
      isTriangulation = false;
    }
  }
  else // no faces, try edges
  {
    TopExp_Explorer expe (aShape, TopAbs_EDGE);
    if (!expe.More()) {
      return false;
    }
    TopLoc_Location aLoc;
    Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(TopoDS::Edge(expe.Current()), aLoc);
    if (aPE.IsNull()) {
      isTriangulation = false;
    }
  }

  if (!isTriangulation) {
    // calculate deflection
    Standard_Real aDeviationCoefficient = 0.001;

    Bnd_Box B;
    BRepBndLib::Add(aShape, B);
    Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
    B.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);

    Standard_Real dx = aXmax - aXmin, dy = aYmax - aYmin, dz = aZmax - aZmin;
    Standard_Real aDeflection = Max(Max(dx, dy), dz) * aDeviationCoefficient * 4;
    Standard_Real aHLRAngle = 0.349066;

    BRepMesh_IncrementalMesh Inc (aShape, aDeflection, Standard_False, aHLRAngle);
  }

  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

TopoDS_Shape GEOMImpl_IShapesOperations::CompsolidToCompound ( const TopoDS_Shape &  theCompsolid) [static]

Convert TopoDS_COMPSOLID to TopoDS_COMPOUND.

If the argument shape is not of type TopoDS_COMPSOLID, this method returns it as is.

Parameters:
theCompsolidThe compsolid to be converted.
Return values:
TopoDS_ShapeReturns the resulting compound.

Definition at line 4512 of file GEOMImpl_IShapesOperations.cxx.

{
  if (theCompsolid.ShapeType() != TopAbs_COMPSOLID) {
    return theCompsolid;
  }

  TopoDS_Compound aCompound;
  BRep_Builder B;
  B.MakeCompound(aCompound);

  TopTools_MapOfShape mapShape;
  TopoDS_Iterator It (theCompsolid, Standard_True, Standard_True);

  for (; It.More(); It.Next()) {
    TopoDS_Shape aShape_i = It.Value();
    if (mapShape.Add(aShape_i)) {
      B.Add(aCompound, aShape_i);
    }
  }

  return aCompound;
}

Here is the caller graph for this function:

void GEOM_IOperations::FinishOperation ( ) [inherited]

FinishOperation.

Definition at line 77 of file GEOM_IOperations.cxx.

{
  Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
  if(aDoc->GetUndoLimit() > 0) 
    aDoc->CommitCommand();
}

Here is the call graph for this function:

Standard_EXPORT int GEOM_IOperations::GetDocID ( ) [inline, inherited]

Definition at line 77 of file GEOM_IOperations.hxx.

{ return _docID; }

Here is the caller graph for this function:

Definition at line 71 of file GEOM_IOperations.hxx.

{ return _engine; }

Here is the caller graph for this function:

Standard_EXPORT char* GEOM_IOperations::GetErrorCode ( ) [inline, inherited]

Definition at line 66 of file GEOM_IOperations.hxx.

                                       {
    return (char*) _errorCode.ToCString();    
  }

Here is the caller graph for this function:

void GEOMImpl_IShapesOperations::GetShapeProperties ( const TopoDS_Shape  aShape,
Standard_Real  propertiesArray[],
gp_Pnt &  aPnt 
)

GetShapeProperties.

Definition at line 3707 of file GEOMImpl_IShapesOperations.cxx.

{
  GProp_GProps theProps;
  gp_Pnt aCenterMass;
  //TopoDS_Shape aPntShape;
  Standard_Real aShapeSize;

  if    (aShape.ShapeType() == TopAbs_VERTEX) aCenterMass = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) );
  else if (aShape.ShapeType() == TopAbs_EDGE) BRepGProp::LinearProperties(aShape,  theProps);
  else if (aShape.ShapeType() == TopAbs_FACE) BRepGProp::SurfaceProperties(aShape, theProps);
  else                                        BRepGProp::VolumeProperties(aShape,  theProps);

  if (aShape.ShapeType() == TopAbs_VERTEX)
    aShapeSize = 1;
  else {
    aCenterMass = theProps.CentreOfMass();
    aShapeSize  = theProps.Mass();
  }

//   aPntShape = BRepBuilderAPI_MakeVertex(aCenterMass).Shape();
//   aVertex   = BRep_Tool::Pnt( TopoDS::Vertex( aPntShape ) );
  aVertex = aCenterMass;
  tab[0] = aVertex.X();
  tab[1] = aVertex.Y();
  tab[2] = aVertex.Z();
  tab[3] = aShapeSize;
  return;
}
TCollection_AsciiString GEOMImpl_IShapesOperations::GetShapeTypeString ( Handle(GEOM_Object theShape)

GetShapeTypeString.

Definition at line 1626 of file GEOMImpl_IShapesOperations.cxx.

{
  SetErrorCode(KO);

  TCollection_AsciiString aTypeName ("Null Shape");

  TopoDS_Shape aShape = theShape->GetValue();
  if (aShape.IsNull())
    return aTypeName;

  switch (aShape.ShapeType() )
  {
  case TopAbs_COMPOUND:
    aTypeName = "Compound";
    break;
  case  TopAbs_COMPSOLID:
    aTypeName = "Compound Solid";
    break;
  case TopAbs_SOLID:
    aTypeName = "Solid";
    break;
  case TopAbs_SHELL:
    aTypeName = "Shell";
    break;
  case TopAbs_FACE:
    {
      BRepAdaptor_Surface surf (TopoDS::Face(aShape));
      if (surf.GetType() == GeomAbs_Plane)
        aTypeName = "Plane";
      else if (surf.GetType() == GeomAbs_Cylinder)
        aTypeName = "Cylindrical Face";
      else if (surf.GetType() == GeomAbs_Sphere)
        aTypeName = "Spherical Face";
      else if (surf.GetType() == GeomAbs_Torus)
        aTypeName = "Toroidal Face";
      else if (surf.GetType() == GeomAbs_Cone)
        aTypeName = "Conical Face";
      else
        aTypeName = "GEOM::FACE";
    }
    break;
  case TopAbs_WIRE:
    aTypeName = "Wire";
    break;
  case TopAbs_EDGE:
    {
      BRepAdaptor_Curve curv (TopoDS::Edge(aShape));
      if (curv.GetType() == GeomAbs_Line) {
        if ((Abs(curv.FirstParameter()) >= 1E6) ||
            (Abs(curv.LastParameter()) >= 1E6))
          aTypeName = "Line";
        else
          aTypeName = "Edge";
      } else if (curv.GetType() == GeomAbs_Circle) {
        if (curv.IsClosed())
          aTypeName = "Circle";
        else
          aTypeName = "Arc";
      } else {
        aTypeName = "Edge";
      }
    }
    break;
  case TopAbs_VERTEX:
    aTypeName = "Vertex";
    break;
  case TopAbs_SHAPE:
    aTypeName = "Shape";
    break;
  default:
    aTypeName = "Shape of unknown type";
  }

  return aTypeName;
}

Here is the call graph for this function:

Definition at line 74 of file GEOM_IOperations.hxx.

{ return _solver; }
Standard_Integer GEOMImpl_IShapesOperations::GetSubShapeIndex ( Handle(GEOM_Object theMainShape,
Handle(GEOM_Object theSubShape 
)

GetSubShapeIndex.

Definition at line 1550 of file GEOMImpl_IShapesOperations.cxx.

{
  SetErrorCode(KO);

  TopoDS_Shape aMainShape = theMainShape->GetValue();
  TopoDS_Shape aSubShape = theSubShape->GetValue();

  if (aMainShape.IsNull() || aSubShape.IsNull()) return -1;

  TopTools_IndexedMapOfShape anIndices;
  TopExp::MapShapes(aMainShape, anIndices);
  if (anIndices.Contains(aSubShape)) {
    SetErrorCode(OK);
    return anIndices.FindIndex(aSubShape);
  }

  return -1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Standard_Integer GEOMImpl_IShapesOperations::GetTopologyIndex ( Handle(GEOM_Object theMainShape,
Handle(GEOM_Object theSubShape 
)

GetTopologyIndex.

Definition at line 1575 of file GEOMImpl_IShapesOperations.cxx.

{
  SetErrorCode(OK);

  TopoDS_Shape aMainShape = theMainShape->GetValue();
  TopoDS_Shape aSubShape = theSubShape->GetValue();

  if (aMainShape.IsNull() || aSubShape.IsNull()) {
    SetErrorCode("Null argument shape given");
    return -1;
  }

  int index = 1;
  if (aSubShape.ShapeType() == TopAbs_COMPOUND) {
    TopoDS_Iterator it;
    TopTools_ListOfShape CL;
    CL.Append(aMainShape);
    TopTools_ListIteratorOfListOfShape itC;
    for (itC.Initialize(CL); itC.More(); itC.Next()) {
      for (it.Initialize(itC.Value()); it.More(); it.Next()) {
        if (it.Value().ShapeType() == TopAbs_COMPOUND) {
          if (it.Value().IsSame(aSubShape))
            return index;
          else
            index++;
          CL.Append(it.Value());
        }
      }
    }
  } else {
    TopExp_Explorer anExp (aMainShape, aSubShape.ShapeType());
    TopTools_MapOfShape M;
    for (; anExp.More(); anExp.Next()) {
      if (M.Add(anExp.Current())) {
        if (anExp.Current().IsSame(aSubShape))
          return index;
        index++;
      }
    }
  }

  SetErrorCode("The sub-shape does not belong to the main shape");
  return -1;
}

Here is the call graph for this function:

TopAbs_ShapeEnum GEOMImpl_IShapesOperations::GetTypeOfSimplePart ( const TopoDS_Shape &  theShape) [static]

Return type of shape for explode.

In case of compound it will be a type of its first sub shape.

Parameters:
theShapeThe shape to get type of.
Return values:
TopAbs_ShapeEnumReturn type of shape for explode.

In case of compound it will be a type of sub-shape.

Definition at line 3785 of file GEOMImpl_IShapesOperations.cxx.

{
  TopAbs_ShapeEnum aType = theShape.ShapeType();
  if      (aType == TopAbs_VERTEX)                             return TopAbs_VERTEX;
  else if (aType == TopAbs_EDGE  || aType == TopAbs_WIRE)      return TopAbs_EDGE;
  else if (aType == TopAbs_FACE  || aType == TopAbs_SHELL)     return TopAbs_FACE;
  else if (aType == TopAbs_SOLID || aType == TopAbs_COMPSOLID) return TopAbs_SOLID;
  else if (aType == TopAbs_COMPOUND) {
    // Only the iType of the first shape in the compound is taken into account
    TopoDS_Iterator It (theShape, Standard_False, Standard_False);
    if (It.More()) {
      return GetTypeOfSimplePart(It.Value());
    }
  }
  return TopAbs_SHAPE;
}

Here is the caller graph for this function:

Here is the caller graph for this function:

Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HArray1OfInteger  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  ) const
Standard_EXPORT const Standard_Integer const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  ) const
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  ) const
Standard_EXPORT const Standard_Integer const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  ) const
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const
Standard_EXPORT const Standard_Integer const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const
Standard_EXPORT const Standard_Integer const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  ) const

Find sub-shapes complying with given status about quadrangle.

Parameters:
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theTopLeftPoint- top left quadrangle corner
theTopRigthPoint- top right quadrangle corner
theBottomLeftPoint- bottom left quadrangle corner
theBottomRigthPoint- bottom right quadrangle corner
theState- required state
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
Standard_EXPORT const Standard_Integer const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )
Standard_EXPORT const Standard_Integer const const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )
Standard_EXPORT const Standard_Integer const const const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const

Find IDs of sub-shapes complying with given status about quadrangle.

Parameters:
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theTopLeftPoint- top left quadrangle corner
theTopRigthPoint- top right quadrangle corner
theBottomLeftPoint- bottom left quadrangle corner
theBottomRigthPoint- bottom right quadrangle corner
theState- required state
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
Standard_EXPORT const Standard_Integer const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )
Standard_EXPORT const Standard_Integer const const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )
Standard_EXPORT const Standard_Integer const const const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  )

Searches a shape equal to theWhat in the context of theWhere.

Parameters:
theShapeWhere- a context shap
theShapeWhat- a sample shape
Return values:
Handle(GEOM_Object)- found shape
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const

Searches a shape equal to theWhat in the context of theWhere.

Parameters:
theShapeWhere- a context shap
theShapeWhat- a sample shape
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const

Find IDs of sub-shapes complying with given status about surface.

Parameters:
theBox- the box to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  ) const

Find sub-shapes complying with given status about surface.

Parameters:
theBox- the box to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
Return values:
Handle(TColStd_HSequenceOfTransient)- found shape objects
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const

Find IDs of sub-shapes complying with given status about surface.

Parameters:
theCheckShape- the shape to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
Standard_EXPORT GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  ) const

Find sub-shapes complying with given status about surface.

Parameters:
theCheckShape- the shape to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
Return values:
Handle(TColStd_HSequenceOfTransient)- found shape objects
GEOMImpl_IShapesOperations::Handle ( Geom_Surface  ) const [private]

Creates Geom_Plane.

Parameters:
theAx1- edge defining plane normal
Return values:
Handle(Geom_Surface)- resulting surface
GEOMImpl_IShapesOperations::Handle ( Geom_Surface  ) const [private]

Creates Geom_CylindricalSurface.

Parameters:
theAx1- edge defining cylinder axis
theRadius- cylinder radius
Return values:
Handle(Geom_Surface)- resulting surface
GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const [private]

Find IDs of sub-shapes complying with given status about surface.

Parameters:
theSurface- the surface to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  ) const [private]

Find sub-shapes complying with given status about surface.

Parameters:
theSurface- the surface to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
theShapeEntries- outgoing entries like "entry1, entry2, ..."
Return values:
Handle(TColStd_HSequenceOfTransient)- found shape objects
GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const [private]

Find IDs of sub-shapes complying with given status about quadrangle.

Parameters:
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theTopLeftPoint- top left quadrangle corner
theTopRigthPoint- top right quadrangle corner
theBottomLeftPoint- bottom left quadrangle corner
theBottomRigthPoint- bottom right quadrangle corner
theState- required state
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
const Standard_Integer const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  ) [private]
const Standard_Integer const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  ) [private]
const Standard_Integer const const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  ) [private]
const Standard_Integer const const const const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  ) [private]
GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const [private]

Find IDs of sub-shapes complying with given status about surface.

Parameters:
theBox- the box to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) const [private]

Find IDs of sub-shapes complying with given status about surface.

Parameters:
theCheckShape- the shape to check state of sub-shapes against
theShape- the shape to explore
theShapeType- type of sub-shape of theShape
theState- required state
Return values:
Handle(TColStd_HSequenceOfInteger)- IDs of found sub-shapes
GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfTransient  ) const [private]

Find shape objects and their entries by their ids.

Parameters:
theShape- the main shape
theShapeIDs- theShapeIDs - incoming shape ids
theShapeEntries- outgoing entries like "entry1, entry2, ..."
Return values:
Handle(TColStd_HSequenceOfTransient)- found shape objects
const GEOMImpl_IShapesOperations::Handle ( TColStd_HSequenceOfInteger  ) [private]
static GEOMImpl_IShapesOperations::Handle ( GEOM_Object  ) const [static, private]

Select the object created last.

Parameters:
theObj1- Object 1
theObj2- Object 2
Return values:
Handle(GEOM_Object)- selected object
static const GEOMImpl_IShapesOperations::Handle ( GEOM_Object  ) [private]
bool GEOM_IOperations::IsDone ( ) [inherited]

IsDone.

Definition at line 101 of file GEOM_IOperations.cxx.

{
  return (_errorCode == OK);
}  
Standard_Integer GEOMImpl_IShapesOperations::NumberOfSubShapes ( Handle(GEOM_Object theShape,
const Standard_Integer  theShapeType 
)

NumberOfSubShapes.

Definition at line 1708 of file GEOMImpl_IShapesOperations.cxx.

{
  SetErrorCode(KO);
  Standard_Integer nbShapes = 0;

  if (theShape.IsNull()) return -1;
  TopoDS_Shape aShape = theShape->GetValue();
  if (aShape.IsNull()) return -1;

  /*
  TopTools_MapOfShape mapShape;

  if (aShape.ShapeType() == TopAbs_COMPOUND &&
      (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE ||
       TopAbs_ShapeEnum(theShapeType) == TopAbs_COMPSOLID ||
       TopAbs_ShapeEnum(theShapeType) == TopAbs_COMPOUND)) {
    TopoDS_Iterator It (aShape, Standard_True, Standard_True);
    for (; It.More(); It.Next()) {
      if (mapShape.Add(It.Value())) {
        if (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE ||
            TopAbs_ShapeEnum(theShapeType) == It.Value().ShapeType()) {
          nbShapes++;
        }
      }
    }
  } else {
    TopExp_Explorer exp (aShape, TopAbs_ShapeEnum(theShapeType));
    for (; exp.More(); exp.Next())
      if (mapShape.Add(exp.Current()))
        nbShapes++;
  }
  */

  try {
#if OCC_VERSION_LARGE > 0x06010000
    OCC_CATCH_SIGNALS;
#endif
    int iType, nbTypes [TopAbs_SHAPE];
    for (iType = 0; iType < TopAbs_SHAPE; ++iType)
      nbTypes[iType] = 0;
    nbTypes[aShape.ShapeType()]++;

    TopTools_MapOfShape aMapOfShape;
    aMapOfShape.Add(aShape);
    TopTools_ListOfShape aListOfShape;
    aListOfShape.Append(aShape);

    TopTools_ListIteratorOfListOfShape itL (aListOfShape);
    for (; itL.More(); itL.Next()) {
      TopoDS_Iterator it (itL.Value());
      for (; it.More(); it.Next()) {
        TopoDS_Shape s = it.Value();
        if (aMapOfShape.Add(s)) {
          aListOfShape.Append(s);
          nbTypes[s.ShapeType()]++;
        }
      }
    }

    if (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE)
      nbShapes = aMapOfShape.Extent();
    else
      nbShapes = nbTypes[theShapeType];
  }
  catch (Standard_Failure) {
    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
    SetErrorCode(aFail->GetMessageString());
    return -1;
  }

  SetErrorCode(OK);
  return nbShapes;
}

Here is the call graph for this function:

Standard_EXPORT void GEOM_IOperations::SetErrorCode ( const TCollection_AsciiString &  theErrorCode) [inline, inherited]

Definition at line 61 of file GEOM_IOperations.hxx.

                                                                                 {
    _errorCode = theErrorCode;    
  } 

Here is the caller graph for this function:

Standard_EXPORT void GEOM_IOperations::SetNotDone ( ) [inline, inherited]

Definition at line 58 of file GEOM_IOperations.hxx.

{ _errorCode = KO; }
void GEOMImpl_IShapesOperations::SortShapes ( TopTools_ListOfShape &  SL,
const Standard_Boolean  isOldSorting = Standard_True 
) [static]

Definition at line 4374 of file GEOMImpl_IShapesOperations.cxx.

{
#ifdef STD_SORT_ALGO
  std::vector<TopoDS_Shape> aShapesVec;
  aShapesVec.reserve(SL.Extent());

  TopTools_ListIteratorOfListOfShape it (SL);
  for (; it.More(); it.Next()) {
    aShapesVec.push_back(it.Value());
  }
  SL.Clear();

  CompareShapes shComp (isOldSorting);
  std::stable_sort(aShapesVec.begin(), aShapesVec.end(), shComp);
  //std::sort(aShapesVec.begin(), aShapesVec.end(), shComp);

  std::vector<TopoDS_Shape>::const_iterator anIter = aShapesVec.begin();
  for (; anIter != aShapesVec.end(); ++anIter) {
    SL.Append(*anIter);
  }
#else
  // old implementation
  Standard_Integer MaxShapes = SL.Extent();
  TopTools_Array1OfShape  aShapes (1,MaxShapes);
  TColStd_Array1OfInteger OrderInd(1,MaxShapes);
  TColStd_Array1OfReal    MidXYZ  (1,MaxShapes); //X,Y,Z;
  TColStd_Array1OfReal    Length  (1,MaxShapes); //X,Y,Z;

  // Computing of CentreOfMass
  Standard_Integer Index;
  GProp_GProps GPr;
  gp_Pnt GPoint;
  TopTools_ListIteratorOfListOfShape it(SL);
  for (Index=1;  it.More();  Index++)
  {
    TopoDS_Shape S = it.Value();
    SL.Remove( it ); // == it.Next()
    aShapes(Index) = S;
    OrderInd.SetValue (Index, Index);
    if (S.ShapeType() == TopAbs_VERTEX) {
      GPoint = BRep_Tool::Pnt( TopoDS::Vertex( S ));
      Length.SetValue( Index, (Standard_Real) S.Orientation());
    }
    else {
      // BEGIN: fix for Mantis issue 0020842
      if (isOldSorting) {
        BRepGProp::LinearProperties (S, GPr);
      }
      else {
        if (S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE) {
          BRepGProp::LinearProperties (S, GPr);
        }
        else if (S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL) {
          BRepGProp::SurfaceProperties(S, GPr);
        }
        else {
          BRepGProp::VolumeProperties(S, GPr);
        }
      }
      // END: fix for Mantis issue 0020842
      GPoint = GPr.CentreOfMass();
      Length.SetValue(Index, GPr.Mass());
    }
    MidXYZ.SetValue(Index, GPoint.X()*999.0 + GPoint.Y()*99.0 + GPoint.Z()*0.9);
    //cout << Index << " L: " << Length(Index) << "CG: " << MidXYZ(Index) << endl;
  }

  // Sorting
  Standard_Integer aTemp;
  Standard_Boolean exchange, Sort = Standard_True;
  Standard_Real    tol = Precision::Confusion();
  while (Sort)
  {
    Sort = Standard_False;
    for (Index=1; Index < MaxShapes; Index++)
    {
      exchange = Standard_False;
      Standard_Real dMidXYZ = MidXYZ(OrderInd(Index)) - MidXYZ(OrderInd(Index+1));
      Standard_Real dLength = Length(OrderInd(Index)) - Length(OrderInd(Index+1));
      if ( dMidXYZ >= tol ) {
//         cout << "MidXYZ: " << MidXYZ(OrderInd(Index))<< " > " <<MidXYZ(OrderInd(Index+1))
//              << " d: " << dMidXYZ << endl;
        exchange = Standard_True;
      }
      else if ( Abs(dMidXYZ) < tol && dLength >= tol ) {
//         cout << "Length: " << Length(OrderInd(Index))<< " > " <<Length(OrderInd(Index+1))
//              << " d: " << dLength << endl;
        exchange = Standard_True;
      }
      else if ( Abs(dMidXYZ) < tol && Abs(dLength) < tol &&
                aShapes(OrderInd(Index)).ShapeType() <= TopAbs_FACE) {
        // PAL17233
        // equal values possible on shapes such as two halves of a sphere and
        // a membrane inside the sphere
        Bnd_Box box1,box2;
        BRepBndLib::Add( aShapes( OrderInd(Index) ), box1 );
        if ( box1.IsVoid() ) continue;
        BRepBndLib::Add( aShapes( OrderInd(Index+1) ), box2 );
        Standard_Real dSquareExtent = box1.SquareExtent() - box2.SquareExtent();
        if ( dSquareExtent >= tol ) {
//           cout << "SquareExtent: " << box1.SquareExtent()<<" > "<<box2.SquareExtent() << endl;
          exchange = Standard_True;
        }
        else if ( Abs(dSquareExtent) < tol ) {
          Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax, val1, val2;
          box1.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
          val1 = (aXmin+aXmax)*999 + (aYmin+aYmax)*99 + (aZmin+aZmax)*0.9;
          box2.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
          val2 = (aXmin+aXmax)*999 + (aYmin+aYmax)*99 + (aZmin+aZmax)*0.9;
          //exchange = val1 > val2;
          if ((val1 - val2) >= tol) {
            exchange = Standard_True;
          }
          //cout << "box: " << val1<<" > "<<val2 << endl;
        }
      }

      if (exchange)
      {
//         cout << "exchange " << Index << " & " << Index+1 << endl;
        aTemp = OrderInd(Index);
        OrderInd(Index) = OrderInd(Index+1);
        OrderInd(Index+1) = aTemp;
        Sort = Standard_True;
      }
    }
  }

  for (Index=1; Index <= MaxShapes; Index++)
    SL.Append( aShapes( OrderInd(Index) ));
#endif
}

Here is the caller graph for this function:

void GEOM_IOperations::StartOperation ( ) [inherited]

StartOperation.

Definition at line 65 of file GEOM_IOperations.cxx.

{
  Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
  if(aDoc->GetUndoLimit() > 0) 
    aDoc->NewCommand();
}

Here is the call graph for this function:


Member Data Documentation

Standard_EXPORT const Standard_Real std::list<Handle(GEOM_Object)> const Standard_Boolean const Standard_Boolean GEOMImpl_IShapesOperations::doGlueAllEdges

Definition at line 98 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT Handle (GEOM_Object) MakeFaceWires (std Standard_EXPORT Handle (GEOM_Object) MakeShell (std Standard_EXPORT Handle (GEOM_Object) MakeSolidShells (std Standard_EXPORT Handle (GEOM_Object) MakeCompound (std Standard_EXPORT const Standard_Real const Standard_Boolean GEOMImpl_IShapesOperations::doKeepNonSolids

Definition at line 91 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Real std::list<Handle(GEOM_Object)> const Standard_Boolean GEOMImpl_IShapesOperations::doKeepNonSolids

Definition at line 98 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 79 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Integer const Standard_Boolean GEOMImpl_IShapesOperations::isSorted

Definition at line 126 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Real const Standard_Real GEOMImpl_IShapesOperations::theAngularTolerance

Definition at line 73 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 111 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 128 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 98 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 116 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 137 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 69 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 73 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Integer const Standard_Real GEOMImpl_IShapesOperations::theRadius

Definition at line 185 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Integer const const const Standard_Real GEOMImpl_IShapesOperations::theRadius

Definition at line 193 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Integer const Standard_Real GEOMImpl_IShapesOperations::theRadius

Definition at line 281 of file GEOMImpl_IShapesOperations.hxx.

const Standard_Real GEOMImpl_IShapesOperations::theRadius [private]

Definition at line 453 of file GEOMImpl_IShapesOperations.hxx.

const TopoDS_Shape& GEOMImpl_IShapesOperations::theShape [private]

Definition at line 465 of file GEOMImpl_IShapesOperations.hxx.

const TopAbs_ShapeEnum GEOMAlgo_State TCollection_AsciiString& GEOMImpl_IShapesOperations::theShapeEntries [private]

Definition at line 481 of file GEOMImpl_IShapesOperations.hxx.

const TCollection_AsciiString& GEOMImpl_IShapesOperations::theShapeEntries [private]

Definition at line 542 of file GEOMImpl_IShapesOperations.hxx.

const const Standard_Integer GEOMImpl_IShapesOperations::theShapeType

Definition at line 126 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT Handle (TColStd_HSequenceOfTransient) GetSharedShapes (std Standard_EXPORT const Standard_Integer GEOMImpl_IShapesOperations::theShapeType

Definition at line 169 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 328 of file GEOMImpl_IShapesOperations.hxx.

const TopoDS_Shape TopAbs_ShapeEnum GEOMImpl_IShapesOperations::theShapeType [private]

Definition at line 465 of file GEOMImpl_IShapesOperations.hxx.

const TopAbs_ShapeEnum GEOMImpl_IShapesOperations::theShapeType [private]

Definition at line 481 of file GEOMImpl_IShapesOperations.hxx.

const Standard_Integer GEOMImpl_IShapesOperations::theShapeType [private]

Definition at line 498 of file GEOMImpl_IShapesOperations.hxx.

const const Standard_Integer GEOMImpl_IShapesOperations::theShapeType [private]

Definition at line 515 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 171 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Integer const const const GEOMAlgo_State GEOMImpl_IShapesOperations::theState

Definition at line 178 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Integer const const Standard_Real const GEOMAlgo_State GEOMImpl_IShapesOperations::theState

Definition at line 185 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Integer const const const Standard_Real const GEOMAlgo_State GEOMImpl_IShapesOperations::theState

Definition at line 193 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 207 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Integer const const const const const GEOMAlgo_State GEOMImpl_IShapesOperations::theState

Definition at line 256 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 328 of file GEOMImpl_IShapesOperations.hxx.

const TopoDS_Shape TopAbs_ShapeEnum GEOMAlgo_State GEOMImpl_IShapesOperations::theState [private]

Definition at line 465 of file GEOMImpl_IShapesOperations.hxx.

const TopAbs_ShapeEnum GEOMAlgo_State GEOMImpl_IShapesOperations::theState [private]

Definition at line 481 of file GEOMImpl_IShapesOperations.hxx.

const Standard_Integer const const const const const GEOMAlgo_State GEOMImpl_IShapesOperations::theState [private]

Definition at line 503 of file GEOMImpl_IShapesOperations.hxx.

const const Standard_Integer GEOMAlgo_State GEOMImpl_IShapesOperations::theState [private]

Definition at line 515 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 91 of file GEOMImpl_IShapesOperations.hxx.

Definition at line 98 of file GEOMImpl_IShapesOperations.hxx.

Standard_EXPORT const Standard_Real const TopAbs_ShapeEnum GEOMImpl_IShapesOperations::theType

Definition at line 107 of file GEOMImpl_IShapesOperations.hxx.


The documentation for this class was generated from the following files: