Merge from V6_main 15/03/2013

This commit is contained in:
vsr 2013-03-15 14:28:11 +00:00
parent 3392cb794a
commit 4ab1782428
29 changed files with 3283 additions and 1342 deletions

View File

@ -27,6 +27,16 @@ id_pipetshape_position = geompy.addToStudy(pipetshape_position[0],"PipeTShape_po
for g in pipetshape_position[1:]: for g in pipetshape_position[1:]:
geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName()) geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName())
# create PipeTShape object with left thickness reduction
pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0,
theRL=60, theWL=20, theLtransL=40, theLthinL=20)
# add object in the study
id_pipetshape_thr = geompy.addToStudy(pipetshape_thr[0],"PipeTShape_left_thickness_reduction")
# add groups in the study
for g in pipetshape_thr[1:]:
geompy.addToStudyInFather(pipetshape_thr[0], g, g.GetName())
# create PipeTShape with chamfer object # create PipeTShape with chamfer object
pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0) pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
@ -45,6 +55,17 @@ id_pipetshapechamfer_position = geompy.addToStudy(pipetshapechamfer_position[0],
for g in pipetshapechamfer_position[1:]: for g in pipetshapechamfer_position[1:]:
geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName()) geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName())
# create PipeTShape with chamfer object with left and right thickness reductions
pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0,
theRL=60, theWL=20, theLtransL=40, theLthinL=20,
theRR=40, theWR=10, theLtransR=60, theLthinR=30)
# add object in the study
id_pipetshapechamfer_thr = geompy.addToStudy(pipetshapechamfer_thr[0],"PipeTShapeChamfer_two_thickness_reductions")
# add groups in the study
for g in pipetshapechamfer_thr[1:]:
geompy.addToStudyInFather(pipetshapechamfer_thr[0], g, g.GetName())
# create PipeTShape with fillet object # create PipeTShape with fillet object
pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0) pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
@ -62,12 +83,28 @@ id_pipetshapefillet_position = geompy.addToStudy(pipetshapefillet_position[0],"P
# add groups in the study # add groups in the study
for g in pipetshapefillet_position[1:]: for g in pipetshapefillet_position[1:]:
geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName()) geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName())
# create PipeTShape with fillet object with three thickness reductions
pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0,
5.0, True, None, None, None,
60, 20, 40, 20,
40, 10, 60, 30,
20, 10, 30, 30)
# add object in the study
id_pipetshapefillet_thr = geompy.addToStudy(pipetshapefillet_thr[0],"PipeTShapeFillet_three_thickness_reductions")
# add groups in the study
for g in pipetshapefillet_thr[1:]:
geompy.addToStudyInFather(pipetshapefillet_thr[0], g, g.GetName())
# display pipetshapes # display pipetshapes
gg.createAndDisplayGO(id_pipetshape) gg.createAndDisplayGO(id_pipetshape)
gg.createAndDisplayGO(id_pipetshape_position) gg.createAndDisplayGO(id_pipetshape_position)
gg.createAndDisplayGO(id_pipetshape_thr)
gg.createAndDisplayGO(id_pipetshapechamfer) gg.createAndDisplayGO(id_pipetshapechamfer)
gg.createAndDisplayGO(id_pipetshapechamfer_position) gg.createAndDisplayGO(id_pipetshapechamfer_position)
gg.createAndDisplayGO(id_pipetshapechamfer_thr)
gg.createAndDisplayGO(id_pipetshapefillet) gg.createAndDisplayGO(id_pipetshapefillet)
gg.createAndDisplayGO(id_pipetshapefillet_position) gg.createAndDisplayGO(id_pipetshapefillet_position)
gg.createAndDisplayGO(id_pipetshapefillet_thr)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -8,6 +8,16 @@ Specify the parameters of the PipeTShape object in the opened dialog
box and press "Apply" or "Apply & Close" button. box and press "Apply" or "Apply & Close" button.
The <b>result</b> of the operation will be a <b>GEOM_Object</b>. The <b>result</b> of the operation will be a <b>GEOM_Object</b>.
\n <b>Main parameters</b>:
\image html pipetshape_dlg.png
\n <b>Position parameters</b>:
\image html pipetshape_pos_dlg.png
\n <b>Advanced options</b> \ref preview_anchor "Preview"
<b>TUI Command:</b> <em>geompy.MakePipeTShape(R1, W1, L1, R2, W2, L2, HexMesh=True, P1=None, P2=None, P3=None)</em> <b>TUI Command:</b> <em>geompy.MakePipeTShape(R1, W1, L1, R2, W2, L2, HexMesh=True, P1=None, P2=None, P3=None)</em>
<b>Arguments:</b> <b>Arguments:</b>
@ -18,19 +28,17 @@ The <b>result</b> of the operation will be a <b>GEOM_Object</b>.
- \b W2 - Thickness of the incident T-shape pipe. - \b W2 - Thickness of the incident T-shape pipe.
- \b L2 - Length of the incident T-shape pipe. - \b L2 - Length of the incident T-shape pipe.
- \b HexMesh - If True, the shape is splitted into blocks (suitable for hexaedral mesh). - \b HexMesh - If True, the shape is splitted into blocks (suitable for hexaedral mesh).
<b>Position arguments:</b>
- \b P1 - First junction point of the main pipe (GEOM Vertex). - \b P1 - First junction point of the main pipe (GEOM Vertex).
- \b P2 - Second junction point of the main pipe (GEOM Vertex). - \b P2 - Second junction point of the main pipe (GEOM Vertex).
- \b P3 - Junction point of the incident pipe (GEOM Vertex). - \b P3 - Junction point of the incident pipe (GEOM Vertex).
\n <b>Advanced options</b> \ref preview_anchor "Preview"
\image html pipetshape_dlg.png
Example: Example:
\image html pipetshape.png \image html pipetshape.png
A Pipe T-Shape can be created with a chamfer at the junction of the main and the incident pipes: <h2>A Pipe T-Shape can be created with a chamfer at the junction of the main and the incident pipes:</h2>
<b>TUI Command:</b> <em>geompy.MakePipeTShapeChamfer(R1, W1, L1, R2, W2, L2, H, W, HexMesh=True, P1=None, P2=None, P3=None)</em> <b>TUI Command:</b> <em>geompy.MakePipeTShapeChamfer(R1, W1, L1, R2, W2, L2, H, W, HexMesh=True, P1=None, P2=None, P3=None)</em>
@ -42,7 +50,7 @@ Example:
\image html pipetshapechamfer.png \image html pipetshapechamfer.png
A Pipe T-Shape can be created with a fillet at the junction of the main and the incident pipes: <h2>A Pipe T-Shape can be created with a fillet at the junction of the main and the incident pipes:</h2>
<b>TUI Command:</b> <em>geompy.MakePipeTShapeFillet(R1, W1, L1, R2, W2, L2, RF, HexMesh=True, P1=None, P2=None, P3=None)</em> <b>TUI Command:</b> <em>geompy.MakePipeTShapeFillet(R1, W1, L1, R2, W2, L2, RF, HexMesh=True, P1=None, P2=None, P3=None)</em>
@ -53,6 +61,35 @@ Example:
\image html pipetshapefillet.png \image html pipetshapefillet.png
<h2>All three types of T-Shape (basic, with chamfer and with fillet) can
have thickness reductions at its open ends (two ends of the main pipe
and one end of the incident pipe):</h2>
\image html pipetshape_thr_dlg.png
<b>TUI Commands:</b>
\n<em>geompy.MakePipeTShape(R1, W1, L1, R2, W2, L2, HexMesh=True, P1=None, P2=None, P3=None, theRL=0, theWL=0, theLtransL=0, theLthinL=0, theRR=0, theWR=0, theLtransR=0, theLthinR=0, theRI=0, theWI=0, theLtransI=0, theLthinI=0)</em>
\n<em>geompy.MakePipeTShapeChamfer(R1, W1, L1, R2, W2, L2, H, W, HexMesh=True, P1=None, P2=None, P3=None, theRL=0, theWL=0, theLtransL=0, theLthinL=0, theRR=0, theWR=0, theLtransR=0, theLthinR=0, theRI=0, theWI=0, theLtransI=0, theLthinI=0)</em>
\n<em>geompy.MakePipeTShapeFillet(R1, W1, L1, R2, W2, L2, RF, HexMesh=True, P1=None, P2=None, P3=None, theRL=0, theWL=0, theLtransL=0, theLthinL=0, theRR=0, theWR=0, theLtransR=0, theLthinR=0, theRI=0, theWI=0, theLtransI=0, theLthinI=0)</em>
<b>The additional arguments are:</b>
- \b theRL - Internal radius of left thickness reduction.
- \b theWL - Width of left thickness reduction.
- \b theLtransL - Length of left transition part.
- \b theLthinL - Length of left thin part.
- \b theRR - Internal radius of right thickness reduction.
- \b theWR - Width of right thickness reduction.
- \b theLtransR - Length of right transition part.
- \b theLthinR - Length of right thin part.
- \b theRI - Internal radius of incident thickness reduction.
- \b theWI - Width of incident thickness reduction.
- \b theLtransI - Length of incident transition part.
- \b theLthinI - Length of incident thin part.
Example:
\image html pipetshapethr.png
Our <b>TUI Scripts</b> provide you with useful examples of creation of Our <b>TUI Scripts</b> provide you with useful examples of creation of
\ref tui_creation_pipetshape "Advanced objects". \ref tui_creation_pipetshape "Advanced objects".

View File

@ -5,6 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>$title</title> <title>$title</title>
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/> <link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview $treeview
$search $search
$mathjax $mathjax

View File

@ -5,6 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>$title</title> <title>$title</title>
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/> <link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview $treeview
$search $search
$mathjax $mathjax

View File

@ -5,6 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>$title</title> <title>$title</title>
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/> <link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview $treeview
$search $search
$mathjax $mathjax

View File

@ -3935,6 +3935,8 @@ module GEOM
*/ */
interface GEOM_IAdvancedOperations : GEOM_IOperations interface GEOM_IAdvancedOperations : GEOM_IOperations
{ {
// T-Shape WITHOUT Thickness reduction
/*! /*!
* \brief Create a T-shape object with specified caracteristics for the main and * \brief Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length). * the incident pipes (radius, width, half-length).
@ -4062,6 +4064,256 @@ module GEOM
in double theR2, in double theW2, in double theL2, in double theR2, in double theW2, in double theL2,
in double theRF, in boolean theHexMesh, in double theRF, in boolean theHexMesh,
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3); in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
// T-Shape WITH Thickness reduction
/*!
* \brief Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length).
*
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
*
* \param theRL Internal radius of left thickness reduction
* \param theWL Width of left thickness reduction
* \param theLtransL Length of left transition part
* \param theLthinL Length of left thin part
*
* \param theRR Internal radius of right thickness reduction
* \param theWR Width of right thickness reduction
* \param theLtransR Length of right transition part
* \param theLthinR Length of right thin part
*
* \param theRI Internal radius of incident thickness reduction
* \param theWI Width of incident thickness reduction
* \param theLtransI Length of incident transition part
* \param theLthinI Length of incident thin part
*
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
* \return List of GEOM_Object, containing the created shape and propagation groups.
*/
ListOfGO MakePipeTShapeTR (in double theR1, in double theW1, in double theL1,
in double theR2, in double theW2, in double theL2,
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
in boolean theHexMesh);
/*!
* \brief Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length).
*
* The extremities of the main pipe are located on junctions points P1 and P2.
* The extremity of the incident pipe is located on junction point P3.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
*
* \param theRL Internal radius of left thickness reduction
* \param theWL Width of left thickness reduction
* \param theLtransL Length of left transition part
* \param theLthinL Length of left thin part
*
* \param theRR Internal radius of right thickness reduction
* \param theWR Width of right thickness reduction
* \param theLtransR Length of right transition part
* \param theLthinR Length of right thin part
*
* \param theRI Internal radius of incident thickness reduction
* \param theWI Width of incident thickness reduction
* \param theLtransI Length of incident transition part
* \param theLthinI Length of incident thin part
*
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
* \param theP1 1st junction point of main pipe
* \param theP2 2nd junction point of main pipe
* \param theP3 Junction point of incident pipe
* \return List of GEOM_Object, containing the created shape and propagation groups.
*/
ListOfGO MakePipeTShapeTRWithPosition
(in double theR1, in double theW1, in double theL1,
in double theR2, in double theW2, in double theL2,
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
in boolean theHexMesh,
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
/*!
* \brief Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length). A chamfer is created
* on the junction of the pipes.
*
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
*
* \param theRL Internal radius of left thickness reduction
* \param theWL Width of left thickness reduction
* \param theLtransL Length of left transition part
* \param theLthinL Length of left thin part
*
* \param theRR Internal radius of right thickness reduction
* \param theWR Width of right thickness reduction
* \param theLtransR Length of right transition part
* \param theLthinR Length of right thin part
*
* \param theRI Internal radius of incident thickness reduction
* \param theWI Width of incident thickness reduction
* \param theLtransI Length of incident transition part
* \param theLthinI Length of incident thin part
*
* \param theH Height of the chamfer.
* \param theW Width of the chamfer.
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
* \return List of GEOM_Object, containing the created shape and propagation groups.
*/
ListOfGO MakePipeTShapeTRChamfer
(in double theR1, in double theW1, in double theL1,
in double theR2, in double theW2, in double theL2,
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
in double theH, in double theW, in boolean theHexMesh);
/*!
* \brief Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length).
*
* A chamfer is created on the junction of the pipes.
* The extremities of the main pipe are located on junctions points P1 and P2.
* The extremity of the incident pipe is located on junction point P3.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
*
* \param theRL Internal radius of left thickness reduction
* \param theWL Width of left thickness reduction
* \param theLtransL Length of left transition part
* \param theLthinL Length of left thin part
*
* \param theRR Internal radius of right thickness reduction
* \param theWR Width of right thickness reduction
* \param theLtransR Length of right transition part
* \param theLthinR Length of right thin part
*
* \param theRI Internal radius of incident thickness reduction
* \param theWI Width of incident thickness reduction
* \param theLtransI Length of incident transition part
* \param theLthinI Length of incident thin part
*
* \param theH Height of the chamfer.
* \param theW Width of the chamfer.
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
* \param theP1 1st junction point of main pipe
* \param theP2 2nd junction point of main pipe
* \param theP3 Junction point of incident pipe
* \return List of GEOM_Object, containing the created shape and propagation groups.
*/
ListOfGO MakePipeTShapeTRChamferWithPosition
(in double theR1, in double theW1, in double theL1,
in double theR2, in double theW2, in double theL2,
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
in double theH, in double theW, in boolean theHexMesh,
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
/*!
* \brief Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length).
*
* A fillet is created on the junction of the pipes.
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
*
* \param theRL Internal radius of left thickness reduction
* \param theWL Width of left thickness reduction
* \param theLtransL Length of left transition part
* \param theLthinL Length of left thin part
*
* \param theRR Internal radius of right thickness reduction
* \param theWR Width of right thickness reduction
* \param theLtransR Length of right transition part
* \param theLthinR Length of right thin part
*
* \param theRI Internal radius of incident thickness reduction
* \param theWI Width of incident thickness reduction
* \param theLtransI Length of incident transition part
* \param theLthinI Length of incident thin part
*
* \param theRF Radius of curvature of fillet.
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
* \return List of GEOM_Object, containing the created shape and propagation groups.
*/
ListOfGO MakePipeTShapeTRFillet
(in double theR1, in double theW1, in double theL1,
in double theR2, in double theW2, in double theL2,
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
in double theRF, in boolean theHexMesh);
/*!
* \brief Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length).
*
* A fillet is created on the junction of the pipes.
* The extremities of the main pipe are located on junctions points P1 and P2.
* The extremity of the incident pipe is located on junction point P3.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
*
* \param theRL Internal radius of left thickness reduction
* \param theWL Width of left thickness reduction
* \param theLtransL Length of left transition part
* \param theLthinL Length of left thin part
*
* \param theRR Internal radius of right thickness reduction
* \param theWR Width of right thickness reduction
* \param theLtransR Length of right transition part
* \param theLthinR Length of right thin part
*
* \param theRI Internal radius of incident thickness reduction
* \param theWI Width of incident thickness reduction
* \param theLtransI Length of incident transition part
* \param theLthinI Length of incident thin part
*
* \param theRF Radius of curvature of fillet.
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
* \param theP1 1st junction point of main pipe
* \param theP2 2nd junction point of main pipe
* \param theP3 Junction point of incident pipe
* \return List of GEOM_Object, containing the created shape and propagation groups.
*/
ListOfGO MakePipeTShapeTRFilletWithPosition
(in double theR1, in double theW1, in double theL1,
in double theR2, in double theW2, in double theL2,
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
in double theRF, in boolean theHexMesh,
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
/*! /*!
* This function allows to create a disk already divided into blocks. It * This function allows to create a disk already divided into blocks. It
* can be use to create divided pipes for later meshing in hexaedra. * can be use to create divided pipes for later meshing in hexaedra.

View File

@ -244,7 +244,7 @@ coordsys.png \
translation.png translation.png
ADVANCED_RESOURCES = ADVANCED_RESOURCES =
ADVANCED_RESOURCES += pipetshape.png tree_pipetshape.png pipetshape_import_icon.png ADVANCED_RESOURCES += pipetshape.png tree_pipetshape.png pipetshape_import_icon.png pipetshape_section.png
ADVANCED_RESOURCES += dlg_pipetshape.png dlg_pipetshapechamfer.png dlg_pipetshapefillet.png ADVANCED_RESOURCES += dlg_pipetshape.png dlg_pipetshapechamfer.png dlg_pipetshapefillet.png
ADVANCED_RESOURCES += dlg_pipetshapel1.png dlg_pipetshaper1.png dlg_pipetshapew1.png ADVANCED_RESOURCES += dlg_pipetshapel1.png dlg_pipetshaper1.png dlg_pipetshapew1.png
ADVANCED_RESOURCES += dlg_pipetshapel2.png dlg_pipetshaper2.png dlg_pipetshapew2.png ADVANCED_RESOURCES += dlg_pipetshapel2.png dlg_pipetshaper2.png dlg_pipetshapew2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef ADVANCEDGUI_PIPETSHAPEDLG_H #ifndef ADVANCEDGUI_PIPETSHAPEDLG_H
#define ADVANCEDGUI_PIPETSHAPEDLG_H #define ADVANCEDGUI_PIPETSHAPEDLG_H
@ -25,72 +24,114 @@
class DlgRef_1Spin; class DlgRef_1Spin;
class DlgRef_2Spin; class DlgRef_2Spin;
class DlgRef_3Spin; class DlgRef_3Spin;
class DlgRef_4Spin;
class DlgRef_3Sel; class DlgRef_3Sel;
class DlgRef_6Sel; class DlgRef_6Sel;
class QCheckBox; class QCheckBox;
class QLineEdit; class QLineEdit;
class QLabel; class QLabel;
class QGridLayout;
class QGroupBox;
class SalomeApp_DoubleSpinBox;
//=================================================================================
// class : AdvancedGUI_4Spin
// purpose :
//=================================================================================
class AdvancedGUI_4Spin : public QWidget
{
Q_OBJECT
public:
AdvancedGUI_4Spin ();
~AdvancedGUI_4Spin();
public:
QGroupBox *GroupBox1;
QGridLayout *gridLayout1;
QLabel *TextLabel1;
QLabel *TextLabel2;
QLabel *TextLabel3;
QLabel *TextLabel4;
SalomeApp_DoubleSpinBox *SpinBox1;
SalomeApp_DoubleSpinBox *SpinBox2;
SalomeApp_DoubleSpinBox *SpinBox3;
SalomeApp_DoubleSpinBox *SpinBox4;
};
//================================================================================= //=================================================================================
// class : AdvancedGUI_PipeTShapeDlg // class : AdvancedGUI_PipeTShapeDlg
// purpose : // purpose :
//================================================================================= //=================================================================================
class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton { class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton
Q_OBJECT {
Q_OBJECT
public: public:
AdvancedGUI_PipeTShapeDlg(GeometryGUI*, QWidget* = 0); AdvancedGUI_PipeTShapeDlg (GeometryGUI*, QWidget* = 0);
~AdvancedGUI_PipeTShapeDlg(); ~AdvancedGUI_PipeTShapeDlg();
protected: protected:
// redefined from GEOMBase_Helper // redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid(QString&); virtual bool isValid (QString&);
virtual bool execute(ObjectList&); virtual bool execute (ObjectList&);
virtual void restoreSubShapes(SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr); virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
private: private:
void Init(); void Init();
void enterEvent(QEvent*); void enterEvent (QEvent*);
void resizeEvent(QResizeEvent *event); void resizeEvent (QResizeEvent *event);
void updateTshapeScreenshotLabel(); void updateLabelImgPipeTShape();
bool CheckCompatiblePosition(GEOM::GEOM_Object_var theP1, bool CheckCompatiblePosition (GEOM::GEOM_Object_var theP1,
GEOM::GEOM_Object_var theP2, GEOM::GEOM_Object_var theP2,
GEOM::GEOM_Object_var theP3, double theTolerance); GEOM::GEOM_Object_var theP3, double theTolerance);
private: private:
QPixmap imagePipeTShape; QPixmap imagePipeTShape;
QLabel* tshapeScreenShotLabel; QPixmap imageReduction;
DlgRef_3Spin* MainTubeGroupParams; QLabel* LabelImgPipeTShape;
DlgRef_3Spin* IncidentTubeGroupParams; QLabel* LabelImgReduction;
DlgRef_2Spin* ChamferGroupParams;
DlgRef_1Spin* FilletGroupParams; // Main parameters
DlgRef_6Sel* JunctionPointsSel; DlgRef_3Spin* MainTubeGroupParams;
QPixmap imageImp; DlgRef_3Spin* IncidentTubeGroupParams;
QString CssNormal, CssAcceptable, CssRefused; DlgRef_2Spin* ChamferGroupParams;
QCheckBox* HexMeshCheckBox; DlgRef_1Spin* FilletGroupParams;
GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3; QCheckBox* HexMeshCheckBox;
bool myOkPoint1, myOkPoint2, myOkPoint3;
bool isPreview; // Thickness reduction parameters
ObjectList pipeTShapeGroupObjects; AdvancedGUI_4Spin* LReductionGroupParams;
AdvancedGUI_4Spin* RReductionGroupParams;
AdvancedGUI_4Spin* IReductionGroupParams;
// Position parameters
DlgRef_6Sel* JunctionPointsSel;
QString CssNormal, CssAcceptable, CssRefused;
GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
bool myOkPoint1, myOkPoint2, myOkPoint3;
ObjectList pipeTShapeGroupObjects;
private slots: private slots:
void ClickOnOk(); void ClickOnOk();
bool ClickOnApply(); bool ClickOnApply();
void ActivateThisDialog(); void ActivateThisDialog();
void SelectionIntoArgument(); void currentChanged (int);
void SetEditCurrentArgument(); void SelectionIntoArgument();
void DisplayPreview(const bool activate = false, const bool update = true, void SetEditCurrentArgument();
const bool toRemoveFromEngine = true, const double lineWidth = -1, void DisplayPreview (const bool activate = false, const bool update = true,
const int displayMode = -1, const int color = -1); const bool toRemoveFromEngine = true, const double lineWidth = -1,
virtual void processPreview(); const int displayMode = -1, const int color = -1);
void SetPosition(bool); virtual void processPreview();
void ChamferOrFillet(bool); void SetPosition (bool);
void SetDoubleSpinBoxStep(double); void ChamferOrFillet (bool);
void ValueChangedInSpinBox( double ); void SetDoubleSpinBoxStep (double);
void UpdatePicture(QWidget* old, QWidget* now); void ValueChangedInSpinBox (double);
void ApplyNewDimensions(); void UpdatePicture (QWidget* old, QWidget* now);
bool executeNoCheck( ObjectList& objects ); void ApplyNewDimensions();
bool executeNoCheck (ObjectList& objects);
}; };
#endif // ADVANCEDGUI_PIPETSHAPEDLG_H #endif // ADVANCEDGUI_PIPETSHAPEDLG_H

View File

@ -1207,6 +1207,10 @@
<source>DLG_PIPETSHAPE</source> <source>DLG_PIPETSHAPE</source>
<translation>dlg_pipetshape.png</translation> <translation>dlg_pipetshape.png</translation>
</message> </message>
<message>
<source>IMG_PIPETSHAPE_SECT</source>
<translation>pipetshape_section.png</translation>
</message>
<message> <message>
<source>DLG_PIPETSHAPE_L1</source> <source>DLG_PIPETSHAPE_L1</source>
<translation>dlg_pipetshapel1.png</translation> <translation>dlg_pipetshapel1.png</translation>

View File

@ -5801,6 +5801,46 @@ Do you want to create new material?</translation>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source> <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
<translation>New L2</translation> <translation>New L2</translation>
</message> </message>
<message>
<source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
<translation type="unfinished">Left thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
<translation type="unfinished">Right thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_INCI_TR</source>
<translation type="unfinished">Incident thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_R</source>
<translation type="unfinished">Radius (r%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_W</source>
<translation type="unfinished">Width (w%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
<translation type="unfinished">Transition length (ltrans%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
<translation type="unfinished">Thin part length (lthin%1)</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPMAIN</source>
<translation type="unfinished">Main parameters</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
<translation type="unfinished">Thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
<translation type="unfinished">Position</translation>
</message>
</context> </context>
<context> <context>
<name>GEOMToolsGUI_PublishDlg</name> <name>GEOMToolsGUI_PublishDlg</name>

View File

@ -5784,6 +5784,46 @@ Voulez-vous en créer un nouveau ?</translation>
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source> <source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
<translation>Nouvelle L2</translation> <translation>Nouvelle L2</translation>
</message> </message>
<message>
<source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
<translation type="unfinished">Left thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
<translation type="unfinished">Right thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_INCI_TR</source>
<translation type="unfinished">Incident thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_R</source>
<translation type="unfinished">Radius (r%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_W</source>
<translation type="unfinished">Width (w%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
<translation type="unfinished">Transition length (ltrans%1)</translation>
</message>
<message>
<source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
<translation type="unfinished">Thin part length (lthin%1)</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPMAIN</source>
<translation type="unfinished">Main parameters</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
<translation type="unfinished">Thickness reduction</translation>
</message>
<message>
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
<translation type="unfinished">Position</translation>
</message>
</context> </context>
<context> <context>
<name>GEOMToolsGUI_PublishDlg</name> <name>GEOMToolsGUI_PublishDlg</name>

View File

@ -18,13 +18,13 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <GEOMImpl_BooleanDriver.hxx> #include <GEOMImpl_BooleanDriver.hxx>
#include <GEOMImpl_IBoolean.hxx> #include <GEOMImpl_IBoolean.hxx>
#include <GEOMImpl_Types.hxx> #include <GEOMImpl_Types.hxx>
#include <GEOMImpl_GlueDriver.hxx> #include <GEOMImpl_GlueDriver.hxx>
#include <GEOM_Function.hxx> #include <GEOM_Function.hxx>
#include <GEOMUtils.hxx>
#include <TNaming_CopyShape.hxx> #include <TNaming_CopyShape.hxx>
@ -72,30 +72,6 @@ GEOMImpl_BooleanDriver::GEOMImpl_BooleanDriver()
{ {
} }
void AddSimpleShapes(TopoDS_Shape theShape, TopTools_ListOfShape& theList)
{
if (theShape.ShapeType() != TopAbs_COMPOUND &&
theShape.ShapeType() != TopAbs_COMPSOLID) {
theList.Append(theShape);
return;
}
TopTools_MapOfShape mapShape;
TopoDS_Iterator It (theShape, Standard_True, Standard_True);
for (; It.More(); It.Next()) {
TopoDS_Shape aShape_i = It.Value();
if (mapShape.Add(aShape_i)) {
if (aShape_i.ShapeType() == TopAbs_COMPOUND ||
aShape_i.ShapeType() == TopAbs_COMPSOLID) {
AddSimpleShapes(aShape_i, theList);
} else {
theList.Append(aShape_i);
}
}
}
}
//======================================================================= //=======================================================================
//function : Execute //function : Execute
//purpose : //purpose :
@ -131,8 +107,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
B.MakeCompound(C); B.MakeCompound(C);
TopTools_ListOfShape listShape1, listShape2; TopTools_ListOfShape listShape1, listShape2;
AddSimpleShapes(aShape1, listShape1); GEOMUtils::AddSimpleShapes(aShape1, listShape1);
AddSimpleShapes(aShape2, listShape2); GEOMUtils::AddSimpleShapes(aShape2, listShape2);
Standard_Boolean isCompound = Standard_Boolean isCompound =
(listShape1.Extent() > 1 || listShape2.Extent() > 1); (listShape1.Extent() > 1 || listShape2.Extent() > 1);
@ -174,7 +150,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
if (isCompound) { if (isCompound) {
/* /*
TopTools_ListOfShape listShapeC; TopTools_ListOfShape listShapeC;
AddSimpleShapes(C, listShapeC); GEOMUtils::AddSimpleShapes(C, listShapeC);
TopTools_ListIteratorOfListOfShape itSubC (listShapeC); TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
bool isOnlySolids = true; bool isOnlySolids = true;
for (; itSubC.More(); itSubC.Next()) { for (; itSubC.More(); itSubC.Next()) {
@ -203,8 +179,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
B.MakeCompound(C); B.MakeCompound(C);
TopTools_ListOfShape listShapes, listTools; TopTools_ListOfShape listShapes, listTools;
AddSimpleShapes(aShape1, listShapes); GEOMUtils::AddSimpleShapes(aShape1, listShapes);
AddSimpleShapes(aShape2, listTools); GEOMUtils::AddSimpleShapes(aShape2, listTools);
Standard_Boolean isCompound = (listShapes.Extent() > 1); Standard_Boolean isCompound = (listShapes.Extent() > 1);
@ -245,7 +221,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
if (isCompound) { if (isCompound) {
/* /*
TopTools_ListOfShape listShapeC; TopTools_ListOfShape listShapeC;
AddSimpleShapes(C, listShapeC); GEOMUtils::AddSimpleShapes(C, listShapeC);
TopTools_ListIteratorOfListOfShape itSubC (listShapeC); TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
bool isOnlySolids = true; bool isOnlySolids = true;
for (; itSubC.More(); itSubC.Next()) { for (; itSubC.More(); itSubC.Next()) {
@ -272,8 +248,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
/* Fix for NPAL15379: refused /* Fix for NPAL15379: refused
// Check arguments // Check arguments
TopTools_ListOfShape listShape1, listShape2; TopTools_ListOfShape listShape1, listShape2;
AddSimpleShapes(aShape1, listShape1); GEOMUtils::AddSimpleShapes(aShape1, listShape1);
AddSimpleShapes(aShape2, listShape2); GEOMUtils::AddSimpleShapes(aShape2, listShape2);
Standard_Boolean isIntersect = Standard_False; Standard_Boolean isIntersect = Standard_False;
@ -360,8 +336,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
B.MakeCompound(C); B.MakeCompound(C);
TopTools_ListOfShape listShape1, listShape2; TopTools_ListOfShape listShape1, listShape2;
AddSimpleShapes(aShape1, listShape1); GEOMUtils::AddSimpleShapes(aShape1, listShape1);
AddSimpleShapes(aShape2, listShape2); GEOMUtils::AddSimpleShapes(aShape2, listShape2);
Standard_Boolean isCompound = Standard_Boolean isCompound =
(listShape1.Extent() > 1 || listShape2.Extent() > 1); (listShape1.Extent() > 1 || listShape2.Extent() > 1);
@ -433,7 +409,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
// as boolean operations always produce compound, lets simplify it // as boolean operations always produce compound, lets simplify it
// for the case, if it contains only one sub-shape // for the case, if it contains only one sub-shape
TopTools_ListOfShape listShapeRes; TopTools_ListOfShape listShapeRes;
AddSimpleShapes(aShape, listShapeRes); GEOMUtils::AddSimpleShapes(aShape, listShapeRes);
if (listShapeRes.Extent() == 1) { if (listShapeRes.Extent() == 1) {
aShape = listShapeRes.First(); aShape = listShapeRes.First();
if (aShape.IsNull()) return 0; if (aShape.IsNull()) return 0;

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,8 @@
#include "GEOM_Engine.hxx" #include "GEOM_Engine.hxx"
#include "GEOM_Object.hxx" #include "GEOM_Object.hxx"
#include <gp_Ax2.hxx>
class GEOMImpl_IBasicOperations; class GEOMImpl_IBasicOperations;
class GEOMImpl_IBooleanOperations; class GEOMImpl_IBooleanOperations;
class GEOMImpl_IShapesOperations; class GEOMImpl_IShapesOperations;
@ -43,23 +45,36 @@ private:
double theR2, double theW2, double theL2, double theR2, double theW2, double theL2,
double theH = 0, double theW = 0, double theH = 0, double theW = 0,
double theRF = 0, bool isNormal = true); double theRF = 0, bool isNormal = true);
bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape, bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
double theR1, double theW1, double theL1, double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2); double theR2, double theW2, double theL2);
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);
bool MakeGroups(Handle(GEOM_Object) theShape, int shapType, bool MakeGroups(Handle(GEOM_Object) theShape, int shapType,
double theR1, double theW1, double theL1, double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2, double theR2, double theW2, double theL2,
double theH, double theW, double theRF,
Handle(TColStd_HSequenceOfTransient) theSeq, Handle(TColStd_HSequenceOfTransient) theSeq,
gp_Trsf aTrsf); gp_Trsf aTrsf);
gp_Trsf GetPositionTrsf(double theL1, double theL2, gp_Trsf GetPositionTrsf(double theL1, double theL2,
Handle(GEOM_Object) P1 = 0, Handle(GEOM_Object) P1 = 0,
Handle(GEOM_Object) P2 = 0, Handle(GEOM_Object) P2 = 0,
Handle(GEOM_Object) P3 = 0); Handle(GEOM_Object) P3 = 0);
bool CheckCompatiblePosition(double& theL1, double& theL2, bool CheckCompatiblePosition(double& theL1, double& theL2,
Handle(GEOM_Object) theP1, Handle(GEOM_Object) theP1,
Handle(GEOM_Object) theP2, Handle(GEOM_Object) theP2,
Handle(GEOM_Object) theP3, Handle(GEOM_Object) theP3,
double theTolerance); double theTolerance);
private: private:
GEOMImpl_IBasicOperations* myBasicOperations; GEOMImpl_IBasicOperations* myBasicOperations;
GEOMImpl_IBooleanOperations* myBooleanOperations; GEOMImpl_IBooleanOperations* myBooleanOperations;
@ -70,6 +85,57 @@ private:
GEOMImpl_ILocalOperations* myLocalOperations; GEOMImpl_ILocalOperations* myLocalOperations;
GEOMImpl_IHealingOperations* myHealingOperations; GEOMImpl_IHealingOperations* myHealingOperations;
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);
public: public:
Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID); Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
Standard_EXPORT ~GEOMImpl_IAdvancedOperations(); Standard_EXPORT ~GEOMImpl_IAdvancedOperations();
@ -77,34 +143,57 @@ public:
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShape(double theR1, double theW1, double theL1, MakePipeTShape(double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2, 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,
bool theHexMesh = true); bool theHexMesh = true);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeWithPosition(double theR1, double theW1, double theL1, MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2, 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,
bool theHexMesh = true, bool theHexMesh = true,
Handle(GEOM_Object) P1 = 0, Handle(GEOM_Object) P1 = 0,
Handle(GEOM_Object) P2 = 0, Handle(GEOM_Object) P2 = 0,
Handle(GEOM_Object) P3 = 0); Handle(GEOM_Object) P3 = 0);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeChamfer(double theR1, double theW1, double theL1, MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2, 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,
double theH, double theW, double theH, double theW,
bool theHexMesh = true); bool theHexMesh = true);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1, MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2, double theR2, double theW2, double theL2,
double theH, double theW, double theH, double theW,
double theRL, double theWL, double theLtransL, double theLthinL,
double theRR, double theWR, double theLtransR, double theLthinR,
double theRI, double theWI, double theLtransI, double theLthinI,
bool theHexMesh = true, bool theHexMesh = true,
Handle(GEOM_Object) P1 = 0, Handle(GEOM_Object) P1 = 0,
Handle(GEOM_Object) P2 = 0, Handle(GEOM_Object) P2 = 0,
Handle(GEOM_Object) P3 = 0); Handle(GEOM_Object) P3 = 0);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeFillet(double theR1, double theW1, double theL1, MakePipeTShapeFillet(double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2, 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,
double theRF, bool theHexMesh = true); double theRF, bool theHexMesh = true);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1, MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
double theR2, double theW2, double theL2, 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,
double theRF, bool theHexMesh = true, double theRF, bool theHexMesh = true,
Handle(GEOM_Object) P1 = 0, Handle(GEOM_Object) P1 = 0,
Handle(GEOM_Object) P2 = 0, Handle(GEOM_Object) P2 = 0,

View File

@ -794,71 +794,14 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdgeNearPoint
#if OCC_VERSION_LARGE > 0x06010000 #if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
#endif #endif
TopoDS_Shape aShape;
TopoDS_Vertex aVert = TopoDS::Vertex(anArg); TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
TopoDS_Shape aShape = GEOMUtils::GetEdgeNearPoint(aBlockOrComp, aVert);
// 1. Explode blocks on edges TopTools_IndexedMapOfShape anIndices;
TopTools_MapOfShape mapShape; TopExp::MapShapes(aBlockOrComp, anIndices);
Standard_Integer nbEdges = 0; Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1);
TopExp_Explorer exp (aBlockOrComp, TopAbs_EDGE); anArray->SetValue(1, anIndices.FindIndex(aShape));
for (; exp.More(); exp.Next()) { aResult = GetEngine()->AddSubShape(theShape, anArray);
if (mapShape.Add(exp.Current())) {
nbEdges++;
}
}
if (nbEdges == 0) {
SetErrorCode("Given shape contains no edges");
return NULL;
}
mapShape.Clear();
Standard_Integer ind = 1;
TopTools_Array1OfShape anEdges (1, nbEdges);
TColStd_Array1OfReal aDistances (1, nbEdges);
for (exp.Init(aBlockOrComp, TopAbs_EDGE); exp.More(); exp.Next()) {
if (mapShape.Add(exp.Current())) {
TopoDS_Shape anEdge = exp.Current();
anEdges(ind) = anEdge;
// 2. Classify the point relatively each edge
BRepExtrema_DistShapeShape aDistTool (aVert, anEdges(ind));
if (!aDistTool.IsDone()) {
SetErrorCode("Can not find a distance from the given point to one of edges");
return NULL;
}
aDistances(ind) = aDistTool.Value();
ind++;
}
}
// 3. Define edge, having minimum distance to the point
Standard_Real nearest = RealLast(), nbFound = 0;
Standard_Real prec = Precision::Confusion();
for (ind = 1; ind <= nbEdges; ind++) {
if (Abs(aDistances(ind) - nearest) < prec) {
nbFound++;
} else if (aDistances(ind) < nearest) {
nearest = aDistances(ind);
aShape = anEdges(ind);
nbFound = 1;
} else {
}
}
if (nbFound > 1) {
SetErrorCode("Multiple edges near the given point are found");
return NULL;
} else if (nbFound == 0) {
SetErrorCode("There are no edges near the given point");
return NULL;
} else {
TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes(aBlockOrComp, anIndices);
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1);
anArray->SetValue(1, anIndices.FindIndex(aShape));
aResult = GetEngine()->AddSubShape(theShape, anArray);
}
} }
catch (Standard_Failure) { catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught(); Handle(Standard_Failure) aFail = Standard_Failure::Caught();

View File

@ -15,34 +15,13 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _GEOMImpl_IPipeTShape_HXX_ #ifndef _GEOMImpl_IPipeTShape_HXX_
#define _GEOMImpl_IPipeTShape_HXX_ #define _GEOMImpl_IPipeTShape_HXX_
#include "GEOM_Function.hxx" #include "GEOM_Function.hxx"
#define TSHAPE_ARG_R1 1 #include <TColStd_HArray1OfReal.hxx>
#define TSHAPE_ARG_W1 2
#define TSHAPE_ARG_L1 3
#define TSHAPE_ARG_R2 4
#define TSHAPE_ARG_W2 5
#define TSHAPE_ARG_L2 6
// chamfer
#define TSHAPE_ARG_H 7
#define TSHAPE_ARG_W 8
// fillet
#define TSHAPE_ARG_RF 9
// partition
#define TSHAPE_ARG_HEXMESH 10
// junction points
#define TSHAPE_ARG_P1 11
#define TSHAPE_ARG_P2 12
#define TSHAPE_ARG_P3 13
class GEOMImpl_IPipeTShape class GEOMImpl_IPipeTShape
{ {
@ -88,6 +67,34 @@ public:
void SetP3(const Handle(GEOM_Function)& theP3){_func->SetReference(TSHAPE_ARG_P3, theP3); } void SetP3(const Handle(GEOM_Function)& theP3){_func->SetReference(TSHAPE_ARG_P3, theP3); }
Handle(GEOM_Function) GetP3() { return _func->GetReference(TSHAPE_ARG_P3); } Handle(GEOM_Function) GetP3() { return _func->GetReference(TSHAPE_ARG_P3); }
private:
enum {
// main pipe
TSHAPE_ARG_R1 = 1,
TSHAPE_ARG_W1 = 2,
TSHAPE_ARG_L1 = 3,
// incident pipe
TSHAPE_ARG_R2 = 4,
TSHAPE_ARG_W2 = 5,
TSHAPE_ARG_L2 = 6,
// chamfer
TSHAPE_ARG_H = 7,
TSHAPE_ARG_W = 8,
// fillet
TSHAPE_ARG_RF = 9,
// partition
TSHAPE_ARG_HEXMESH = 10,
// junction points
TSHAPE_ARG_P1 = 11,
TSHAPE_ARG_P2 = 12,
TSHAPE_ARG_P3 = 13
};
private: private:
Handle(GEOM_Function) _func; Handle(GEOM_Function) _func;
}; };

View File

@ -21,6 +21,7 @@
#include <GEOMImpl_IPipeTShape.hxx> #include <GEOMImpl_IPipeTShape.hxx>
#include <GEOMImpl_Types.hxx> #include <GEOMImpl_Types.hxx>
#include <GEOMImpl_Block6Explorer.hxx> #include <GEOMImpl_Block6Explorer.hxx>
#include <GEOMImpl_IAdvancedOperations.hxx>
#include <GEOM_Function.hxx> #include <GEOM_Function.hxx>
#include <GEOM_IOperations.hxx> #include <GEOM_IOperations.hxx>
@ -45,6 +46,7 @@
#include <gp_Dir.hxx> #include <gp_Dir.hxx>
#include <gp_Trsf.hxx> #include <gp_Trsf.hxx>
#include <BRepPrimAPI_MakeCone.hxx>
#include <BRepPrimAPI_MakeCylinder.hxx> #include <BRepPrimAPI_MakeCylinder.hxx>
#include <BRepAlgoAPI_Fuse.hxx> #include <BRepAlgoAPI_Fuse.hxx>
#include <BRepAlgoAPI_Cut.hxx> #include <BRepAlgoAPI_Cut.hxx>
@ -251,19 +253,19 @@ Handle(TColStd_HSequenceOfInteger)
// along OX and OZ // along OX and OZ
//======================================================================= //=======================================================================
void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& theShape, void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
TopAbs_ShapeEnum theShapeType, TopAbs_ShapeEnum theShapeType,
double r1, double r1,
double r2, double r2,
Handle(TopTools_HSequenceOfShape)& commonShapes) const Handle(TopTools_HSequenceOfShape)& commonShapes) const
{ {
gp_Pnt aP0 (0, 0, 0); gp_Pnt aP0 (0, 0, 0);
gp_Vec aVX = gp::DX(), aVZ = gp::DZ(); gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
gp_Ax3 anAxis1 (aP0, aVX), anAxis2 (aP0, aVZ); gp_Ax3 anAxis1 (aP0, aVX, aVZ), anAxis2 (aP0, aVZ, aVX);
TopTools_IndexedMapOfShape aMapOfShapes; TopTools_IndexedMapOfShape aMapOfShapes;
aMapOfShapes.Clear(); aMapOfShapes.Clear();
TopExp::MapShapes(theShape, aMapOfShapes); TopExp::MapShapes(theShape, aMapOfShapes);
commonShapes->Clear(); commonShapes->Clear();
int myID; int myID;
@ -289,9 +291,9 @@ void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& t
for (int j=1; j<=aSeqExt1->Length();j++) { for (int j=1; j<=aSeqExt1->Length();j++) {
// std::cerr << "aSeqExt1->Value(j): " << aSeqExt1->Value(j) << std::endl; // std::cerr << "aSeqExt1->Value(j): " << aSeqExt1->Value(j) << std::endl;
if (aSeqExt1->Value(j) == aSeqExt2->Value(i)) { if (aSeqExt1->Value(j) == aSeqExt2->Value(i)) {
myID = aSeqExt1->Value(j); myID = aSeqExt1->Value(j);
commonShapes->Append(aMapOfShapes.FindKey(myID)); commonShapes->Append(aMapOfShapes.FindKey(myID));
found = true; found = true;
} }
} }
} }
@ -303,8 +305,8 @@ void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& t
//function : MakePipeTShape //function : MakePipeTShape
//purpose : //purpose :
//======================================================================= //=======================================================================
TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const double w1, const double l1, TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape (const double r1, const double w1, const double l1,
const double r2, const double w2, const double l2) const const double r2, const double w2, const double l2) const
{ {
double r1Ext = r1 + w1; double r1Ext = r1 + w1;
double r2Ext = r2 + w2; double r2Ext = r2 + w2;
@ -312,8 +314,8 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const do
gp_Pnt aP0 (0, 0, 0); gp_Pnt aP0 (0, 0, 0);
gp_Pnt aP1 (-l1, 0, 0); gp_Pnt aP1 (-l1, 0, 0);
gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ(); gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
gp_Ax2 anAxes1 (aP1, aVX); gp_Ax2 anAxes1 (aP1, aVX, aVZ);
gp_Ax2 anAxes2 (aP0, aVZ); gp_Ax2 anAxes2 (aP0, aVZ, aVX);
// Build the initial pipes // Build the initial pipes
BRepPrimAPI_MakeCylinder C1Int (anAxes1, r1, Abs(2 * l1)); BRepPrimAPI_MakeCylinder C1Int (anAxes1, r1, Abs(2 * l1));
@ -325,13 +327,13 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const do
C2Int.Build(); C2Int.Build();
C2Ext.Build(); C2Ext.Build();
if (!C1Int.IsDone() || !C1Ext.IsDone() || !C2Int.IsDone() || !C2Ext.IsDone()) { if (!C1Int.IsDone() || !C1Ext.IsDone() || !C2Int.IsDone() || !C2Ext.IsDone()) {
StdFail_NotDone::Raise("Couldn't build cylinders"); StdFail_NotDone::Raise("Cannot build cylinders");
} }
// Fuse the 2 pipes // Fuse the 2 pipes
BRepAlgoAPI_Fuse fuse1 (C1Ext.Shape(), C2Ext.Shape()); BRepAlgoAPI_Fuse fuse1 (C1Ext.Shape(), C2Ext.Shape());
if (!fuse1.IsDone()) { if (!fuse1.IsDone()) {
StdFail_NotDone::Raise("Couldn't fuse cylinders"); StdFail_NotDone::Raise("Cannot fuse cylinders");
} }
// Remove small radius main pipe // Remove small radius main pipe
@ -353,17 +355,17 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const do
//function : MakeQuarterPipeTShape //function : MakeQuarterPipeTShape
//purpose : //purpose :
//======================================================================= //=======================================================================
TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape(const double r1, const double w1, const double l1, TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1, const double w1, const double l1,
const double r2, const double w2, const double l2) const const double r2, const double w2, const double l2) const
{ {
double r1Ext = r1 + w1;
TopoDS_Shape Te = MakePipeTShape(r1, w1, l1, r2, w2, l2); TopoDS_Shape Te = MakePipeTShape(r1, w1, l1, r2, w2, l2);
if (Te.IsNull()) if (Te.IsNull())
StdFail_NotDone::Raise("Couldn't build Pipe TShape"); StdFail_NotDone::Raise("Couldn't build Pipe TShape");
// Get a quarter of shape => Te2 // Get a quarter of shape => Te2
BRepPrimAPI_MakeBox box1 (gp_Pnt(0,-2*r1Ext,-2*r1Ext),gp_Pnt(Abs(2 * l1), 2*r1Ext, Abs(2*l2))); double r1Ext = r1 + w1;
BRepPrimAPI_MakeBox box2 (gp_Pnt(0,2*r1Ext,-2*r1Ext),gp_Pnt(-Abs(2 * l1), 0, Abs(2*l2))); BRepPrimAPI_MakeBox box1 (gp_Pnt(0, -2*r1Ext, -2*r1Ext), gp_Pnt( Abs(2 * l1), 2*r1Ext, Abs(2*l2)));
BRepPrimAPI_MakeBox box2 (gp_Pnt(0, 2*r1Ext, -2*r1Ext), gp_Pnt(-Abs(2 * l1), 0, Abs(2*l2)));
box1.Build(); box1.Build();
box2.Build(); box2.Build();
if (!box1.IsDone() || !box2.IsDone()) { if (!box1.IsDone() || !box2.IsDone()) {
@ -385,7 +387,7 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape(const double r1, c
//function : Execute //function : Execute
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) const Standard_Integer GEOMImpl_PipeTShapeDriver::Execute (TFunction_Logbook& log) const
{ {
if (Label().IsNull()) return 0; if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@ -394,20 +396,20 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
Standard_Integer aType = aFunction->GetType(); Standard_Integer aType = aFunction->GetType();
TopoDS_Shape aShape, Te4, Te4Part; TopoDS_Shape aShape, Te4, Te4Part;
// TopoDS_Edge arete_intersect_int; //TopoDS_Edge arete_intersect_int;
// Handle(TopTools_HSequenceOfShape) edges_e = new TopTools_HSequenceOfShape; //Handle(TopTools_HSequenceOfShape) edges_e = new TopTools_HSequenceOfShape;
Handle(TColStd_HSequenceOfInteger) edges_e; Handle(TColStd_HSequenceOfInteger) edges_e;
// Handle(TopTools_HSequenceOfShape) edges_i = new TopTools_HSequenceOfShape; //Handle(TopTools_HSequenceOfShape) edges_i = new TopTools_HSequenceOfShape;
// gp_Pnt aP0 (0, 0, 0); //gp_Pnt aP0 (0, 0, 0);
// gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ(); //gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
bool hexMesh = (bool) aData.GetHexMesh(); bool hexMesh = (bool) aData.GetHexMesh();
// Useful values // Useful values
// double aSize = 2*(aData.GetL1() + aData.GetL2()); //double aSize = 2*(aData.GetL1() + aData.GetL2());
double epsilon = Precision::Approximation(); double epsilon = Precision::Approximation();
double aR1Ext = aData.GetR1() + aData.GetW1(); double aR1Ext = aData.GetR1() + aData.GetW1();
double aR2Ext = aData.GetR2() + aData.GetW2(); double aR2Ext = aData.GetR2() + aData.GetW2();
if (aData.GetR2() > aData.GetR1() + epsilon) { if (aData.GetR2() > aData.GetR1() + epsilon) {
StdFail_NotDone::Raise("TShape cannot be computed if R2 > R1"); StdFail_NotDone::Raise("TShape cannot be computed if R2 > R1");
} }
@ -415,7 +417,7 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
if (aR2Ext > aR1Ext + epsilon) { if (aR2Ext > aR1Ext + epsilon) {
StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 > R1+W1"); StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 > R1+W1");
} }
// external radius are equal // external radius are equal
if (fabs(aR2Ext - aR1Ext) < epsilon) { if (fabs(aR2Ext - aR1Ext) < epsilon) {
if (aType == TSHAPE_CHAMFER) if (aType == TSHAPE_CHAMFER)
@ -428,11 +430,10 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
} }
} }
if (aR1Ext >= aData.GetL2() + epsilon) { if (aR1Ext >= aData.GetL2() + epsilon) {
StdFail_NotDone::Raise("TShape cannot be computed if R1+W1 >= L2"); StdFail_NotDone::Raise("TShape cannot be computed if R1+W1 >= L2");
} }
if (aR2Ext >= aData.GetL1() + epsilon) { if (aR2Ext >= aData.GetL1() + epsilon) {
StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 >= L1"); StdFail_NotDone::Raise("TShape cannot be computed if R2+W2 >= L1");
} }
@ -446,22 +447,22 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
} }
if (aType == TSHAPE_FILLET) { if (aType == TSHAPE_FILLET) {
if (aData.GetRF() >= (aData.GetL2() - aR1Ext + epsilon) || if (aData.GetRF() >= (aData.GetL2() - aR1Ext + epsilon) ||
aData.GetRF() >= (aData.GetL1() - aR2Ext + epsilon)) aData.GetRF() >= (aData.GetL1() - aR2Ext + epsilon))
StdFail_NotDone::Raise("TShape cannot be computed: radius of fillet is too high"); StdFail_NotDone::Raise("TShape cannot be computed: radius of fillet is too high");
} }
if (hexMesh) { if (hexMesh) {
// Create a quarter of a basic T-Shape pipe // Create a quarter of a basic T-Shape pipe
// std::cerr << "Create a quarter of a basic T-Shape pipe" << std::endl; //std::cerr << "Create a quarter of a basic T-Shape pipe" << std::endl;
Te4 = MakeQuarterPipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(), Te4 = MakeQuarterPipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(),
aData.GetR2(), aData.GetW2(), aData.GetL2()); aData.GetR2(), aData.GetW2(), aData.GetL2());
} }
else { else {
// No need to cut pipe t-shape // No need to cut pipe t-shape
// std::cerr << "Create a basic T-Shape pipe" << std::endl; //std::cerr << "Create a basic T-Shape pipe" << std::endl;
Te4 = MakePipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(), Te4 = MakePipeTShape(aData.GetR1(), aData.GetW1(), aData.GetL1(),
aData.GetR2(), aData.GetW2(), aData.GetL2()); aData.GetR2(), aData.GetW2(), aData.GetL2());
} }
aShape = Te4; aShape = Te4;
/* /*
@ -502,7 +503,6 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
if (edges_e.IsNull() || edges_e->Length() == 0) { if (edges_e.IsNull() || edges_e->Length() == 0) {
StdFail_NotDone::Raise("Common edges not found"); StdFail_NotDone::Raise("Common edges not found");
} }
TopTools_IndexedDataMapOfShapeListOfShape M; TopTools_IndexedDataMapOfShapeListOfShape M;
GEOMImpl_Block6Explorer::MapShapesAndAncestors(Te4, TopAbs_EDGE, TopAbs_FACE, M); GEOMImpl_Block6Explorer::MapShapesAndAncestors(Te4, TopAbs_EDGE, TopAbs_FACE, M);
@ -547,10 +547,9 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
if (!chamfer.IsDone()) { if (!chamfer.IsDone()) {
StdFail_NotDone::Raise("Chamfer can not be computed on the given shape with the given parameters"); StdFail_NotDone::Raise("Chamfer can not be computed on the given shape with the given parameters");
} }
// BB.Add(CC, chamfer.Shape()); // BB.Add(CC, chamfer.Shape());
// aShape = CC; // aShape = CC;
aShape = chamfer.Shape(); aShape = chamfer.Shape();
} }
@ -558,10 +557,10 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
// TShape with fillet // TShape with fillet
// Create fillet on the edge arete_intersect_ext // Create fillet on the edge arete_intersect_ext
BRepFilletAPI_MakeFillet fill (Te4); BRepFilletAPI_MakeFillet fill (Te4);
TopTools_IndexedMapOfShape anIndices; TopTools_IndexedMapOfShape anIndices;
TopExp::MapShapes(Te4, anIndices); TopExp::MapShapes(Te4, anIndices);
TopoDS_Shape theBox; TopoDS_Shape theBox;
if (hexMesh) { if (hexMesh) {
BRepPrimAPI_MakeBox aBox (gp_Pnt(0,0,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext)); BRepPrimAPI_MakeBox aBox (gp_Pnt(0,0,0),gp_Pnt(-aR2Ext, -aR2Ext, aR1Ext));
@ -584,7 +583,7 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
if (edges_e.IsNull() || edges_e->Length() == 0) { if (edges_e.IsNull() || edges_e->Length() == 0) {
StdFail_NotDone::Raise("Common edges not found"); StdFail_NotDone::Raise("Common edges not found");
} }
// fill.Add(TopoDS::Edge(edges_e->Value(1))); // fill.Add(TopoDS::Edge(edges_e->Value(1)));
// if (!hexMesh) { // if (!hexMesh) {
for (int i=1;i<=edges_e->Length();i++) { for (int i=1;i<=edges_e->Length();i++) {

View File

@ -15,7 +15,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef _GEOMImpl_PipeTShapeDriver_HXX #ifndef _GEOMImpl_PipeTShapeDriver_HXX
#define _GEOMImpl_PipeTShapeDriver_HXX #define _GEOMImpl_PipeTShapeDriver_HXX
@ -24,11 +23,12 @@
#include "GEOMAlgo_State.hxx" #include "GEOMAlgo_State.hxx"
#include <TopAbs_ShapeEnum.hxx>
#include <TopTools_ListOfShape.hxx> #include <TopTools_ListOfShape.hxx>
#include <TopTools_HSequenceOfShape.hxx> #include <TopTools_HSequenceOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx> #include <TopTools_IndexedMapOfShape.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TColStd_HSequenceOfInteger.hxx> #include <TColStd_HSequenceOfInteger.hxx>
#include <gp_Ax2.hxx>
#include <Handle_Geom_Surface.hxx> #include <Handle_Geom_Surface.hxx>
@ -125,32 +125,33 @@ public:
return (STANDARD_TYPE(GEOMImpl_PipeTShapeDriver) == AType || TFunction_Driver::IsKind(AType)); return (STANDARD_TYPE(GEOMImpl_PipeTShapeDriver) == AType || TFunction_Driver::IsKind(AType));
} }
private: private:
/*! /*!
* \brief Create a T-Shape based on pipes * \brief Create a T-Shape based on pipes
* \param r1 - the internal radius of main pipe * \param r1 - the internal radius of main pipe
* \param w1 - the thickness main pipe * \param w1 - the thickness of main pipe
* \param l1 - the half-length of main pipe * \param l1 - the half-length of main pipe
* \param r2 - the internal radius of incident pipe * \param r2 - the internal radius of incident pipe
* \param w2 - the thickness incident pipe * \param w2 - the thickness of incident pipe
* \param l2 - the half-length of main pipe * \param l2 - the half-length of main pipe
* \retval TopoDS_Shape - Resulting shape * \retval TopoDS_Shape - Resulting shape
*/ */
TopoDS_Shape MakePipeTShape(double r1, double w1, double l1, double r2, double w2, double l2) const; TopoDS_Shape MakePipeTShape(double r1, double w1, double l1,
double r2, double w2, double l2) const;
/*! /*!
* \brief Create a quarter of a T-Shape based on pipes * \brief Create a quarter of a T-Shape based on pipes
* \param r1 - the internal radius of main pipe * \param r1 - the internal radius of main pipe
* \param w1 - the thickness main pipe * \param w1 - the thickness of main pipe
* \param l1 - the half-length of main pipe * \param l1 - the half-length of main pipe
* \param r2 - the internal radius of incident pipe * \param r2 - the internal radius of incident pipe
* \param w2 - the thickness incident pipe * \param w2 - the thickness of incident pipe
* \param l2 - the half-length of main pipe * \param l2 - the half-length of main pipe
* \retval TopoDS_Shape - Resulting shape * \retval TopoDS_Shape - Resulting shape
*/ */
TopoDS_Shape MakeQuarterPipeTShape(double r1, double w1, double l1, double r2, double w2, double l2) const; TopoDS_Shape MakeQuarterPipeTShape(double r1, double w1, double l1,
double r2, double w2, double l2) const;
//=======================================================================
//function : GetShapesOnSurfaceIDs
/*! /*!
* \brief Find IDs of sub-shapes complying with given status about surface * \brief Find IDs of sub-shapes complying with given status about surface
* \param theSurface - the surface to check state of sub-shapes against * \param theSurface - the surface to check state of sub-shapes against
@ -164,8 +165,7 @@ private:
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
TopAbs_ShapeEnum theShapeType, TopAbs_ShapeEnum theShapeType,
GEOMAlgo_State theState) const; GEOMAlgo_State theState) const;
//=======================================================================
//function : getShapesOnBoxIDs
/*! /*!
* \brief Find IDs of sub-shapes complying with given status about surface * \brief Find IDs of sub-shapes complying with given status about surface
* \param theBox - the box to check state of sub-shapes against * \param theBox - the box to check state of sub-shapes against
@ -174,7 +174,6 @@ private:
* \param theState - required state * \param theState - required state
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
*/ */
//=======================================================================
Handle(TColStd_HSequenceOfInteger) Handle(TColStd_HSequenceOfInteger)
GetShapesOnBoxIDs(const TopoDS_Shape& aBox, GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
const TopoDS_Shape& aShape, const TopoDS_Shape& aShape,
@ -188,7 +187,7 @@ private:
//======================================================================= //=======================================================================
void GetCommonShapesOnCylinders(const TopoDS_Shape& theShape, void GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
TopAbs_ShapeEnum theShapeType, TopAbs_ShapeEnum theShapeType,
double r, double r2, double r, double r2,
Handle(TopTools_HSequenceOfShape)& commonShapes) const; Handle(TopTools_HSequenceOfShape)& commonShapes) const;
}; };

View File

@ -32,6 +32,8 @@
// OCCT Includes // OCCT Includes
#include <BRepMesh_IncrementalMesh.hxx> #include <BRepMesh_IncrementalMesh.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>
#include <BRep_Tool.hxx> #include <BRep_Tool.hxx>
#include <BRepBndLib.hxx> #include <BRepBndLib.hxx>
@ -53,6 +55,7 @@
#include <TopTools_MapOfShape.hxx> #include <TopTools_MapOfShape.hxx>
#include <TopTools_ListOfShape.hxx> #include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx> #include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <Geom_Surface.hxx> #include <Geom_Surface.hxx>
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
@ -63,6 +66,8 @@
#include <GProp_GProps.hxx> #include <GProp_GProps.hxx>
#include <GProp_PrincipalProps.hxx> #include <GProp_PrincipalProps.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <gp_Pln.hxx> #include <gp_Pln.hxx>
#include <gp_Lin.hxx> #include <gp_Lin.hxx>
@ -427,6 +432,34 @@ TopoDS_Shape GEOMUtils::CompsolidToCompound (const TopoDS_Shape& theCompsolid)
return aCompound; return aCompound;
} }
//=======================================================================
//function : AddSimpleShapes
//purpose :
//=======================================================================
void GEOMUtils::AddSimpleShapes (const TopoDS_Shape& theShape, TopTools_ListOfShape& theList)
{
if (theShape.ShapeType() != TopAbs_COMPOUND &&
theShape.ShapeType() != TopAbs_COMPSOLID) {
theList.Append(theShape);
return;
}
TopTools_MapOfShape mapShape;
TopoDS_Iterator It (theShape, Standard_True, Standard_True);
for (; It.More(); It.Next()) {
TopoDS_Shape aShape_i = It.Value();
if (mapShape.Add(aShape_i)) {
if (aShape_i.ShapeType() == TopAbs_COMPOUND ||
aShape_i.ShapeType() == TopAbs_COMPSOLID) {
AddSimpleShapes(aShape_i, theList);
} else {
theList.Append(aShape_i);
}
}
}
}
//======================================================================= //=======================================================================
//function : CheckTriangulation //function : CheckTriangulation
//purpose : //purpose :
@ -497,3 +530,71 @@ TopAbs_ShapeEnum GEOMUtils::GetTypeOfSimplePart (const TopoDS_Shape& theShape)
} }
return TopAbs_SHAPE; return TopAbs_SHAPE;
} }
//=======================================================================
//function : GetEdgeNearPoint
//purpose :
//=======================================================================
TopoDS_Shape GEOMUtils::GetEdgeNearPoint (const TopoDS_Shape& theShape,
const TopoDS_Vertex& thePoint)
{
TopoDS_Shape aResult;
// 1. Explode the shape on edges
TopTools_MapOfShape mapShape;
Standard_Integer nbEdges = 0;
TopExp_Explorer exp (theShape, TopAbs_EDGE);
for (; exp.More(); exp.Next()) {
if (mapShape.Add(exp.Current())) {
nbEdges++;
}
}
if (nbEdges == 0)
Standard_NullObject::Raise("Given shape contains no edges");
mapShape.Clear();
Standard_Integer ind = 1;
TopTools_Array1OfShape anEdges (1, nbEdges);
TColStd_Array1OfReal aDistances (1, nbEdges);
for (exp.Init(theShape, TopAbs_EDGE); exp.More(); exp.Next()) {
if (mapShape.Add(exp.Current())) {
TopoDS_Shape anEdge = exp.Current();
anEdges(ind) = anEdge;
// 2. Classify the point relatively each edge
BRepExtrema_DistShapeShape aDistTool (thePoint, anEdges(ind));
if (!aDistTool.IsDone())
Standard_ConstructionError::Raise("Cannot find a distance from the given point to one of edges");
aDistances(ind) = aDistTool.Value();
ind++;
}
}
// 3. Define edge, having minimum distance to the point
Standard_Real nearest = RealLast(), nbFound = 0;
Standard_Real prec = Precision::Confusion();
for (ind = 1; ind <= nbEdges; ind++) {
if (Abs(aDistances(ind) - nearest) < prec) {
nbFound++;
}
else if (aDistances(ind) < nearest) {
nearest = aDistances(ind);
aResult = anEdges(ind);
nbFound = 1;
}
else {
}
}
if (nbFound > 1) {
Standard_ConstructionError::Raise("Multiple edges near the given point are found");
}
else if (nbFound == 0) {
Standard_ConstructionError::Raise("There are no edges near the given point");
}
else {
}
return aResult;
}

View File

@ -23,6 +23,7 @@
#define _GEOMUtils_HXX_ #define _GEOMUtils_HXX_
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_ListOfShape.hxx> #include <TopTools_ListOfShape.hxx>
@ -89,6 +90,17 @@ class GEOMUtils {
*/ */
Standard_EXPORT static TopoDS_Shape CompsolidToCompound (const TopoDS_Shape& theCompsolid); Standard_EXPORT static TopoDS_Shape CompsolidToCompound (const TopoDS_Shape& theCompsolid);
/*!
* \brief Recursively extract all shapes from compounds and compsolids of the given shape into theList.
*
* If theShape is not compound or compsolid, theList will contain only theShape itself.
*
* \param theShape The shape to be exploded.
* \param theList Output parameter.
*/
Standard_EXPORT static void AddSimpleShapes (const TopoDS_Shape& theShape,
TopTools_ListOfShape& theList);
/*! /*!
* \brief Build a triangulation on \a theShape if it is absent. * \brief Build a triangulation on \a theShape if it is absent.
* \param theShape The shape to check/build triangulation on. * \param theShape The shape to check/build triangulation on.
@ -103,6 +115,16 @@ class GEOMUtils {
*/ */
Standard_EXPORT static TopAbs_ShapeEnum GetTypeOfSimplePart (const TopoDS_Shape& theShape); Standard_EXPORT static TopAbs_ShapeEnum GetTypeOfSimplePart (const TopoDS_Shape& theShape);
/*!
* \brief Find an edge of theShape, closest to thePoint.
*
* \param theShape The shape to explore.
* \param thePoint The point near the required edge.
* \retval TopoDS_Shape Returns the found edge or an empty shape if multiple edges found.
*/
Standard_EXPORT static TopoDS_Shape GetEdgeNearPoint (const TopoDS_Shape& theShape,
const TopoDS_Vertex& thePoint);
}; };
#endif #endif

View File

@ -15,11 +15,10 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : GEOM_IAdvancedOperations.cc // File : GEOM_IAdvancedOperations.cc
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#include <Standard_Stream.hxx> #include <Standard_Stream.hxx>
#include "GEOM_IAdvancedOperations_i.hh" #include "GEOM_IAdvancedOperations_i.hh"
@ -68,8 +67,10 @@ GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i()
* \return List of GEOM_Objects, containing the created shape and propagation groups. * \return List of GEOM_Objects, containing the created shape and propagation groups.
*/ */
//============================================================================= //=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Boolean theHexMesh) (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Boolean theHexMesh)
{ {
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
@ -77,10 +78,13 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape (CORBA::Double theR1,
GetOperations()->SetNotDone(); GetOperations()->SetNotDone();
//Create the TShape //Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh); Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
theHexMesh);
if (!GetOperations()->IsDone() || aHSeq.IsNull()) if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn(); return aSeq._retn();
Standard_Integer aLength = aHSeq->Length(); Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength); aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++) for (Standard_Integer i = 1; i <= aLength; i++)
@ -109,9 +113,11 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape (CORBA::Double theR1,
* \return List of GEOM_Objects, containing the created shape and propagation groups. * \return List of GEOM_Objects, containing the created shape and propagation groups.
*/ */
//============================================================================= //=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Boolean theHexMesh, (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3) CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
{ {
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
@ -125,10 +131,13 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::D
if (aP1.IsNull() || aP2.IsNull() || aP3.IsNull())return aSeq._retn(); if (aP1.IsNull() || aP2.IsNull() || aP3.IsNull())return aSeq._retn();
//Create the TShape //Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, aP1, aP2, aP3); Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
theHexMesh, aP1, aP2, aP3);
if (!GetOperations()->IsDone() || aHSeq.IsNull()) if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn(); return aSeq._retn();
Standard_Integer aLength = aHSeq->Length(); Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength); aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++) for (Standard_Integer i = 1; i <= aLength; i++)
@ -156,9 +165,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::D
* \return List of GEOM_Objects, containing the created shape and propagation groups. * \return List of GEOM_Objects, containing the created shape and propagation groups.
*/ */
//============================================================================= //=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh) CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
{ {
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
@ -166,10 +176,13 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double
GetOperations()->SetNotDone(); GetOperations()->SetNotDone();
//Create the TShape //Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh); Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
theH, theW, theHexMesh);
if (!GetOperations()->IsDone() || aHSeq.IsNull()) if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn(); return aSeq._retn();
Standard_Integer aLength = aHSeq->Length(); Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength); aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++) for (Standard_Integer i = 1; i <= aLength; i++)
@ -201,10 +214,11 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double
* \return List of GEOM_Objects, containing the created shape and propagation groups. * \return List of GEOM_Objects, containing the created shape and propagation groups.
*/ */
//============================================================================= //=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh, CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3) CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
{ {
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
@ -217,11 +231,13 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition (C
Handle(GEOM_Object) aP3 = GetObjectImpl(theP3); Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
//Create the TShape //Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Handle(TColStd_HSequenceOfTransient) aHSeq =
theHexMesh, aP1, aP2, aP3); GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
theH, theW, theHexMesh, aP1, aP2, aP3);
if (!GetOperations()->IsDone() || aHSeq.IsNull()) if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn(); return aSeq._retn();
Standard_Integer aLength = aHSeq->Length(); Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength); aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++) for (Standard_Integer i = 1; i <= aLength; i++)
@ -248,9 +264,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition (C
* \return List of GEOM_Objects, containing the created shape and propagation groups. * \return List of GEOM_Objects, containing the created shape and propagation groups.
*/ */
//============================================================================= //=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theRF, CORBA::Boolean theHexMesh) CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRF, CORBA::Boolean theHexMesh)
{ {
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
@ -258,10 +275,13 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet (CORBA::Double
GetOperations()->SetNotDone(); GetOperations()->SetNotDone();
//Create the TShape //Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh); Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
theRF, theHexMesh);
if (!GetOperations()->IsDone() || aHSeq.IsNull()) if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn(); return aSeq._retn();
Standard_Integer aLength = aHSeq->Length(); Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength); aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++) for (Standard_Integer i = 1; i <= aLength; i++)
@ -292,10 +312,11 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet (CORBA::Double
* \return List of GEOM_Objects, containing the created shape and propagation groups. * \return List of GEOM_Objects, containing the created shape and propagation groups.
*/ */
//============================================================================= //=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theRF, CORBA::Boolean theHexMesh, CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3) CORBA::Double theRF, CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
{ {
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
@ -308,11 +329,336 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition (CO
Handle(GEOM_Object) aP3 = GetObjectImpl(theP3); Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
//Create the TShape //Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, Handle(TColStd_HSequenceOfTransient) aHSeq =
theHexMesh, aP1, aP2, aP3); GetOperations()->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
theRF, theHexMesh, aP1, aP2, aP3);
if (!GetOperations()->IsDone() || aHSeq.IsNull()) if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn(); return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
//=============================================================================
/*!
* MakePipeTShapeTR
* Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length).
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh
* \return List of GEOM_Objects, containing the created shape and propagation groups.
*/
//=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTR
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Boolean theHexMesh)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Set a not done flag
GetOperations()->SetNotDone();
//Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theHexMesh);
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
//=============================================================================
/*!
* MakePipeTShapeTRWithPosition
* Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length).
* The extremities of the main pipe are located on junctions points P1 and P2.
* The extremity of the incident pipe is located on junction point P3.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh
* \param theP1 1st junction point of main pipe
* \param theP2 2nd junction point of main pipe
* \param theP3 Junction point of incident pipe
* \return List of GEOM_Objects, containing the created shape and propagation groups.
*/
//=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRWithPosition
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Set a not done flag
GetOperations()->SetNotDone();
//Get the reference vertices
Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
if (aP1.IsNull() || aP2.IsNull() || aP3.IsNull()) return aSeq._retn();
//Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theHexMesh, aP1, aP2, aP3);
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
//=============================================================================
/*!
* MakePipeTShapeTRChamfer
* Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length). A chamfer is created
* on the junction of the pipes.
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
* \param theH Height of chamfer.
* \param theW Width of chamfer.
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh
* \return List of GEOM_Objects, containing the created shape and propagation groups.
*/
//=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamfer
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Set a not done flag
GetOperations()->SetNotDone();
//Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theH, theW, theHexMesh);
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
//=============================================================================
/*!
* MakePipeTShapeTRChamferWithPosition
* Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length). A chamfer is created
* on the junction of the pipes.
* The extremities of the main pipe are located on junctions points P1 and P2.
* The extremity of the incident pipe is located on junction point P3.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
* \param theH Height of the chamfer.
* \param theW Width of the chamfer.
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh
* \param theP1 1st junction point of main pipe
* \param theP2 2nd junction point of main pipe
* \param theP3 Junction point of incident pipe
* \return List of GEOM_Objects, containing the created shape and propagation groups.
*/
//=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRChamferWithPosition
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Set a not done flag
GetOperations()->SetNotDone();
//Get the reference vertices
Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
//Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theH, theW, theHexMesh, aP1, aP2, aP3);
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
//=============================================================================
/*!
* MakePipeTShapeTRFillet
* Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length). A fillet is created
* on the junction of the pipes.
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
* \param theRF Radius of curvature of fillet.
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh
* \return List of GEOM_Objects, containing the created shape and propagation groups.
*/
//=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFillet
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Double theRF, CORBA::Boolean theHexMesh)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Set a not done flag
GetOperations()->SetNotDone();
//Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theRF, theHexMesh);
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++)
aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
return aSeq._retn();
}
//=============================================================================
/*!
* MakePipeTShapeTRFilletWithPosition
* Create a T-shape object with specified caracteristics for the main and
* the incident pipes (radius, width, half-length). A fillet is created
* on the junction of the pipes.
* The extremities of the main pipe are located on junctions points P1 and P2.
* The extremity of the incident pipe is located on junction point P3.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
* \param theL1 Half-length of main pipe
* \param theR2 Internal radius of incident pipe (R2 < R1)
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
* \param theL2 Half-length of incident pipe
* \param theRF Radius of curvature of fillet
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh
* \param theP1 1st junction point of main pipe
* \param theP2 2nd junction point of main pipe
* \param theP3 Junction point of incident pipe
* \return List of GEOM_Objects, containing the created shape and propagation groups.
*/
//=============================================================================
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeTRFilletWithPosition
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Double theRF, CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
//Set a not done flag
GetOperations()->SetNotDone();
//Get the reference vertices
Handle(GEOM_Object) aP1 = GetObjectImpl(theP1);
Handle(GEOM_Object) aP2 = GetObjectImpl(theP2);
Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
//Create the TShape
Handle(TColStd_HSequenceOfTransient) aHSeq =
GetOperations()->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theRF, theHexMesh, aP1, aP2, aP3);
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
Standard_Integer aLength = aHSeq->Length(); Standard_Integer aLength = aHSeq->Length();
aSeq->length(aLength); aSeq->length(aLength);
for (Standard_Integer i = 1; i <= aLength; i++) for (Standard_Integer i = 1; i <= aLength; i++)
@ -330,8 +676,8 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition (CO
* \return New GEOM_Object, containing the created shape. * \return New GEOM_Object, containing the created shape.
*/ */
//============================================================================= //=============================================================================
GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double theR, GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double theR,
CORBA::Double theRatio, CORBA::Double theRatio,
CORBA::Short theOrientation, CORBA::Short theOrientation,
GEOM::pattern thePattern) GEOM::pattern thePattern)
{ {
@ -353,7 +699,7 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDisk (CORBA::Double
* MakeDividedDiskPntVecR * MakeDividedDiskPntVecR
*/ */
//============================================================================= //=============================================================================
GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr thePnt,
GEOM::GEOM_Object_ptr theVec, GEOM::GEOM_Object_ptr theVec,
CORBA::Double theR, CORBA::Double theR,
CORBA::Double theRatio, CORBA::Double theRatio,
@ -387,7 +733,7 @@ GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedDiskPntVecR (GEOM::
* \return New GEOM_Object, containing the created shape. * \return New GEOM_Object, containing the created shape.
*/ */
//============================================================================= //=============================================================================
GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Double theR, GEOM::GEOM_Object_ptr GEOM_IAdvancedOperations_i::MakeDividedCylinder (CORBA::Double theR,
CORBA::Double theH, CORBA::Double theH,
GEOM::pattern thePattern) GEOM::pattern thePattern)
{ {

View File

@ -15,11 +15,10 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : GEOM_IAdvancedOperations.hh // File : GEOM_IAdvancedOperations.hh
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
//
#ifndef _GEOM_IAdvancedOperations_i_HeaderFile #ifndef _GEOM_IAdvancedOperations_i_HeaderFile
#define _GEOM_IAdvancedOperations_i_HeaderFile #define _GEOM_IAdvancedOperations_i_HeaderFile
@ -39,43 +38,91 @@ class GEOM_I_EXPORT GEOM_IAdvancedOperations_i :
{ {
public: public:
GEOM_IAdvancedOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, GEOM_IAdvancedOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
::GEOMImpl_IAdvancedOperations* theImpl); ::GEOMImpl_IAdvancedOperations* theImpl);
~GEOM_IAdvancedOperations_i(); ~GEOM_IAdvancedOperations_i();
GEOM::ListOfGO* MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, // PipeTShape without thickness reduction
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, GEOM::ListOfGO* MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Boolean theHexMesh); CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
GEOM::ListOfGO* MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, CORBA::Boolean theHexMesh);
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, GEOM::ListOfGO* MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Boolean theHexMesh, CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3); CORBA::Boolean theHexMesh,
GEOM::ListOfGO* MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, GEOM::ListOfGO* MakePipeTShapeChamfer (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh); CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
GEOM::ListOfGO* MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, GEOM::ListOfGO* MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh, CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3); CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
GEOM::ListOfGO* MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, GEOM::ListOfGO* MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theRF, CORBA::Boolean theHexMesh); CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
GEOM::ListOfGO* MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1, CORBA::Double theRF, CORBA::Boolean theHexMesh);
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, GEOM::ListOfGO* MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theRF, CORBA::Boolean theHexMesh, CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3); CORBA::Double theRF, CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
GEOM::GEOM_Object_ptr MakeDividedDisk (CORBA::Double theR,
CORBA::Double theRatio, // PipeTShape with thickness reduction
GEOM::ListOfGO* MakePipeTShapeTR
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Boolean theHexMesh);
GEOM::ListOfGO* MakePipeTShapeTRWithPosition
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
GEOM::ListOfGO* MakePipeTShapeTRChamfer
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh);
GEOM::ListOfGO* MakePipeTShapeTRChamferWithPosition
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
GEOM::ListOfGO* MakePipeTShapeTRFillet
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Double theRF, CORBA::Boolean theHexMesh);
GEOM::ListOfGO* MakePipeTShapeTRFilletWithPosition
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
CORBA::Double theRL, CORBA::Double theWL, CORBA::Double theLtransL, CORBA::Double theLthinL,
CORBA::Double theRR, CORBA::Double theWR, CORBA::Double theLtransR, CORBA::Double theLthinR,
CORBA::Double theRI, CORBA::Double theWI, CORBA::Double theLtransI, CORBA::Double theLthinI,
CORBA::Double theRF, CORBA::Boolean theHexMesh,
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
GEOM::GEOM_Object_ptr MakeDividedDisk (CORBA::Double theR,
CORBA::Double theRatio,
CORBA::Short theOrientation, CORBA::Short theOrientation,
GEOM::pattern thePattern); GEOM::pattern thePattern);
GEOM::GEOM_Object_ptr MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr theCenter, GEOM::GEOM_Object_ptr MakeDividedDiskPntVecR (GEOM::GEOM_Object_ptr theCenter,
GEOM::GEOM_Object_ptr theVector, GEOM::GEOM_Object_ptr theVector,
CORBA::Double theR, CORBA::Double theR,
CORBA::Double theRatio, CORBA::Double theRatio,
GEOM::pattern thePattern); GEOM::pattern thePattern);
GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR, GEOM::GEOM_Object_ptr MakeDividedCylinder (CORBA::Double theR,
CORBA::Double theH, CORBA::Double theH,
GEOM::pattern thePattern); GEOM::pattern thePattern);
/*@@ insert new functions before this line @@ do not remove this line @@*/ /*@@ insert new functions before this line @@ do not remove this line @@*/

View File

@ -11514,16 +11514,34 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# The extremity of the incident pipe is located on junction point P3. # The extremity of the incident pipe is located on junction point P3.
# If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and # If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
# the main plane of the T-shape is XOY. # the main plane of the T-shape is XOY.
#
# @param theR1 Internal radius of main pipe # @param theR1 Internal radius of main pipe
# @param theW1 Width of main pipe # @param theW1 Width of main pipe
# @param theL1 Half-length of main pipe # @param theL1 Half-length of main pipe
# @param theR2 Internal radius of incident pipe (R2 < R1) # @param theR2 Internal radius of incident pipe (R2 < R1)
# @param theW2 Width of incident pipe (R2+W2 < R1+W1) # @param theW2 Width of incident pipe (R2+W2 < R1+W1)
# @param theL2 Half-length of incident pipe # @param theL2 Half-length of incident pipe
#
# @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True) # @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
# @param theP1 1st junction point of main pipe # @param theP1 1st junction point of main pipe
# @param theP2 2nd junction point of main pipe # @param theP2 2nd junction point of main pipe
# @param theP3 Junction point of incident pipe # @param theP3 Junction point of incident pipe
#
# @param theRL Internal radius of left thickness reduction
# @param theWL Width of left thickness reduction
# @param theLtransL Length of left transition part
# @param theLthinL Length of left thin part
#
# @param theRR Internal radius of right thickness reduction
# @param theWR Width of right thickness reduction
# @param theLtransR Length of right transition part
# @param theLthinR Length of right thin part
#
# @param theRI Internal radius of incident thickness reduction
# @param theWI Width of incident thickness reduction
# @param theLtransI Length of incident transition part
# @param theLthinI Length of incident thin part
#
# @param theName Object name; when specified, this parameter is used # @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic # for result publication in the study. Otherwise, if automatic
# publication is switched on, default value is used for result name. # publication is switched on, default value is used for result name.
@ -11531,7 +11549,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# @return List of GEOM.GEOM_Object, containing the created shape and propagation groups. # @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
# #
# @ref tui_creation_pipetshape "Example" # @ref tui_creation_pipetshape "Example"
def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None, theName=None): def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
theHexMesh=True, theP1=None, theP2=None, theP3=None,
theRL=0, theWL=0, theLtransL=0, theLthinL=0,
theRR=0, theWR=0, theLtransR=0, theLthinR=0,
theRI=0, theWI=0, theLtransI=0, theLthinI=0,
theName=None):
""" """
Create a T-shape object with specified caracteristics for the main Create a T-shape object with specified caracteristics for the main
and the incident pipes (radius, width, half-length). and the incident pipes (radius, width, half-length).
@ -11540,7 +11563,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
the main plane of the T-shape is XOY. the main plane of the T-shape is XOY.
Paremeters: Parameters:
theR1 Internal radius of main pipe theR1 Internal radius of main pipe
theW1 Width of main pipe theW1 Width of main pipe
theL1 Half-length of main pipe theL1 Half-length of main pipe
@ -11551,6 +11574,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
theP1 1st junction point of main pipe theP1 1st junction point of main pipe
theP2 2nd junction point of main pipe theP2 2nd junction point of main pipe
theP3 Junction point of incident pipe theP3 Junction point of incident pipe
theRL Internal radius of left thickness reduction
theWL Width of left thickness reduction
theLtransL Length of left transition part
theLthinL Length of left thin part
theRR Internal radius of right thickness reduction
theWR Width of right thickness reduction
theLtransR Length of right transition part
theLthinR Length of right thin part
theRI Internal radius of incident thickness reduction
theWI Width of incident thickness reduction
theLtransI Length of incident transition part
theLthinI Length of incident thin part
theName Object name; when specified, this parameter is used theName Object name; when specified, this parameter is used
for result publication in the study. Otherwise, if automatic for result publication in the study. Otherwise, if automatic
publication is switched on, default value is used for result name. publication is switched on, default value is used for result name.
@ -11563,12 +11602,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0) pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
# create PipeTShape object with position # create PipeTShape object with position
pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3) pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
# create PipeTShape object with left thickness reduction
pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
""" """
theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2) theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
if (theP1 and theP2 and theP3): if (theP1 and theP2 and theP3):
anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3) anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theHexMesh, theP1, theP2, theP3)
else: else:
anObj = self.AdvOp.MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh) anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theHexMesh)
RaiseIfFailed("MakePipeTShape", self.AdvOp) RaiseIfFailed("MakePipeTShape", self.AdvOp)
if Parameters: anObj[0].SetParameters(Parameters) if Parameters: anObj[0].SetParameters(Parameters)
def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ] def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
@ -11594,6 +11643,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# @param theP1 1st junction point of main pipe # @param theP1 1st junction point of main pipe
# @param theP2 2nd junction point of main pipe # @param theP2 2nd junction point of main pipe
# @param theP3 Junction point of incident pipe # @param theP3 Junction point of incident pipe
#
# @param theRL Internal radius of left thickness reduction
# @param theWL Width of left thickness reduction
# @param theLtransL Length of left transition part
# @param theLthinL Length of left thin part
#
# @param theRR Internal radius of right thickness reduction
# @param theWR Width of right thickness reduction
# @param theLtransR Length of right transition part
# @param theLthinR Length of right thin part
#
# @param theRI Internal radius of incident thickness reduction
# @param theWI Width of incident thickness reduction
# @param theLtransI Length of incident transition part
# @param theLthinI Length of incident thin part
#
# @param theName Object name; when specified, this parameter is used # @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic # for result publication in the study. Otherwise, if automatic
# publication is switched on, default value is used for result name. # publication is switched on, default value is used for result name.
@ -11601,7 +11666,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# @return List of GEOM.GEOM_Object, containing the created shape and propagation groups. # @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
# #
# @ref tui_creation_pipetshape "Example" # @ref tui_creation_pipetshape "Example"
def MakePipeTShapeChamfer(self, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None, theName=None): def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
theRL=0, theWL=0, theLtransL=0, theLthinL=0,
theRR=0, theWR=0, theLtransR=0, theLthinR=0,
theRI=0, theWI=0, theLtransI=0, theLthinI=0,
theName=None):
""" """
Create a T-shape object with chamfer and with specified caracteristics for the main Create a T-shape object with chamfer and with specified caracteristics for the main
and the incident pipes (radius, width, half-length). The chamfer is and the incident pipes (radius, width, half-length). The chamfer is
@ -11611,7 +11681,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
the main plane of the T-shape is XOY. the main plane of the T-shape is XOY.
Paremeters: Parameters:
theR1 Internal radius of main pipe theR1 Internal radius of main pipe
theW1 Width of main pipe theW1 Width of main pipe
theL1 Half-length of main pipe theL1 Half-length of main pipe
@ -11624,6 +11694,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
theP1 1st junction point of main pipe theP1 1st junction point of main pipe
theP2 2nd junction point of main pipe theP2 2nd junction point of main pipe
theP3 Junction point of incident pipe theP3 Junction point of incident pipe
theRL Internal radius of left thickness reduction
theWL Width of left thickness reduction
theLtransL Length of left transition part
theLthinL Length of left thin part
theRR Internal radius of right thickness reduction
theWR Width of right thickness reduction
theLtransR Length of right transition part
theLthinR Length of right thin part
theRI Internal radius of incident thickness reduction
theWI Width of incident thickness reduction
theLtransI Length of incident transition part
theLthinI Length of incident thin part
theName Object name; when specified, this parameter is used theName Object name; when specified, this parameter is used
for result publication in the study. Otherwise, if automatic for result publication in the study. Otherwise, if automatic
publication is switched on, default value is used for result name. publication is switched on, default value is used for result name.
@ -11636,12 +11722,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0) pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
# create PipeTShape with chamfer object with position # create PipeTShape with chamfer object with position
pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3) pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
# create PipeTShape with chamfer object with left thickness reduction
pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
""" """
theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW) theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
if (theP1 and theP2 and theP3): if (theP1 and theP2 and theP3):
anObj = self.AdvOp.MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3) anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theH, theW, theHexMesh, theP1, theP2, theP3)
else: else:
anObj = self.AdvOp.MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh) anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theH, theW, theHexMesh)
RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp) RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
if Parameters: anObj[0].SetParameters(Parameters) if Parameters: anObj[0].SetParameters(Parameters)
def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ] def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
@ -11666,6 +11762,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# @param theP1 1st junction point of main pipe # @param theP1 1st junction point of main pipe
# @param theP2 2nd junction point of main pipe # @param theP2 2nd junction point of main pipe
# @param theP3 Junction point of incident pipe # @param theP3 Junction point of incident pipe
#
# @param theRL Internal radius of left thickness reduction
# @param theWL Width of left thickness reduction
# @param theLtransL Length of left transition part
# @param theLthinL Length of left thin part
#
# @param theRR Internal radius of right thickness reduction
# @param theWR Width of right thickness reduction
# @param theLtransR Length of right transition part
# @param theLthinR Length of right thin part
#
# @param theRI Internal radius of incident thickness reduction
# @param theWI Width of incident thickness reduction
# @param theLtransI Length of incident transition part
# @param theLthinI Length of incident thin part
#
# @param theName Object name; when specified, this parameter is used # @param theName Object name; when specified, this parameter is used
# for result publication in the study. Otherwise, if automatic # for result publication in the study. Otherwise, if automatic
# publication is switched on, default value is used for result name. # publication is switched on, default value is used for result name.
@ -11673,7 +11785,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
# @return List of GEOM.GEOM_Object, containing the created shape and propagation groups. # @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
# #
# @ref tui_creation_pipetshape "Example" # @ref tui_creation_pipetshape "Example"
def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None, theName=None): def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
theRL=0, theWL=0, theLtransL=0, theLthinL=0,
theRR=0, theWR=0, theLtransR=0, theLthinR=0,
theRI=0, theWI=0, theLtransI=0, theLthinI=0,
theName=None):
""" """
Create a T-shape object with fillet and with specified caracteristics for the main Create a T-shape object with fillet and with specified caracteristics for the main
and the incident pipes (radius, width, half-length). The fillet is and the incident pipes (radius, width, half-length). The fillet is
@ -11681,7 +11798,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
The extremities of the main pipe are located on junctions points P1 and P2. The extremities of the main pipe are located on junctions points P1 and P2.
The extremity of the incident pipe is located on junction point P3. The extremity of the incident pipe is located on junction point P3.
Paremeters: Parameters:
If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
the main plane of the T-shape is XOY. the main plane of the T-shape is XOY.
theR1 Internal radius of main pipe theR1 Internal radius of main pipe
@ -11695,6 +11812,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
theP1 1st junction point of main pipe theP1 1st junction point of main pipe
theP2 2nd junction point of main pipe theP2 2nd junction point of main pipe
theP3 Junction point of incident pipe theP3 Junction point of incident pipe
theRL Internal radius of left thickness reduction
theWL Width of left thickness reduction
theLtransL Length of left transition part
theLthinL Length of left thin part
theRR Internal radius of right thickness reduction
theWR Width of right thickness reduction
theLtransR Length of right transition part
theLthinR Length of right thin part
theRI Internal radius of incident thickness reduction
theWI Width of incident thickness reduction
theLtransI Length of incident transition part
theLthinI Length of incident thin part
theName Object name; when specified, this parameter is used theName Object name; when specified, this parameter is used
for result publication in the study. Otherwise, if automatic for result publication in the study. Otherwise, if automatic
publication is switched on, default value is used for result name. publication is switched on, default value is used for result name.
@ -11707,13 +11840,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0) pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
# create PipeTShape with fillet object with position # create PipeTShape with fillet object with position
pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3) pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
# create PipeTShape with fillet object with left thickness reduction
pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
""" """
theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF) theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
if (theP1 and theP2 and theP3): if (theP1 and theP2 and theP3):
anObj = self.AdvOp.MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3) anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theRF, theHexMesh, theP1, theP2, theP3)
else: else:
anObj = self.AdvOp.MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh) anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
theRL, theWL, theLtransL, theLthinL,
theRR, theWR, theLtransR, theLthinR,
theRI, theWI, theLtransI, theLthinI,
theRF, theHexMesh)
RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp) RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
if Parameters: anObj[0].SetParameters(Parameters) if Parameters: anObj[0].SetParameters(Parameters)
def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ] def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
@ -11847,7 +11989,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
""" """
Create a copy of the given object Create a copy of the given object
Paremeters: Parameters:
theOriginal geometry object for copy theOriginal geometry object for copy
theName Object name; when specified, this parameter is used theName Object name; when specified, this parameter is used
for result publication in the study. Otherwise, if automatic for result publication in the study. Otherwise, if automatic