mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-24 16:30:35 +05:00
Merge from V6_main 15/03/2013
This commit is contained in:
parent
3392cb794a
commit
4ab1782428
@ -27,6 +27,16 @@ id_pipetshape_position = geompy.addToStudy(pipetshape_position[0],"PipeTShape_po
|
||||
for g in pipetshape_position[1:]:
|
||||
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
|
||||
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:]:
|
||||
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
|
||||
pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
|
||||
|
||||
@ -63,11 +84,27 @@ id_pipetshapefillet_position = geompy.addToStudy(pipetshapefillet_position[0],"P
|
||||
for g in pipetshapefillet_position[1:]:
|
||||
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
|
||||
gg.createAndDisplayGO(id_pipetshape)
|
||||
gg.createAndDisplayGO(id_pipetshape_position)
|
||||
gg.createAndDisplayGO(id_pipetshape_thr)
|
||||
gg.createAndDisplayGO(id_pipetshapechamfer)
|
||||
gg.createAndDisplayGO(id_pipetshapechamfer_position)
|
||||
gg.createAndDisplayGO(id_pipetshapechamfer_thr)
|
||||
gg.createAndDisplayGO(id_pipetshapefillet)
|
||||
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 |
BIN
doc/salome/gui/GEOM/images/pipetshape_pos_dlg.png
Normal file
BIN
doc/salome/gui/GEOM/images/pipetshape_pos_dlg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
doc/salome/gui/GEOM/images/pipetshape_thr_dlg.png
Normal file
BIN
doc/salome/gui/GEOM/images/pipetshape_thr_dlg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
BIN
doc/salome/gui/GEOM/images/pipetshapethr.png
Normal file
BIN
doc/salome/gui/GEOM/images/pipetshapethr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -8,6 +8,16 @@ Specify the parameters of the PipeTShape object in the opened dialog
|
||||
box and press "Apply" or "Apply & Close" button.
|
||||
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>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 L2 - Length of the incident T-shape pipe.
|
||||
- \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 P2 - Second junction point of the main 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:
|
||||
|
||||
\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>
|
||||
|
||||
@ -42,7 +50,7 @@ Example:
|
||||
|
||||
\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>
|
||||
|
||||
@ -53,6 +61,35 @@ Example:
|
||||
|
||||
\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
|
||||
\ref tui_creation_pipetshape "Advanced objects".
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>$title</title>
|
||||
<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
|
||||
$search
|
||||
$mathjax
|
||||
|
@ -5,6 +5,8 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>$title</title>
|
||||
<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
|
||||
$search
|
||||
$mathjax
|
||||
|
@ -5,6 +5,8 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<title>$title</title>
|
||||
<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
|
||||
$search
|
||||
$mathjax
|
||||
|
252
idl/GEOM_Gen.idl
252
idl/GEOM_Gen.idl
@ -3935,6 +3935,8 @@ module GEOM
|
||||
*/
|
||||
interface GEOM_IAdvancedOperations : GEOM_IOperations
|
||||
{
|
||||
// T-Shape WITHOUT Thickness reduction
|
||||
|
||||
/*!
|
||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||
* the incident pipes (radius, width, half-length).
|
||||
@ -4062,6 +4064,256 @@ module GEOM
|
||||
in double theR2, in double theW2, in double theL2,
|
||||
in double theRF, in boolean theHexMesh,
|
||||
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
|
||||
* can be use to create divided pipes for later meshing in hexaedra.
|
||||
|
@ -244,7 +244,7 @@ coordsys.png \
|
||||
translation.png
|
||||
|
||||
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_pipetshapel1.png dlg_pipetshaper1.png dlg_pipetshapew1.png
|
||||
ADVANCED_RESOURCES += dlg_pipetshapel2.png dlg_pipetshaper2.png dlg_pipetshapew2.png
|
||||
|
BIN
resources/pipetshape_section.png
Normal file
BIN
resources/pipetshape_section.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
File diff suppressed because it is too large
Load Diff
@ -15,7 +15,6 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef ADVANCEDGUI_PIPETSHAPEDLG_H
|
||||
#define ADVANCEDGUI_PIPETSHAPEDLG_H
|
||||
@ -25,72 +24,114 @@
|
||||
class DlgRef_1Spin;
|
||||
class DlgRef_2Spin;
|
||||
class DlgRef_3Spin;
|
||||
class DlgRef_4Spin;
|
||||
class DlgRef_3Sel;
|
||||
class DlgRef_6Sel;
|
||||
class QCheckBox;
|
||||
class QLineEdit;
|
||||
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
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton {
|
||||
Q_OBJECT
|
||||
class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AdvancedGUI_PipeTShapeDlg(GeometryGUI*, QWidget* = 0);
|
||||
AdvancedGUI_PipeTShapeDlg (GeometryGUI*, QWidget* = 0);
|
||||
~AdvancedGUI_PipeTShapeDlg();
|
||||
|
||||
protected:
|
||||
// redefined from GEOMBase_Helper
|
||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||
virtual bool isValid(QString&);
|
||||
virtual bool execute(ObjectList&);
|
||||
virtual void restoreSubShapes(SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
|
||||
virtual bool isValid (QString&);
|
||||
virtual bool execute (ObjectList&);
|
||||
virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void enterEvent(QEvent*);
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void updateTshapeScreenshotLabel();
|
||||
bool CheckCompatiblePosition(GEOM::GEOM_Object_var theP1,
|
||||
void enterEvent (QEvent*);
|
||||
void resizeEvent (QResizeEvent *event);
|
||||
void updateLabelImgPipeTShape();
|
||||
bool CheckCompatiblePosition (GEOM::GEOM_Object_var theP1,
|
||||
GEOM::GEOM_Object_var theP2,
|
||||
GEOM::GEOM_Object_var theP3, double theTolerance);
|
||||
|
||||
private:
|
||||
QPixmap imagePipeTShape;
|
||||
QLabel* tshapeScreenShotLabel;
|
||||
QPixmap imageReduction;
|
||||
QLabel* LabelImgPipeTShape;
|
||||
QLabel* LabelImgReduction;
|
||||
|
||||
// Main parameters
|
||||
DlgRef_3Spin* MainTubeGroupParams;
|
||||
DlgRef_3Spin* IncidentTubeGroupParams;
|
||||
DlgRef_2Spin* ChamferGroupParams;
|
||||
DlgRef_1Spin* FilletGroupParams;
|
||||
DlgRef_6Sel* JunctionPointsSel;
|
||||
QPixmap imageImp;
|
||||
QString CssNormal, CssAcceptable, CssRefused;
|
||||
QCheckBox* HexMeshCheckBox;
|
||||
|
||||
// Thickness reduction parameters
|
||||
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;
|
||||
bool isPreview;
|
||||
ObjectList pipeTShapeGroupObjects;
|
||||
|
||||
private slots:
|
||||
void ClickOnOk();
|
||||
bool ClickOnApply();
|
||||
void ActivateThisDialog();
|
||||
void currentChanged (int);
|
||||
void SelectionIntoArgument();
|
||||
void SetEditCurrentArgument();
|
||||
void DisplayPreview(const bool activate = false, const bool update = true,
|
||||
void DisplayPreview (const bool activate = false, const bool update = true,
|
||||
const bool toRemoveFromEngine = true, const double lineWidth = -1,
|
||||
const int displayMode = -1, const int color = -1);
|
||||
virtual void processPreview();
|
||||
void SetPosition(bool);
|
||||
void ChamferOrFillet(bool);
|
||||
void SetDoubleSpinBoxStep(double);
|
||||
void ValueChangedInSpinBox( double );
|
||||
void UpdatePicture(QWidget* old, QWidget* now);
|
||||
void SetPosition (bool);
|
||||
void ChamferOrFillet (bool);
|
||||
void SetDoubleSpinBoxStep (double);
|
||||
void ValueChangedInSpinBox (double);
|
||||
void UpdatePicture (QWidget* old, QWidget* now);
|
||||
void ApplyNewDimensions();
|
||||
bool executeNoCheck( ObjectList& objects );
|
||||
bool executeNoCheck (ObjectList& objects);
|
||||
};
|
||||
|
||||
#endif // ADVANCEDGUI_PIPETSHAPEDLG_H
|
||||
|
@ -1207,6 +1207,10 @@
|
||||
<source>DLG_PIPETSHAPE</source>
|
||||
<translation>dlg_pipetshape.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IMG_PIPETSHAPE_SECT</source>
|
||||
<translation>pipetshape_section.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>DLG_PIPETSHAPE_L1</source>
|
||||
<translation>dlg_pipetshapel1.png</translation>
|
||||
|
@ -5801,6 +5801,46 @@ Do you want to create new material?</translation>
|
||||
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
|
||||
<translation>New L2</translation>
|
||||
</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>
|
||||
<name>GEOMToolsGUI_PublishDlg</name>
|
||||
|
@ -5784,6 +5784,46 @@ Voulez-vous en créer un nouveau ?</translation>
|
||||
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
|
||||
<translation>Nouvelle L2</translation>
|
||||
</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>
|
||||
<name>GEOMToolsGUI_PublishDlg</name>
|
||||
|
@ -18,13 +18,13 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#include <GEOMImpl_BooleanDriver.hxx>
|
||||
#include <GEOMImpl_IBoolean.hxx>
|
||||
#include <GEOMImpl_Types.hxx>
|
||||
#include <GEOMImpl_GlueDriver.hxx>
|
||||
#include <GEOM_Function.hxx>
|
||||
#include <GEOMUtils.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
|
||||
//purpose :
|
||||
@ -131,8 +107,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
||||
B.MakeCompound(C);
|
||||
|
||||
TopTools_ListOfShape listShape1, listShape2;
|
||||
AddSimpleShapes(aShape1, listShape1);
|
||||
AddSimpleShapes(aShape2, listShape2);
|
||||
GEOMUtils::AddSimpleShapes(aShape1, listShape1);
|
||||
GEOMUtils::AddSimpleShapes(aShape2, listShape2);
|
||||
|
||||
Standard_Boolean isCompound =
|
||||
(listShape1.Extent() > 1 || listShape2.Extent() > 1);
|
||||
@ -174,7 +150,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
||||
if (isCompound) {
|
||||
/*
|
||||
TopTools_ListOfShape listShapeC;
|
||||
AddSimpleShapes(C, listShapeC);
|
||||
GEOMUtils::AddSimpleShapes(C, listShapeC);
|
||||
TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
|
||||
bool isOnlySolids = true;
|
||||
for (; itSubC.More(); itSubC.Next()) {
|
||||
@ -203,8 +179,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
||||
B.MakeCompound(C);
|
||||
|
||||
TopTools_ListOfShape listShapes, listTools;
|
||||
AddSimpleShapes(aShape1, listShapes);
|
||||
AddSimpleShapes(aShape2, listTools);
|
||||
GEOMUtils::AddSimpleShapes(aShape1, listShapes);
|
||||
GEOMUtils::AddSimpleShapes(aShape2, listTools);
|
||||
|
||||
Standard_Boolean isCompound = (listShapes.Extent() > 1);
|
||||
|
||||
@ -245,7 +221,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
||||
if (isCompound) {
|
||||
/*
|
||||
TopTools_ListOfShape listShapeC;
|
||||
AddSimpleShapes(C, listShapeC);
|
||||
GEOMUtils::AddSimpleShapes(C, listShapeC);
|
||||
TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
|
||||
bool isOnlySolids = true;
|
||||
for (; itSubC.More(); itSubC.Next()) {
|
||||
@ -272,8 +248,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
||||
/* Fix for NPAL15379: refused
|
||||
// Check arguments
|
||||
TopTools_ListOfShape listShape1, listShape2;
|
||||
AddSimpleShapes(aShape1, listShape1);
|
||||
AddSimpleShapes(aShape2, listShape2);
|
||||
GEOMUtils::AddSimpleShapes(aShape1, listShape1);
|
||||
GEOMUtils::AddSimpleShapes(aShape2, listShape2);
|
||||
|
||||
Standard_Boolean isIntersect = Standard_False;
|
||||
|
||||
@ -360,8 +336,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
||||
B.MakeCompound(C);
|
||||
|
||||
TopTools_ListOfShape listShape1, listShape2;
|
||||
AddSimpleShapes(aShape1, listShape1);
|
||||
AddSimpleShapes(aShape2, listShape2);
|
||||
GEOMUtils::AddSimpleShapes(aShape1, listShape1);
|
||||
GEOMUtils::AddSimpleShapes(aShape2, listShape2);
|
||||
|
||||
Standard_Boolean isCompound =
|
||||
(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
|
||||
// for the case, if it contains only one sub-shape
|
||||
TopTools_ListOfShape listShapeRes;
|
||||
AddSimpleShapes(aShape, listShapeRes);
|
||||
GEOMUtils::AddSimpleShapes(aShape, listShapeRes);
|
||||
if (listShapeRes.Extent() == 1) {
|
||||
aShape = listShapeRes.First();
|
||||
if (aShape.IsNull()) return 0;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -27,6 +27,8 @@
|
||||
#include "GEOM_Engine.hxx"
|
||||
#include "GEOM_Object.hxx"
|
||||
|
||||
#include <gp_Ax2.hxx>
|
||||
|
||||
class GEOMImpl_IBasicOperations;
|
||||
class GEOMImpl_IBooleanOperations;
|
||||
class GEOMImpl_IShapesOperations;
|
||||
@ -43,23 +45,36 @@ private:
|
||||
double theR2, double theW2, double theL2,
|
||||
double theH = 0, double theW = 0,
|
||||
double theRF = 0, bool isNormal = true);
|
||||
|
||||
bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
|
||||
double theR1, double theW1, double theL1,
|
||||
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,
|
||||
double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double theH, double theW, double theRF,
|
||||
Handle(TColStd_HSequenceOfTransient) theSeq,
|
||||
gp_Trsf aTrsf);
|
||||
|
||||
gp_Trsf GetPositionTrsf(double theL1, double theL2,
|
||||
Handle(GEOM_Object) P1 = 0,
|
||||
Handle(GEOM_Object) P2 = 0,
|
||||
Handle(GEOM_Object) P3 = 0);
|
||||
|
||||
bool CheckCompatiblePosition(double& theL1, double& theL2,
|
||||
Handle(GEOM_Object) theP1,
|
||||
Handle(GEOM_Object) theP2,
|
||||
Handle(GEOM_Object) theP3,
|
||||
double theTolerance);
|
||||
|
||||
private:
|
||||
GEOMImpl_IBasicOperations* myBasicOperations;
|
||||
GEOMImpl_IBooleanOperations* myBooleanOperations;
|
||||
@ -70,6 +85,57 @@ private:
|
||||
GEOMImpl_ILocalOperations* myLocalOperations;
|
||||
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:
|
||||
Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
|
||||
Standard_EXPORT ~GEOMImpl_IAdvancedOperations();
|
||||
@ -77,34 +143,57 @@ public:
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShape(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 theHexMesh = true);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeWithPosition(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 theHexMesh = true,
|
||||
Handle(GEOM_Object) P1 = 0,
|
||||
Handle(GEOM_Object) P2 = 0,
|
||||
Handle(GEOM_Object) P3 = 0);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeChamfer(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,
|
||||
double theH, double theW,
|
||||
bool theHexMesh = true);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
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,
|
||||
Handle(GEOM_Object) P1 = 0,
|
||||
Handle(GEOM_Object) P2 = 0,
|
||||
Handle(GEOM_Object) P3 = 0);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeFillet(double theR1, double theW1, double theL1,
|
||||
double theR2, double theW2, double theL2,
|
||||
double 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);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||
MakePipeTShapeFilletWithPosition(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,
|
||||
double theRF, bool theHexMesh = true,
|
||||
Handle(GEOM_Object) P1 = 0,
|
||||
Handle(GEOM_Object) P2 = 0,
|
||||
|
@ -794,72 +794,15 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdgeNearPoint
|
||||
#if OCC_VERSION_LARGE > 0x06010000
|
||||
OCC_CATCH_SIGNALS;
|
||||
#endif
|
||||
TopoDS_Shape aShape;
|
||||
|
||||
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
|
||||
TopoDS_Shape aShape = GEOMUtils::GetEdgeNearPoint(aBlockOrComp, aVert);
|
||||
|
||||
// 1. Explode blocks on edges
|
||||
TopTools_MapOfShape mapShape;
|
||||
Standard_Integer nbEdges = 0;
|
||||
TopExp_Explorer exp (aBlockOrComp, TopAbs_EDGE);
|
||||
for (; exp.More(); exp.Next()) {
|
||||
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) {
|
||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||
SetErrorCode(aFail->GetMessageString());
|
||||
|
@ -15,34 +15,13 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _GEOMImpl_IPipeTShape_HXX_
|
||||
#define _GEOMImpl_IPipeTShape_HXX_
|
||||
|
||||
#include "GEOM_Function.hxx"
|
||||
|
||||
#define TSHAPE_ARG_R1 1
|
||||
#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
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
|
||||
class GEOMImpl_IPipeTShape
|
||||
{
|
||||
@ -88,6 +67,34 @@ public:
|
||||
void SetP3(const Handle(GEOM_Function)& theP3){_func->SetReference(TSHAPE_ARG_P3, theP3); }
|
||||
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:
|
||||
Handle(GEOM_Function) _func;
|
||||
};
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <GEOMImpl_IPipeTShape.hxx>
|
||||
#include <GEOMImpl_Types.hxx>
|
||||
#include <GEOMImpl_Block6Explorer.hxx>
|
||||
#include <GEOMImpl_IAdvancedOperations.hxx>
|
||||
|
||||
#include <GEOM_Function.hxx>
|
||||
#include <GEOM_IOperations.hxx>
|
||||
@ -45,6 +46,7 @@
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Trsf.hxx>
|
||||
|
||||
#include <BRepPrimAPI_MakeCone.hxx>
|
||||
#include <BRepPrimAPI_MakeCylinder.hxx>
|
||||
#include <BRepAlgoAPI_Fuse.hxx>
|
||||
#include <BRepAlgoAPI_Cut.hxx>
|
||||
@ -258,7 +260,7 @@ void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& t
|
||||
{
|
||||
gp_Pnt aP0 (0, 0, 0);
|
||||
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;
|
||||
aMapOfShapes.Clear();
|
||||
@ -303,7 +305,7 @@ void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& t
|
||||
//function : MakePipeTShape
|
||||
//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
|
||||
{
|
||||
double r1Ext = r1 + w1;
|
||||
@ -312,8 +314,8 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const do
|
||||
gp_Pnt aP0 (0, 0, 0);
|
||||
gp_Pnt aP1 (-l1, 0, 0);
|
||||
gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
|
||||
gp_Ax2 anAxes1 (aP1, aVX);
|
||||
gp_Ax2 anAxes2 (aP0, aVZ);
|
||||
gp_Ax2 anAxes1 (aP1, aVX, aVZ);
|
||||
gp_Ax2 anAxes2 (aP0, aVZ, aVX);
|
||||
|
||||
// Build the initial pipes
|
||||
BRepPrimAPI_MakeCylinder C1Int (anAxes1, r1, Abs(2 * l1));
|
||||
@ -325,13 +327,13 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const do
|
||||
C2Int.Build();
|
||||
C2Ext.Build();
|
||||
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
|
||||
BRepAlgoAPI_Fuse fuse1 (C1Ext.Shape(), C2Ext.Shape());
|
||||
if (!fuse1.IsDone()) {
|
||||
StdFail_NotDone::Raise("Couldn't fuse cylinders");
|
||||
StdFail_NotDone::Raise("Cannot fuse cylinders");
|
||||
}
|
||||
|
||||
// Remove small radius main pipe
|
||||
@ -353,17 +355,17 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const do
|
||||
//function : MakeQuarterPipeTShape
|
||||
//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
|
||||
{
|
||||
double r1Ext = r1 + w1;
|
||||
TopoDS_Shape Te = MakePipeTShape(r1, w1, l1, r2, w2, l2);
|
||||
if (Te.IsNull())
|
||||
StdFail_NotDone::Raise("Couldn't build Pipe TShape");
|
||||
|
||||
// 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)));
|
||||
BRepPrimAPI_MakeBox box2 (gp_Pnt(0,2*r1Ext,-2*r1Ext),gp_Pnt(-Abs(2 * l1), 0, Abs(2*l2)));
|
||||
double r1Ext = r1 + w1;
|
||||
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();
|
||||
box2.Build();
|
||||
if (!box1.IsDone() || !box2.IsDone()) {
|
||||
@ -385,7 +387,7 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape(const double r1, c
|
||||
//function : Execute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) const
|
||||
Standard_Integer GEOMImpl_PipeTShapeDriver::Execute (TFunction_Logbook& log) const
|
||||
{
|
||||
if (Label().IsNull()) return 0;
|
||||
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
|
||||
@ -394,16 +396,16 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
|
||||
Standard_Integer aType = aFunction->GetType();
|
||||
|
||||
TopoDS_Shape aShape, Te4, Te4Part;
|
||||
// TopoDS_Edge arete_intersect_int;
|
||||
// Handle(TopTools_HSequenceOfShape) edges_e = new TopTools_HSequenceOfShape;
|
||||
//TopoDS_Edge arete_intersect_int;
|
||||
//Handle(TopTools_HSequenceOfShape) edges_e = new TopTools_HSequenceOfShape;
|
||||
Handle(TColStd_HSequenceOfInteger) edges_e;
|
||||
// Handle(TopTools_HSequenceOfShape) edges_i = new TopTools_HSequenceOfShape;
|
||||
// gp_Pnt aP0 (0, 0, 0);
|
||||
// gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
|
||||
//Handle(TopTools_HSequenceOfShape) edges_i = new TopTools_HSequenceOfShape;
|
||||
//gp_Pnt aP0 (0, 0, 0);
|
||||
//gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
|
||||
bool hexMesh = (bool) aData.GetHexMesh();
|
||||
|
||||
// Useful values
|
||||
// double aSize = 2*(aData.GetL1() + aData.GetL2());
|
||||
//double aSize = 2*(aData.GetL1() + aData.GetL2());
|
||||
double epsilon = Precision::Approximation();
|
||||
double aR1Ext = aData.GetR1() + aData.GetW1();
|
||||
double aR2Ext = aData.GetR2() + aData.GetW2();
|
||||
@ -428,7 +430,6 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (aR1Ext >= aData.GetL2() + epsilon) {
|
||||
StdFail_NotDone::Raise("TShape cannot be computed if R1+W1 >= L2");
|
||||
}
|
||||
@ -453,13 +454,13 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
|
||||
|
||||
if (hexMesh) {
|
||||
// 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(),
|
||||
aData.GetR2(), aData.GetW2(), aData.GetL2());
|
||||
}
|
||||
else {
|
||||
// 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(),
|
||||
aData.GetR2(), aData.GetW2(), aData.GetL2());
|
||||
}
|
||||
@ -503,7 +504,6 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
|
||||
StdFail_NotDone::Raise("Common edges not found");
|
||||
}
|
||||
|
||||
|
||||
TopTools_IndexedDataMapOfShapeListOfShape M;
|
||||
GEOMImpl_Block6Explorer::MapShapesAndAncestors(Te4, TopAbs_EDGE, TopAbs_FACE, M);
|
||||
// std::cerr << "Number of IDs: " << edges_e->Length() << std::endl;
|
||||
@ -550,7 +550,6 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
|
||||
|
||||
// BB.Add(CC, chamfer.Shape());
|
||||
|
||||
|
||||
// aShape = CC;
|
||||
aShape = chamfer.Shape();
|
||||
}
|
||||
|
@ -15,7 +15,6 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
#ifndef _GEOMImpl_PipeTShapeDriver_HXX
|
||||
#define _GEOMImpl_PipeTShapeDriver_HXX
|
||||
@ -24,11 +23,12 @@
|
||||
|
||||
#include "GEOMAlgo_State.hxx"
|
||||
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_HSequenceOfShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <TColStd_HSequenceOfInteger.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
|
||||
#include <Handle_Geom_Surface.hxx>
|
||||
|
||||
@ -125,32 +125,33 @@ public:
|
||||
return (STANDARD_TYPE(GEOMImpl_PipeTShapeDriver) == AType || TFunction_Driver::IsKind(AType));
|
||||
}
|
||||
private:
|
||||
|
||||
/*!
|
||||
* \brief Create a T-Shape based on pipes
|
||||
* \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 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
|
||||
* \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
|
||||
* \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 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
|
||||
* \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
|
||||
* \param theSurface - the surface to check state of sub-shapes against
|
||||
@ -164,8 +165,7 @@ private:
|
||||
const TopoDS_Shape& theShape,
|
||||
TopAbs_ShapeEnum theShapeType,
|
||||
GEOMAlgo_State theState) const;
|
||||
//=======================================================================
|
||||
//function : getShapesOnBoxIDs
|
||||
|
||||
/*!
|
||||
* \brief Find IDs of sub-shapes complying with given status about surface
|
||||
* \param theBox - the box to check state of sub-shapes against
|
||||
@ -174,7 +174,6 @@ private:
|
||||
* \param theState - required state
|
||||
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
|
||||
*/
|
||||
//=======================================================================
|
||||
Handle(TColStd_HSequenceOfInteger)
|
||||
GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
|
||||
const TopoDS_Shape& aShape,
|
||||
|
@ -32,6 +32,8 @@
|
||||
// OCCT Includes
|
||||
#include <BRepMesh_IncrementalMesh.hxx>
|
||||
|
||||
#include <BRepExtrema_DistShapeShape.hxx>
|
||||
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
@ -53,6 +55,7 @@
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_Array1OfShape.hxx>
|
||||
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
@ -63,6 +66,8 @@
|
||||
#include <GProp_GProps.hxx>
|
||||
#include <GProp_PrincipalProps.hxx>
|
||||
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
|
||||
@ -427,6 +432,34 @@ TopoDS_Shape GEOMUtils::CompsolidToCompound (const TopoDS_Shape& theCompsolid)
|
||||
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
|
||||
//purpose :
|
||||
@ -497,3 +530,71 @@ TopAbs_ShapeEnum GEOMUtils::GetTypeOfSimplePart (const TopoDS_Shape& theShape)
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
#define _GEOMUtils_HXX_
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
|
||||
@ -89,6 +90,17 @@ class GEOMUtils {
|
||||
*/
|
||||
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.
|
||||
* \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);
|
||||
|
||||
/*!
|
||||
* \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
|
||||
|
@ -15,11 +15,10 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// File : GEOM_IAdvancedOperations.cc
|
||||
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
||||
//
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
|
||||
#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.
|
||||
*/
|
||||
//=============================================================================
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Boolean theHexMesh)
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape
|
||||
(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;
|
||||
|
||||
@ -77,7 +78,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape (CORBA::Double theR1,
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
//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())
|
||||
return aSeq._retn();
|
||||
|
||||
@ -109,8 +113,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape (CORBA::Double theR1,
|
||||
* \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,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Boolean theHexMesh,
|
||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition
|
||||
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
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;
|
||||
@ -125,7 +131,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::D
|
||||
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, 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())
|
||||
return aSeq._retn();
|
||||
|
||||
@ -156,7 +165,8 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::D
|
||||
* \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 theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
|
||||
{
|
||||
@ -166,7 +176,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
//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())
|
||||
return aSeq._retn();
|
||||
|
||||
@ -201,7 +214,8 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double
|
||||
* \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 theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
|
||||
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
|
||||
@ -217,8 +231,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition (C
|
||||
Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
|
||||
|
||||
//Create the TShape
|
||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW,
|
||||
theHexMesh, aP1, aP2, aP3);
|
||||
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||
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())
|
||||
return aSeq._retn();
|
||||
|
||||
@ -248,7 +264,8 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition (C
|
||||
* \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 theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRF, CORBA::Boolean theHexMesh)
|
||||
{
|
||||
@ -258,7 +275,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet (CORBA::Double
|
||||
GetOperations()->SetNotDone();
|
||||
|
||||
//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())
|
||||
return aSeq._retn();
|
||||
|
||||
@ -292,7 +312,8 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet (CORBA::Double
|
||||
* \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 theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Double theRF, CORBA::Boolean theHexMesh,
|
||||
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
|
||||
@ -308,7 +329,114 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition (CO
|
||||
Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
|
||||
|
||||
//Create the TShape
|
||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF,
|
||||
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||
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())
|
||||
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();
|
||||
@ -321,6 +449,224 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition (CO
|
||||
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();
|
||||
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();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* This function allows to create a disk already divided into blocks. It can be
|
||||
|
@ -15,11 +15,10 @@
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// File : GEOM_IAdvancedOperations.hh
|
||||
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
||||
//
|
||||
|
||||
#ifndef _GEOM_IAdvancedOperations_i_HeaderFile
|
||||
#define _GEOM_IAdvancedOperations_i_HeaderFile
|
||||
|
||||
@ -42,6 +41,7 @@ class GEOM_I_EXPORT GEOM_IAdvancedOperations_i :
|
||||
::GEOMImpl_IAdvancedOperations* theImpl);
|
||||
~GEOM_IAdvancedOperations_i();
|
||||
|
||||
// PipeTShape without thickness reduction
|
||||
GEOM::ListOfGO* MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||
CORBA::Boolean theHexMesh);
|
||||
@ -64,6 +64,53 @@ class GEOM_I_EXPORT GEOM_IAdvancedOperations_i :
|
||||
CORBA::Double theRF, CORBA::Boolean theHexMesh,
|
||||
GEOM::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3);
|
||||
|
||||
// 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,
|
||||
|
@ -11514,16 +11514,34 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
||||
# 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
|
||||
# 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 (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
|
||||
#
|
||||
# @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
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# 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.
|
||||
#
|
||||
# @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
|
||||
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
|
||||
the main plane of the T-shape is XOY.
|
||||
|
||||
Paremeters:
|
||||
Parameters:
|
||||
theR1 Internal radius of main pipe
|
||||
theW1 Width 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
|
||||
theP2 2nd junction point of main 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
|
||||
for result publication in the study. Otherwise, if automatic
|
||||
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)
|
||||
# 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)
|
||||
# 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):
|
||||
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:
|
||||
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)
|
||||
if Parameters: anObj[0].SetParameters(Parameters)
|
||||
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 theP2 2nd junction point of main 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
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# 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.
|
||||
#
|
||||
# @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
|
||||
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
|
||||
the main plane of the T-shape is XOY.
|
||||
|
||||
Paremeters:
|
||||
Parameters:
|
||||
theR1 Internal radius of main pipe
|
||||
theW1 Width 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
|
||||
theP2 2nd junction point of main 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
|
||||
for result publication in the study. Otherwise, if automatic
|
||||
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)
|
||||
# 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)
|
||||
# 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):
|
||||
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:
|
||||
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)
|
||||
if Parameters: anObj[0].SetParameters(Parameters)
|
||||
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 theP2 2nd junction point of main 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
|
||||
# for result publication in the study. Otherwise, if automatic
|
||||
# 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.
|
||||
#
|
||||
# @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
|
||||
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 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
|
||||
the main plane of the T-shape is XOY.
|
||||
theR1 Internal radius of main pipe
|
||||
@ -11695,6 +11812,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
||||
theP1 1st junction point of main pipe
|
||||
theP2 2nd junction point of main 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
|
||||
for result publication in the study. Otherwise, if automatic
|
||||
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)
|
||||
# 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)
|
||||
|
||||
# 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):
|
||||
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:
|
||||
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)
|
||||
if Parameters: anObj[0].SetParameters(Parameters)
|
||||
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
|
||||
|
||||
Paremeters:
|
||||
Parameters:
|
||||
theOriginal geometry object for copy
|
||||
theName Object name; when specified, this parameter is used
|
||||
for result publication in the study. Otherwise, if automatic
|
||||
|
Loading…
Reference in New Issue
Block a user