0020695: EDF 1076 GEOM: Add a new shape in GEOM: T-shape

Some improvement:
- code indentation
- remove unnecessary #includes from header
- replace NULL by 0 (C++ syntax)
- fix some memory leaks
- remove unnecessary #defines (Handle_...) from header
This commit is contained in:
vsr 2010-04-29 15:56:54 +00:00
parent 3ebb105540
commit 05f6ac13c1
2 changed files with 1748 additions and 1665 deletions

File diff suppressed because it is too large Load Diff

View File

@ -27,66 +27,87 @@
#include "GEOM_IOperations.hxx" #include "GEOM_IOperations.hxx"
#include "GEOM_Engine.hxx" #include "GEOM_Engine.hxx"
#include "GEOM_Object.hxx" #include "GEOM_Object.hxx"
#include "GEOMImpl_IBasicOperations.hxx"
#include "GEOMImpl_IShapesOperations.hxx"
#include "GEOMImpl_IBlocksOperations.hxx"
#include "GEOMImpl_IAdvancedOperations.hxx"
#include "GEOMImpl_ILocalOperations.hxx"
#define Handle_GEOM_Object Handle(GEOM_Object) class GEOMImpl_IBasicOperations;
#define Handle_TColStd_HSequenceOfTransient Handle(TColStd_HSequenceOfTransient) class GEOMImpl_IBooleanOperations;
#define Handle_TColStd_HSequenceOfInteger Handle(TColStd_HSequenceOfInteger) class GEOMImpl_IShapesOperations;
class GEOMImpl_ITransformOperations;
class GEOMImpl_IBlocksOperations;
class GEOMImpl_I3DPrimOperations;
class GEOMImpl_ILocalOperations;
class GEOMImpl_IAdvancedOperations: public GEOM_IOperations { class GEOMImpl_IAdvancedOperations: public GEOM_IOperations {
private: private:
bool MakePipeTShapePartition(Handle_GEOM_Object theShape, double theR1, double theW1, double theL1, double theR2, bool MakePipeTShapePartition(Handle(GEOM_Object) theShape,
double theW2, double theL2, double theH = 0, double theW = 0, double theRF = 0, bool isNormal = true); double theR1, double theW1, double theL1,
bool MakePipeTShapeMirrorAndGlue(Handle_GEOM_Object theShape, double theR1, double theW1, double theL1, double theR2, double theR2, double theW2, double theL2,
double theW2, double theL2); double theH = 0, double theW = 0,
bool MakeGroups(Handle_GEOM_Object theShape, int shapType, double theR1, double theW1, double theL1, double theR2, double theRF = 0, bool isNormal = true);
double theW2, double theL2, Handle_TColStd_HSequenceOfTransient theSeq, gp_Trsf aTrsf); bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
gp_Trsf GetPositionTrsf(double theL1, double theL2, Handle_GEOM_Object P1 = NULL, Handle_GEOM_Object P2 = NULL, double theR1, double theW1, double theL1,
Handle_GEOM_Object P3 = NULL); double theR2, double theW2, double theL2);
bool CheckCompatiblePosition(double& theL1, double& theL2, Handle_GEOM_Object theP1, Handle_GEOM_Object theP2, bool MakeGroups(Handle(GEOM_Object) theShape, int shapType,
Handle_GEOM_Object theP3, double theTolerance); double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2,
Handle(TColStd_HSequenceOfTransient) theSeq,
gp_Trsf aTrsf);
gp_Trsf GetPositionTrsf(double theL1, double theL2,
Handle(GEOM_Object) P1 = 0,
Handle(GEOM_Object) P2 = 0,
Handle(GEOM_Object) P3 = 0);
bool CheckCompatiblePosition(double& theL1, double& theL2,
Handle(GEOM_Object) theP1,
Handle(GEOM_Object) theP2,
Handle(GEOM_Object) theP3,
double theTolerance);
private: private:
GEOMImpl_IBasicOperations* aBasicOperations; GEOMImpl_IBasicOperations* myBasicOperations;
GEOMImpl_IBooleanOperations* aBooleanOperations; GEOMImpl_IBooleanOperations* myBooleanOperations;
GEOMImpl_IShapesOperations* aShapesOperations; GEOMImpl_IShapesOperations* myShapesOperations;
GEOMImpl_ITransformOperations* aTransformOperations; GEOMImpl_ITransformOperations* myTransformOperations;
GEOMImpl_IBlocksOperations* aBlocksOperations; GEOMImpl_IBlocksOperations* myBlocksOperations;
GEOMImpl_I3DPrimOperations* a3DPrimOperations; GEOMImpl_I3DPrimOperations* my3DPrimOperations;
GEOMImpl_ILocalOperations* aLocalOperations; GEOMImpl_ILocalOperations* myLocalOperations;
public: public:
Standard_EXPORT Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);Standard_EXPORT Standard_EXPORT ~GEOMImpl_IAdvancedOperations();
~GEOMImpl_IAdvancedOperations();
Standard_EXPORT Handle_TColStd_HSequenceOfTransient MakePipeTShape(double theR1, double theW1, double theL1, Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
double theR2, double theW2, double theL2, bool theHexMesh = true); MakePipeTShape(double theR1, double theW1, double theL1,
Standard_EXPORT Handle_TColStd_HSequenceOfTransient double theR2, double theW2, double theL2,
MakePipeTShapeWithPosition(double theR1, double theW1, double theL1, double theR2, double theW2, double theL2, bool theHexMesh = true);
bool theHexMesh = true, Handle_GEOM_Object P1 = NULL, Handle_GEOM_Object P2 = NULL, Handle_GEOM_Object P3 = Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
NULL); MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
Standard_EXPORT Handle_TColStd_HSequenceOfTransient MakePipeTShapeChamfer(double theR1, double theW1, double theL1, double theR2, double theW2, double theL2,
double theR2, double theW2, double theL2, double theH, double theW, bool theHexMesh = true); bool theHexMesh = true,
Standard_EXPORT Handle_TColStd_HSequenceOfTransient Handle(GEOM_Object) P1 = 0,
MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1, double theR2, double theW2, Handle(GEOM_Object) P2 = 0,
double theL2, double theH, double theW, bool theHexMesh = true, Handle_GEOM_Object P1 = NULL, Handle(GEOM_Object) P3 = 0);
Handle_GEOM_Object P2 = NULL, Handle_GEOM_Object P3 = NULL); Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
Standard_EXPORT Handle_TColStd_HSequenceOfTransient MakePipeTShapeFillet(double theR1, double theW1, double theL1, MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2, double theRF, bool theHexMesh = true); double theR2, double theW2, double theL2,
Standard_EXPORT Handle_TColStd_HSequenceOfTransient double theH, double theW,
MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1, double theR2, double theW2, bool theHexMesh = true);
double theL2, double theRF, bool theHexMesh = true, Handle_GEOM_Object P1 = NULL, Handle_GEOM_Object P2 = Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
NULL, Handle_GEOM_Object P3 = NULL); MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
/*@@ insert new functions before this line @@*/ double theR2, double theW2, double theL2,
double theH, double theW,
bool theHexMesh = true,
Handle(GEOM_Object) P1 = 0,
Handle(GEOM_Object) P2 = 0,
Handle(GEOM_Object) P3 = 0);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeFillet(double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2,
double theRF, bool theHexMesh = true);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2,
double theRF, bool theHexMesh = true,
Handle(GEOM_Object) P1 = 0,
Handle(GEOM_Object) P2 = 0,
Handle(GEOM_Object) P3 = 0);
/*@@ insert new functions before this line @@*/
}; };
#undef Handle_GEOM_Object
#undef Handle_TColStd_HSequenceOfTransient
#undef Handle_TColStd_HSequenceOfInteger
#endif #endif