mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-25 08:50:36 +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:]:
|
for g in pipetshape_position[1:]:
|
||||||
geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName())
|
geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName())
|
||||||
|
|
||||||
|
# create PipeTShape object with left thickness reduction
|
||||||
|
pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0,
|
||||||
|
theRL=60, theWL=20, theLtransL=40, theLthinL=20)
|
||||||
|
|
||||||
|
# add object in the study
|
||||||
|
id_pipetshape_thr = geompy.addToStudy(pipetshape_thr[0],"PipeTShape_left_thickness_reduction")
|
||||||
|
# add groups in the study
|
||||||
|
for g in pipetshape_thr[1:]:
|
||||||
|
geompy.addToStudyInFather(pipetshape_thr[0], g, g.GetName())
|
||||||
|
|
||||||
# create PipeTShape with chamfer object
|
# create PipeTShape with chamfer object
|
||||||
pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
|
pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
|
||||||
|
|
||||||
@ -45,6 +55,17 @@ id_pipetshapechamfer_position = geompy.addToStudy(pipetshapechamfer_position[0],
|
|||||||
for g in pipetshapechamfer_position[1:]:
|
for g in pipetshapechamfer_position[1:]:
|
||||||
geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName())
|
geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName())
|
||||||
|
|
||||||
|
# create PipeTShape with chamfer object with left and right thickness reductions
|
||||||
|
pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0,
|
||||||
|
theRL=60, theWL=20, theLtransL=40, theLthinL=20,
|
||||||
|
theRR=40, theWR=10, theLtransR=60, theLthinR=30)
|
||||||
|
|
||||||
|
# add object in the study
|
||||||
|
id_pipetshapechamfer_thr = geompy.addToStudy(pipetshapechamfer_thr[0],"PipeTShapeChamfer_two_thickness_reductions")
|
||||||
|
# add groups in the study
|
||||||
|
for g in pipetshapechamfer_thr[1:]:
|
||||||
|
geompy.addToStudyInFather(pipetshapechamfer_thr[0], g, g.GetName())
|
||||||
|
|
||||||
# create PipeTShape with fillet object
|
# create PipeTShape with fillet object
|
||||||
pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
|
pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
|
||||||
|
|
||||||
@ -63,11 +84,27 @@ id_pipetshapefillet_position = geompy.addToStudy(pipetshapefillet_position[0],"P
|
|||||||
for g in pipetshapefillet_position[1:]:
|
for g in pipetshapefillet_position[1:]:
|
||||||
geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName())
|
geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName())
|
||||||
|
|
||||||
|
# create PipeTShape with fillet object with three thickness reductions
|
||||||
|
pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0,
|
||||||
|
5.0, True, None, None, None,
|
||||||
|
60, 20, 40, 20,
|
||||||
|
40, 10, 60, 30,
|
||||||
|
20, 10, 30, 30)
|
||||||
|
|
||||||
|
# add object in the study
|
||||||
|
id_pipetshapefillet_thr = geompy.addToStudy(pipetshapefillet_thr[0],"PipeTShapeFillet_three_thickness_reductions")
|
||||||
|
# add groups in the study
|
||||||
|
for g in pipetshapefillet_thr[1:]:
|
||||||
|
geompy.addToStudyInFather(pipetshapefillet_thr[0], g, g.GetName())
|
||||||
|
|
||||||
|
|
||||||
# display pipetshapes
|
# display pipetshapes
|
||||||
gg.createAndDisplayGO(id_pipetshape)
|
gg.createAndDisplayGO(id_pipetshape)
|
||||||
gg.createAndDisplayGO(id_pipetshape_position)
|
gg.createAndDisplayGO(id_pipetshape_position)
|
||||||
|
gg.createAndDisplayGO(id_pipetshape_thr)
|
||||||
gg.createAndDisplayGO(id_pipetshapechamfer)
|
gg.createAndDisplayGO(id_pipetshapechamfer)
|
||||||
gg.createAndDisplayGO(id_pipetshapechamfer_position)
|
gg.createAndDisplayGO(id_pipetshapechamfer_position)
|
||||||
|
gg.createAndDisplayGO(id_pipetshapechamfer_thr)
|
||||||
gg.createAndDisplayGO(id_pipetshapefillet)
|
gg.createAndDisplayGO(id_pipetshapefillet)
|
||||||
gg.createAndDisplayGO(id_pipetshapefillet_position)
|
gg.createAndDisplayGO(id_pipetshapefillet_position)
|
||||||
|
gg.createAndDisplayGO(id_pipetshapefillet_thr)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 49 KiB |
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.
|
box and press "Apply" or "Apply & Close" button.
|
||||||
The <b>result</b> of the operation will be a <b>GEOM_Object</b>.
|
The <b>result</b> of the operation will be a <b>GEOM_Object</b>.
|
||||||
|
|
||||||
|
\n <b>Main parameters</b>:
|
||||||
|
|
||||||
|
\image html pipetshape_dlg.png
|
||||||
|
|
||||||
|
\n <b>Position parameters</b>:
|
||||||
|
|
||||||
|
\image html pipetshape_pos_dlg.png
|
||||||
|
|
||||||
|
\n <b>Advanced options</b> \ref preview_anchor "Preview"
|
||||||
|
|
||||||
<b>TUI Command:</b> <em>geompy.MakePipeTShape(R1, W1, L1, R2, W2, L2, HexMesh=True, P1=None, P2=None, P3=None)</em>
|
<b>TUI Command:</b> <em>geompy.MakePipeTShape(R1, W1, L1, R2, W2, L2, HexMesh=True, P1=None, P2=None, P3=None)</em>
|
||||||
|
|
||||||
<b>Arguments:</b>
|
<b>Arguments:</b>
|
||||||
@ -18,19 +28,17 @@ The <b>result</b> of the operation will be a <b>GEOM_Object</b>.
|
|||||||
- \b W2 - Thickness of the incident T-shape pipe.
|
- \b W2 - Thickness of the incident T-shape pipe.
|
||||||
- \b L2 - Length of the incident T-shape pipe.
|
- \b L2 - Length of the incident T-shape pipe.
|
||||||
- \b HexMesh - If True, the shape is splitted into blocks (suitable for hexaedral mesh).
|
- \b HexMesh - If True, the shape is splitted into blocks (suitable for hexaedral mesh).
|
||||||
|
|
||||||
|
<b>Position arguments:</b>
|
||||||
- \b P1 - First junction point of the main pipe (GEOM Vertex).
|
- \b P1 - First junction point of the main pipe (GEOM Vertex).
|
||||||
- \b P2 - Second junction point of the main pipe (GEOM Vertex).
|
- \b P2 - Second junction point of the main pipe (GEOM Vertex).
|
||||||
- \b P3 - Junction point of the incident pipe (GEOM Vertex).
|
- \b P3 - Junction point of the incident pipe (GEOM Vertex).
|
||||||
|
|
||||||
\n <b>Advanced options</b> \ref preview_anchor "Preview"
|
|
||||||
|
|
||||||
\image html pipetshape_dlg.png
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
\image html pipetshape.png
|
\image html pipetshape.png
|
||||||
|
|
||||||
A Pipe T-Shape can be created with a chamfer at the junction of the main and the incident pipes:
|
<h2>A Pipe T-Shape can be created with a chamfer at the junction of the main and the incident pipes:</h2>
|
||||||
|
|
||||||
<b>TUI Command:</b> <em>geompy.MakePipeTShapeChamfer(R1, W1, L1, R2, W2, L2, H, W, HexMesh=True, P1=None, P2=None, P3=None)</em>
|
<b>TUI Command:</b> <em>geompy.MakePipeTShapeChamfer(R1, W1, L1, R2, W2, L2, H, W, HexMesh=True, P1=None, P2=None, P3=None)</em>
|
||||||
|
|
||||||
@ -42,7 +50,7 @@ Example:
|
|||||||
|
|
||||||
\image html pipetshapechamfer.png
|
\image html pipetshapechamfer.png
|
||||||
|
|
||||||
A Pipe T-Shape can be created with a fillet at the junction of the main and the incident pipes:
|
<h2>A Pipe T-Shape can be created with a fillet at the junction of the main and the incident pipes:</h2>
|
||||||
|
|
||||||
<b>TUI Command:</b> <em>geompy.MakePipeTShapeFillet(R1, W1, L1, R2, W2, L2, RF, HexMesh=True, P1=None, P2=None, P3=None)</em>
|
<b>TUI Command:</b> <em>geompy.MakePipeTShapeFillet(R1, W1, L1, R2, W2, L2, RF, HexMesh=True, P1=None, P2=None, P3=None)</em>
|
||||||
|
|
||||||
@ -53,6 +61,35 @@ Example:
|
|||||||
|
|
||||||
\image html pipetshapefillet.png
|
\image html pipetshapefillet.png
|
||||||
|
|
||||||
|
<h2>All three types of T-Shape (basic, with chamfer and with fillet) can
|
||||||
|
have thickness reductions at its open ends (two ends of the main pipe
|
||||||
|
and one end of the incident pipe):</h2>
|
||||||
|
|
||||||
|
\image html pipetshape_thr_dlg.png
|
||||||
|
|
||||||
|
<b>TUI Commands:</b>
|
||||||
|
\n<em>geompy.MakePipeTShape(R1, W1, L1, R2, W2, L2, HexMesh=True, P1=None, P2=None, P3=None, theRL=0, theWL=0, theLtransL=0, theLthinL=0, theRR=0, theWR=0, theLtransR=0, theLthinR=0, theRI=0, theWI=0, theLtransI=0, theLthinI=0)</em>
|
||||||
|
\n<em>geompy.MakePipeTShapeChamfer(R1, W1, L1, R2, W2, L2, H, W, HexMesh=True, P1=None, P2=None, P3=None, theRL=0, theWL=0, theLtransL=0, theLthinL=0, theRR=0, theWR=0, theLtransR=0, theLthinR=0, theRI=0, theWI=0, theLtransI=0, theLthinI=0)</em>
|
||||||
|
\n<em>geompy.MakePipeTShapeFillet(R1, W1, L1, R2, W2, L2, RF, HexMesh=True, P1=None, P2=None, P3=None, theRL=0, theWL=0, theLtransL=0, theLthinL=0, theRR=0, theWR=0, theLtransR=0, theLthinR=0, theRI=0, theWI=0, theLtransI=0, theLthinI=0)</em>
|
||||||
|
|
||||||
|
<b>The additional arguments are:</b>
|
||||||
|
- \b theRL - Internal radius of left thickness reduction.
|
||||||
|
- \b theWL - Width of left thickness reduction.
|
||||||
|
- \b theLtransL - Length of left transition part.
|
||||||
|
- \b theLthinL - Length of left thin part.
|
||||||
|
- \b theRR - Internal radius of right thickness reduction.
|
||||||
|
- \b theWR - Width of right thickness reduction.
|
||||||
|
- \b theLtransR - Length of right transition part.
|
||||||
|
- \b theLthinR - Length of right thin part.
|
||||||
|
- \b theRI - Internal radius of incident thickness reduction.
|
||||||
|
- \b theWI - Width of incident thickness reduction.
|
||||||
|
- \b theLtransI - Length of incident transition part.
|
||||||
|
- \b theLthinI - Length of incident thin part.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
\image html pipetshapethr.png
|
||||||
|
|
||||||
Our <b>TUI Scripts</b> provide you with useful examples of creation of
|
Our <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||||
\ref tui_creation_pipetshape "Advanced objects".
|
\ref tui_creation_pipetshape "Advanced objects".
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
<title>$title</title>
|
<title>$title</title>
|
||||||
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||||
$treeview
|
$treeview
|
||||||
$search
|
$search
|
||||||
$mathjax
|
$mathjax
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
<title>$title</title>
|
<title>$title</title>
|
||||||
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||||
$treeview
|
$treeview
|
||||||
$search
|
$search
|
||||||
$mathjax
|
$mathjax
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
<title>$title</title>
|
<title>$title</title>
|
||||||
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="$relpath^jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="$relpath^dynsections.js"></script>
|
||||||
$treeview
|
$treeview
|
||||||
$search
|
$search
|
||||||
$mathjax
|
$mathjax
|
||||||
|
252
idl/GEOM_Gen.idl
252
idl/GEOM_Gen.idl
@ -3935,6 +3935,8 @@ module GEOM
|
|||||||
*/
|
*/
|
||||||
interface GEOM_IAdvancedOperations : GEOM_IOperations
|
interface GEOM_IAdvancedOperations : GEOM_IOperations
|
||||||
{
|
{
|
||||||
|
// T-Shape WITHOUT Thickness reduction
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Create a T-shape object with specified caracteristics for the main and
|
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||||
* the incident pipes (radius, width, half-length).
|
* the incident pipes (radius, width, half-length).
|
||||||
@ -4062,6 +4064,256 @@ module GEOM
|
|||||||
in double theR2, in double theW2, in double theL2,
|
in double theR2, in double theW2, in double theL2,
|
||||||
in double theRF, in boolean theHexMesh,
|
in double theRF, in boolean theHexMesh,
|
||||||
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||||
|
|
||||||
|
// T-Shape WITH Thickness reduction
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||||
|
* the incident pipes (radius, width, half-length).
|
||||||
|
*
|
||||||
|
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||||
|
* \param theR1 Internal radius of main pipe
|
||||||
|
* \param theW1 Width of main pipe
|
||||||
|
* \param theL1 Half-length of main pipe
|
||||||
|
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||||
|
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||||
|
* \param theL2 Half-length of incident pipe
|
||||||
|
*
|
||||||
|
* \param theRL Internal radius of left thickness reduction
|
||||||
|
* \param theWL Width of left thickness reduction
|
||||||
|
* \param theLtransL Length of left transition part
|
||||||
|
* \param theLthinL Length of left thin part
|
||||||
|
*
|
||||||
|
* \param theRR Internal radius of right thickness reduction
|
||||||
|
* \param theWR Width of right thickness reduction
|
||||||
|
* \param theLtransR Length of right transition part
|
||||||
|
* \param theLthinR Length of right thin part
|
||||||
|
*
|
||||||
|
* \param theRI Internal radius of incident thickness reduction
|
||||||
|
* \param theWI Width of incident thickness reduction
|
||||||
|
* \param theLtransI Length of incident transition part
|
||||||
|
* \param theLthinI Length of incident thin part
|
||||||
|
*
|
||||||
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||||
|
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||||
|
*/
|
||||||
|
ListOfGO MakePipeTShapeTR (in double theR1, in double theW1, in double theL1,
|
||||||
|
in double theR2, in double theW2, in double theL2,
|
||||||
|
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||||
|
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||||
|
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||||
|
in boolean theHexMesh);
|
||||||
|
/*!
|
||||||
|
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||||
|
* the incident pipes (radius, width, half-length).
|
||||||
|
*
|
||||||
|
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||||
|
* The extremity of the incident pipe is located on junction point P3.
|
||||||
|
* \param theR1 Internal radius of main pipe
|
||||||
|
* \param theW1 Width of main pipe
|
||||||
|
* \param theL1 Half-length of main pipe
|
||||||
|
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||||
|
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||||
|
* \param theL2 Half-length of incident pipe
|
||||||
|
*
|
||||||
|
* \param theRL Internal radius of left thickness reduction
|
||||||
|
* \param theWL Width of left thickness reduction
|
||||||
|
* \param theLtransL Length of left transition part
|
||||||
|
* \param theLthinL Length of left thin part
|
||||||
|
*
|
||||||
|
* \param theRR Internal radius of right thickness reduction
|
||||||
|
* \param theWR Width of right thickness reduction
|
||||||
|
* \param theLtransR Length of right transition part
|
||||||
|
* \param theLthinR Length of right thin part
|
||||||
|
*
|
||||||
|
* \param theRI Internal radius of incident thickness reduction
|
||||||
|
* \param theWI Width of incident thickness reduction
|
||||||
|
* \param theLtransI Length of incident transition part
|
||||||
|
* \param theLthinI Length of incident thin part
|
||||||
|
*
|
||||||
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||||
|
* \param theP1 1st junction point of main pipe
|
||||||
|
* \param theP2 2nd junction point of main pipe
|
||||||
|
* \param theP3 Junction point of incident pipe
|
||||||
|
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||||
|
*/
|
||||||
|
ListOfGO MakePipeTShapeTRWithPosition
|
||||||
|
(in double theR1, in double theW1, in double theL1,
|
||||||
|
in double theR2, in double theW2, in double theL2,
|
||||||
|
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||||
|
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||||
|
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||||
|
in boolean theHexMesh,
|
||||||
|
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||||
|
/*!
|
||||||
|
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||||
|
* the incident pipes (radius, width, half-length). A chamfer is created
|
||||||
|
* on the junction of the pipes.
|
||||||
|
*
|
||||||
|
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||||
|
* \param theR1 Internal radius of main pipe
|
||||||
|
* \param theW1 Width of main pipe
|
||||||
|
* \param theL1 Half-length of main pipe
|
||||||
|
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||||
|
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||||
|
* \param theL2 Half-length of incident pipe
|
||||||
|
*
|
||||||
|
* \param theRL Internal radius of left thickness reduction
|
||||||
|
* \param theWL Width of left thickness reduction
|
||||||
|
* \param theLtransL Length of left transition part
|
||||||
|
* \param theLthinL Length of left thin part
|
||||||
|
*
|
||||||
|
* \param theRR Internal radius of right thickness reduction
|
||||||
|
* \param theWR Width of right thickness reduction
|
||||||
|
* \param theLtransR Length of right transition part
|
||||||
|
* \param theLthinR Length of right thin part
|
||||||
|
*
|
||||||
|
* \param theRI Internal radius of incident thickness reduction
|
||||||
|
* \param theWI Width of incident thickness reduction
|
||||||
|
* \param theLtransI Length of incident transition part
|
||||||
|
* \param theLthinI Length of incident thin part
|
||||||
|
*
|
||||||
|
* \param theH Height of the chamfer.
|
||||||
|
* \param theW Width of the chamfer.
|
||||||
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||||
|
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||||
|
*/
|
||||||
|
ListOfGO MakePipeTShapeTRChamfer
|
||||||
|
(in double theR1, in double theW1, in double theL1,
|
||||||
|
in double theR2, in double theW2, in double theL2,
|
||||||
|
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||||
|
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||||
|
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||||
|
in double theH, in double theW, in boolean theHexMesh);
|
||||||
|
/*!
|
||||||
|
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||||
|
* the incident pipes (radius, width, half-length).
|
||||||
|
*
|
||||||
|
* A chamfer is created on the junction of the pipes.
|
||||||
|
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||||
|
* The extremity of the incident pipe is located on junction point P3.
|
||||||
|
* \param theR1 Internal radius of main pipe
|
||||||
|
* \param theW1 Width of main pipe
|
||||||
|
* \param theL1 Half-length of main pipe
|
||||||
|
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||||
|
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||||
|
* \param theL2 Half-length of incident pipe
|
||||||
|
*
|
||||||
|
* \param theRL Internal radius of left thickness reduction
|
||||||
|
* \param theWL Width of left thickness reduction
|
||||||
|
* \param theLtransL Length of left transition part
|
||||||
|
* \param theLthinL Length of left thin part
|
||||||
|
*
|
||||||
|
* \param theRR Internal radius of right thickness reduction
|
||||||
|
* \param theWR Width of right thickness reduction
|
||||||
|
* \param theLtransR Length of right transition part
|
||||||
|
* \param theLthinR Length of right thin part
|
||||||
|
*
|
||||||
|
* \param theRI Internal radius of incident thickness reduction
|
||||||
|
* \param theWI Width of incident thickness reduction
|
||||||
|
* \param theLtransI Length of incident transition part
|
||||||
|
* \param theLthinI Length of incident thin part
|
||||||
|
*
|
||||||
|
* \param theH Height of the chamfer.
|
||||||
|
* \param theW Width of the chamfer.
|
||||||
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||||
|
* \param theP1 1st junction point of main pipe
|
||||||
|
* \param theP2 2nd junction point of main pipe
|
||||||
|
* \param theP3 Junction point of incident pipe
|
||||||
|
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||||
|
*/
|
||||||
|
ListOfGO MakePipeTShapeTRChamferWithPosition
|
||||||
|
(in double theR1, in double theW1, in double theL1,
|
||||||
|
in double theR2, in double theW2, in double theL2,
|
||||||
|
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||||
|
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||||
|
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||||
|
in double theH, in double theW, in boolean theHexMesh,
|
||||||
|
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||||
|
/*!
|
||||||
|
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||||
|
* the incident pipes (radius, width, half-length).
|
||||||
|
*
|
||||||
|
* A fillet is created on the junction of the pipes.
|
||||||
|
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
||||||
|
* \param theR1 Internal radius of main pipe
|
||||||
|
* \param theW1 Width of main pipe
|
||||||
|
* \param theL1 Half-length of main pipe
|
||||||
|
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||||
|
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||||
|
* \param theL2 Half-length of incident pipe
|
||||||
|
*
|
||||||
|
* \param theRL Internal radius of left thickness reduction
|
||||||
|
* \param theWL Width of left thickness reduction
|
||||||
|
* \param theLtransL Length of left transition part
|
||||||
|
* \param theLthinL Length of left thin part
|
||||||
|
*
|
||||||
|
* \param theRR Internal radius of right thickness reduction
|
||||||
|
* \param theWR Width of right thickness reduction
|
||||||
|
* \param theLtransR Length of right transition part
|
||||||
|
* \param theLthinR Length of right thin part
|
||||||
|
*
|
||||||
|
* \param theRI Internal radius of incident thickness reduction
|
||||||
|
* \param theWI Width of incident thickness reduction
|
||||||
|
* \param theLtransI Length of incident transition part
|
||||||
|
* \param theLthinI Length of incident thin part
|
||||||
|
*
|
||||||
|
* \param theRF Radius of curvature of fillet.
|
||||||
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||||
|
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||||
|
*/
|
||||||
|
ListOfGO MakePipeTShapeTRFillet
|
||||||
|
(in double theR1, in double theW1, in double theL1,
|
||||||
|
in double theR2, in double theW2, in double theL2,
|
||||||
|
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||||
|
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||||
|
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||||
|
in double theRF, in boolean theHexMesh);
|
||||||
|
/*!
|
||||||
|
* \brief Create a T-shape object with specified caracteristics for the main and
|
||||||
|
* the incident pipes (radius, width, half-length).
|
||||||
|
*
|
||||||
|
* A fillet is created on the junction of the pipes.
|
||||||
|
* The extremities of the main pipe are located on junctions points P1 and P2.
|
||||||
|
* The extremity of the incident pipe is located on junction point P3.
|
||||||
|
* \param theR1 Internal radius of main pipe
|
||||||
|
* \param theW1 Width of main pipe
|
||||||
|
* \param theL1 Half-length of main pipe
|
||||||
|
* \param theR2 Internal radius of incident pipe (R2 < R1)
|
||||||
|
* \param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||||
|
* \param theL2 Half-length of incident pipe
|
||||||
|
*
|
||||||
|
* \param theRL Internal radius of left thickness reduction
|
||||||
|
* \param theWL Width of left thickness reduction
|
||||||
|
* \param theLtransL Length of left transition part
|
||||||
|
* \param theLthinL Length of left thin part
|
||||||
|
*
|
||||||
|
* \param theRR Internal radius of right thickness reduction
|
||||||
|
* \param theWR Width of right thickness reduction
|
||||||
|
* \param theLtransR Length of right transition part
|
||||||
|
* \param theLthinR Length of right thin part
|
||||||
|
*
|
||||||
|
* \param theRI Internal radius of incident thickness reduction
|
||||||
|
* \param theWI Width of incident thickness reduction
|
||||||
|
* \param theLtransI Length of incident transition part
|
||||||
|
* \param theLthinI Length of incident thin part
|
||||||
|
*
|
||||||
|
* \param theRF Radius of curvature of fillet.
|
||||||
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||||
|
* \param theP1 1st junction point of main pipe
|
||||||
|
* \param theP2 2nd junction point of main pipe
|
||||||
|
* \param theP3 Junction point of incident pipe
|
||||||
|
* \return List of GEOM_Object, containing the created shape and propagation groups.
|
||||||
|
*/
|
||||||
|
ListOfGO MakePipeTShapeTRFilletWithPosition
|
||||||
|
(in double theR1, in double theW1, in double theL1,
|
||||||
|
in double theR2, in double theW2, in double theL2,
|
||||||
|
in double theRL, in double theWL, in double theLtransL, in double theLthinL,
|
||||||
|
in double theRR, in double theWR, in double theLtransR, in double theLthinR,
|
||||||
|
in double theRI, in double theWI, in double theLtransI, in double theLthinI,
|
||||||
|
in double theRF, in boolean theHexMesh,
|
||||||
|
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* This function allows to create a disk already divided into blocks. It
|
* This function allows to create a disk already divided into blocks. It
|
||||||
* can be use to create divided pipes for later meshing in hexaedra.
|
* can be use to create divided pipes for later meshing in hexaedra.
|
||||||
|
@ -244,7 +244,7 @@ coordsys.png \
|
|||||||
translation.png
|
translation.png
|
||||||
|
|
||||||
ADVANCED_RESOURCES =
|
ADVANCED_RESOURCES =
|
||||||
ADVANCED_RESOURCES += pipetshape.png tree_pipetshape.png pipetshape_import_icon.png
|
ADVANCED_RESOURCES += pipetshape.png tree_pipetshape.png pipetshape_import_icon.png pipetshape_section.png
|
||||||
ADVANCED_RESOURCES += dlg_pipetshape.png dlg_pipetshapechamfer.png dlg_pipetshapefillet.png
|
ADVANCED_RESOURCES += dlg_pipetshape.png dlg_pipetshapechamfer.png dlg_pipetshapefillet.png
|
||||||
ADVANCED_RESOURCES += dlg_pipetshapel1.png dlg_pipetshaper1.png dlg_pipetshapew1.png
|
ADVANCED_RESOURCES += dlg_pipetshapel1.png dlg_pipetshaper1.png dlg_pipetshapew1.png
|
||||||
ADVANCED_RESOURCES += dlg_pipetshapel2.png dlg_pipetshaper2.png dlg_pipetshapew2.png
|
ADVANCED_RESOURCES += dlg_pipetshapel2.png dlg_pipetshaper2.png dlg_pipetshapew2.png
|
||||||
|
BIN
resources/pipetshape_section.png
Normal file
BIN
resources/pipetshape_section.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
@ -15,7 +15,6 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
#include "AdvancedGUI_PipeTShapeDlg.h"
|
#include "AdvancedGUI_PipeTShapeDlg.h"
|
||||||
|
|
||||||
@ -26,56 +25,58 @@
|
|||||||
#include <SUIT_Session.h>
|
#include <SUIT_Session.h>
|
||||||
#include <SUIT_ResourceMgr.h>
|
#include <SUIT_ResourceMgr.h>
|
||||||
#include <SUIT_OverrideCursor.h>
|
#include <SUIT_OverrideCursor.h>
|
||||||
|
#include <LightApp_SelectionMgr.h>
|
||||||
#include <SalomeApp_Application.h>
|
#include <SalomeApp_Application.h>
|
||||||
#include <SalomeApp_Tools.h>
|
#include <SalomeApp_Tools.h>
|
||||||
#include <LightApp_SelectionMgr.h>
|
|
||||||
|
|
||||||
// OCCT Includes
|
// OCCT Includes
|
||||||
|
#include <BRep_Tool.hxx>
|
||||||
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopExp.hxx>
|
#include <TopExp.hxx>
|
||||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||||
#include <TopTools_IndexedMapOfShape.hxx>
|
|
||||||
#include <gp_Pnt.hxx>
|
#include <gp_Pnt.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
|
||||||
|
#include <QTabWidget>
|
||||||
|
|
||||||
#include <GEOMImpl_Types.hxx>
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// Constructor
|
// Constructor
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
AdvancedGUI_PipeTShapeDlg::AdvancedGUI_PipeTShapeDlg(GeometryGUI* theGeometryGUI, QWidget* parent) :
|
AdvancedGUI_PipeTShapeDlg::AdvancedGUI_PipeTShapeDlg (GeometryGUI* theGeometryGUI, QWidget* parent)
|
||||||
GEOMBase_Skeleton(theGeometryGUI, parent, false) {
|
: GEOMBase_Skeleton(theGeometryGUI, parent, false)
|
||||||
QPixmap imageOp(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_PIPETSHAPE")));
|
{
|
||||||
QPixmap imageSel(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
|
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||||
imageImp = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICO_PIPETSHAPE_IMPORT"));
|
//QPixmap imageOp = aResMgr->loadPixmap("GEOM", tr("ICON_DLG_PIPETSHAPE"));
|
||||||
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
QPixmap imageSel = aResMgr->loadPixmap("GEOM", tr("ICON_SELECT"));
|
||||||
|
QPixmap imageImp = aResMgr->loadPixmap("GEOM", tr("ICO_PIPETSHAPE_IMPORT"));
|
||||||
|
imagePipeTShape = aResMgr->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
||||||
|
imageReduction = aResMgr->loadPixmap("GEOM", tr("IMG_PIPETSHAPE_SECT"));
|
||||||
|
|
||||||
setWindowTitle(tr("GEOM_PIPE_TSHAPE_TITLE"));
|
setWindowTitle(tr("GEOM_PIPE_TSHAPE_TITLE"));
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
mainFrame()->GroupConstructors->setTitle(tr("GEOM_PIPE_TSHAPE"));
|
mainFrame()->GroupConstructors->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
mainFrame()->RadioButton1->setIcon(imageOp);
|
mainFrame()->GroupConstructors->close();
|
||||||
mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
mainFrame()->RadioButton2->close();
|
QTabWidget* aTabWidget = new QTabWidget (centralWidget());
|
||||||
mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
mainFrame()->RadioButton3->close();
|
|
||||||
|
|
||||||
QGridLayout* myMainLayout = new QGridLayout (centralWidget());
|
QGridLayout* myMainLayout = new QGridLayout (centralWidget());
|
||||||
myMainLayout->setMargin(0);
|
myMainLayout->setMargin(0);
|
||||||
myMainLayout->setSpacing(6);
|
myMainLayout->setSpacing(6);
|
||||||
|
|
||||||
tshapeScreenShotLabel = new QLabel();
|
// Main parameters
|
||||||
tshapeScreenShotLabel->setSizePolicy(QSizePolicy::Expanding,
|
QGroupBox* GroupMain = new QGroupBox();
|
||||||
QSizePolicy::Expanding);
|
QGridLayout* layoutGroupMain = new QGridLayout (GroupMain);
|
||||||
tshapeScreenShotLabel->setAlignment(Qt::AlignCenter);
|
|
||||||
tshapeScreenShotLabel->setMinimumSize(100, 100);
|
|
||||||
|
|
||||||
MainTubeGroupParams = new DlgRef_3Spin();
|
MainTubeGroupParams = new DlgRef_3Spin();
|
||||||
MainTubeGroupParams->GroupBox1->setTitle(tr("GEOM_PIPE_TSHAPE_MPIPE"));
|
MainTubeGroupParams->GroupBox1->setTitle(tr("GEOM_PIPE_TSHAPE_MPIPE"));
|
||||||
MainTubeGroupParams->TextLabel1->setText(tr("GEOM_PIPE_TSHAPE_R"));
|
MainTubeGroupParams->TextLabel1->setText(tr("GEOM_PIPE_TSHAPE_R"));
|
||||||
MainTubeGroupParams->TextLabel2->setText(tr("GEOM_PIPE_TSHAPE_W"));
|
MainTubeGroupParams->TextLabel2->setText(tr("GEOM_PIPE_TSHAPE_W"));
|
||||||
MainTubeGroupParams->TextLabel3->setText(tr("GEOM_PIPE_TSHAPE_L"));
|
MainTubeGroupParams->TextLabel3->setText(tr("GEOM_PIPE_TSHAPE_L"));
|
||||||
|
MainTubeGroupParams->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); // ??
|
||||||
|
|
||||||
IncidentTubeGroupParams = new DlgRef_3Spin();
|
IncidentTubeGroupParams = new DlgRef_3Spin();
|
||||||
IncidentTubeGroupParams->GroupBox1->setTitle(tr("GEOM_PIPE_TSHAPE_IPIPE"));
|
IncidentTubeGroupParams->GroupBox1->setTitle(tr("GEOM_PIPE_TSHAPE_IPIPE"));
|
||||||
@ -100,6 +101,67 @@ AdvancedGUI_PipeTShapeDlg::AdvancedGUI_PipeTShapeDlg(GeometryGUI* theGeometryGUI
|
|||||||
HexMeshCheckBox->setText(tr("GEOM_PIPE_TSHAPE_HEX"));
|
HexMeshCheckBox->setText(tr("GEOM_PIPE_TSHAPE_HEX"));
|
||||||
HexMeshCheckBox->setChecked(true);
|
HexMeshCheckBox->setChecked(true);
|
||||||
|
|
||||||
|
LabelImgPipeTShape = new QLabel();
|
||||||
|
LabelImgPipeTShape->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
LabelImgPipeTShape->setAlignment(Qt::AlignCenter);
|
||||||
|
LabelImgPipeTShape->setMinimumSize(300, 300);
|
||||||
|
|
||||||
|
layoutGroupMain->addWidget(MainTubeGroupParams, 0, 0, 1, 1);
|
||||||
|
layoutGroupMain->addWidget(IncidentTubeGroupParams, 1, 0, 1, 1);
|
||||||
|
layoutGroupMain->addWidget(ChamferGroupParams, 2, 0, 1, 1);
|
||||||
|
layoutGroupMain->addWidget(FilletGroupParams, 3, 0, 1, 1);
|
||||||
|
layoutGroupMain->addWidget(HexMeshCheckBox, 4, 0, 1, 1);
|
||||||
|
|
||||||
|
layoutGroupMain->addWidget(LabelImgPipeTShape, 0, 1, 5, 1);
|
||||||
|
layoutGroupMain->setColumnStretch(1, 1); // stretch of column 0 is supposed 0 by default
|
||||||
|
|
||||||
|
// Thickness reduction parameters
|
||||||
|
QGroupBox* GroupReduct = new QGroupBox();
|
||||||
|
QGridLayout* layoutGroupReduct = new QGridLayout (GroupReduct);
|
||||||
|
|
||||||
|
LReductionGroupParams = new AdvancedGUI_4Spin();
|
||||||
|
LReductionGroupParams->GroupBox1->setCheckable(true);
|
||||||
|
LReductionGroupParams->GroupBox1->setChecked(false);
|
||||||
|
LReductionGroupParams->GroupBox1->setTitle(tr("GEOM_PIPE_TSHAPE_LEFT_TR"));
|
||||||
|
LReductionGroupParams->TextLabel1->setText(tr("GEOM_PIPE_TSHAPE_TR_R").arg("L"));
|
||||||
|
LReductionGroupParams->TextLabel2->setText(tr("GEOM_PIPE_TSHAPE_TR_W").arg("L"));
|
||||||
|
LReductionGroupParams->TextLabel3->setText(tr("GEOM_PIPE_TSHAPE_TR_L_TRANS").arg("L"));
|
||||||
|
LReductionGroupParams->TextLabel4->setText(tr("GEOM_PIPE_TSHAPE_TR_L_THIN").arg("L"));
|
||||||
|
|
||||||
|
RReductionGroupParams = new AdvancedGUI_4Spin();
|
||||||
|
RReductionGroupParams->GroupBox1->setCheckable(true);
|
||||||
|
RReductionGroupParams->GroupBox1->setChecked(false);
|
||||||
|
RReductionGroupParams->GroupBox1->setTitle(tr("GEOM_PIPE_TSHAPE_RIGHT_TR"));
|
||||||
|
RReductionGroupParams->TextLabel1->setText(tr("GEOM_PIPE_TSHAPE_TR_R").arg("R"));
|
||||||
|
RReductionGroupParams->TextLabel2->setText(tr("GEOM_PIPE_TSHAPE_TR_W").arg("R"));
|
||||||
|
RReductionGroupParams->TextLabel3->setText(tr("GEOM_PIPE_TSHAPE_TR_L_TRANS").arg("R"));
|
||||||
|
RReductionGroupParams->TextLabel4->setText(tr("GEOM_PIPE_TSHAPE_TR_L_THIN").arg("R"));
|
||||||
|
|
||||||
|
IReductionGroupParams = new AdvancedGUI_4Spin();
|
||||||
|
IReductionGroupParams->GroupBox1->setCheckable(true);
|
||||||
|
IReductionGroupParams->GroupBox1->setChecked(false);
|
||||||
|
IReductionGroupParams->GroupBox1->setTitle(tr("GEOM_PIPE_TSHAPE_INCI_TR"));
|
||||||
|
IReductionGroupParams->TextLabel1->setText(tr("GEOM_PIPE_TSHAPE_TR_R").arg("I"));
|
||||||
|
IReductionGroupParams->TextLabel2->setText(tr("GEOM_PIPE_TSHAPE_TR_W").arg("I"));
|
||||||
|
IReductionGroupParams->TextLabel3->setText(tr("GEOM_PIPE_TSHAPE_TR_L_TRANS").arg("I"));
|
||||||
|
IReductionGroupParams->TextLabel4->setText(tr("GEOM_PIPE_TSHAPE_TR_L_THIN").arg("I"));
|
||||||
|
|
||||||
|
LabelImgReduction = new QLabel();
|
||||||
|
LabelImgReduction->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
LabelImgReduction->setAlignment(Qt::AlignCenter);
|
||||||
|
LabelImgReduction->setMinimumSize(300, 300);
|
||||||
|
|
||||||
|
layoutGroupReduct->addWidget(LReductionGroupParams->GroupBox1, 0, 0, 1, 1);
|
||||||
|
layoutGroupReduct->addWidget(RReductionGroupParams->GroupBox1, 1, 0, 1, 1);
|
||||||
|
layoutGroupReduct->addWidget(IReductionGroupParams->GroupBox1, 2, 0, 1, 1);
|
||||||
|
|
||||||
|
layoutGroupReduct->addWidget(LabelImgReduction, 0, 1, 3, 1);
|
||||||
|
layoutGroupReduct->setColumnStretch(1, 1); // stretch of column 0 is supposed 0 by default
|
||||||
|
|
||||||
|
// Position parameters
|
||||||
|
QGroupBox* GroupPos = new QGroupBox();
|
||||||
|
QVBoxLayout* layoutGroupPos = new QVBoxLayout (GroupPos);
|
||||||
|
|
||||||
JunctionPointsSel = new DlgRef_6Sel();
|
JunctionPointsSel = new DlgRef_6Sel();
|
||||||
JunctionPointsSel->GroupBox1->setTitle(tr("GEOM_PIPE_TSHAPE_POSITION"));
|
JunctionPointsSel->GroupBox1->setTitle(tr("GEOM_PIPE_TSHAPE_POSITION"));
|
||||||
JunctionPointsSel->GroupBox1->setCheckable(true);
|
JunctionPointsSel->GroupBox1->setCheckable(true);
|
||||||
@ -136,28 +198,16 @@ AdvancedGUI_PipeTShapeDlg::AdvancedGUI_PipeTShapeDlg(GeometryGUI* theGeometryGUI
|
|||||||
JunctionPointsSel->TextLabel6->setAttribute(Qt::WA_DeleteOnClose);
|
JunctionPointsSel->TextLabel6->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
JunctionPointsSel->TextLabel6->close();
|
JunctionPointsSel->TextLabel6->close();
|
||||||
|
|
||||||
// 1st row, height = 1, colspan = 3
|
layoutGroupPos->addWidget(JunctionPointsSel);
|
||||||
int rowPict = 0, colPict = 0, rowspanPict = 1, colspanPict = 3;
|
layoutGroupPos->addStretch();
|
||||||
// 2nd row, height = 4, col 1
|
|
||||||
int rowMain = rowspanPict, colMain = 0, rowspanMain = 2, colspanMain = 1;
|
|
||||||
int rowCham = rowspanPict + rowspanMain, colCham = 0, rowspanCham = 2, colspanCham = 1;
|
|
||||||
// 2nd row, height = 4, col 2
|
|
||||||
int rowInc = rowspanPict, colInc = 1, rowspanInc = 2, colspanInc = 1;
|
|
||||||
int rowFill = rowspanPict + rowspanInc, colFill = 1, rowspanFill = 1, colspanFill = 1;
|
|
||||||
int rowHex = rowspanPict + rowspanInc + rowspanFill, colHex = 1, rowspanHex = 1, colspanHex = 1;
|
|
||||||
// 2nd row, height = 4, col 3
|
|
||||||
int rowNewPosVal = rowspanPict, colNewPosVal = 2, rowspanNewPosVal = 4, colspanNewPosVal = 1;
|
|
||||||
|
|
||||||
myMainLayout->addWidget(tshapeScreenShotLabel, rowPict, colPict, rowspanPict, colspanPict);
|
//aTabWidget->addTab(GroupMain, imageOp, tr("GEOM_PIPETSHAPE_GROUPMAIN"));
|
||||||
|
aTabWidget->addTab(GroupMain, tr("GEOM_PIPETSHAPE_GROUPMAIN"));
|
||||||
|
aTabWidget->addTab(GroupReduct, tr("GEOM_PIPETSHAPE_GROUPREDUCT"));
|
||||||
|
aTabWidget->addTab(GroupPos, tr("GEOM_PIPETSHAPE_GROUPPOS"));
|
||||||
|
|
||||||
myMainLayout->addWidget(MainTubeGroupParams, rowMain, colMain, rowspanMain, colspanMain);
|
myMainLayout->addWidget(aTabWidget, 0, 0, 1, 1);
|
||||||
myMainLayout->addWidget(FilletGroupParams, rowFill, colFill, rowspanFill, colspanFill);
|
connect(aTabWidget, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
|
||||||
myMainLayout->addWidget(HexMeshCheckBox, rowHex, colHex, rowspanHex, colspanHex);
|
|
||||||
|
|
||||||
myMainLayout->addWidget(IncidentTubeGroupParams, rowInc, colInc, rowspanInc, colspanInc);
|
|
||||||
myMainLayout->addWidget(ChamferGroupParams, rowCham, colCham, rowspanCham, colspanCham);
|
|
||||||
|
|
||||||
myMainLayout->addWidget(JunctionPointsSel, rowNewPosVal, colNewPosVal, rowspanNewPosVal, colspanNewPosVal);
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName("create_pipetshape_page.html");
|
setHelpFileName("create_pipetshape_page.html");
|
||||||
@ -176,10 +226,12 @@ AdvancedGUI_PipeTShapeDlg::~AdvancedGUI_PipeTShapeDlg() {
|
|||||||
// function : Init()
|
// function : Init()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::Init() {
|
void AdvancedGUI_PipeTShapeDlg::Init()
|
||||||
|
{
|
||||||
// Get setting of step value from file configuration
|
// Get setting of step value from file configuration
|
||||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
|
double step = resMgr->doubleValue("Geometry", "SettingsGeomStep", 100);
|
||||||
|
double minValue = Precision::Approximation();
|
||||||
|
|
||||||
myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
|
myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil();
|
||||||
myOkPoint1 = myOkPoint2 = myOkPoint3 = false;
|
myOkPoint1 = myOkPoint2 = myOkPoint3 = false;
|
||||||
@ -187,15 +239,30 @@ void AdvancedGUI_PipeTShapeDlg::Init() {
|
|||||||
pipeTShapeGroupObjects.clear();
|
pipeTShapeGroupObjects.clear();
|
||||||
|
|
||||||
// min, max, step and decimals for spin boxes
|
// min, max, step and decimals for spin boxes
|
||||||
initSpinBox(MainTubeGroupParams->SpinBox_DX, Precision::Approximation(), COORD_MAX, step, "length_precision");
|
initSpinBox(MainTubeGroupParams->SpinBox_DX, minValue, COORD_MAX, step, "length_precision");
|
||||||
initSpinBox(MainTubeGroupParams->SpinBox_DY, Precision::Approximation(), COORD_MAX, step, "length_precision");
|
initSpinBox(MainTubeGroupParams->SpinBox_DY, minValue, COORD_MAX, step, "length_precision");
|
||||||
initSpinBox(MainTubeGroupParams->SpinBox_DZ, Precision::Approximation(), COORD_MAX, step, "length_precision");
|
initSpinBox(MainTubeGroupParams->SpinBox_DZ, minValue, COORD_MAX, step, "length_precision");
|
||||||
initSpinBox(IncidentTubeGroupParams->SpinBox_DX, Precision::Approximation(), COORD_MAX, step, "length_precision");
|
initSpinBox(IncidentTubeGroupParams->SpinBox_DX, minValue, COORD_MAX, step, "length_precision");
|
||||||
initSpinBox(IncidentTubeGroupParams->SpinBox_DY, Precision::Approximation(), COORD_MAX, step, "length_precision");
|
initSpinBox(IncidentTubeGroupParams->SpinBox_DY, minValue, COORD_MAX, step, "length_precision");
|
||||||
initSpinBox(IncidentTubeGroupParams->SpinBox_DZ, Precision::Approximation(), COORD_MAX, step, "length_precision");
|
initSpinBox(IncidentTubeGroupParams->SpinBox_DZ, minValue, COORD_MAX, step, "length_precision");
|
||||||
initSpinBox(ChamferGroupParams->SpinBox_DX, Precision::Approximation(), COORD_MAX, step, "length_precision");
|
initSpinBox(ChamferGroupParams->SpinBox_DX, minValue, COORD_MAX, step, "length_precision");
|
||||||
initSpinBox(ChamferGroupParams->SpinBox_DY, Precision::Approximation(), COORD_MAX, step, "length_precision");
|
initSpinBox(ChamferGroupParams->SpinBox_DY, minValue, COORD_MAX, step, "length_precision");
|
||||||
initSpinBox(FilletGroupParams->SpinBox_DX, Precision::Approximation(), COORD_MAX, step, "length_precision");
|
initSpinBox(FilletGroupParams->SpinBox_DX, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
|
||||||
|
initSpinBox(LReductionGroupParams->SpinBox1, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
initSpinBox(LReductionGroupParams->SpinBox2, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
initSpinBox(LReductionGroupParams->SpinBox3, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
initSpinBox(LReductionGroupParams->SpinBox4, 0., COORD_MAX, step, "length_precision");
|
||||||
|
|
||||||
|
initSpinBox(RReductionGroupParams->SpinBox1, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
initSpinBox(RReductionGroupParams->SpinBox2, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
initSpinBox(RReductionGroupParams->SpinBox3, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
initSpinBox(RReductionGroupParams->SpinBox4, 0., COORD_MAX, step, "length_precision");
|
||||||
|
|
||||||
|
initSpinBox(IReductionGroupParams->SpinBox1, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
initSpinBox(IReductionGroupParams->SpinBox2, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
initSpinBox(IReductionGroupParams->SpinBox3, minValue, COORD_MAX, step, "length_precision");
|
||||||
|
initSpinBox(IReductionGroupParams->SpinBox4, 0., COORD_MAX, step, "length_precision");
|
||||||
|
|
||||||
// init variables
|
// init variables
|
||||||
MainTubeGroupParams->SpinBox_DX->setValue(80);
|
MainTubeGroupParams->SpinBox_DX->setValue(80);
|
||||||
@ -208,6 +275,21 @@ void AdvancedGUI_PipeTShapeDlg::Init() {
|
|||||||
ChamferGroupParams->SpinBox_DY->setValue(10);
|
ChamferGroupParams->SpinBox_DY->setValue(10);
|
||||||
FilletGroupParams->SpinBox_DX->setValue(20);
|
FilletGroupParams->SpinBox_DX->setValue(20);
|
||||||
|
|
||||||
|
LReductionGroupParams->SpinBox1->setValue(60);
|
||||||
|
LReductionGroupParams->SpinBox2->setValue(30);
|
||||||
|
LReductionGroupParams->SpinBox3->setValue(40);
|
||||||
|
LReductionGroupParams->SpinBox4->setValue(20);
|
||||||
|
|
||||||
|
RReductionGroupParams->SpinBox1->setValue(60);
|
||||||
|
RReductionGroupParams->SpinBox2->setValue(30);
|
||||||
|
RReductionGroupParams->SpinBox3->setValue(40);
|
||||||
|
RReductionGroupParams->SpinBox4->setValue(20);
|
||||||
|
|
||||||
|
IReductionGroupParams->SpinBox1->setValue(40);
|
||||||
|
IReductionGroupParams->SpinBox2->setValue(10);
|
||||||
|
IReductionGroupParams->SpinBox3->setValue(30);
|
||||||
|
IReductionGroupParams->SpinBox4->setValue(15);
|
||||||
|
|
||||||
CssNormal = QString("QDoubleSpinBox {");
|
CssNormal = QString("QDoubleSpinBox {");
|
||||||
CssNormal.append(MainTubeGroupParams->SpinBox_DZ->styleSheet());
|
CssNormal.append(MainTubeGroupParams->SpinBox_DZ->styleSheet());
|
||||||
CssNormal.append("}");
|
CssNormal.append("}");
|
||||||
@ -223,6 +305,7 @@ void AdvancedGUI_PipeTShapeDlg::Init() {
|
|||||||
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||||
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
||||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
|
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), this, SLOT(SetDoubleSpinBoxStep(double)));
|
||||||
|
//connect(this, SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));
|
||||||
// ValueChangedInSpinBox
|
// ValueChangedInSpinBox
|
||||||
connect(MainTubeGroupParams->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
connect(MainTubeGroupParams->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
connect(MainTubeGroupParams->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
connect(MainTubeGroupParams->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
@ -250,15 +333,34 @@ void AdvancedGUI_PipeTShapeDlg::Init() {
|
|||||||
//@@ put additional signal/slot connections here @@//
|
//@@ put additional signal/slot connections here @@//
|
||||||
|
|
||||||
initName(tr("GEOM_PIPE_TSHAPE"));
|
initName(tr("GEOM_PIPE_TSHAPE"));
|
||||||
updateTshapeScreenshotLabel();
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize(minimumSizeHint());
|
||||||
|
|
||||||
|
updateLabelImgPipeTShape();
|
||||||
|
LabelImgReduction->setPixmap(imageReduction.scaled(LabelImgReduction->size(),
|
||||||
|
Qt::KeepAspectRatio,
|
||||||
|
Qt::SmoothTransformation));
|
||||||
processPreview();
|
processPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : currentChanged()
|
||||||
|
// purpose : Tab widget management
|
||||||
|
//=================================================================================
|
||||||
|
void AdvancedGUI_PipeTShapeDlg::currentChanged (int tabId)
|
||||||
|
{
|
||||||
|
if (tabId == 0 || tabId == 1)
|
||||||
|
resizeEvent(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : ApplyNewDimensions()
|
// function : ApplyNewDimensions()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::ApplyNewDimensions() {
|
void AdvancedGUI_PipeTShapeDlg::ApplyNewDimensions()
|
||||||
|
{
|
||||||
QPushButton* send = (QPushButton*) sender();
|
QPushButton* send = (QPushButton*) sender();
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
@ -297,8 +399,8 @@ void AdvancedGUI_PipeTShapeDlg::ApplyNewDimensions() {
|
|||||||
// function : UpdatePicture()
|
// function : UpdatePicture()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::UpdatePicture(QWidget* old, QWidget* now) {
|
void AdvancedGUI_PipeTShapeDlg::UpdatePicture (QWidget* old, QWidget* now)
|
||||||
|
{
|
||||||
if (ChamferGroupParams->GroupBox1->isChecked())
|
if (ChamferGroupParams->GroupBox1->isChecked())
|
||||||
if (now == MainTubeGroupParams->SpinBox_DX)
|
if (now == MainTubeGroupParams->SpinBox_DX)
|
||||||
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE_CHAMFER_R1"));
|
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE_CHAMFER_R1"));
|
||||||
@ -351,14 +453,15 @@ void AdvancedGUI_PipeTShapeDlg::UpdatePicture(QWidget* old, QWidget* now) {
|
|||||||
else
|
else
|
||||||
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
||||||
|
|
||||||
updateTshapeScreenshotLabel();
|
updateLabelImgPipeTShape();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : SetPosition()
|
// function : SetPosition()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::SetPosition(bool isChecked) {
|
void AdvancedGUI_PipeTShapeDlg::SetPosition (bool isChecked)
|
||||||
|
{
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
erasePreview();
|
erasePreview();
|
||||||
JunctionPointsSel->LineEdit4->setText("");
|
JunctionPointsSel->LineEdit4->setText("");
|
||||||
@ -367,7 +470,8 @@ void AdvancedGUI_PipeTShapeDlg::SetPosition(bool isChecked) {
|
|||||||
//SelectionIntoArgument()));
|
//SelectionIntoArgument()));
|
||||||
JunctionPointsSel->PushButton1->click();
|
JunctionPointsSel->PushButton1->click();
|
||||||
SelectionIntoArgument();
|
SelectionIntoArgument();
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
|
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
|
||||||
JunctionPointsSel->LineEdit4->setText("");
|
JunctionPointsSel->LineEdit4->setText("");
|
||||||
JunctionPointsSel->LineEdit5->setText("");
|
JunctionPointsSel->LineEdit5->setText("");
|
||||||
@ -390,8 +494,8 @@ void AdvancedGUI_PipeTShapeDlg::ValueChangedInSpinBox(double newValue)
|
|||||||
// function : SelectionIntoArgument()
|
// function : SelectionIntoArgument()
|
||||||
// purpose : Called when selection as changed or other case
|
// purpose : Called when selection as changed or other case
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument() {
|
void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument()
|
||||||
|
{
|
||||||
erasePreview();
|
erasePreview();
|
||||||
//myEditCurrentArgument->setText("");
|
//myEditCurrentArgument->setText("");
|
||||||
|
|
||||||
@ -432,7 +536,8 @@ void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument() {
|
|||||||
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
GEOM::GEOM_IShapesOperations_var aShapesOp =
|
||||||
getGeomEngine()->GetIShapesOperations(getStudyId());
|
getGeomEngine()->GetIShapesOperations(getStudyId());
|
||||||
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
aSelectedObject = aFindedObject; // get Object from study
|
aSelectedObject = aFindedObject; // get Object from study
|
||||||
}
|
}
|
||||||
GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE);
|
GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE);
|
||||||
@ -471,45 +576,14 @@ void AdvancedGUI_PipeTShapeDlg::SelectionIntoArgument() {
|
|||||||
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
|
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
|
||||||
processPreview();
|
processPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
// GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(aSelList.First());
|
|
||||||
// if (aSelectedObject->_is_nil())
|
|
||||||
// return;
|
|
||||||
//
|
|
||||||
// myEditCurrentArgument->setText(GEOMBase::GetName(aSelectedObject));
|
|
||||||
//
|
|
||||||
// // clear selection
|
|
||||||
// disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
|
|
||||||
// myGeomGUI->getApp()->selectionMgr()->clearSelected();
|
|
||||||
// connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
|
||||||
//
|
|
||||||
// if (myEditCurrentArgument == JunctionPointsSel->LineEdit1) {
|
|
||||||
// myPoint1 = aSelectedObject;
|
|
||||||
// myOkPoint1 = true;
|
|
||||||
// if (!myOkPoint2)
|
|
||||||
// JunctionPointsSel->PushButton2->click();
|
|
||||||
// // P2GroupParams->PushButton1->click();
|
|
||||||
// } else if (myEditCurrentArgument == JunctionPointsSel->LineEdit2) {
|
|
||||||
// // } else if (myEditCurrentArgument == P2GroupParams->LineEdit1) {
|
|
||||||
// myPoint2 = aSelectedObject;
|
|
||||||
// myOkPoint2 = true;
|
|
||||||
// if (!myOkPoint3)
|
|
||||||
// JunctionPointsSel->PushButton3->click();
|
|
||||||
// // P3GroupParams->PushButton1->click();
|
|
||||||
// } else if (myEditCurrentArgument == JunctionPointsSel->LineEdit3) {
|
|
||||||
// // } else if (myEditCurrentArgument == P3GroupParams->LineEdit1) {
|
|
||||||
// myPoint3 = aSelectedObject;
|
|
||||||
// myOkPoint3 = true;
|
|
||||||
// if (!myOkPoint1)
|
|
||||||
// JunctionPointsSel->PushButton1->click();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : SetEditCurrentArgument()
|
// function : SetEditCurrentArgument()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::SetEditCurrentArgument() {
|
void AdvancedGUI_PipeTShapeDlg::SetEditCurrentArgument()
|
||||||
|
{
|
||||||
QPushButton* send = (QPushButton*) sender();
|
QPushButton* send = (QPushButton*) sender();
|
||||||
|
|
||||||
if (send == JunctionPointsSel->PushButton1) {
|
if (send == JunctionPointsSel->PushButton1) {
|
||||||
@ -518,13 +592,15 @@ void AdvancedGUI_PipeTShapeDlg::SetEditCurrentArgument() {
|
|||||||
JunctionPointsSel->LineEdit2->setEnabled(false);
|
JunctionPointsSel->LineEdit2->setEnabled(false);
|
||||||
JunctionPointsSel->PushButton3->setDown(false);
|
JunctionPointsSel->PushButton3->setDown(false);
|
||||||
JunctionPointsSel->LineEdit3->setEnabled(false);
|
JunctionPointsSel->LineEdit3->setEnabled(false);
|
||||||
} else if (send == JunctionPointsSel->PushButton2) {
|
}
|
||||||
|
else if (send == JunctionPointsSel->PushButton2) {
|
||||||
myEditCurrentArgument = JunctionPointsSel->LineEdit2;
|
myEditCurrentArgument = JunctionPointsSel->LineEdit2;
|
||||||
JunctionPointsSel->PushButton1->setDown(false);
|
JunctionPointsSel->PushButton1->setDown(false);
|
||||||
JunctionPointsSel->LineEdit1->setEnabled(false);
|
JunctionPointsSel->LineEdit1->setEnabled(false);
|
||||||
JunctionPointsSel->PushButton3->setDown(false);
|
JunctionPointsSel->PushButton3->setDown(false);
|
||||||
JunctionPointsSel->LineEdit3->setEnabled(false);
|
JunctionPointsSel->LineEdit3->setEnabled(false);
|
||||||
} else if (send == JunctionPointsSel->PushButton3) {
|
}
|
||||||
|
else if (send == JunctionPointsSel->PushButton3) {
|
||||||
myEditCurrentArgument = JunctionPointsSel->LineEdit3;
|
myEditCurrentArgument = JunctionPointsSel->LineEdit3;
|
||||||
JunctionPointsSel->PushButton1->setDown(false);
|
JunctionPointsSel->PushButton1->setDown(false);
|
||||||
JunctionPointsSel->LineEdit1->setEnabled(false);
|
JunctionPointsSel->LineEdit1->setEnabled(false);
|
||||||
@ -546,14 +622,16 @@ void AdvancedGUI_PipeTShapeDlg::SetEditCurrentArgument() {
|
|||||||
//globalSelection(GEOM_POINT);
|
//globalSelection(GEOM_POINT);
|
||||||
globalSelection(); // close local contexts, if any
|
globalSelection(); // close local contexts, if any
|
||||||
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
|
||||||
|
this, SLOT(SelectionIntoArgument()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : SetDoubleSpinBoxStep()
|
// function : SetDoubleSpinBoxStep()
|
||||||
// purpose : Double spin box management
|
// purpose : Double spin box management
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::SetDoubleSpinBoxStep(double step) {
|
void AdvancedGUI_PipeTShapeDlg::SetDoubleSpinBoxStep (double step)
|
||||||
|
{
|
||||||
MainTubeGroupParams->SpinBox_DX->setSingleStep(step);
|
MainTubeGroupParams->SpinBox_DX->setSingleStep(step);
|
||||||
MainTubeGroupParams->SpinBox_DY->setSingleStep(step);
|
MainTubeGroupParams->SpinBox_DY->setSingleStep(step);
|
||||||
MainTubeGroupParams->SpinBox_DZ->setSingleStep(step);
|
MainTubeGroupParams->SpinBox_DZ->setSingleStep(step);
|
||||||
@ -563,13 +641,29 @@ void AdvancedGUI_PipeTShapeDlg::SetDoubleSpinBoxStep(double step) {
|
|||||||
ChamferGroupParams->SpinBox_DX->setSingleStep(step);
|
ChamferGroupParams->SpinBox_DX->setSingleStep(step);
|
||||||
ChamferGroupParams->SpinBox_DY->setSingleStep(step);
|
ChamferGroupParams->SpinBox_DY->setSingleStep(step);
|
||||||
FilletGroupParams->SpinBox_DX->setSingleStep(step);
|
FilletGroupParams->SpinBox_DX->setSingleStep(step);
|
||||||
|
|
||||||
|
LReductionGroupParams->SpinBox1->setSingleStep(step);
|
||||||
|
LReductionGroupParams->SpinBox2->setSingleStep(step);
|
||||||
|
LReductionGroupParams->SpinBox3->setSingleStep(step);
|
||||||
|
LReductionGroupParams->SpinBox4->setSingleStep(step);
|
||||||
|
|
||||||
|
RReductionGroupParams->SpinBox1->setSingleStep(step);
|
||||||
|
RReductionGroupParams->SpinBox2->setSingleStep(step);
|
||||||
|
RReductionGroupParams->SpinBox3->setSingleStep(step);
|
||||||
|
RReductionGroupParams->SpinBox4->setSingleStep(step);
|
||||||
|
|
||||||
|
IReductionGroupParams->SpinBox1->setSingleStep(step);
|
||||||
|
IReductionGroupParams->SpinBox2->setSingleStep(step);
|
||||||
|
IReductionGroupParams->SpinBox3->setSingleStep(step);
|
||||||
|
IReductionGroupParams->SpinBox4->setSingleStep(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : ClickOnOk()
|
// function : ClickOnOk()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::ClickOnOk() {
|
void AdvancedGUI_PipeTShapeDlg::ClickOnOk()
|
||||||
|
{
|
||||||
setIsApplyAndClose( true );
|
setIsApplyAndClose( true );
|
||||||
if (ClickOnApply())
|
if (ClickOnApply())
|
||||||
ClickOnCancel();
|
ClickOnCancel();
|
||||||
@ -579,7 +673,8 @@ void AdvancedGUI_PipeTShapeDlg::ClickOnOk() {
|
|||||||
// function : ClickOnApply()
|
// function : ClickOnApply()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool AdvancedGUI_PipeTShapeDlg::ClickOnApply() {
|
bool AdvancedGUI_PipeTShapeDlg::ClickOnApply()
|
||||||
|
{
|
||||||
if (!onAccept())
|
if (!onAccept())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -592,7 +687,8 @@ bool AdvancedGUI_PipeTShapeDlg::ClickOnApply() {
|
|||||||
// function : ActivateThisDialog()
|
// function : ActivateThisDialog()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::ActivateThisDialog() {
|
void AdvancedGUI_PipeTShapeDlg::ActivateThisDialog()
|
||||||
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
//globalSelection( GEOM_POINT);
|
//globalSelection( GEOM_POINT);
|
||||||
//connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(
|
//connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(
|
||||||
@ -606,8 +702,9 @@ void AdvancedGUI_PipeTShapeDlg::ActivateThisDialog() {
|
|||||||
// function : enterEvent [REDEFINED]
|
// function : enterEvent [REDEFINED]
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::enterEvent(QEvent*) {
|
void AdvancedGUI_PipeTShapeDlg::enterEvent (QEvent*)
|
||||||
if (!mainFrame()->GroupConstructors->isEnabled())
|
{
|
||||||
|
if (!mainFrame()->GroupButtons->isEnabled())
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -615,20 +712,28 @@ void AdvancedGUI_PipeTShapeDlg::enterEvent(QEvent*) {
|
|||||||
// function : resizeEvent [REDEFINED]
|
// function : resizeEvent [REDEFINED]
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::resizeEvent(QResizeEvent */*event*/) {
|
void AdvancedGUI_PipeTShapeDlg::resizeEvent (QResizeEvent */*event*/)
|
||||||
QSize scaledSize = imagePipeTShape.size();
|
{
|
||||||
scaledSize.scale(tshapeScreenShotLabel->size(), Qt::KeepAspectRatio);
|
QSize scaledSize1 = imagePipeTShape.size();
|
||||||
if (!tshapeScreenShotLabel->pixmap()
|
scaledSize1.scale(LabelImgPipeTShape->size(), Qt::KeepAspectRatio);
|
||||||
|| scaledSize != tshapeScreenShotLabel->pixmap()->size())
|
if (!LabelImgPipeTShape->pixmap() || scaledSize1 != LabelImgPipeTShape->pixmap()->size())
|
||||||
updateTshapeScreenshotLabel();
|
updateLabelImgPipeTShape();
|
||||||
|
|
||||||
|
QSize scaledSize2 = imageReduction.size();
|
||||||
|
scaledSize2.scale(LabelImgReduction->size(), Qt::KeepAspectRatio);
|
||||||
|
if (!LabelImgReduction->pixmap() || scaledSize2 != LabelImgReduction->pixmap()->size())
|
||||||
|
LabelImgReduction->setPixmap(imageReduction.scaled(LabelImgReduction->size(),
|
||||||
|
Qt::KeepAspectRatio,
|
||||||
|
Qt::SmoothTransformation));
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : updateTshapeScreenshotLabel
|
// function : updateLabelImgPipeTShape
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::updateTshapeScreenshotLabel() {
|
void AdvancedGUI_PipeTShapeDlg::updateLabelImgPipeTShape()
|
||||||
tshapeScreenShotLabel->setPixmap(imagePipeTShape.scaled(tshapeScreenShotLabel->size(),
|
{
|
||||||
|
LabelImgPipeTShape->setPixmap(imagePipeTShape.scaled(LabelImgPipeTShape->size(),
|
||||||
Qt::KeepAspectRatio,
|
Qt::KeepAspectRatio,
|
||||||
Qt::SmoothTransformation));
|
Qt::SmoothTransformation));
|
||||||
}
|
}
|
||||||
@ -637,7 +742,8 @@ void AdvancedGUI_PipeTShapeDlg::updateTshapeScreenshotLabel() {
|
|||||||
// function : ChamferOrFillet()
|
// function : ChamferOrFillet()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::ChamferOrFillet(bool) {
|
void AdvancedGUI_PipeTShapeDlg::ChamferOrFillet (bool)
|
||||||
|
{
|
||||||
QGroupBox* send = (QGroupBox*) sender();
|
QGroupBox* send = (QGroupBox*) sender();
|
||||||
|
|
||||||
if (send == ChamferGroupParams->GroupBox1) {
|
if (send == ChamferGroupParams->GroupBox1) {
|
||||||
@ -649,11 +755,13 @@ void AdvancedGUI_PipeTShapeDlg::ChamferOrFillet(bool) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
||||||
updateTshapeScreenshotLabel();
|
|
||||||
|
updateLabelImgPipeTShape();
|
||||||
if (myOkPoint1 && myOkPoint2 && myOkPoint3)
|
if (myOkPoint1 && myOkPoint2 && myOkPoint3)
|
||||||
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
|
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
|
||||||
processPreview();
|
processPreview();
|
||||||
} else if (send == FilletGroupParams->GroupBox1) {
|
}
|
||||||
|
else if (send == FilletGroupParams->GroupBox1) {
|
||||||
if (send->isChecked()) {
|
if (send->isChecked()) {
|
||||||
disconnect(ChamferGroupParams->GroupBox1, SIGNAL(toggled(bool)), this, 0);
|
disconnect(ChamferGroupParams->GroupBox1, SIGNAL(toggled(bool)), this, 0);
|
||||||
ChamferGroupParams->GroupBox1->setChecked(!send->isChecked());
|
ChamferGroupParams->GroupBox1->setChecked(!send->isChecked());
|
||||||
@ -662,25 +770,25 @@ void AdvancedGUI_PipeTShapeDlg::ChamferOrFillet(bool) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
||||||
updateTshapeScreenshotLabel();
|
|
||||||
|
updateLabelImgPipeTShape();
|
||||||
if (myOkPoint1 && myOkPoint2 && myOkPoint3)
|
if (myOkPoint1 && myOkPoint2 && myOkPoint3)
|
||||||
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
|
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
|
||||||
processPreview();
|
processPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : DisplayPreview()
|
// function : DisplayPreview()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::DisplayPreview(const bool activate, const bool update, const bool toRemoveFromEngine,
|
void AdvancedGUI_PipeTShapeDlg::DisplayPreview (const bool activate, const bool update,
|
||||||
const double lineWidth, const int displayMode, const int color) {
|
const bool toRemoveFromEngine, const double lineWidth,
|
||||||
isPreview = true;
|
const int displayMode, const int color)
|
||||||
|
{
|
||||||
QString msg;
|
QString msg;
|
||||||
if (!isValid(msg)) {
|
if (!isValid(msg)) {
|
||||||
erasePreview(update);
|
erasePreview(update);
|
||||||
isPreview = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -693,7 +801,8 @@ void AdvancedGUI_PipeTShapeDlg::DisplayPreview(const bool activate, const bool u
|
|||||||
HexMeshCheckBox->setChecked(false);
|
HexMeshCheckBox->setChecked(false);
|
||||||
if (!executeNoCheck(objects) || !getOperation()->IsDone()) {
|
if (!executeNoCheck(objects) || !getOperation()->IsDone()) {
|
||||||
wc.suspend();
|
wc.suspend();
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
ObjectList::iterator it = objects.begin();
|
ObjectList::iterator it = objects.begin();
|
||||||
GEOM::GEOM_Object_var obj = *it;
|
GEOM::GEOM_Object_var obj = *it;
|
||||||
displayPreview(obj, true, activate, false, lineWidth, displayMode, color);
|
displayPreview(obj, true, activate, false, lineWidth, displayMode, color);
|
||||||
@ -705,16 +814,16 @@ void AdvancedGUI_PipeTShapeDlg::DisplayPreview(const bool activate, const bool u
|
|||||||
SalomeApp_Tools::QtCatchCorbaException(e);
|
SalomeApp_Tools::QtCatchCorbaException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
isPreview = false;
|
|
||||||
|
|
||||||
if (update)
|
if (update)
|
||||||
updateViewer();
|
updateViewer();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : createOperation
|
// function : createOperation
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation() {
|
GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation()
|
||||||
|
{
|
||||||
return getGeomEngine()->GetIAdvancedOperations(getStudyId());
|
return getGeomEngine()->GetIAdvancedOperations(getStudyId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -722,7 +831,8 @@ GEOM::GEOM_IOperations_ptr AdvancedGUI_PipeTShapeDlg::createOperation() {
|
|||||||
// function : isValid
|
// function : isValid
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool AdvancedGUI_PipeTShapeDlg::isValid(QString& msg) {
|
bool AdvancedGUI_PipeTShapeDlg::isValid (QString& msg)
|
||||||
|
{
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
|
|
||||||
ok = MainTubeGroupParams->SpinBox_DX->isValid(msg, !IsPreview()) && ok;
|
ok = MainTubeGroupParams->SpinBox_DX->isValid(msg, !IsPreview()) && ok;
|
||||||
@ -735,6 +845,25 @@ bool AdvancedGUI_PipeTShapeDlg::isValid(QString& msg) {
|
|||||||
ok = ChamferGroupParams->SpinBox_DY->isValid(msg, !IsPreview()) && ok;
|
ok = ChamferGroupParams->SpinBox_DY->isValid(msg, !IsPreview()) && ok;
|
||||||
ok = FilletGroupParams->SpinBox_DX->isValid(msg, !IsPreview()) && ok;
|
ok = FilletGroupParams->SpinBox_DX->isValid(msg, !IsPreview()) && ok;
|
||||||
|
|
||||||
|
if (LReductionGroupParams->GroupBox1->isChecked()) {
|
||||||
|
ok = LReductionGroupParams->SpinBox1->isValid(msg, !IsPreview()) && ok;
|
||||||
|
ok = LReductionGroupParams->SpinBox2->isValid(msg, !IsPreview()) && ok;
|
||||||
|
ok = LReductionGroupParams->SpinBox3->isValid(msg, !IsPreview()) && ok;
|
||||||
|
ok = LReductionGroupParams->SpinBox4->isValid(msg, !IsPreview()) && ok;
|
||||||
|
}
|
||||||
|
if (RReductionGroupParams->GroupBox1->isChecked()) {
|
||||||
|
ok = RReductionGroupParams->SpinBox1->isValid(msg, !IsPreview()) && ok;
|
||||||
|
ok = RReductionGroupParams->SpinBox2->isValid(msg, !IsPreview()) && ok;
|
||||||
|
ok = RReductionGroupParams->SpinBox3->isValid(msg, !IsPreview()) && ok;
|
||||||
|
ok = RReductionGroupParams->SpinBox4->isValid(msg, !IsPreview()) && ok;
|
||||||
|
}
|
||||||
|
if (IReductionGroupParams->GroupBox1->isChecked()) {
|
||||||
|
ok = IReductionGroupParams->SpinBox1->isValid(msg, !IsPreview()) && ok;
|
||||||
|
ok = IReductionGroupParams->SpinBox2->isValid(msg, !IsPreview()) && ok;
|
||||||
|
ok = IReductionGroupParams->SpinBox3->isValid(msg, !IsPreview()) && ok;
|
||||||
|
ok = IReductionGroupParams->SpinBox4->isValid(msg, !IsPreview()) && ok;
|
||||||
|
}
|
||||||
|
|
||||||
ok = fabs(MainTubeGroupParams->SpinBox_DX->value()) > Precision::Confusion() && ok;
|
ok = fabs(MainTubeGroupParams->SpinBox_DX->value()) > Precision::Confusion() && ok;
|
||||||
ok = fabs(MainTubeGroupParams->SpinBox_DY->value()) > Precision::Confusion() && ok;
|
ok = fabs(MainTubeGroupParams->SpinBox_DY->value()) > Precision::Confusion() && ok;
|
||||||
ok = fabs(MainTubeGroupParams->SpinBox_DZ->value()) > Precision::Confusion() && ok;
|
ok = fabs(MainTubeGroupParams->SpinBox_DZ->value()) > Precision::Confusion() && ok;
|
||||||
@ -755,9 +884,10 @@ bool AdvancedGUI_PipeTShapeDlg::isValid(QString& msg) {
|
|||||||
// function : CheckCompatiblePosition()
|
// function : CheckCompatiblePosition()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var theP1,
|
bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition
|
||||||
GEOM::GEOM_Object_var theP2, GEOM::GEOM_Object_var theP3, double theTolerance) {
|
(GEOM::GEOM_Object_var theP1, GEOM::GEOM_Object_var theP2, GEOM::GEOM_Object_var theP3,
|
||||||
|
double theTolerance)
|
||||||
|
{
|
||||||
MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
|
MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
|
||||||
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
|
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
|
||||||
JunctionPointsSel->PushButton4->setStyleSheet(CssNormal);
|
JunctionPointsSel->PushButton4->setStyleSheet(CssNormal);
|
||||||
@ -817,7 +947,8 @@ bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var th
|
|||||||
(newL1 * (1 + theTolerance) - theL1 >= Precision::Approximation())) {
|
(newL1 * (1 + theTolerance) - theL1 >= Precision::Approximation())) {
|
||||||
disconnect(MainTubeGroupParams->SpinBox_DZ, 0, this, 0);
|
disconnect(MainTubeGroupParams->SpinBox_DZ, 0, this, 0);
|
||||||
MainTubeGroupParams->SpinBox_DZ->setValue(newL1);
|
MainTubeGroupParams->SpinBox_DZ->setValue(newL1);
|
||||||
connect(MainTubeGroupParams->SpinBox_DZ, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double)));
|
connect(MainTubeGroupParams->SpinBox_DZ, SIGNAL(valueChanged(double)),
|
||||||
|
this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
MainTubeGroupParams->SpinBox_DZ->setToolTip("Value was recomputed to fit with position");
|
MainTubeGroupParams->SpinBox_DZ->setToolTip("Value was recomputed to fit with position");
|
||||||
MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssAcceptable);
|
MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssAcceptable);
|
||||||
JunctionPointsSel->PushButton4->setStyleSheet(CssAcceptable);
|
JunctionPointsSel->PushButton4->setStyleSheet(CssAcceptable);
|
||||||
@ -857,8 +988,12 @@ bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var th
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AdvancedGUI_PipeTShapeDlg::execute(ObjectList& objects) {
|
//=================================================================================
|
||||||
|
// function : execute
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
|
bool AdvancedGUI_PipeTShapeDlg::execute (ObjectList& objects)
|
||||||
|
{
|
||||||
if (JunctionPointsSel->GroupBox1->isChecked() && myOkPoint1 && myOkPoint2 && myOkPoint3)
|
if (JunctionPointsSel->GroupBox1->isChecked() && myOkPoint1 && myOkPoint2 && myOkPoint3)
|
||||||
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
|
CheckCompatiblePosition(myPoint1, myPoint2, myPoint3, 0.01);
|
||||||
|
|
||||||
@ -866,10 +1001,11 @@ bool AdvancedGUI_PipeTShapeDlg::execute(ObjectList& objects) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : execute
|
// function : executeNoCheck
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool AdvancedGUI_PipeTShapeDlg::executeNoCheck(ObjectList& objects) {
|
bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
|
||||||
|
{
|
||||||
bool res = false;
|
bool res = false;
|
||||||
|
|
||||||
// GEOM::GEOM_Object_var anObj;
|
// GEOM::GEOM_Object_var anObj;
|
||||||
@ -889,6 +1025,30 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck(ObjectList& objects) {
|
|||||||
CORBA::Double theRF = FilletGroupParams->SpinBox_DX->value();
|
CORBA::Double theRF = FilletGroupParams->SpinBox_DX->value();
|
||||||
CORBA::Boolean theHexMesh = HexMeshCheckBox->isChecked();
|
CORBA::Boolean theHexMesh = HexMeshCheckBox->isChecked();
|
||||||
|
|
||||||
|
// Thickness reductions
|
||||||
|
CORBA::Double theRL = 0., theWL = 0., theLtransL = 0., theLthinL = 0.;
|
||||||
|
CORBA::Double theRR = 0., theWR = 0., theLtransR = 0., theLthinR = 0.;
|
||||||
|
CORBA::Double theRI = 0., theWI = 0., theLtransI = 0., theLthinI = 0.;
|
||||||
|
|
||||||
|
if (LReductionGroupParams->GroupBox1->isChecked()) {
|
||||||
|
theRL = LReductionGroupParams->SpinBox1->value();
|
||||||
|
theWL = LReductionGroupParams->SpinBox2->value();
|
||||||
|
theLtransL = LReductionGroupParams->SpinBox3->value();
|
||||||
|
theLthinL = LReductionGroupParams->SpinBox4->value();
|
||||||
|
}
|
||||||
|
if (RReductionGroupParams->GroupBox1->isChecked()) {
|
||||||
|
theRR = RReductionGroupParams->SpinBox1->value();
|
||||||
|
theWR = RReductionGroupParams->SpinBox2->value();
|
||||||
|
theLtransR = RReductionGroupParams->SpinBox3->value();
|
||||||
|
theLthinR = RReductionGroupParams->SpinBox4->value();
|
||||||
|
}
|
||||||
|
if (IReductionGroupParams->GroupBox1->isChecked()) {
|
||||||
|
theRI = IReductionGroupParams->SpinBox1->value();
|
||||||
|
theWI = IReductionGroupParams->SpinBox2->value();
|
||||||
|
theLtransI = IReductionGroupParams->SpinBox3->value();
|
||||||
|
theLthinI = IReductionGroupParams->SpinBox4->value();
|
||||||
|
}
|
||||||
|
|
||||||
//if (JunctionPointsSel->GroupBox1->isChecked()) {
|
//if (JunctionPointsSel->GroupBox1->isChecked()) {
|
||||||
// CheckCompatiblePosition(theL1, theL2, myPoint1, myPoint2, myPoint3, 0.01);
|
// CheckCompatiblePosition(theL1, theL2, myPoint1, myPoint2, myPoint3, 0.01);
|
||||||
// theL1 = MainTubeGroupParams->SpinBox_DZ->value();
|
// theL1 = MainTubeGroupParams->SpinBox_DZ->value();
|
||||||
@ -898,24 +1058,45 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck(ObjectList& objects) {
|
|||||||
// call engine function
|
// call engine function
|
||||||
if (ChamferGroupParams->GroupBox1->isChecked()) {
|
if (ChamferGroupParams->GroupBox1->isChecked()) {
|
||||||
if (JunctionPointsSel->GroupBox1->isChecked())
|
if (JunctionPointsSel->GroupBox1->isChecked())
|
||||||
anObj = anOper->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW,
|
anObj = anOper->MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
theHexMesh, myPoint1, myPoint2, myPoint3);
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theH, theW, theHexMesh, myPoint1, myPoint2, myPoint3);
|
||||||
else
|
else
|
||||||
anObj = anOper->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh);
|
anObj = anOper->MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theH, theW, theHexMesh);
|
||||||
}
|
}
|
||||||
else if (FilletGroupParams->GroupBox1->isChecked()) {
|
else if (FilletGroupParams->GroupBox1->isChecked()) {
|
||||||
if (JunctionPointsSel->GroupBox1->isChecked())
|
if (JunctionPointsSel->GroupBox1->isChecked())
|
||||||
anObj = anOper->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF,
|
anObj = anOper->MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
theHexMesh, myPoint1, myPoint2, myPoint3);
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theRF, theHexMesh, myPoint1, myPoint2, myPoint3);
|
||||||
else
|
else
|
||||||
anObj = anOper->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh);
|
anObj = anOper->MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theRF, theHexMesh);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (JunctionPointsSel->GroupBox1->isChecked())
|
if (JunctionPointsSel->GroupBox1->isChecked())
|
||||||
anObj = anOper->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, myPoint1,
|
anObj = anOper->MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
myPoint2, myPoint3);
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theHexMesh, myPoint1, myPoint2, myPoint3);
|
||||||
else
|
else
|
||||||
anObj = anOper->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh);
|
anObj = anOper->MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theHexMesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
res = anObj->length();
|
res = anObj->length();
|
||||||
@ -932,6 +1113,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck(ObjectList& objects) {
|
|||||||
aParameters << IncidentTubeGroupParams->SpinBox_DX->text(); // R2 parameter
|
aParameters << IncidentTubeGroupParams->SpinBox_DX->text(); // R2 parameter
|
||||||
aParameters << IncidentTubeGroupParams->SpinBox_DY->text(); // W2 parameter
|
aParameters << IncidentTubeGroupParams->SpinBox_DY->text(); // W2 parameter
|
||||||
aParameters << IncidentTubeGroupParams->SpinBox_DZ->text(); // L2 parameter
|
aParameters << IncidentTubeGroupParams->SpinBox_DZ->text(); // L2 parameter
|
||||||
|
|
||||||
if (ChamferGroupParams->GroupBox1->isChecked()) { // Chamfer parameter
|
if (ChamferGroupParams->GroupBox1->isChecked()) { // Chamfer parameter
|
||||||
aParameters << ChamferGroupParams->SpinBox_DX->text(); // H parameter
|
aParameters << ChamferGroupParams->SpinBox_DX->text(); // H parameter
|
||||||
aParameters << ChamferGroupParams->SpinBox_DY->text(); // W parameter
|
aParameters << ChamferGroupParams->SpinBox_DY->text(); // W parameter
|
||||||
@ -939,6 +1121,35 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck(ObjectList& objects) {
|
|||||||
if (FilletGroupParams->GroupBox1->isChecked()) // Fillet parameter
|
if (FilletGroupParams->GroupBox1->isChecked()) // Fillet parameter
|
||||||
aParameters << FilletGroupParams->SpinBox_DX->text(); // RF parameter
|
aParameters << FilletGroupParams->SpinBox_DX->text(); // RF parameter
|
||||||
|
|
||||||
|
// Thickness reductions
|
||||||
|
if (LReductionGroupParams->GroupBox1->isChecked()) {
|
||||||
|
aParameters << LReductionGroupParams->SpinBox1->text();
|
||||||
|
aParameters << LReductionGroupParams->SpinBox2->text();
|
||||||
|
aParameters << LReductionGroupParams->SpinBox3->text();
|
||||||
|
aParameters << LReductionGroupParams->SpinBox4->text();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
aParameters << "0" << "0" << "0" << "0";
|
||||||
|
}
|
||||||
|
if (RReductionGroupParams->GroupBox1->isChecked()) {
|
||||||
|
aParameters << RReductionGroupParams->SpinBox1->text();
|
||||||
|
aParameters << RReductionGroupParams->SpinBox2->text();
|
||||||
|
aParameters << RReductionGroupParams->SpinBox3->text();
|
||||||
|
aParameters << RReductionGroupParams->SpinBox4->text();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
aParameters << "0" << "0" << "0" << "0";
|
||||||
|
}
|
||||||
|
if (IReductionGroupParams->GroupBox1->isChecked()) {
|
||||||
|
aParameters << IReductionGroupParams->SpinBox1->text();
|
||||||
|
aParameters << IReductionGroupParams->SpinBox2->text();
|
||||||
|
aParameters << IReductionGroupParams->SpinBox3->text();
|
||||||
|
aParameters << IReductionGroupParams->SpinBox4->text();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
aParameters << "0" << "0" << "0" << "0";
|
||||||
|
}
|
||||||
|
|
||||||
if (aParameters.count() > 0)
|
if (aParameters.count() > 0)
|
||||||
anObj[0]->SetParameters(aParameters.join(":").toLatin1().constData());
|
anObj[0]->SetParameters(aParameters.join(":").toLatin1().constData());
|
||||||
}
|
}
|
||||||
@ -956,7 +1167,9 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck(ObjectList& objects) {
|
|||||||
// function : restoreSubShapes
|
// function : restoreSubShapes
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject) {
|
void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
|
||||||
|
SALOMEDS::SObject_ptr theSObject)
|
||||||
|
{
|
||||||
SALOMEDS::GenericAttribute_var anAttr;
|
SALOMEDS::GenericAttribute_var anAttr;
|
||||||
if (!theSObject->FindAttribute(anAttr, "AttributeIOR"))
|
if (!theSObject->FindAttribute(anAttr, "AttributeIOR"))
|
||||||
return;
|
return;
|
||||||
@ -965,7 +1178,8 @@ void AdvancedGUI_PipeTShapeDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy, S
|
|||||||
CORBA::String_var anIORso = anAttrIOR->Value();
|
CORBA::String_var anIORso = anAttrIOR->Value();
|
||||||
|
|
||||||
// get Object from SObject
|
// get Object from SObject
|
||||||
GEOM::GEOM_Object_var theFather = GEOM::GEOM_Object::_narrow(myGeomGUI->getApp()->orb()->string_to_object(anIORso));
|
GEOM::GEOM_Object_var theFather =
|
||||||
|
GEOM::GEOM_Object::_narrow(myGeomGUI->getApp()->orb()->string_to_object(anIORso));
|
||||||
if (CORBA::is_nil(theFather))
|
if (CORBA::is_nil(theFather))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -974,16 +1188,66 @@ void AdvancedGUI_PipeTShapeDlg::restoreSubShapes(SALOMEDS::Study_ptr theStudy, S
|
|||||||
for (int i = 0; it != pipeTShapeGroupObjects.end(); it++, i++) {
|
for (int i = 0; it != pipeTShapeGroupObjects.end(); it++, i++) {
|
||||||
getGeomEngine()->AddInStudy(theStudy, (*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
|
getGeomEngine()->AddInStudy(theStudy, (*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : processPreview()
|
// function : processPreview()
|
||||||
// purpose : Display preview if CheckBoxPreview is checked
|
// purpose : Display preview if CheckBoxPreview is checked
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void AdvancedGUI_PipeTShapeDlg::processPreview() {
|
void AdvancedGUI_PipeTShapeDlg::processPreview()
|
||||||
|
{
|
||||||
if (mainFrame()->CheckBoxPreview->isChecked())
|
if (mainFrame()->CheckBoxPreview->isChecked())
|
||||||
DisplayPreview();
|
DisplayPreview();
|
||||||
else
|
else
|
||||||
erasePreview(true);
|
erasePreview(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : AdvancedGUI_4Spin
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
|
AdvancedGUI_4Spin::AdvancedGUI_4Spin()
|
||||||
|
{
|
||||||
|
GroupBox1 = new QGroupBox ();
|
||||||
|
|
||||||
|
gridLayout1 = new QGridLayout (GroupBox1);
|
||||||
|
gridLayout1->setSpacing(6);
|
||||||
|
gridLayout1->setContentsMargins(11, 11, 11, 11);
|
||||||
|
gridLayout1->setHorizontalSpacing(6);
|
||||||
|
gridLayout1->setVerticalSpacing(6);
|
||||||
|
gridLayout1->setContentsMargins(9, 9, 9, 9);
|
||||||
|
|
||||||
|
TextLabel1 = new QLabel (GroupBox1);
|
||||||
|
TextLabel2 = new QLabel (GroupBox1);
|
||||||
|
TextLabel3 = new QLabel (GroupBox1);
|
||||||
|
TextLabel4 = new QLabel (GroupBox1);
|
||||||
|
|
||||||
|
SpinBox1 = new SalomeApp_DoubleSpinBox (GroupBox1);
|
||||||
|
SpinBox2 = new SalomeApp_DoubleSpinBox (GroupBox1);
|
||||||
|
SpinBox3 = new SalomeApp_DoubleSpinBox (GroupBox1);
|
||||||
|
SpinBox4 = new SalomeApp_DoubleSpinBox (GroupBox1);
|
||||||
|
|
||||||
|
SpinBox1->setMinimumWidth(60);
|
||||||
|
SpinBox2->setMinimumWidth(60);
|
||||||
|
SpinBox3->setMinimumWidth(60);
|
||||||
|
SpinBox4->setMinimumWidth(60);
|
||||||
|
|
||||||
|
gridLayout1->addWidget(TextLabel1, 0, 0, 1, 1);
|
||||||
|
gridLayout1->addWidget(TextLabel2, 1, 0, 1, 1);
|
||||||
|
gridLayout1->addWidget(TextLabel3, 2, 0, 1, 1);
|
||||||
|
gridLayout1->addWidget(TextLabel4, 3, 0, 1, 1);
|
||||||
|
|
||||||
|
gridLayout1->addWidget(SpinBox1, 0, 1, 1, 1);
|
||||||
|
gridLayout1->addWidget(SpinBox2, 1, 1, 1, 1);
|
||||||
|
gridLayout1->addWidget(SpinBox3, 2, 1, 1, 1);
|
||||||
|
gridLayout1->addWidget(SpinBox4, 3, 1, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : ~AdvancedGUI_4Spin()
|
||||||
|
// purpose : Destroys the object and frees any allocated resources
|
||||||
|
//=================================================================================
|
||||||
|
AdvancedGUI_4Spin::~AdvancedGUI_4Spin()
|
||||||
|
{
|
||||||
|
// no need to delete child widgets, Qt does it all for us
|
||||||
|
}
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef ADVANCEDGUI_PIPETSHAPEDLG_H
|
#ifndef ADVANCEDGUI_PIPETSHAPEDLG_H
|
||||||
#define ADVANCEDGUI_PIPETSHAPEDLG_H
|
#define ADVANCEDGUI_PIPETSHAPEDLG_H
|
||||||
@ -25,17 +24,48 @@
|
|||||||
class DlgRef_1Spin;
|
class DlgRef_1Spin;
|
||||||
class DlgRef_2Spin;
|
class DlgRef_2Spin;
|
||||||
class DlgRef_3Spin;
|
class DlgRef_3Spin;
|
||||||
|
class DlgRef_4Spin;
|
||||||
class DlgRef_3Sel;
|
class DlgRef_3Sel;
|
||||||
class DlgRef_6Sel;
|
class DlgRef_6Sel;
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
class QLabel;
|
class QLabel;
|
||||||
|
class QGridLayout;
|
||||||
|
class QGroupBox;
|
||||||
|
class SalomeApp_DoubleSpinBox;
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// class : AdvancedGUI_4Spin
|
||||||
|
// purpose :
|
||||||
|
//=================================================================================
|
||||||
|
class AdvancedGUI_4Spin : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
AdvancedGUI_4Spin ();
|
||||||
|
~AdvancedGUI_4Spin();
|
||||||
|
|
||||||
|
public:
|
||||||
|
QGroupBox *GroupBox1;
|
||||||
|
QGridLayout *gridLayout1;
|
||||||
|
|
||||||
|
QLabel *TextLabel1;
|
||||||
|
QLabel *TextLabel2;
|
||||||
|
QLabel *TextLabel3;
|
||||||
|
QLabel *TextLabel4;
|
||||||
|
SalomeApp_DoubleSpinBox *SpinBox1;
|
||||||
|
SalomeApp_DoubleSpinBox *SpinBox2;
|
||||||
|
SalomeApp_DoubleSpinBox *SpinBox3;
|
||||||
|
SalomeApp_DoubleSpinBox *SpinBox4;
|
||||||
|
};
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : AdvancedGUI_PipeTShapeDlg
|
// class : AdvancedGUI_PipeTShapeDlg
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton {
|
class AdvancedGUI_PipeTShapeDlg: public GEOMBase_Skeleton
|
||||||
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -53,31 +83,42 @@ private:
|
|||||||
void Init();
|
void Init();
|
||||||
void enterEvent (QEvent*);
|
void enterEvent (QEvent*);
|
||||||
void resizeEvent (QResizeEvent *event);
|
void resizeEvent (QResizeEvent *event);
|
||||||
void updateTshapeScreenshotLabel();
|
void updateLabelImgPipeTShape();
|
||||||
bool CheckCompatiblePosition (GEOM::GEOM_Object_var theP1,
|
bool CheckCompatiblePosition (GEOM::GEOM_Object_var theP1,
|
||||||
GEOM::GEOM_Object_var theP2,
|
GEOM::GEOM_Object_var theP2,
|
||||||
GEOM::GEOM_Object_var theP3, double theTolerance);
|
GEOM::GEOM_Object_var theP3, double theTolerance);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPixmap imagePipeTShape;
|
QPixmap imagePipeTShape;
|
||||||
QLabel* tshapeScreenShotLabel;
|
QPixmap imageReduction;
|
||||||
|
QLabel* LabelImgPipeTShape;
|
||||||
|
QLabel* LabelImgReduction;
|
||||||
|
|
||||||
|
// Main parameters
|
||||||
DlgRef_3Spin* MainTubeGroupParams;
|
DlgRef_3Spin* MainTubeGroupParams;
|
||||||
DlgRef_3Spin* IncidentTubeGroupParams;
|
DlgRef_3Spin* IncidentTubeGroupParams;
|
||||||
DlgRef_2Spin* ChamferGroupParams;
|
DlgRef_2Spin* ChamferGroupParams;
|
||||||
DlgRef_1Spin* FilletGroupParams;
|
DlgRef_1Spin* FilletGroupParams;
|
||||||
DlgRef_6Sel* JunctionPointsSel;
|
|
||||||
QPixmap imageImp;
|
|
||||||
QString CssNormal, CssAcceptable, CssRefused;
|
|
||||||
QCheckBox* HexMeshCheckBox;
|
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;
|
GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3;
|
||||||
bool myOkPoint1, myOkPoint2, myOkPoint3;
|
bool myOkPoint1, myOkPoint2, myOkPoint3;
|
||||||
bool isPreview;
|
|
||||||
ObjectList pipeTShapeGroupObjects;
|
ObjectList pipeTShapeGroupObjects;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
bool ClickOnApply();
|
bool ClickOnApply();
|
||||||
void ActivateThisDialog();
|
void ActivateThisDialog();
|
||||||
|
void currentChanged (int);
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void DisplayPreview (const bool activate = false, const bool update = true,
|
void DisplayPreview (const bool activate = false, const bool update = true,
|
||||||
|
@ -1207,6 +1207,10 @@
|
|||||||
<source>DLG_PIPETSHAPE</source>
|
<source>DLG_PIPETSHAPE</source>
|
||||||
<translation>dlg_pipetshape.png</translation>
|
<translation>dlg_pipetshape.png</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>IMG_PIPETSHAPE_SECT</source>
|
||||||
|
<translation>pipetshape_section.png</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>DLG_PIPETSHAPE_L1</source>
|
<source>DLG_PIPETSHAPE_L1</source>
|
||||||
<translation>dlg_pipetshapel1.png</translation>
|
<translation>dlg_pipetshapel1.png</translation>
|
||||||
|
@ -5801,6 +5801,46 @@ Do you want to create new material?</translation>
|
|||||||
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
|
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
|
||||||
<translation>New L2</translation>
|
<translation>New L2</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
|
||||||
|
<translation type="unfinished">Left thickness reduction</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
|
||||||
|
<translation type="unfinished">Right thickness reduction</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_INCI_TR</source>
|
||||||
|
<translation type="unfinished">Incident thickness reduction</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_TR_R</source>
|
||||||
|
<translation type="unfinished">Radius (r%1)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_TR_W</source>
|
||||||
|
<translation type="unfinished">Width (w%1)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
|
||||||
|
<translation type="unfinished">Transition length (ltrans%1)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
|
||||||
|
<translation type="unfinished">Thin part length (lthin%1)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPETSHAPE_GROUPMAIN</source>
|
||||||
|
<translation type="unfinished">Main parameters</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
|
||||||
|
<translation type="unfinished">Thickness reduction</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
|
||||||
|
<translation type="unfinished">Position</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>GEOMToolsGUI_PublishDlg</name>
|
<name>GEOMToolsGUI_PublishDlg</name>
|
||||||
|
@ -5784,6 +5784,46 @@ Voulez-vous en créer un nouveau ?</translation>
|
|||||||
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
|
<source>GEOM_PIPE_TSHAPE_POSITION_LBL_L2</source>
|
||||||
<translation>Nouvelle L2</translation>
|
<translation>Nouvelle L2</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_LEFT_TR</source>
|
||||||
|
<translation type="unfinished">Left thickness reduction</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_RIGHT_TR</source>
|
||||||
|
<translation type="unfinished">Right thickness reduction</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_INCI_TR</source>
|
||||||
|
<translation type="unfinished">Incident thickness reduction</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_TR_R</source>
|
||||||
|
<translation type="unfinished">Radius (r%1)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_TR_W</source>
|
||||||
|
<translation type="unfinished">Width (w%1)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_TR_L_TRANS</source>
|
||||||
|
<translation type="unfinished">Transition length (ltrans%1)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPE_TSHAPE_TR_L_THIN</source>
|
||||||
|
<translation type="unfinished">Thin part length (lthin%1)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPETSHAPE_GROUPMAIN</source>
|
||||||
|
<translation type="unfinished">Main parameters</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPETSHAPE_GROUPREDUCT</source>
|
||||||
|
<translation type="unfinished">Thickness reduction</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_PIPETSHAPE_GROUPPOS</source>
|
||||||
|
<translation type="unfinished">Position</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>GEOMToolsGUI_PublishDlg</name>
|
<name>GEOMToolsGUI_PublishDlg</name>
|
||||||
|
@ -18,13 +18,13 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
#include <GEOMImpl_BooleanDriver.hxx>
|
#include <GEOMImpl_BooleanDriver.hxx>
|
||||||
#include <GEOMImpl_IBoolean.hxx>
|
#include <GEOMImpl_IBoolean.hxx>
|
||||||
#include <GEOMImpl_Types.hxx>
|
#include <GEOMImpl_Types.hxx>
|
||||||
#include <GEOMImpl_GlueDriver.hxx>
|
#include <GEOMImpl_GlueDriver.hxx>
|
||||||
#include <GEOM_Function.hxx>
|
#include <GEOM_Function.hxx>
|
||||||
|
#include <GEOMUtils.hxx>
|
||||||
|
|
||||||
#include <TNaming_CopyShape.hxx>
|
#include <TNaming_CopyShape.hxx>
|
||||||
|
|
||||||
@ -72,30 +72,6 @@ GEOMImpl_BooleanDriver::GEOMImpl_BooleanDriver()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddSimpleShapes(TopoDS_Shape theShape, TopTools_ListOfShape& theList)
|
|
||||||
{
|
|
||||||
if (theShape.ShapeType() != TopAbs_COMPOUND &&
|
|
||||||
theShape.ShapeType() != TopAbs_COMPSOLID) {
|
|
||||||
theList.Append(theShape);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TopTools_MapOfShape mapShape;
|
|
||||||
TopoDS_Iterator It (theShape, Standard_True, Standard_True);
|
|
||||||
|
|
||||||
for (; It.More(); It.Next()) {
|
|
||||||
TopoDS_Shape aShape_i = It.Value();
|
|
||||||
if (mapShape.Add(aShape_i)) {
|
|
||||||
if (aShape_i.ShapeType() == TopAbs_COMPOUND ||
|
|
||||||
aShape_i.ShapeType() == TopAbs_COMPSOLID) {
|
|
||||||
AddSimpleShapes(aShape_i, theList);
|
|
||||||
} else {
|
|
||||||
theList.Append(aShape_i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Execute
|
//function : Execute
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -131,8 +107,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
|||||||
B.MakeCompound(C);
|
B.MakeCompound(C);
|
||||||
|
|
||||||
TopTools_ListOfShape listShape1, listShape2;
|
TopTools_ListOfShape listShape1, listShape2;
|
||||||
AddSimpleShapes(aShape1, listShape1);
|
GEOMUtils::AddSimpleShapes(aShape1, listShape1);
|
||||||
AddSimpleShapes(aShape2, listShape2);
|
GEOMUtils::AddSimpleShapes(aShape2, listShape2);
|
||||||
|
|
||||||
Standard_Boolean isCompound =
|
Standard_Boolean isCompound =
|
||||||
(listShape1.Extent() > 1 || listShape2.Extent() > 1);
|
(listShape1.Extent() > 1 || listShape2.Extent() > 1);
|
||||||
@ -174,7 +150,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
|||||||
if (isCompound) {
|
if (isCompound) {
|
||||||
/*
|
/*
|
||||||
TopTools_ListOfShape listShapeC;
|
TopTools_ListOfShape listShapeC;
|
||||||
AddSimpleShapes(C, listShapeC);
|
GEOMUtils::AddSimpleShapes(C, listShapeC);
|
||||||
TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
|
TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
|
||||||
bool isOnlySolids = true;
|
bool isOnlySolids = true;
|
||||||
for (; itSubC.More(); itSubC.Next()) {
|
for (; itSubC.More(); itSubC.Next()) {
|
||||||
@ -203,8 +179,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
|||||||
B.MakeCompound(C);
|
B.MakeCompound(C);
|
||||||
|
|
||||||
TopTools_ListOfShape listShapes, listTools;
|
TopTools_ListOfShape listShapes, listTools;
|
||||||
AddSimpleShapes(aShape1, listShapes);
|
GEOMUtils::AddSimpleShapes(aShape1, listShapes);
|
||||||
AddSimpleShapes(aShape2, listTools);
|
GEOMUtils::AddSimpleShapes(aShape2, listTools);
|
||||||
|
|
||||||
Standard_Boolean isCompound = (listShapes.Extent() > 1);
|
Standard_Boolean isCompound = (listShapes.Extent() > 1);
|
||||||
|
|
||||||
@ -245,7 +221,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
|||||||
if (isCompound) {
|
if (isCompound) {
|
||||||
/*
|
/*
|
||||||
TopTools_ListOfShape listShapeC;
|
TopTools_ListOfShape listShapeC;
|
||||||
AddSimpleShapes(C, listShapeC);
|
GEOMUtils::AddSimpleShapes(C, listShapeC);
|
||||||
TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
|
TopTools_ListIteratorOfListOfShape itSubC (listShapeC);
|
||||||
bool isOnlySolids = true;
|
bool isOnlySolids = true;
|
||||||
for (; itSubC.More(); itSubC.Next()) {
|
for (; itSubC.More(); itSubC.Next()) {
|
||||||
@ -272,8 +248,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
|||||||
/* Fix for NPAL15379: refused
|
/* Fix for NPAL15379: refused
|
||||||
// Check arguments
|
// Check arguments
|
||||||
TopTools_ListOfShape listShape1, listShape2;
|
TopTools_ListOfShape listShape1, listShape2;
|
||||||
AddSimpleShapes(aShape1, listShape1);
|
GEOMUtils::AddSimpleShapes(aShape1, listShape1);
|
||||||
AddSimpleShapes(aShape2, listShape2);
|
GEOMUtils::AddSimpleShapes(aShape2, listShape2);
|
||||||
|
|
||||||
Standard_Boolean isIntersect = Standard_False;
|
Standard_Boolean isIntersect = Standard_False;
|
||||||
|
|
||||||
@ -360,8 +336,8 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
|||||||
B.MakeCompound(C);
|
B.MakeCompound(C);
|
||||||
|
|
||||||
TopTools_ListOfShape listShape1, listShape2;
|
TopTools_ListOfShape listShape1, listShape2;
|
||||||
AddSimpleShapes(aShape1, listShape1);
|
GEOMUtils::AddSimpleShapes(aShape1, listShape1);
|
||||||
AddSimpleShapes(aShape2, listShape2);
|
GEOMUtils::AddSimpleShapes(aShape2, listShape2);
|
||||||
|
|
||||||
Standard_Boolean isCompound =
|
Standard_Boolean isCompound =
|
||||||
(listShape1.Extent() > 1 || listShape2.Extent() > 1);
|
(listShape1.Extent() > 1 || listShape2.Extent() > 1);
|
||||||
@ -433,7 +409,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute (TFunction_Logbook& log) const
|
|||||||
// as boolean operations always produce compound, lets simplify it
|
// as boolean operations always produce compound, lets simplify it
|
||||||
// for the case, if it contains only one sub-shape
|
// for the case, if it contains only one sub-shape
|
||||||
TopTools_ListOfShape listShapeRes;
|
TopTools_ListOfShape listShapeRes;
|
||||||
AddSimpleShapes(aShape, listShapeRes);
|
GEOMUtils::AddSimpleShapes(aShape, listShapeRes);
|
||||||
if (listShapeRes.Extent() == 1) {
|
if (listShapeRes.Extent() == 1) {
|
||||||
aShape = listShapeRes.First();
|
aShape = listShapeRes.First();
|
||||||
if (aShape.IsNull()) return 0;
|
if (aShape.IsNull()) return 0;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -27,6 +27,8 @@
|
|||||||
#include "GEOM_Engine.hxx"
|
#include "GEOM_Engine.hxx"
|
||||||
#include "GEOM_Object.hxx"
|
#include "GEOM_Object.hxx"
|
||||||
|
|
||||||
|
#include <gp_Ax2.hxx>
|
||||||
|
|
||||||
class GEOMImpl_IBasicOperations;
|
class GEOMImpl_IBasicOperations;
|
||||||
class GEOMImpl_IBooleanOperations;
|
class GEOMImpl_IBooleanOperations;
|
||||||
class GEOMImpl_IShapesOperations;
|
class GEOMImpl_IShapesOperations;
|
||||||
@ -43,23 +45,36 @@ private:
|
|||||||
double theR2, double theW2, double theL2,
|
double theR2, double theW2, double theL2,
|
||||||
double theH = 0, double theW = 0,
|
double theH = 0, double theW = 0,
|
||||||
double theRF = 0, bool isNormal = true);
|
double theRF = 0, bool isNormal = true);
|
||||||
|
|
||||||
bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
|
bool MakePipeTShapeMirrorAndGlue(Handle(GEOM_Object) theShape,
|
||||||
double theR1, double theW1, double theL1,
|
double theR1, double theW1, double theL1,
|
||||||
double theR2, double theW2, double theL2);
|
double theR2, double theW2, double theL2);
|
||||||
|
|
||||||
|
bool MakePipeTShapeThicknessReduction (Handle(GEOM_Object) theShape,
|
||||||
|
double theR1, double theW1, double theL1,
|
||||||
|
double theR2, double theW2, double theL2,
|
||||||
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||||
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
||||||
|
double theRI, double theWI, double theLtransI, double theLthinI);
|
||||||
|
|
||||||
bool MakeGroups(Handle(GEOM_Object) theShape, int shapType,
|
bool MakeGroups(Handle(GEOM_Object) theShape, int shapType,
|
||||||
double theR1, double theW1, double theL1,
|
double theR1, double theW1, double theL1,
|
||||||
double theR2, double theW2, double theL2,
|
double theR2, double theW2, double theL2,
|
||||||
|
double theH, double theW, double theRF,
|
||||||
Handle(TColStd_HSequenceOfTransient) theSeq,
|
Handle(TColStd_HSequenceOfTransient) theSeq,
|
||||||
gp_Trsf aTrsf);
|
gp_Trsf aTrsf);
|
||||||
|
|
||||||
gp_Trsf GetPositionTrsf(double theL1, double theL2,
|
gp_Trsf GetPositionTrsf(double theL1, double theL2,
|
||||||
Handle(GEOM_Object) P1 = 0,
|
Handle(GEOM_Object) P1 = 0,
|
||||||
Handle(GEOM_Object) P2 = 0,
|
Handle(GEOM_Object) P2 = 0,
|
||||||
Handle(GEOM_Object) P3 = 0);
|
Handle(GEOM_Object) P3 = 0);
|
||||||
|
|
||||||
bool CheckCompatiblePosition(double& theL1, double& theL2,
|
bool CheckCompatiblePosition(double& theL1, double& theL2,
|
||||||
Handle(GEOM_Object) theP1,
|
Handle(GEOM_Object) theP1,
|
||||||
Handle(GEOM_Object) theP2,
|
Handle(GEOM_Object) theP2,
|
||||||
Handle(GEOM_Object) theP3,
|
Handle(GEOM_Object) theP3,
|
||||||
double theTolerance);
|
double theTolerance);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GEOMImpl_IBasicOperations* myBasicOperations;
|
GEOMImpl_IBasicOperations* myBasicOperations;
|
||||||
GEOMImpl_IBooleanOperations* myBooleanOperations;
|
GEOMImpl_IBooleanOperations* myBooleanOperations;
|
||||||
@ -70,6 +85,57 @@ private:
|
|||||||
GEOMImpl_ILocalOperations* myLocalOperations;
|
GEOMImpl_ILocalOperations* myLocalOperations;
|
||||||
GEOMImpl_IHealingOperations* myHealingOperations;
|
GEOMImpl_IHealingOperations* myHealingOperations;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Add three thickness reductions at the open ends of the pipe T-Shape
|
||||||
|
*
|
||||||
|
* \param theShape - the pipe T-Shape
|
||||||
|
* \param r1 - the internal radius of main pipe
|
||||||
|
* \param w1 - the thickness of main pipe
|
||||||
|
* \param l1 - the half-length of main pipe
|
||||||
|
* \param r2 - the internal radius of incident pipe
|
||||||
|
* \param w2 - the thickness of incident pipe
|
||||||
|
* \param l2 - the half-length of main pipe
|
||||||
|
* \param r*, w*, ltrans* and lthin* - internal radius, thickness, length of transition part
|
||||||
|
* and length of thin part of left(L), right(R) and
|
||||||
|
* incident(I) thickness reduction correspondingly
|
||||||
|
* \param fuseReductions - boolean flag (use true to generate single solid,
|
||||||
|
* false to obtain parts, useful for hexameshing)
|
||||||
|
* \retval TopoDS_Shape - Resulting shape
|
||||||
|
*/
|
||||||
|
Standard_EXPORT static TopoDS_Shape MakePipeTShapeThicknessReduction
|
||||||
|
(TopoDS_Shape theShape,
|
||||||
|
double r1, double w1, double l1,
|
||||||
|
double r2, double w2, double l2,
|
||||||
|
double rL, double wL, double ltransL, double lthinL,
|
||||||
|
double rR, double wR, double ltransR, double lthinR,
|
||||||
|
double rI, double wI, double ltransI, double lthinI,
|
||||||
|
bool fuseReductions);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Create one thickness reduction element
|
||||||
|
*
|
||||||
|
* This method is called three times from MakePipeTShapeThicknessReduction
|
||||||
|
* to create three thickness reductions (one per each open end of a pipe T-Shape)
|
||||||
|
*
|
||||||
|
* \param theAxes - the position
|
||||||
|
* \param R - the internal radius of main pipe
|
||||||
|
* \param W - the thickness of main pipe
|
||||||
|
* \param Rthin - the internal radius of thin part
|
||||||
|
* \param Wthin - the thickness of thin part
|
||||||
|
* \param Ltrans - the length of transition part
|
||||||
|
* \param Lthin - the length of thin part
|
||||||
|
* \param fuse - boolean flag (use true to generate single solid,
|
||||||
|
* false to obtain parts, useful for hexameshing)
|
||||||
|
* \retval TopoDS_Shape - Resulting shape
|
||||||
|
*/
|
||||||
|
Standard_EXPORT static TopoDS_Shape MakeThicknessReduction (gp_Ax2 theAxes,
|
||||||
|
const double R, const double W,
|
||||||
|
const double Rthin, const double Wthin,
|
||||||
|
const double Ltrans, const double Lthin,
|
||||||
|
bool fuse);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
|
Standard_EXPORT GEOMImpl_IAdvancedOperations(GEOM_Engine* theEngine, int theDocID);
|
||||||
Standard_EXPORT ~GEOMImpl_IAdvancedOperations();
|
Standard_EXPORT ~GEOMImpl_IAdvancedOperations();
|
||||||
@ -77,34 +143,57 @@ public:
|
|||||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||||
MakePipeTShape(double theR1, double theW1, double theL1,
|
MakePipeTShape(double theR1, double theW1, double theL1,
|
||||||
double theR2, double theW2, double theL2,
|
double theR2, double theW2, double theL2,
|
||||||
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||||
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
||||||
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
||||||
bool theHexMesh = true);
|
bool theHexMesh = true);
|
||||||
|
|
||||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||||
MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
|
MakePipeTShapeWithPosition(double theR1, double theW1, double theL1,
|
||||||
double theR2, double theW2, double theL2,
|
double theR2, double theW2, double theL2,
|
||||||
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||||
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
||||||
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
||||||
bool theHexMesh = true,
|
bool theHexMesh = true,
|
||||||
Handle(GEOM_Object) P1 = 0,
|
Handle(GEOM_Object) P1 = 0,
|
||||||
Handle(GEOM_Object) P2 = 0,
|
Handle(GEOM_Object) P2 = 0,
|
||||||
Handle(GEOM_Object) P3 = 0);
|
Handle(GEOM_Object) P3 = 0);
|
||||||
|
|
||||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||||
MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
|
MakePipeTShapeChamfer(double theR1, double theW1, double theL1,
|
||||||
double theR2, double theW2, double theL2,
|
double theR2, double theW2, double theL2,
|
||||||
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||||
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
||||||
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
||||||
double theH, double theW,
|
double theH, double theW,
|
||||||
bool theHexMesh = true);
|
bool theHexMesh = true);
|
||||||
|
|
||||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||||
MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
|
MakePipeTShapeChamferWithPosition(double theR1, double theW1, double theL1,
|
||||||
double theR2, double theW2, double theL2,
|
double theR2, double theW2, double theL2,
|
||||||
double theH, double theW,
|
double theH, double theW,
|
||||||
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||||
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
||||||
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
||||||
bool theHexMesh = true,
|
bool theHexMesh = true,
|
||||||
Handle(GEOM_Object) P1 = 0,
|
Handle(GEOM_Object) P1 = 0,
|
||||||
Handle(GEOM_Object) P2 = 0,
|
Handle(GEOM_Object) P2 = 0,
|
||||||
Handle(GEOM_Object) P3 = 0);
|
Handle(GEOM_Object) P3 = 0);
|
||||||
|
|
||||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||||
MakePipeTShapeFillet(double theR1, double theW1, double theL1,
|
MakePipeTShapeFillet(double theR1, double theW1, double theL1,
|
||||||
double theR2, double theW2, double theL2,
|
double theR2, double theW2, double theL2,
|
||||||
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||||
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
||||||
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
||||||
double theRF, bool theHexMesh = true);
|
double theRF, bool theHexMesh = true);
|
||||||
|
|
||||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
Standard_EXPORT Handle(TColStd_HSequenceOfTransient)
|
||||||
MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
|
MakePipeTShapeFilletWithPosition(double theR1, double theW1, double theL1,
|
||||||
double theR2, double theW2, double theL2,
|
double theR2, double theW2, double theL2,
|
||||||
|
double theRL, double theWL, double theLtransL, double theLthinL,
|
||||||
|
double theRR, double theWR, double theLtransR, double theLthinR,
|
||||||
|
double theRI, double theWI, double theLtransI, double theLthinI,
|
||||||
double theRF, bool theHexMesh = true,
|
double theRF, bool theHexMesh = true,
|
||||||
Handle(GEOM_Object) P1 = 0,
|
Handle(GEOM_Object) P1 = 0,
|
||||||
Handle(GEOM_Object) P2 = 0,
|
Handle(GEOM_Object) P2 = 0,
|
||||||
|
@ -794,72 +794,15 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdgeNearPoint
|
|||||||
#if OCC_VERSION_LARGE > 0x06010000
|
#if OCC_VERSION_LARGE > 0x06010000
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
#endif
|
#endif
|
||||||
TopoDS_Shape aShape;
|
|
||||||
|
|
||||||
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
|
TopoDS_Vertex aVert = TopoDS::Vertex(anArg);
|
||||||
|
TopoDS_Shape aShape = GEOMUtils::GetEdgeNearPoint(aBlockOrComp, aVert);
|
||||||
|
|
||||||
// 1. Explode blocks on edges
|
|
||||||
TopTools_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;
|
TopTools_IndexedMapOfShape anIndices;
|
||||||
TopExp::MapShapes(aBlockOrComp, anIndices);
|
TopExp::MapShapes(aBlockOrComp, anIndices);
|
||||||
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1);
|
Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1);
|
||||||
anArray->SetValue(1, anIndices.FindIndex(aShape));
|
anArray->SetValue(1, anIndices.FindIndex(aShape));
|
||||||
aResult = GetEngine()->AddSubShape(theShape, anArray);
|
aResult = GetEngine()->AddSubShape(theShape, anArray);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (Standard_Failure) {
|
catch (Standard_Failure) {
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
SetErrorCode(aFail->GetMessageString());
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
@ -15,34 +15,13 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef _GEOMImpl_IPipeTShape_HXX_
|
#ifndef _GEOMImpl_IPipeTShape_HXX_
|
||||||
#define _GEOMImpl_IPipeTShape_HXX_
|
#define _GEOMImpl_IPipeTShape_HXX_
|
||||||
|
|
||||||
#include "GEOM_Function.hxx"
|
#include "GEOM_Function.hxx"
|
||||||
|
|
||||||
#define TSHAPE_ARG_R1 1
|
#include <TColStd_HArray1OfReal.hxx>
|
||||||
#define TSHAPE_ARG_W1 2
|
|
||||||
#define TSHAPE_ARG_L1 3
|
|
||||||
#define TSHAPE_ARG_R2 4
|
|
||||||
#define TSHAPE_ARG_W2 5
|
|
||||||
#define TSHAPE_ARG_L2 6
|
|
||||||
|
|
||||||
// chamfer
|
|
||||||
#define TSHAPE_ARG_H 7
|
|
||||||
#define TSHAPE_ARG_W 8
|
|
||||||
|
|
||||||
// fillet
|
|
||||||
#define TSHAPE_ARG_RF 9
|
|
||||||
|
|
||||||
// partition
|
|
||||||
#define TSHAPE_ARG_HEXMESH 10
|
|
||||||
|
|
||||||
// junction points
|
|
||||||
#define TSHAPE_ARG_P1 11
|
|
||||||
#define TSHAPE_ARG_P2 12
|
|
||||||
#define TSHAPE_ARG_P3 13
|
|
||||||
|
|
||||||
class GEOMImpl_IPipeTShape
|
class GEOMImpl_IPipeTShape
|
||||||
{
|
{
|
||||||
@ -88,6 +67,34 @@ public:
|
|||||||
void SetP3(const Handle(GEOM_Function)& theP3){_func->SetReference(TSHAPE_ARG_P3, theP3); }
|
void SetP3(const Handle(GEOM_Function)& theP3){_func->SetReference(TSHAPE_ARG_P3, theP3); }
|
||||||
Handle(GEOM_Function) GetP3() { return _func->GetReference(TSHAPE_ARG_P3); }
|
Handle(GEOM_Function) GetP3() { return _func->GetReference(TSHAPE_ARG_P3); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum {
|
||||||
|
// main pipe
|
||||||
|
TSHAPE_ARG_R1 = 1,
|
||||||
|
TSHAPE_ARG_W1 = 2,
|
||||||
|
TSHAPE_ARG_L1 = 3,
|
||||||
|
|
||||||
|
// incident pipe
|
||||||
|
TSHAPE_ARG_R2 = 4,
|
||||||
|
TSHAPE_ARG_W2 = 5,
|
||||||
|
TSHAPE_ARG_L2 = 6,
|
||||||
|
|
||||||
|
// chamfer
|
||||||
|
TSHAPE_ARG_H = 7,
|
||||||
|
TSHAPE_ARG_W = 8,
|
||||||
|
|
||||||
|
// fillet
|
||||||
|
TSHAPE_ARG_RF = 9,
|
||||||
|
|
||||||
|
// partition
|
||||||
|
TSHAPE_ARG_HEXMESH = 10,
|
||||||
|
|
||||||
|
// junction points
|
||||||
|
TSHAPE_ARG_P1 = 11,
|
||||||
|
TSHAPE_ARG_P2 = 12,
|
||||||
|
TSHAPE_ARG_P3 = 13
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Handle(GEOM_Function) _func;
|
Handle(GEOM_Function) _func;
|
||||||
};
|
};
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include <GEOMImpl_IPipeTShape.hxx>
|
#include <GEOMImpl_IPipeTShape.hxx>
|
||||||
#include <GEOMImpl_Types.hxx>
|
#include <GEOMImpl_Types.hxx>
|
||||||
#include <GEOMImpl_Block6Explorer.hxx>
|
#include <GEOMImpl_Block6Explorer.hxx>
|
||||||
|
#include <GEOMImpl_IAdvancedOperations.hxx>
|
||||||
|
|
||||||
#include <GEOM_Function.hxx>
|
#include <GEOM_Function.hxx>
|
||||||
#include <GEOM_IOperations.hxx>
|
#include <GEOM_IOperations.hxx>
|
||||||
@ -45,6 +46,7 @@
|
|||||||
#include <gp_Dir.hxx>
|
#include <gp_Dir.hxx>
|
||||||
#include <gp_Trsf.hxx>
|
#include <gp_Trsf.hxx>
|
||||||
|
|
||||||
|
#include <BRepPrimAPI_MakeCone.hxx>
|
||||||
#include <BRepPrimAPI_MakeCylinder.hxx>
|
#include <BRepPrimAPI_MakeCylinder.hxx>
|
||||||
#include <BRepAlgoAPI_Fuse.hxx>
|
#include <BRepAlgoAPI_Fuse.hxx>
|
||||||
#include <BRepAlgoAPI_Cut.hxx>
|
#include <BRepAlgoAPI_Cut.hxx>
|
||||||
@ -258,7 +260,7 @@ void GEOMImpl_PipeTShapeDriver::GetCommonShapesOnCylinders(const TopoDS_Shape& t
|
|||||||
{
|
{
|
||||||
gp_Pnt aP0 (0, 0, 0);
|
gp_Pnt aP0 (0, 0, 0);
|
||||||
gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
|
gp_Vec aVX = gp::DX(), aVZ = gp::DZ();
|
||||||
gp_Ax3 anAxis1 (aP0, aVX), anAxis2 (aP0, aVZ);
|
gp_Ax3 anAxis1 (aP0, aVX, aVZ), anAxis2 (aP0, aVZ, aVX);
|
||||||
|
|
||||||
TopTools_IndexedMapOfShape aMapOfShapes;
|
TopTools_IndexedMapOfShape aMapOfShapes;
|
||||||
aMapOfShapes.Clear();
|
aMapOfShapes.Clear();
|
||||||
@ -312,8 +314,8 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const do
|
|||||||
gp_Pnt aP0 (0, 0, 0);
|
gp_Pnt aP0 (0, 0, 0);
|
||||||
gp_Pnt aP1 (-l1, 0, 0);
|
gp_Pnt aP1 (-l1, 0, 0);
|
||||||
gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
|
gp_Vec aVX = gp::DX(), aVY = gp::DY(), aVZ = gp::DZ();
|
||||||
gp_Ax2 anAxes1 (aP1, aVX);
|
gp_Ax2 anAxes1 (aP1, aVX, aVZ);
|
||||||
gp_Ax2 anAxes2 (aP0, aVZ);
|
gp_Ax2 anAxes2 (aP0, aVZ, aVX);
|
||||||
|
|
||||||
// Build the initial pipes
|
// Build the initial pipes
|
||||||
BRepPrimAPI_MakeCylinder C1Int (anAxes1, r1, Abs(2 * l1));
|
BRepPrimAPI_MakeCylinder C1Int (anAxes1, r1, Abs(2 * l1));
|
||||||
@ -325,13 +327,13 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const do
|
|||||||
C2Int.Build();
|
C2Int.Build();
|
||||||
C2Ext.Build();
|
C2Ext.Build();
|
||||||
if (!C1Int.IsDone() || !C1Ext.IsDone() || !C2Int.IsDone() || !C2Ext.IsDone()) {
|
if (!C1Int.IsDone() || !C1Ext.IsDone() || !C2Int.IsDone() || !C2Ext.IsDone()) {
|
||||||
StdFail_NotDone::Raise("Couldn't build cylinders");
|
StdFail_NotDone::Raise("Cannot build cylinders");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fuse the 2 pipes
|
// Fuse the 2 pipes
|
||||||
BRepAlgoAPI_Fuse fuse1 (C1Ext.Shape(), C2Ext.Shape());
|
BRepAlgoAPI_Fuse fuse1 (C1Ext.Shape(), C2Ext.Shape());
|
||||||
if (!fuse1.IsDone()) {
|
if (!fuse1.IsDone()) {
|
||||||
StdFail_NotDone::Raise("Couldn't fuse cylinders");
|
StdFail_NotDone::Raise("Cannot fuse cylinders");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove small radius main pipe
|
// Remove small radius main pipe
|
||||||
@ -356,12 +358,12 @@ TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakePipeTShape(const double r1, const do
|
|||||||
TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1, const double w1, const double l1,
|
TopoDS_Shape GEOMImpl_PipeTShapeDriver::MakeQuarterPipeTShape (const double r1, const double w1, const double l1,
|
||||||
const double r2, const double w2, const double l2) const
|
const double r2, const double w2, const double l2) const
|
||||||
{
|
{
|
||||||
double r1Ext = r1 + w1;
|
|
||||||
TopoDS_Shape Te = MakePipeTShape(r1, w1, l1, r2, w2, l2);
|
TopoDS_Shape Te = MakePipeTShape(r1, w1, l1, r2, w2, l2);
|
||||||
if (Te.IsNull())
|
if (Te.IsNull())
|
||||||
StdFail_NotDone::Raise("Couldn't build Pipe TShape");
|
StdFail_NotDone::Raise("Couldn't build Pipe TShape");
|
||||||
|
|
||||||
// Get a quarter of shape => Te2
|
// Get a quarter of shape => Te2
|
||||||
|
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 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)));
|
BRepPrimAPI_MakeBox box2 (gp_Pnt(0, 2*r1Ext, -2*r1Ext), gp_Pnt(-Abs(2 * l1), 0, Abs(2*l2)));
|
||||||
box1.Build();
|
box1.Build();
|
||||||
@ -428,7 +430,6 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (aR1Ext >= aData.GetL2() + epsilon) {
|
if (aR1Ext >= aData.GetL2() + epsilon) {
|
||||||
StdFail_NotDone::Raise("TShape cannot be computed if R1+W1 >= L2");
|
StdFail_NotDone::Raise("TShape cannot be computed if R1+W1 >= L2");
|
||||||
}
|
}
|
||||||
@ -503,7 +504,6 @@ Standard_Integer GEOMImpl_PipeTShapeDriver::Execute(TFunction_Logbook& log) cons
|
|||||||
StdFail_NotDone::Raise("Common edges not found");
|
StdFail_NotDone::Raise("Common edges not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape M;
|
TopTools_IndexedDataMapOfShapeListOfShape M;
|
||||||
GEOMImpl_Block6Explorer::MapShapesAndAncestors(Te4, TopAbs_EDGE, TopAbs_FACE, M);
|
GEOMImpl_Block6Explorer::MapShapesAndAncestors(Te4, TopAbs_EDGE, TopAbs_FACE, M);
|
||||||
// std::cerr << "Number of IDs: " << edges_e->Length() << std::endl;
|
// 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());
|
// BB.Add(CC, chamfer.Shape());
|
||||||
|
|
||||||
|
|
||||||
// aShape = CC;
|
// aShape = CC;
|
||||||
aShape = chamfer.Shape();
|
aShape = chamfer.Shape();
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef _GEOMImpl_PipeTShapeDriver_HXX
|
#ifndef _GEOMImpl_PipeTShapeDriver_HXX
|
||||||
#define _GEOMImpl_PipeTShapeDriver_HXX
|
#define _GEOMImpl_PipeTShapeDriver_HXX
|
||||||
@ -24,11 +23,12 @@
|
|||||||
|
|
||||||
#include "GEOMAlgo_State.hxx"
|
#include "GEOMAlgo_State.hxx"
|
||||||
|
|
||||||
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_HSequenceOfShape.hxx>
|
#include <TopTools_HSequenceOfShape.hxx>
|
||||||
#include <TopTools_IndexedMapOfShape.hxx>
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
#include <TopAbs_ShapeEnum.hxx>
|
|
||||||
#include <TColStd_HSequenceOfInteger.hxx>
|
#include <TColStd_HSequenceOfInteger.hxx>
|
||||||
|
#include <gp_Ax2.hxx>
|
||||||
|
|
||||||
#include <Handle_Geom_Surface.hxx>
|
#include <Handle_Geom_Surface.hxx>
|
||||||
|
|
||||||
@ -125,32 +125,33 @@ public:
|
|||||||
return (STANDARD_TYPE(GEOMImpl_PipeTShapeDriver) == AType || TFunction_Driver::IsKind(AType));
|
return (STANDARD_TYPE(GEOMImpl_PipeTShapeDriver) == AType || TFunction_Driver::IsKind(AType));
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Create a T-Shape based on pipes
|
* \brief Create a T-Shape based on pipes
|
||||||
* \param r1 - the internal radius of main pipe
|
* \param r1 - the internal radius of main pipe
|
||||||
* \param w1 - the thickness main pipe
|
* \param w1 - the thickness of main pipe
|
||||||
* \param l1 - the half-length of main pipe
|
* \param l1 - the half-length of main pipe
|
||||||
* \param r2 - the internal radius of incident pipe
|
* \param r2 - the internal radius of incident pipe
|
||||||
* \param w2 - the thickness incident pipe
|
* \param w2 - the thickness of incident pipe
|
||||||
* \param l2 - the half-length of main pipe
|
* \param l2 - the half-length of main pipe
|
||||||
* \retval TopoDS_Shape - Resulting shape
|
* \retval TopoDS_Shape - Resulting shape
|
||||||
*/
|
*/
|
||||||
TopoDS_Shape MakePipeTShape(double r1, double w1, double l1, double r2, double w2, double l2) const;
|
TopoDS_Shape MakePipeTShape(double r1, double w1, double l1,
|
||||||
|
double r2, double w2, double l2) const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Create a quarter of a T-Shape based on pipes
|
* \brief Create a quarter of a T-Shape based on pipes
|
||||||
* \param r1 - the internal radius of main pipe
|
* \param r1 - the internal radius of main pipe
|
||||||
* \param w1 - the thickness main pipe
|
* \param w1 - the thickness of main pipe
|
||||||
* \param l1 - the half-length of main pipe
|
* \param l1 - the half-length of main pipe
|
||||||
* \param r2 - the internal radius of incident pipe
|
* \param r2 - the internal radius of incident pipe
|
||||||
* \param w2 - the thickness incident pipe
|
* \param w2 - the thickness of incident pipe
|
||||||
* \param l2 - the half-length of main pipe
|
* \param l2 - the half-length of main pipe
|
||||||
* \retval TopoDS_Shape - Resulting shape
|
* \retval TopoDS_Shape - Resulting shape
|
||||||
*/
|
*/
|
||||||
TopoDS_Shape MakeQuarterPipeTShape(double r1, double w1, double l1, double r2, double w2, double l2) const;
|
TopoDS_Shape MakeQuarterPipeTShape(double r1, double w1, double l1,
|
||||||
|
double r2, double w2, double l2) const;
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : GetShapesOnSurfaceIDs
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Find IDs of sub-shapes complying with given status about surface
|
* \brief Find IDs of sub-shapes complying with given status about surface
|
||||||
* \param theSurface - the surface to check state of sub-shapes against
|
* \param theSurface - the surface to check state of sub-shapes against
|
||||||
@ -164,8 +165,7 @@ private:
|
|||||||
const TopoDS_Shape& theShape,
|
const TopoDS_Shape& theShape,
|
||||||
TopAbs_ShapeEnum theShapeType,
|
TopAbs_ShapeEnum theShapeType,
|
||||||
GEOMAlgo_State theState) const;
|
GEOMAlgo_State theState) const;
|
||||||
//=======================================================================
|
|
||||||
//function : getShapesOnBoxIDs
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Find IDs of sub-shapes complying with given status about surface
|
* \brief Find IDs of sub-shapes complying with given status about surface
|
||||||
* \param theBox - the box to check state of sub-shapes against
|
* \param theBox - the box to check state of sub-shapes against
|
||||||
@ -174,7 +174,6 @@ private:
|
|||||||
* \param theState - required state
|
* \param theState - required state
|
||||||
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
|
* \retval Handle(TColStd_HSequenceOfInteger) - IDs of found sub-shapes
|
||||||
*/
|
*/
|
||||||
//=======================================================================
|
|
||||||
Handle(TColStd_HSequenceOfInteger)
|
Handle(TColStd_HSequenceOfInteger)
|
||||||
GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
|
GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
|
||||||
const TopoDS_Shape& aShape,
|
const TopoDS_Shape& aShape,
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
// OCCT Includes
|
// OCCT Includes
|
||||||
#include <BRepMesh_IncrementalMesh.hxx>
|
#include <BRepMesh_IncrementalMesh.hxx>
|
||||||
|
|
||||||
|
#include <BRepExtrema_DistShapeShape.hxx>
|
||||||
|
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepBndLib.hxx>
|
#include <BRepBndLib.hxx>
|
||||||
@ -53,6 +55,7 @@
|
|||||||
#include <TopTools_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
|
#include <TopTools_Array1OfShape.hxx>
|
||||||
|
|
||||||
#include <Geom_Surface.hxx>
|
#include <Geom_Surface.hxx>
|
||||||
#include <Geom_Plane.hxx>
|
#include <Geom_Plane.hxx>
|
||||||
@ -63,6 +66,8 @@
|
|||||||
#include <GProp_GProps.hxx>
|
#include <GProp_GProps.hxx>
|
||||||
#include <GProp_PrincipalProps.hxx>
|
#include <GProp_PrincipalProps.hxx>
|
||||||
|
|
||||||
|
#include <TColStd_Array1OfReal.hxx>
|
||||||
|
|
||||||
#include <gp_Pln.hxx>
|
#include <gp_Pln.hxx>
|
||||||
#include <gp_Lin.hxx>
|
#include <gp_Lin.hxx>
|
||||||
|
|
||||||
@ -427,6 +432,34 @@ TopoDS_Shape GEOMUtils::CompsolidToCompound (const TopoDS_Shape& theCompsolid)
|
|||||||
return aCompound;
|
return aCompound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : AddSimpleShapes
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void GEOMUtils::AddSimpleShapes (const TopoDS_Shape& theShape, TopTools_ListOfShape& theList)
|
||||||
|
{
|
||||||
|
if (theShape.ShapeType() != TopAbs_COMPOUND &&
|
||||||
|
theShape.ShapeType() != TopAbs_COMPSOLID) {
|
||||||
|
theList.Append(theShape);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TopTools_MapOfShape mapShape;
|
||||||
|
TopoDS_Iterator It (theShape, Standard_True, Standard_True);
|
||||||
|
|
||||||
|
for (; It.More(); It.Next()) {
|
||||||
|
TopoDS_Shape aShape_i = It.Value();
|
||||||
|
if (mapShape.Add(aShape_i)) {
|
||||||
|
if (aShape_i.ShapeType() == TopAbs_COMPOUND ||
|
||||||
|
aShape_i.ShapeType() == TopAbs_COMPSOLID) {
|
||||||
|
AddSimpleShapes(aShape_i, theList);
|
||||||
|
} else {
|
||||||
|
theList.Append(aShape_i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : CheckTriangulation
|
//function : CheckTriangulation
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -497,3 +530,71 @@ TopAbs_ShapeEnum GEOMUtils::GetTypeOfSimplePart (const TopoDS_Shape& theShape)
|
|||||||
}
|
}
|
||||||
return TopAbs_SHAPE;
|
return TopAbs_SHAPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetEdgeNearPoint
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
TopoDS_Shape GEOMUtils::GetEdgeNearPoint (const TopoDS_Shape& theShape,
|
||||||
|
const TopoDS_Vertex& thePoint)
|
||||||
|
{
|
||||||
|
TopoDS_Shape aResult;
|
||||||
|
|
||||||
|
// 1. Explode the shape on edges
|
||||||
|
TopTools_MapOfShape mapShape;
|
||||||
|
Standard_Integer nbEdges = 0;
|
||||||
|
TopExp_Explorer exp (theShape, TopAbs_EDGE);
|
||||||
|
for (; exp.More(); exp.Next()) {
|
||||||
|
if (mapShape.Add(exp.Current())) {
|
||||||
|
nbEdges++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nbEdges == 0)
|
||||||
|
Standard_NullObject::Raise("Given shape contains no edges");
|
||||||
|
|
||||||
|
mapShape.Clear();
|
||||||
|
Standard_Integer ind = 1;
|
||||||
|
TopTools_Array1OfShape anEdges (1, nbEdges);
|
||||||
|
TColStd_Array1OfReal aDistances (1, nbEdges);
|
||||||
|
for (exp.Init(theShape, TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||||
|
if (mapShape.Add(exp.Current())) {
|
||||||
|
TopoDS_Shape anEdge = exp.Current();
|
||||||
|
anEdges(ind) = anEdge;
|
||||||
|
|
||||||
|
// 2. Classify the point relatively each edge
|
||||||
|
BRepExtrema_DistShapeShape aDistTool (thePoint, anEdges(ind));
|
||||||
|
if (!aDistTool.IsDone())
|
||||||
|
Standard_ConstructionError::Raise("Cannot find a distance from the given point to one of edges");
|
||||||
|
|
||||||
|
aDistances(ind) = aDistTool.Value();
|
||||||
|
ind++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Define edge, having minimum distance to the point
|
||||||
|
Standard_Real nearest = RealLast(), nbFound = 0;
|
||||||
|
Standard_Real prec = Precision::Confusion();
|
||||||
|
for (ind = 1; ind <= nbEdges; ind++) {
|
||||||
|
if (Abs(aDistances(ind) - nearest) < prec) {
|
||||||
|
nbFound++;
|
||||||
|
}
|
||||||
|
else if (aDistances(ind) < nearest) {
|
||||||
|
nearest = aDistances(ind);
|
||||||
|
aResult = anEdges(ind);
|
||||||
|
nbFound = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (nbFound > 1) {
|
||||||
|
Standard_ConstructionError::Raise("Multiple edges near the given point are found");
|
||||||
|
}
|
||||||
|
else if (nbFound == 0) {
|
||||||
|
Standard_ConstructionError::Raise("There are no edges near the given point");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
}
|
||||||
|
|
||||||
|
return aResult;
|
||||||
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#define _GEOMUtils_HXX_
|
#define _GEOMUtils_HXX_
|
||||||
|
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#include <TopoDS_Vertex.hxx>
|
||||||
|
|
||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
|
|
||||||
@ -89,6 +90,17 @@ class GEOMUtils {
|
|||||||
*/
|
*/
|
||||||
Standard_EXPORT static TopoDS_Shape CompsolidToCompound (const TopoDS_Shape& theCompsolid);
|
Standard_EXPORT static TopoDS_Shape CompsolidToCompound (const TopoDS_Shape& theCompsolid);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Recursively extract all shapes from compounds and compsolids of the given shape into theList.
|
||||||
|
*
|
||||||
|
* If theShape is not compound or compsolid, theList will contain only theShape itself.
|
||||||
|
*
|
||||||
|
* \param theShape The shape to be exploded.
|
||||||
|
* \param theList Output parameter.
|
||||||
|
*/
|
||||||
|
Standard_EXPORT static void AddSimpleShapes (const TopoDS_Shape& theShape,
|
||||||
|
TopTools_ListOfShape& theList);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Build a triangulation on \a theShape if it is absent.
|
* \brief Build a triangulation on \a theShape if it is absent.
|
||||||
* \param theShape The shape to check/build triangulation on.
|
* \param theShape The shape to check/build triangulation on.
|
||||||
@ -103,6 +115,16 @@ class GEOMUtils {
|
|||||||
*/
|
*/
|
||||||
Standard_EXPORT static TopAbs_ShapeEnum GetTypeOfSimplePart (const TopoDS_Shape& theShape);
|
Standard_EXPORT static TopAbs_ShapeEnum GetTypeOfSimplePart (const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Find an edge of theShape, closest to thePoint.
|
||||||
|
*
|
||||||
|
* \param theShape The shape to explore.
|
||||||
|
* \param thePoint The point near the required edge.
|
||||||
|
* \retval TopoDS_Shape Returns the found edge or an empty shape if multiple edges found.
|
||||||
|
*/
|
||||||
|
Standard_EXPORT static TopoDS_Shape GetEdgeNearPoint (const TopoDS_Shape& theShape,
|
||||||
|
const TopoDS_Vertex& thePoint);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -15,11 +15,10 @@
|
|||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File : GEOM_IAdvancedOperations.cc
|
// File : GEOM_IAdvancedOperations.cc
|
||||||
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
||||||
//
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include "GEOM_IAdvancedOperations_i.hh"
|
#include "GEOM_IAdvancedOperations_i.hh"
|
||||||
@ -68,8 +67,10 @@ GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i()
|
|||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape
|
||||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Boolean theHexMesh)
|
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||||
|
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||||
|
CORBA::Boolean theHexMesh)
|
||||||
{
|
{
|
||||||
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
||||||
|
|
||||||
@ -77,7 +78,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape (CORBA::Double theR1,
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
//Create the TShape
|
//Create the TShape
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh);
|
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||||
|
GetOperations()->MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
|
||||||
|
theHexMesh);
|
||||||
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
|
|
||||||
@ -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.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition
|
||||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2, CORBA::Boolean theHexMesh,
|
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||||
|
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::GEOM_Object_ptr theP1, GEOM::GEOM_Object_ptr theP2, GEOM::GEOM_Object_ptr theP3)
|
||||||
{
|
{
|
||||||
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
|
||||||
@ -125,7 +131,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::D
|
|||||||
if (aP1.IsNull() || aP2.IsNull() || aP3.IsNull())return aSeq._retn();
|
if (aP1.IsNull() || aP2.IsNull() || aP3.IsNull())return aSeq._retn();
|
||||||
|
|
||||||
//Create the TShape
|
//Create the TShape
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, aP1, aP2, aP3);
|
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||||
|
GetOperations()->MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
|
||||||
|
theHexMesh, aP1, aP2, aP3);
|
||||||
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
|
|
||||||
@ -156,7 +165,8 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::D
|
|||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer
|
||||||
|
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||||
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
|
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh)
|
||||||
{
|
{
|
||||||
@ -166,7 +176,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
//Create the TShape
|
//Create the TShape
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh);
|
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||||
|
GetOperations()->MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
|
||||||
|
theH, theW, theHexMesh);
|
||||||
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
|
|
||||||
@ -201,7 +214,8 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double
|
|||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition
|
||||||
|
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||||
CORBA::Double theH, CORBA::Double theW, CORBA::Boolean theHexMesh,
|
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::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);
|
Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
|
||||||
|
|
||||||
//Create the TShape
|
//Create the TShape
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW,
|
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||||
theHexMesh, aP1, aP2, aP3);
|
GetOperations()->MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
|
||||||
|
theH, theW, theHexMesh, aP1, aP2, aP3);
|
||||||
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
|
|
||||||
@ -248,7 +264,8 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition (C
|
|||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet
|
||||||
|
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||||
CORBA::Double theRF, CORBA::Boolean theHexMesh)
|
CORBA::Double theRF, CORBA::Boolean theHexMesh)
|
||||||
{
|
{
|
||||||
@ -258,7 +275,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet (CORBA::Double
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
//Create the TShape
|
//Create the TShape
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh);
|
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||||
|
GetOperations()->MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
|
||||||
|
theRF, theHexMesh);
|
||||||
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
|
|
||||||
@ -292,7 +312,8 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet (CORBA::Double
|
|||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition
|
||||||
|
(CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||||
CORBA::Double theRF, CORBA::Boolean theHexMesh,
|
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 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);
|
Handle(GEOM_Object) aP3 = GetObjectImpl(theP3);
|
||||||
|
|
||||||
//Create the TShape
|
//Create the TShape
|
||||||
Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF,
|
Handle(TColStd_HSequenceOfTransient) aHSeq =
|
||||||
|
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);
|
theHexMesh, aP1, aP2, aP3);
|
||||||
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
if (!GetOperations()->IsDone() || aHSeq.IsNull())
|
||||||
return aSeq._retn();
|
return aSeq._retn();
|
||||||
@ -321,6 +449,224 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFilletWithPosition (CO
|
|||||||
return aSeq._retn();
|
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
|
* 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
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
|
||||||
|
|
||||||
// File : GEOM_IAdvancedOperations.hh
|
// File : GEOM_IAdvancedOperations.hh
|
||||||
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
|
||||||
//
|
|
||||||
#ifndef _GEOM_IAdvancedOperations_i_HeaderFile
|
#ifndef _GEOM_IAdvancedOperations_i_HeaderFile
|
||||||
#define _GEOM_IAdvancedOperations_i_HeaderFile
|
#define _GEOM_IAdvancedOperations_i_HeaderFile
|
||||||
|
|
||||||
@ -42,6 +41,7 @@ class GEOM_I_EXPORT GEOM_IAdvancedOperations_i :
|
|||||||
::GEOMImpl_IAdvancedOperations* theImpl);
|
::GEOMImpl_IAdvancedOperations* theImpl);
|
||||||
~GEOM_IAdvancedOperations_i();
|
~GEOM_IAdvancedOperations_i();
|
||||||
|
|
||||||
|
// PipeTShape without thickness reduction
|
||||||
GEOM::ListOfGO* MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
GEOM::ListOfGO* MakePipeTShape (CORBA::Double theR1, CORBA::Double theW1, CORBA::Double theL1,
|
||||||
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
CORBA::Double theR2, CORBA::Double theW2, CORBA::Double theL2,
|
||||||
CORBA::Boolean theHexMesh);
|
CORBA::Boolean theHexMesh);
|
||||||
@ -64,6 +64,53 @@ class GEOM_I_EXPORT GEOM_IAdvancedOperations_i :
|
|||||||
CORBA::Double theRF, CORBA::Boolean theHexMesh,
|
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 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,
|
GEOM::GEOM_Object_ptr MakeDividedDisk (CORBA::Double theR,
|
||||||
CORBA::Double theRatio,
|
CORBA::Double theRatio,
|
||||||
CORBA::Short theOrientation,
|
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.
|
# The extremity of the incident pipe is located on junction point P3.
|
||||||
# If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
# If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
||||||
# the main plane of the T-shape is XOY.
|
# the main plane of the T-shape is XOY.
|
||||||
|
#
|
||||||
# @param theR1 Internal radius of main pipe
|
# @param theR1 Internal radius of main pipe
|
||||||
# @param theW1 Width of main pipe
|
# @param theW1 Width of main pipe
|
||||||
# @param theL1 Half-length of main pipe
|
# @param theL1 Half-length of main pipe
|
||||||
# @param theR2 Internal radius of incident pipe (R2 < R1)
|
# @param theR2 Internal radius of incident pipe (R2 < R1)
|
||||||
# @param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
# @param theW2 Width of incident pipe (R2+W2 < R1+W1)
|
||||||
# @param theL2 Half-length of incident pipe
|
# @param theL2 Half-length of incident pipe
|
||||||
|
#
|
||||||
# @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
|
# @param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=True)
|
||||||
# @param theP1 1st junction point of main pipe
|
# @param theP1 1st junction point of main pipe
|
||||||
# @param theP2 2nd junction point of main pipe
|
# @param theP2 2nd junction point of main pipe
|
||||||
# @param theP3 Junction point of incident pipe
|
# @param theP3 Junction point of incident pipe
|
||||||
|
#
|
||||||
|
# @param theRL Internal radius of left thickness reduction
|
||||||
|
# @param theWL Width of left thickness reduction
|
||||||
|
# @param theLtransL Length of left transition part
|
||||||
|
# @param theLthinL Length of left thin part
|
||||||
|
#
|
||||||
|
# @param theRR Internal radius of right thickness reduction
|
||||||
|
# @param theWR Width of right thickness reduction
|
||||||
|
# @param theLtransR Length of right transition part
|
||||||
|
# @param theLthinR Length of right thin part
|
||||||
|
#
|
||||||
|
# @param theRI Internal radius of incident thickness reduction
|
||||||
|
# @param theWI Width of incident thickness reduction
|
||||||
|
# @param theLtransI Length of incident transition part
|
||||||
|
# @param theLthinI Length of incident thin part
|
||||||
|
#
|
||||||
# @param theName Object name; when specified, this parameter is used
|
# @param theName Object name; when specified, this parameter is used
|
||||||
# for result publication in the study. Otherwise, if automatic
|
# for result publication in the study. Otherwise, if automatic
|
||||||
# publication is switched on, default value is used for result name.
|
# publication is switched on, default value is used for result name.
|
||||||
@ -11531,7 +11549,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
|
# @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
|
||||||
#
|
#
|
||||||
# @ref tui_creation_pipetshape "Example"
|
# @ref tui_creation_pipetshape "Example"
|
||||||
def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None, theName=None):
|
def MakePipeTShape (self, theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theHexMesh=True, theP1=None, theP2=None, theP3=None,
|
||||||
|
theRL=0, theWL=0, theLtransL=0, theLthinL=0,
|
||||||
|
theRR=0, theWR=0, theLtransR=0, theLthinR=0,
|
||||||
|
theRI=0, theWI=0, theLtransI=0, theLthinI=0,
|
||||||
|
theName=None):
|
||||||
"""
|
"""
|
||||||
Create a T-shape object with specified caracteristics for the main
|
Create a T-shape object with specified caracteristics for the main
|
||||||
and the incident pipes (radius, width, half-length).
|
and the incident pipes (radius, width, half-length).
|
||||||
@ -11540,7 +11563,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
||||||
the main plane of the T-shape is XOY.
|
the main plane of the T-shape is XOY.
|
||||||
|
|
||||||
Paremeters:
|
Parameters:
|
||||||
theR1 Internal radius of main pipe
|
theR1 Internal radius of main pipe
|
||||||
theW1 Width of main pipe
|
theW1 Width of main pipe
|
||||||
theL1 Half-length of main pipe
|
theL1 Half-length of main pipe
|
||||||
@ -11551,6 +11574,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
theP1 1st junction point of main pipe
|
theP1 1st junction point of main pipe
|
||||||
theP2 2nd junction point of main pipe
|
theP2 2nd junction point of main pipe
|
||||||
theP3 Junction point of incident pipe
|
theP3 Junction point of incident pipe
|
||||||
|
|
||||||
|
theRL Internal radius of left thickness reduction
|
||||||
|
theWL Width of left thickness reduction
|
||||||
|
theLtransL Length of left transition part
|
||||||
|
theLthinL Length of left thin part
|
||||||
|
|
||||||
|
theRR Internal radius of right thickness reduction
|
||||||
|
theWR Width of right thickness reduction
|
||||||
|
theLtransR Length of right transition part
|
||||||
|
theLthinR Length of right thin part
|
||||||
|
|
||||||
|
theRI Internal radius of incident thickness reduction
|
||||||
|
theWI Width of incident thickness reduction
|
||||||
|
theLtransI Length of incident transition part
|
||||||
|
theLthinI Length of incident thin part
|
||||||
|
|
||||||
theName Object name; when specified, this parameter is used
|
theName Object name; when specified, this parameter is used
|
||||||
for result publication in the study. Otherwise, if automatic
|
for result publication in the study. Otherwise, if automatic
|
||||||
publication is switched on, default value is used for result name.
|
publication is switched on, default value is used for result name.
|
||||||
@ -11563,12 +11602,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
|
pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
|
||||||
# create PipeTShape object with position
|
# create PipeTShape object with position
|
||||||
pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
|
pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
|
||||||
|
# create PipeTShape object with left thickness reduction
|
||||||
|
pipetshape_thr = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
|
||||||
"""
|
"""
|
||||||
theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)
|
theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
|
||||||
if (theP1 and theP2 and theP3):
|
if (theP1 and theP2 and theP3):
|
||||||
anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3)
|
anObj = self.AdvOp.MakePipeTShapeTRWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theHexMesh, theP1, theP2, theP3)
|
||||||
else:
|
else:
|
||||||
anObj = self.AdvOp.MakePipeTShape(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh)
|
anObj = self.AdvOp.MakePipeTShapeTR(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theHexMesh)
|
||||||
RaiseIfFailed("MakePipeTShape", self.AdvOp)
|
RaiseIfFailed("MakePipeTShape", self.AdvOp)
|
||||||
if Parameters: anObj[0].SetParameters(Parameters)
|
if Parameters: anObj[0].SetParameters(Parameters)
|
||||||
def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
|
def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
|
||||||
@ -11594,6 +11643,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @param theP1 1st junction point of main pipe
|
# @param theP1 1st junction point of main pipe
|
||||||
# @param theP2 2nd junction point of main pipe
|
# @param theP2 2nd junction point of main pipe
|
||||||
# @param theP3 Junction point of incident pipe
|
# @param theP3 Junction point of incident pipe
|
||||||
|
#
|
||||||
|
# @param theRL Internal radius of left thickness reduction
|
||||||
|
# @param theWL Width of left thickness reduction
|
||||||
|
# @param theLtransL Length of left transition part
|
||||||
|
# @param theLthinL Length of left thin part
|
||||||
|
#
|
||||||
|
# @param theRR Internal radius of right thickness reduction
|
||||||
|
# @param theWR Width of right thickness reduction
|
||||||
|
# @param theLtransR Length of right transition part
|
||||||
|
# @param theLthinR Length of right thin part
|
||||||
|
#
|
||||||
|
# @param theRI Internal radius of incident thickness reduction
|
||||||
|
# @param theWI Width of incident thickness reduction
|
||||||
|
# @param theLtransI Length of incident transition part
|
||||||
|
# @param theLthinI Length of incident thin part
|
||||||
|
#
|
||||||
# @param theName Object name; when specified, this parameter is used
|
# @param theName Object name; when specified, this parameter is used
|
||||||
# for result publication in the study. Otherwise, if automatic
|
# for result publication in the study. Otherwise, if automatic
|
||||||
# publication is switched on, default value is used for result name.
|
# publication is switched on, default value is used for result name.
|
||||||
@ -11601,7 +11666,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
|
# @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
|
||||||
#
|
#
|
||||||
# @ref tui_creation_pipetshape "Example"
|
# @ref tui_creation_pipetshape "Example"
|
||||||
def MakePipeTShapeChamfer(self, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None, theName=None):
|
def MakePipeTShapeChamfer (self, theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None,
|
||||||
|
theRL=0, theWL=0, theLtransL=0, theLthinL=0,
|
||||||
|
theRR=0, theWR=0, theLtransR=0, theLthinR=0,
|
||||||
|
theRI=0, theWI=0, theLtransI=0, theLthinI=0,
|
||||||
|
theName=None):
|
||||||
"""
|
"""
|
||||||
Create a T-shape object with chamfer and with specified caracteristics for the main
|
Create a T-shape object with chamfer and with specified caracteristics for the main
|
||||||
and the incident pipes (radius, width, half-length). The chamfer is
|
and the incident pipes (radius, width, half-length). The chamfer is
|
||||||
@ -11611,7 +11681,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
||||||
the main plane of the T-shape is XOY.
|
the main plane of the T-shape is XOY.
|
||||||
|
|
||||||
Paremeters:
|
Parameters:
|
||||||
theR1 Internal radius of main pipe
|
theR1 Internal radius of main pipe
|
||||||
theW1 Width of main pipe
|
theW1 Width of main pipe
|
||||||
theL1 Half-length of main pipe
|
theL1 Half-length of main pipe
|
||||||
@ -11624,6 +11694,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
theP1 1st junction point of main pipe
|
theP1 1st junction point of main pipe
|
||||||
theP2 2nd junction point of main pipe
|
theP2 2nd junction point of main pipe
|
||||||
theP3 Junction point of incident pipe
|
theP3 Junction point of incident pipe
|
||||||
|
|
||||||
|
theRL Internal radius of left thickness reduction
|
||||||
|
theWL Width of left thickness reduction
|
||||||
|
theLtransL Length of left transition part
|
||||||
|
theLthinL Length of left thin part
|
||||||
|
|
||||||
|
theRR Internal radius of right thickness reduction
|
||||||
|
theWR Width of right thickness reduction
|
||||||
|
theLtransR Length of right transition part
|
||||||
|
theLthinR Length of right thin part
|
||||||
|
|
||||||
|
theRI Internal radius of incident thickness reduction
|
||||||
|
theWI Width of incident thickness reduction
|
||||||
|
theLtransI Length of incident transition part
|
||||||
|
theLthinI Length of incident thin part
|
||||||
|
|
||||||
theName Object name; when specified, this parameter is used
|
theName Object name; when specified, this parameter is used
|
||||||
for result publication in the study. Otherwise, if automatic
|
for result publication in the study. Otherwise, if automatic
|
||||||
publication is switched on, default value is used for result name.
|
publication is switched on, default value is used for result name.
|
||||||
@ -11636,12 +11722,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
|
pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
|
||||||
# create PipeTShape with chamfer object with position
|
# create PipeTShape with chamfer object with position
|
||||||
pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
|
pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
|
||||||
|
# create PipeTShape with chamfer object with left thickness reduction
|
||||||
|
pipetshapechamfer_thr = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
|
||||||
"""
|
"""
|
||||||
theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW)
|
theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
|
||||||
if (theP1 and theP2 and theP3):
|
if (theP1 and theP2 and theP3):
|
||||||
anObj = self.AdvOp.MakePipeTShapeChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh, theP1, theP2, theP3)
|
anObj = self.AdvOp.MakePipeTShapeTRChamferWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theH, theW, theHexMesh, theP1, theP2, theP3)
|
||||||
else:
|
else:
|
||||||
anObj = self.AdvOp.MakePipeTShapeChamfer(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh)
|
anObj = self.AdvOp.MakePipeTShapeTRChamfer(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theH, theW, theHexMesh)
|
||||||
RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
|
RaiseIfFailed("MakePipeTShapeChamfer", self.AdvOp)
|
||||||
if Parameters: anObj[0].SetParameters(Parameters)
|
if Parameters: anObj[0].SetParameters(Parameters)
|
||||||
def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
|
def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
|
||||||
@ -11666,6 +11762,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @param theP1 1st junction point of main pipe
|
# @param theP1 1st junction point of main pipe
|
||||||
# @param theP2 2nd junction point of main pipe
|
# @param theP2 2nd junction point of main pipe
|
||||||
# @param theP3 Junction point of incident pipe
|
# @param theP3 Junction point of incident pipe
|
||||||
|
#
|
||||||
|
# @param theRL Internal radius of left thickness reduction
|
||||||
|
# @param theWL Width of left thickness reduction
|
||||||
|
# @param theLtransL Length of left transition part
|
||||||
|
# @param theLthinL Length of left thin part
|
||||||
|
#
|
||||||
|
# @param theRR Internal radius of right thickness reduction
|
||||||
|
# @param theWR Width of right thickness reduction
|
||||||
|
# @param theLtransR Length of right transition part
|
||||||
|
# @param theLthinR Length of right thin part
|
||||||
|
#
|
||||||
|
# @param theRI Internal radius of incident thickness reduction
|
||||||
|
# @param theWI Width of incident thickness reduction
|
||||||
|
# @param theLtransI Length of incident transition part
|
||||||
|
# @param theLthinI Length of incident thin part
|
||||||
|
#
|
||||||
# @param theName Object name; when specified, this parameter is used
|
# @param theName Object name; when specified, this parameter is used
|
||||||
# for result publication in the study. Otherwise, if automatic
|
# for result publication in the study. Otherwise, if automatic
|
||||||
# publication is switched on, default value is used for result name.
|
# publication is switched on, default value is used for result name.
|
||||||
@ -11673,7 +11785,12 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
|
# @return List of GEOM.GEOM_Object, containing the created shape and propagation groups.
|
||||||
#
|
#
|
||||||
# @ref tui_creation_pipetshape "Example"
|
# @ref tui_creation_pipetshape "Example"
|
||||||
def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None, theName=None):
|
def MakePipeTShapeFillet (self, theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None,
|
||||||
|
theRL=0, theWL=0, theLtransL=0, theLthinL=0,
|
||||||
|
theRR=0, theWR=0, theLtransR=0, theLthinR=0,
|
||||||
|
theRI=0, theWI=0, theLtransI=0, theLthinI=0,
|
||||||
|
theName=None):
|
||||||
"""
|
"""
|
||||||
Create a T-shape object with fillet and with specified caracteristics for the main
|
Create a T-shape object with fillet and with specified caracteristics for the main
|
||||||
and the incident pipes (radius, width, half-length). The fillet is
|
and the incident pipes (radius, width, half-length). The fillet is
|
||||||
@ -11681,7 +11798,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
The extremities of the main pipe are located on junctions points P1 and P2.
|
The extremities of the main pipe are located on junctions points P1 and P2.
|
||||||
The extremity of the incident pipe is located on junction point P3.
|
The extremity of the incident pipe is located on junction point P3.
|
||||||
|
|
||||||
Paremeters:
|
Parameters:
|
||||||
If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
||||||
the main plane of the T-shape is XOY.
|
the main plane of the T-shape is XOY.
|
||||||
theR1 Internal radius of main pipe
|
theR1 Internal radius of main pipe
|
||||||
@ -11695,6 +11812,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
theP1 1st junction point of main pipe
|
theP1 1st junction point of main pipe
|
||||||
theP2 2nd junction point of main pipe
|
theP2 2nd junction point of main pipe
|
||||||
theP3 Junction point of incident pipe
|
theP3 Junction point of incident pipe
|
||||||
|
|
||||||
|
theRL Internal radius of left thickness reduction
|
||||||
|
theWL Width of left thickness reduction
|
||||||
|
theLtransL Length of left transition part
|
||||||
|
theLthinL Length of left thin part
|
||||||
|
|
||||||
|
theRR Internal radius of right thickness reduction
|
||||||
|
theWR Width of right thickness reduction
|
||||||
|
theLtransR Length of right transition part
|
||||||
|
theLthinR Length of right thin part
|
||||||
|
|
||||||
|
theRI Internal radius of incident thickness reduction
|
||||||
|
theWI Width of incident thickness reduction
|
||||||
|
theLtransI Length of incident transition part
|
||||||
|
theLthinI Length of incident thin part
|
||||||
|
|
||||||
theName Object name; when specified, this parameter is used
|
theName Object name; when specified, this parameter is used
|
||||||
for result publication in the study. Otherwise, if automatic
|
for result publication in the study. Otherwise, if automatic
|
||||||
publication is switched on, default value is used for result name.
|
publication is switched on, default value is used for result name.
|
||||||
@ -11707,13 +11840,22 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
|
pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
|
||||||
# create PipeTShape with fillet object with position
|
# create PipeTShape with fillet object with position
|
||||||
pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
|
pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
|
||||||
|
# create PipeTShape with fillet object with left thickness reduction
|
||||||
|
pipetshapefillet_thr = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, theRL=60, theWL=20, theLtransL=40, theLthinL=20)
|
||||||
"""
|
"""
|
||||||
theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
|
theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theRL, theWL, theLtransL, theLthinL, theRR, theWR, theLtransR, theLthinR, theRI, theWI, theLtransI, theLthinI)
|
||||||
if (theP1 and theP2 and theP3):
|
if (theP1 and theP2 and theP3):
|
||||||
anObj = self.AdvOp.MakePipeTShapeFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh, theP1, theP2, theP3)
|
anObj = self.AdvOp.MakePipeTShapeTRFilletWithPosition(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theRF, theHexMesh, theP1, theP2, theP3)
|
||||||
else:
|
else:
|
||||||
anObj = self.AdvOp.MakePipeTShapeFillet(theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh)
|
anObj = self.AdvOp.MakePipeTShapeTRFillet(theR1, theW1, theL1, theR2, theW2, theL2,
|
||||||
|
theRL, theWL, theLtransL, theLthinL,
|
||||||
|
theRR, theWR, theLtransR, theLthinR,
|
||||||
|
theRI, theWI, theLtransI, theLthinI,
|
||||||
|
theRF, theHexMesh)
|
||||||
RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
|
RaiseIfFailed("MakePipeTShapeFillet", self.AdvOp)
|
||||||
if Parameters: anObj[0].SetParameters(Parameters)
|
if Parameters: anObj[0].SetParameters(Parameters)
|
||||||
def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
|
def_names = [ "pipeTShape" ] + [ "pipeTShape_grp_%d" % i for i in range(1, len(anObj)) ]
|
||||||
@ -11847,7 +11989,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
"""
|
"""
|
||||||
Create a copy of the given object
|
Create a copy of the given object
|
||||||
|
|
||||||
Paremeters:
|
Parameters:
|
||||||
theOriginal geometry object for copy
|
theOriginal geometry object for copy
|
||||||
theName Object name; when specified, this parameter is used
|
theName Object name; when specified, this parameter is used
|
||||||
for result publication in the study. Otherwise, if automatic
|
for result publication in the study. Otherwise, if automatic
|
||||||
|
Loading…
Reference in New Issue
Block a user