2013-04-01 18:25:01 +06:00
|
|
|
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
|
2012-08-09 13:58:02 +06:00
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2.1 of the License.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
//
|
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
|
|
|
//
|
|
|
|
// File : GEOMImpl_IAdvancedOperations.hxx
|
|
|
|
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
|
|
|
|
|
|
|
#ifndef _GEOMImpl_IAdvancedOperations_HXX_
|
|
|
|
#define _GEOMImpl_IAdvancedOperations_HXX_
|
|
|
|
|
|
|
|
#include <Utils_SALOME_Exception.hxx>
|
|
|
|
#include "GEOM_IOperations.hxx"
|
|
|
|
#include "GEOM_Engine.hxx"
|
|
|
|
#include "GEOM_Object.hxx"
|
|
|
|
|
2013-03-15 20:28:11 +06:00
|
|
|
#include <gp_Ax2.hxx>
|
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
class GEOMImpl_IBasicOperations;
|
|
|
|
class GEOMImpl_IBooleanOperations;
|
|
|
|
class GEOMImpl_IShapesOperations;
|
|
|
|
class GEOMImpl_ITransformOperations;
|
|
|
|
class GEOMImpl_IBlocksOperations;
|
|
|
|
class GEOMImpl_I3DPrimOperations;
|
|
|
|
class GEOMImpl_ILocalOperations;
|
|
|
|
class GEOMImpl_IHealingOperations;
|
|
|
|
|
|
|
|
class GEOMImpl_IAdvancedOperations: public GEOM_IOperations {
|
|
|
|
private:
|
|
|
|
bool MakePipeTShapePartition(Handle(GEOM_Object) theShape,
|
|
|
|
double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2,
|
|
|
|
double theH = 0, double theW = 0,
|
|
|
|
double theRF = 0, bool isNormal = true);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
|
|
|
|
double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
|
|
|
bool MakePipeTShapeThicknessReduction (Handle(GEOM_Object) theShape,
|
|
|
|
double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2,
|
|
|
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
|
|
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
|
|
|
double theRI, double theWI, double theLtransI, double theLthinI);
|
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
bool MakeGroups(Handle(GEOM_Object) theShape, int shapType,
|
|
|
|
double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2,
|
2013-03-15 20:28:11 +06:00
|
|
|
double theH, double theW, double theRF,
|
2012-08-09 13:58:02 +06:00
|
|
|
Handle(TColStd_HSequenceOfTransient) theSeq,
|
|
|
|
gp_Trsf aTrsf);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
gp_Trsf GetPositionTrsf(double theL1, double theL2,
|
|
|
|
Handle(GEOM_Object) P1 = 0,
|
|
|
|
Handle(GEOM_Object) P2 = 0,
|
|
|
|
Handle(GEOM_Object) P3 = 0);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
bool CheckCompatiblePosition(double& theL1, double& theL2,
|
|
|
|
Handle(GEOM_Object) theP1,
|
|
|
|
Handle(GEOM_Object) theP2,
|
|
|
|
Handle(GEOM_Object) theP3,
|
|
|
|
double theTolerance);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
private:
|
|
|
|
GEOMImpl_IBasicOperations* myBasicOperations;
|
|
|
|
GEOMImpl_IBooleanOperations* myBooleanOperations;
|
|
|
|
GEOMImpl_IShapesOperations* myShapesOperations;
|
|
|
|
GEOMImpl_ITransformOperations* myTransformOperations;
|
|
|
|
GEOMImpl_IBlocksOperations* myBlocksOperations;
|
|
|
|
GEOMImpl_I3DPrimOperations* my3DPrimOperations;
|
|
|
|
GEOMImpl_ILocalOperations* myLocalOperations;
|
|
|
|
GEOMImpl_IHealingOperations* myHealingOperations;
|
|
|
|
|
2013-03-15 20:28:11 +06:00
|
|
|
public:
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Add three thickness reductions at the open ends of the pipe T-Shape
|
|
|
|
*
|
|
|
|
* \param theShape - the pipe T-Shape
|
|
|
|
* \param r1 - the internal radius of main pipe
|
|
|
|
* \param w1 - the thickness of main pipe
|
|
|
|
* \param l1 - the half-length of main pipe
|
|
|
|
* \param r2 - the internal radius of incident pipe
|
|
|
|
* \param w2 - the thickness of incident pipe
|
|
|
|
* \param l2 - the half-length of main pipe
|
|
|
|
* \param r*, w*, ltrans* and lthin* - internal radius, thickness, length of transition part
|
|
|
|
* and length of thin part of left(L), right(R) and
|
|
|
|
* incident(I) thickness reduction correspondingly
|
|
|
|
* \param fuseReductions - boolean flag (use true to generate single solid,
|
|
|
|
* false to obtain parts, useful for hexameshing)
|
|
|
|
* \retval TopoDS_Shape - Resulting shape
|
|
|
|
*/
|
|
|
|
Standard_EXPORT static TopoDS_Shape MakePipeTShapeThicknessReduction
|
|
|
|
(TopoDS_Shape theShape,
|
|
|
|
double r1, double w1, double l1,
|
|
|
|
double r2, double w2, double l2,
|
|
|
|
double rL, double wL, double ltransL, double lthinL,
|
|
|
|
double rR, double wR, double ltransR, double lthinR,
|
|
|
|
double rI, double wI, double ltransI, double lthinI,
|
|
|
|
bool fuseReductions);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Create one thickness reduction element
|
|
|
|
*
|
|
|
|
* This method is called three times from MakePipeTShapeThicknessReduction
|
|
|
|
* to create three thickness reductions (one per each open end of a pipe T-Shape)
|
|
|
|
*
|
|
|
|
* \param theAxes - the position
|
|
|
|
* \param R - the internal radius of main pipe
|
|
|
|
* \param W - the thickness of main pipe
|
|
|
|
* \param Rthin - the internal radius of thin part
|
|
|
|
* \param Wthin - the thickness of thin part
|
|
|
|
* \param Ltrans - the length of transition part
|
|
|
|
* \param Lthin - the length of thin part
|
|
|
|
* \param fuse - boolean flag (use true to generate single solid,
|
|
|
|
* false to obtain parts, useful for hexameshing)
|
|
|
|
* \retval TopoDS_Shape - Resulting shape
|
|
|
|
*/
|
|
|
|
Standard_EXPORT static TopoDS_Shape MakeThicknessReduction (gp_Ax2 theAxes,
|
|
|
|
const double R, const double W,
|
|
|
|
const double Rthin, const double Wthin,
|
|
|
|
const double Ltrans, const double Lthin,
|
|
|
|
bool fuse);
|
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
public:
|
|
|
|
Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
|
|
|
|
Standard_EXPORT ~GEOMImpl_IAdvancedOperations();
|
|
|
|
|
|
|
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
|
|
|
MakePipeTShape(double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2,
|
2013-03-15 20:28:11 +06:00
|
|
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
|
|
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
|
|
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
2012-08-09 13:58:02 +06:00
|
|
|
bool theHexMesh = true);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
|
|
|
MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2,
|
2013-03-15 20:28:11 +06:00
|
|
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
|
|
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
|
|
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
2012-08-09 13:58:02 +06:00
|
|
|
bool theHexMesh = true,
|
|
|
|
Handle(GEOM_Object) P1 = 0,
|
|
|
|
Handle(GEOM_Object) P2 = 0,
|
|
|
|
Handle(GEOM_Object) P3 = 0);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
|
|
|
MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2,
|
2013-03-15 20:28:11 +06:00
|
|
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
|
|
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
|
|
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
2012-08-09 13:58:02 +06:00
|
|
|
double theH, double theW,
|
|
|
|
bool theHexMesh = true);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
|
|
|
MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2,
|
|
|
|
double theH, double theW,
|
2013-03-15 20:28:11 +06:00
|
|
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
|
|
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
|
|
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
2012-08-09 13:58:02 +06:00
|
|
|
bool theHexMesh = true,
|
|
|
|
Handle(GEOM_Object) P1 = 0,
|
|
|
|
Handle(GEOM_Object) P2 = 0,
|
|
|
|
Handle(GEOM_Object) P3 = 0);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
|
|
|
MakePipeTShapeFillet(double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2,
|
2013-03-15 20:28:11 +06:00
|
|
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
|
|
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
|
|
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
2012-08-09 13:58:02 +06:00
|
|
|
double theRF, bool theHexMesh = true);
|
2013-03-15 20:28:11 +06:00
|
|
|
|
2012-08-09 13:58:02 +06:00
|
|
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
|
|
|
MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
|
|
|
|
double theR2, double theW2, double theL2,
|
2013-03-15 20:28:11 +06:00
|
|
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
|
|
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
|
|
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
2012-08-09 13:58:02 +06:00
|
|
|
double theRF, bool theHexMesh = true,
|
|
|
|
Handle(GEOM_Object) P1 = 0,
|
|
|
|
Handle(GEOM_Object) P2 = 0,
|
|
|
|
Handle(GEOM_Object) P3 = 0);
|
|
|
|
|
|
|
|
Standard_EXPORT Handle(GEOM_Object) MakeDividedDisk (double theR, double theRatio,
|
|
|
|
int theOrientation, int thePattern);
|
|
|
|
Standard_EXPORT Handle(GEOM_Object) MakeDividedDiskPntVecR (Handle(GEOM_Object) thePnt,
|
|
|
|
Handle(GEOM_Object) theVec,
|
|
|
|
double theR,
|
|
|
|
double theRatio,
|
|
|
|
int thePattern);
|
|
|
|
|
|
|
|
Standard_EXPORT Handle(GEOM_Object) MakeDividedCylinder (double theR,
|
|
|
|
double theH,
|
|
|
|
int thePattern);
|
|
|
|
|
|
|
|
/*@@ insert new functions before this line @@ do not remove this line @@*/
|
|
|
|
};
|
|
|
|
#endif
|