mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-28 00:40:33 +05:00
0020695: EDF 1076 GEOM: Add a new shape in GEOM: T-shape
- Fix problem with group creation for pipe t-shapes with position - Update documentation
This commit is contained in:
parent
173730bf99
commit
8d50477335
BIN
doc/salome/gui/GEOM/images/pipetshape.png
Normal file
BIN
doc/salome/gui/GEOM/images/pipetshape.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
BIN
doc/salome/gui/GEOM/images/pipetshape_dlg.png
Normal file
BIN
doc/salome/gui/GEOM/images/pipetshape_dlg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
BIN
doc/salome/gui/GEOM/images/pipetshapechamfer.png
Normal file
BIN
doc/salome/gui/GEOM/images/pipetshapechamfer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
doc/salome/gui/GEOM/images/pipetshapefillet.png
Normal file
BIN
doc/salome/gui/GEOM/images/pipetshapefillet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -17,6 +17,7 @@ entities:
|
|||||||
<b>New Entity -> Advanced </b> submenu allows to create additional complex topological objects.
|
<b>New Entity -> Advanced </b> submenu allows to create additional complex topological objects.
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>\subpage create_pipetshape_page</li>
|
||||||
<!--@@ insert new functions before this line @@-->
|
<!--@@ insert new functions before this line @@-->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
58
doc/salome/gui/GEOM/input/creating_pipetshape.doc
Normal file
58
doc/salome/gui/GEOM/input/creating_pipetshape.doc
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/*!
|
||||||
|
|
||||||
|
\page create_pipetshape_page PipeTShape
|
||||||
|
|
||||||
|
To create a \b PipeTShape in the <b>Main Menu</b> select <b>New Entity - >
|
||||||
|
Advanced - > PipeTShape </b>
|
||||||
|
|
||||||
|
Specify the parameters of the PipeTShape object creation in the opened dialog
|
||||||
|
box and press "Apply" or "Apply & Close" button.
|
||||||
|
Result of each operation will be a GEOM_Object.
|
||||||
|
|
||||||
|
<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 R1 - Radius of main T-shape pipe.
|
||||||
|
- \b W1 - Thickness of main T-shape pipe.
|
||||||
|
- \b L1 - Length of main T-shape pipe.
|
||||||
|
- \b R2 - Radius of incident T-shape pipe.
|
||||||
|
- \b W2 - Thickness of incident T-shape pipe.
|
||||||
|
- \b L2 - Length of incident T-shape pipe.
|
||||||
|
- \b HexMesh - If True, the shape is splitted in blocks (suitable for hexaedral mesh).
|
||||||
|
- \b P1 - First junction point of main pipe (GEOM Vertex).
|
||||||
|
- \b P2 - Second junction point of main pipe (GEOM Vertex).
|
||||||
|
- \b P3 - Junction point of incident pipe (GEOM Vertex).
|
||||||
|
|
||||||
|
\image html pipetshape_dlg.png
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
\image html pipetshape.png
|
||||||
|
|
||||||
|
A Pipe T-Shape can be created with a chamfer at the junction of the main and the incident pipes:
|
||||||
|
|
||||||
|
<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>Arguments are the same as normal Pipe T-Shape plus:</b>
|
||||||
|
- \b H - Height of the chamfer along incident pipe.
|
||||||
|
- \b W - Width of the chamfer along the main pipe.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
\image html pipetshapechamfer.png
|
||||||
|
|
||||||
|
A Pipe T-Shape can be created with a fillet at the junction of the main and the incident pipes:
|
||||||
|
|
||||||
|
<b>TUI Command:</b> <em>geompy.MakePipeTShapeFillet(R1, W1, L1, R2, W2, L2, RF, HexMesh=True, P1=None, P2=None, P3=None)</em>
|
||||||
|
|
||||||
|
<b>Arguments are the same as normal Pipe T-Shape plus:</b>
|
||||||
|
- \b RF - Radius of the fillet.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
\image html pipetshapefillet.png
|
||||||
|
|
||||||
|
Our <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||||
|
\ref tui_creation_pipetshape "Advanced objects".
|
||||||
|
|
||||||
|
*/
|
@ -218,5 +218,83 @@ id_compound = geompy.addToStudy(compound,"Compound")
|
|||||||
gg.createAndDisplayGO(id_compound)
|
gg.createAndDisplayGO(id_compound)
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
|
\anchor tui_creation_pipetshape
|
||||||
|
<br><h2>Creation of PipeTShape</h2>
|
||||||
|
|
||||||
|
\code
|
||||||
|
import geompy
|
||||||
|
import salome
|
||||||
|
gg = salome.ImportComponentGUI("GEOM")
|
||||||
|
|
||||||
|
# create PipeTShape object
|
||||||
|
pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
|
||||||
|
|
||||||
|
# add object in the study
|
||||||
|
id_pipetshape = geompy.addToStudy(pipetshape[0],"PipeTShape")
|
||||||
|
# add groups in the study
|
||||||
|
for g in pipetshape[1:]:
|
||||||
|
geompy.addToStudyInFather(pipetshape[0], g, g.GetName())
|
||||||
|
|
||||||
|
# Create junction vertices
|
||||||
|
P1 = geompy.MakeVertex(0.0, 0.0, 0.0)
|
||||||
|
P2 = geompy.MakeVertex(400.0, 0.0, 0.0)
|
||||||
|
P3 = geompy.MakeVertex(200.0, 0.0, 200.0)
|
||||||
|
|
||||||
|
# create PipeTShape object with position
|
||||||
|
pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
|
||||||
|
|
||||||
|
# add object in the study
|
||||||
|
id_pipetshape_position = geompy.addToStudy(pipetshape_position[0],"PipeTShape_position")
|
||||||
|
# add groups in the study
|
||||||
|
for g in pipetshape_position[1:]:
|
||||||
|
geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName())
|
||||||
|
|
||||||
|
# create PipeTShape with chamfer object
|
||||||
|
pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
|
||||||
|
|
||||||
|
# add object in the study
|
||||||
|
id_pipetshapechamfer = geompy.addToStudy(pipetshapechamfer[0],"PipeTShapeChamfer")
|
||||||
|
# add groups in the study
|
||||||
|
for g in pipetshapechamfer[1:]:
|
||||||
|
geompy.addToStudyInFather(pipetshapechamfer[0], g, g.GetName())
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
# add object in the study
|
||||||
|
id_pipetshapechamfer_position = geompy.addToStudy(pipetshapechamfer_position[0],"PipeTShapeChamfer_position")
|
||||||
|
# add groups in the study
|
||||||
|
for g in pipetshapechamfer_position[1:]:
|
||||||
|
geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName())
|
||||||
|
|
||||||
|
# create PipeTShape with fillet object
|
||||||
|
pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
|
||||||
|
|
||||||
|
# add object in the study
|
||||||
|
id_pipetshapefillet = geompy.addToStudy(pipetshapefillet[0],"PipeTShapeFillet")
|
||||||
|
# add groups in the study
|
||||||
|
for g in pipetshapefillet[1:]:
|
||||||
|
geompy.addToStudyInFather(pipetshapefillet[0], g, g.GetName())
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
|
||||||
|
# add object in the study
|
||||||
|
id_pipetshapefillet_position = geompy.addToStudy(pipetshapefillet_position[0],"PipeTShapeFillet_position")
|
||||||
|
# add groups in the study
|
||||||
|
for g in pipetshapefillet_position[1:]:
|
||||||
|
geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName())
|
||||||
|
|
||||||
|
|
||||||
|
# display pipetshapes
|
||||||
|
gg.createAndDisplayGO(id_pipetshape)
|
||||||
|
gg.createAndDisplayGO(id_pipetshape_position)
|
||||||
|
gg.createAndDisplayGO(id_pipetshapechamfer)
|
||||||
|
gg.createAndDisplayGO(id_pipetshapechamfer_position)
|
||||||
|
gg.createAndDisplayGO(id_pipetshapefillet)
|
||||||
|
gg.createAndDisplayGO(id_pipetshapefillet_position)
|
||||||
|
|
||||||
|
\endcode
|
||||||
|
|
||||||
<!--@@ insert new functions before this line @@-->
|
<!--@@ insert new functions before this line @@-->
|
||||||
*/
|
*/
|
||||||
|
@ -3162,26 +3162,24 @@ module GEOM
|
|||||||
* \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 false = no partition, true = with partition
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
|
ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
|
||||||
in double theR2, in double theW2, in double theL2,
|
in double theR2, in double theW2, in double theL2,
|
||||||
in boolean theHexMesh);
|
in boolean theHexMesh);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and
|
* 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).
|
||||||
* 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.
|
||||||
*
|
|
||||||
* \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 false = no partition, true = with partition
|
* \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
|
||||||
@ -3191,13 +3189,11 @@ module GEOM
|
|||||||
in double theR2, in double theW2, in double theL2,
|
in double theR2, in double theW2, in double theL2,
|
||||||
in boolean theHexMesh,
|
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);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the incident pipes (radius, width, half-length). A chamfer is created
|
* the incident pipes (radius, width, half-length). A chamfer is created
|
||||||
* on the junction of the pipes.
|
* on the junction of the pipes.
|
||||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
* 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 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
|
||||||
@ -3206,20 +3202,18 @@ module GEOM
|
|||||||
* \param theL2 Half-length of incident pipe
|
* \param theL2 Half-length of incident pipe
|
||||||
* \param theH Height of the chamfer.
|
* \param theH Height of the chamfer.
|
||||||
* \param theW Width of the chamfer.
|
* \param theW Width of the chamfer.
|
||||||
* \param theHexMesh false = no partition, true = with partition
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
|
ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
|
||||||
in double theR2, in double theW2, in double theL2,
|
in double theR2, in double theW2, in double theL2,
|
||||||
in double theH, in double theW, in boolean theHexMesh);
|
in double theH, in double theW, in boolean theHexMesh);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the incident pipes (radius, width, half-length). A chamfer is created
|
* the incident pipes (radius, width, half-length). A chamfer is created
|
||||||
* on the junction of the pipes.
|
* on the junction of the pipes.
|
||||||
* 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.
|
||||||
*
|
|
||||||
* \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
|
||||||
@ -3228,7 +3222,7 @@ module GEOM
|
|||||||
* \param theL2 Half-length of incident pipe
|
* \param theL2 Half-length of incident pipe
|
||||||
* \param theH Height of the chamfer.
|
* \param theH Height of the chamfer.
|
||||||
* \param theW Width of the chamfer.
|
* \param theW Width of the chamfer.
|
||||||
* \param theHexMesh false = no partition, true = with partition
|
* \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
|
||||||
@ -3238,13 +3232,11 @@ module GEOM
|
|||||||
in double theR2, in double theW2, in double theL2,
|
in double theR2, in double theW2, in double theL2,
|
||||||
in double theH, in double theW, in boolean theHexMesh,
|
in double theH, in double theW, 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);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the incident pipes (radius, width, half-length). A fillet is created
|
* the incident pipes (radius, width, half-length). A fillet is created
|
||||||
* on the junction of the pipes.
|
* on the junction of the pipes.
|
||||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
* 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 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
|
||||||
@ -3252,20 +3244,18 @@ module GEOM
|
|||||||
* \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 theRF Radius of curvature of fillet.
|
* \param theRF Radius of curvature of fillet.
|
||||||
* \param theHexMesh false = no partition, true = with partition
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh (default=true)
|
||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
|
ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
|
||||||
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);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the incident pipes (radius, width, half-length). A fillet is created
|
* the incident pipes (radius, width, half-length). A fillet is created
|
||||||
* on the junction of the pipes.
|
* on the junction of the pipes.
|
||||||
* 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.
|
||||||
*
|
|
||||||
* \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
|
||||||
@ -3273,7 +3263,7 @@ module GEOM
|
|||||||
* \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 theRF Radius of curvature of fillet.
|
* \param theRF Radius of curvature of fillet.
|
||||||
* \param theHexMesh false = no partition, true = with partition
|
* \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
|
||||||
@ -3283,7 +3273,6 @@ 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);
|
||||||
|
|
||||||
/*@@ insert new functions before this line @@*/
|
/*@@ insert new functions before this line @@*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 621 B |
@ -50,7 +50,7 @@ AdvancedGUI_PipeTShapeDlg::AdvancedGUI_PipeTShapeDlg(GeometryGUI* theGeometryGUI
|
|||||||
GEOMBase_Skeleton(theGeometryGUI, parent, false) {
|
GEOMBase_Skeleton(theGeometryGUI, parent, false) {
|
||||||
QPixmap imageOp(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_PIPETSHAPE")));
|
QPixmap imageOp(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_PIPETSHAPE")));
|
||||||
QPixmap imageSel(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
|
QPixmap imageSel(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
|
||||||
QPixmap imageImp(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICO_PIPETSHAPE_IMPORT")));
|
imageImp = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICO_PIPETSHAPE_IMPORT"));
|
||||||
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
imagePipeTShape = SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("DLG_PIPETSHAPE"));
|
||||||
|
|
||||||
setWindowTitle(tr("GEOM_PIPE_TSHAPE_TITLE"));
|
setWindowTitle(tr("GEOM_PIPE_TSHAPE_TITLE"));
|
||||||
@ -137,30 +137,6 @@ AdvancedGUI_PipeTShapeDlg::AdvancedGUI_PipeTShapeDlg(GeometryGUI* theGeometryGUI
|
|||||||
JunctionPointsSel->TextLabel6->setAttribute(Qt::WA_DeleteOnClose);
|
JunctionPointsSel->TextLabel6->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
JunctionPointsSel->TextLabel6->close();
|
JunctionPointsSel->TextLabel6->close();
|
||||||
|
|
||||||
// QGridLayout* junctionLayout = (QGridLayout*)JunctionPointsSel->GroupBox1->layout();
|
|
||||||
|
|
||||||
// junctionLayout->addWidget(new QLabel(tr("GEOM_PIPE_TSHAPE_POSITION_LBL_L1"), JunctionPointsSel->GroupBox1), 3, 0, 1, 1);
|
|
||||||
//
|
|
||||||
// QPushButton* ApplyNewL1 = new QPushButton(centralWidget());
|
|
||||||
// // ApplyNewL1->setText("Apply new L1");
|
|
||||||
// ApplyNewL1->setIcon(imageImp);
|
|
||||||
// junctionLayout->addWidget(ApplyNewL1, 3, 1, 1, 1);
|
|
||||||
//
|
|
||||||
// NewPosValL1 = new QLineEdit(JunctionPointsSel->GroupBox1);
|
|
||||||
// NewPosValL1->setReadOnly(true);
|
|
||||||
// junctionLayout->addWidget(NewPosValL1, 3, 2, 1, 1);
|
|
||||||
//
|
|
||||||
// junctionLayout->addWidget(new QLabel(tr("GEOM_PIPE_TSHAPE_POSITION_LBL_L2"), JunctionPointsSel->GroupBox1), 4, 0, 1, 1);
|
|
||||||
//
|
|
||||||
// QPushButton* ApplyNewL2 = new QPushButton(centralWidget());
|
|
||||||
// // ApplyNewL2->setText("Apply new L2");
|
|
||||||
// ApplyNewL2->setIcon(imageImp);
|
|
||||||
// junctionLayout->addWidget(ApplyNewL2, 4, 1, 1, 1);
|
|
||||||
//
|
|
||||||
// NewPosValL2 = new QLineEdit(JunctionPointsSel->GroupBox1);
|
|
||||||
// NewPosValL2->setReadOnly(true);
|
|
||||||
// junctionLayout->addWidget(NewPosValL2, 4, 2, 1, 1);
|
|
||||||
|
|
||||||
// 1st row, height = 1, colspan = 3
|
// 1st row, height = 1, colspan = 3
|
||||||
int rowPict = 0, colPict = 0, rowspanPict = 1, colspanPict = 3;
|
int rowPict = 0, colPict = 0, rowspanPict = 1, colspanPict = 3;
|
||||||
// 2nd row, height = 4, col 1
|
// 2nd row, height = 4, col 1
|
||||||
@ -185,7 +161,7 @@ AdvancedGUI_PipeTShapeDlg::AdvancedGUI_PipeTShapeDlg(GeometryGUI* theGeometryGUI
|
|||||||
myMainLayout->addWidget(JunctionPointsSel, rowNewPosVal, colNewPosVal, rowspanNewPosVal, colspanNewPosVal);
|
myMainLayout->addWidget(JunctionPointsSel, rowNewPosVal, colNewPosVal, rowspanNewPosVal, colspanNewPosVal);
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName("create_pipe_tshape_page.html");
|
setHelpFileName("create__pipetshape__page.html");
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
@ -235,7 +211,16 @@ void AdvancedGUI_PipeTShapeDlg::Init() {
|
|||||||
ChamferGroupParams->SpinBox_DX->setValue(20);
|
ChamferGroupParams->SpinBox_DX->setValue(20);
|
||||||
ChamferGroupParams->SpinBox_DY->setValue(10);
|
ChamferGroupParams->SpinBox_DY->setValue(10);
|
||||||
FilletGroupParams->SpinBox_DX->setValue(20);
|
FilletGroupParams->SpinBox_DX->setValue(20);
|
||||||
|
|
||||||
|
CssNormal = QString("QDoubleSpinBox {");
|
||||||
|
CssNormal.append(MainTubeGroupParams->SpinBox_DZ->styleSheet());
|
||||||
|
CssNormal.append("}");
|
||||||
|
CssNormal.append("\nQPushButton {");
|
||||||
|
CssNormal.append(JunctionPointsSel->PushButton4->styleSheet());
|
||||||
|
CssNormal.append("}");
|
||||||
|
CssAcceptable = "QDoubleSpinBox, QPushButton {background-color: rgb(85, 170, 127)}";
|
||||||
|
CssRefused = "QDoubleSpinBox, QPushButton {background-color: rgb(255, 0, 0)}";
|
||||||
|
|
||||||
// Signal/slot connections
|
// Signal/slot connections
|
||||||
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()));
|
||||||
@ -754,8 +739,10 @@ bool AdvancedGUI_PipeTShapeDlg::isValid(QString& msg) {
|
|||||||
bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var theP1,
|
bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var theP1,
|
||||||
GEOM::GEOM_Object_var theP2, GEOM::GEOM_Object_var theP3, double theTolerance) {
|
GEOM::GEOM_Object_var theP2, GEOM::GEOM_Object_var theP3, double theTolerance) {
|
||||||
|
|
||||||
MainTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
|
MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
|
||||||
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
|
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
|
||||||
|
JunctionPointsSel->PushButton4->setStyleSheet(CssNormal);
|
||||||
|
JunctionPointsSel->PushButton5->setStyleSheet(CssNormal);
|
||||||
|
|
||||||
CORBA::Double theL1 = MainTubeGroupParams->SpinBox_DZ->value();
|
CORBA::Double theL1 = MainTubeGroupParams->SpinBox_DZ->value();
|
||||||
CORBA::Double theL2 = IncidentTubeGroupParams->SpinBox_DZ->value();
|
CORBA::Double theL2 = IncidentTubeGroupParams->SpinBox_DZ->value();
|
||||||
@ -821,15 +808,19 @@ bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var th
|
|||||||
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("background-color: rgb(85, 170, 127);");
|
MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssAcceptable);
|
||||||
|
JunctionPointsSel->PushButton4->setStyleSheet(CssAcceptable);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MainTubeGroupParams->SpinBox_DZ->setToolTip("Value is incompatible with position");
|
MainTubeGroupParams->SpinBox_DZ->setToolTip("Value is incompatible with position");
|
||||||
MainTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 0, 0);");
|
MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssRefused);
|
||||||
|
JunctionPointsSel->PushButton4->setStyleSheet(CssRefused);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
MainTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
|
MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
|
||||||
|
JunctionPointsSel->PushButton4->setStyleSheet(CssNormal);
|
||||||
|
}
|
||||||
|
|
||||||
// std::cerr << "fabs(newL2 - theL2) = " << fabs(newL2 - theL2) << std::endl;
|
// std::cerr << "fabs(newL2 - theL2) = " << fabs(newL2 - theL2) << std::endl;
|
||||||
if (fabs(newL2 - theL2) > Precision::Approximation()) {
|
if (fabs(newL2 - theL2) > Precision::Approximation()) {
|
||||||
@ -840,15 +831,19 @@ bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var th
|
|||||||
IncidentTubeGroupParams->SpinBox_DZ->setValue(newL2);
|
IncidentTubeGroupParams->SpinBox_DZ->setValue(newL2);
|
||||||
connect(IncidentTubeGroupParams->SpinBox_DZ, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double)));
|
connect(IncidentTubeGroupParams->SpinBox_DZ, SIGNAL(valueChanged( double )), this, SLOT(ValueChangedInSpinBox(double)));
|
||||||
IncidentTubeGroupParams->SpinBox_DZ->setToolTip("Value was recomputed to fit with position");
|
IncidentTubeGroupParams->SpinBox_DZ->setToolTip("Value was recomputed to fit with position");
|
||||||
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(85, 170, 127);");
|
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet(CssAcceptable);
|
||||||
|
JunctionPointsSel->PushButton5->setStyleSheet(CssAcceptable);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
IncidentTubeGroupParams->SpinBox_DZ->setToolTip("Value is incompatible with position");
|
IncidentTubeGroupParams->SpinBox_DZ->setToolTip("Value is incompatible with position");
|
||||||
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 0, 0);");
|
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet(CssRefused);
|
||||||
|
JunctionPointsSel->PushButton5->setStyleSheet(CssRefused);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
|
IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
|
||||||
|
JunctionPointsSel->PushButton5->setStyleSheet(CssNormal);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,8 @@ private:
|
|||||||
DlgRef_2Spin* ChamferGroupParams;
|
DlgRef_2Spin* ChamferGroupParams;
|
||||||
DlgRef_1Spin* FilletGroupParams;
|
DlgRef_1Spin* FilletGroupParams;
|
||||||
DlgRef_6Sel* JunctionPointsSel;
|
DlgRef_6Sel* JunctionPointsSel;
|
||||||
|
QPixmap imageImp;
|
||||||
|
QString CssNormal, CssAcceptable, CssRefused;
|
||||||
// QLineEdit* NewPosValL1;
|
// QLineEdit* NewPosValL1;
|
||||||
// QLineEdit* NewPosValL2;
|
// QLineEdit* NewPosValL2;
|
||||||
// QPushButton* ApplyNewL1;
|
// QPushButton* ApplyNewL1;
|
||||||
|
@ -227,6 +227,8 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gp_Trsf aTrsfInv = aTrsf.Inverted();
|
||||||
|
|
||||||
int expectedGroups = 0;
|
int expectedGroups = 0;
|
||||||
if (shapeType == TSHAPE_BASIC)
|
if (shapeType == TSHAPE_BASIC)
|
||||||
if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
|
if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
|
||||||
@ -256,7 +258,7 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
GEOMImpl_I3DPrimOperations* a3DPrimOperations = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
|
GEOMImpl_I3DPrimOperations* a3DPrimOperations = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
|
||||||
|
|
||||||
//
|
//
|
||||||
// Uncomment the following lines when GetInPlace bug is solved
|
// Comment the following lines when GetInPlace bug is solved
|
||||||
// == BEGIN
|
// == BEGIN
|
||||||
// Workaround of GetInPlace bug
|
// Workaround of GetInPlace bug
|
||||||
// Create a bounding box that fits the shape
|
// Create a bounding box that fits the shape
|
||||||
@ -264,6 +266,11 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
aBox->GetLastFunction()->SetDescription("");
|
aBox->GetLastFunction()->SetDescription("");
|
||||||
aTransformOperations->TranslateDXDYDZ(aBox, -theL1, -aR1Ext, -aR1Ext);
|
aTransformOperations->TranslateDXDYDZ(aBox, -theL1, -aR1Ext, -aR1Ext);
|
||||||
aBox->GetLastFunction()->SetDescription("");
|
aBox->GetLastFunction()->SetDescription("");
|
||||||
|
// Apply transformation to box
|
||||||
|
BRepBuilderAPI_Transform aTransformationBox(aBox->GetValue(), aTrsf, Standard_False);
|
||||||
|
TopoDS_Shape aBoxShapeTrsf = aTransformationBox.Shape();
|
||||||
|
aBox->GetLastFunction()->SetValue(aBoxShapeTrsf);
|
||||||
|
|
||||||
// Get the shell of the box
|
// Get the shell of the box
|
||||||
Handle(GEOM_Object) aShell = Handle(GEOM_Object)::DownCast(aShapesOperations->MakeExplode(aBox, TopAbs_SHELL, true)->Value(1));
|
Handle(GEOM_Object) aShell = Handle(GEOM_Object)::DownCast(aShapesOperations->MakeExplode(aBox, TopAbs_SHELL, true)->Value(1));
|
||||||
aBox->GetLastFunction()->SetDescription("");
|
aBox->GetLastFunction()->SetDescription("");
|
||||||
@ -291,9 +298,9 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
if (!aCompoundOfFaces.IsNull()) {
|
if (!aCompoundOfFaces.IsNull()) {
|
||||||
aCompoundOfFaces->GetLastFunction()->SetDescription("");
|
aCompoundOfFaces->GetLastFunction()->SetDescription("");
|
||||||
// Apply transformation to compound of faces
|
// Apply transformation to compound of faces
|
||||||
BRepBuilderAPI_Transform aTransformationCompoundOfFaces(aCompoundOfFaces->GetValue(), aTrsf, Standard_False);
|
// BRepBuilderAPI_Transform aTransformationCompoundOfFaces(aCompoundOfFaces->GetValue(), aTrsf, Standard_False);
|
||||||
TopoDS_Shape aTrsf_CompoundOfFacesShape = aTransformationCompoundOfFaces.Shape();
|
// TopoDS_Shape aTrsf_CompoundOfFacesShape = aTransformationCompoundOfFaces.Shape();
|
||||||
aCompoundOfFaces->GetLastFunction()->SetValue(aTrsf_CompoundOfFacesShape);
|
// aCompoundOfFaces->GetLastFunction()->SetValue(aTrsf_CompoundOfFacesShape);
|
||||||
aCompoundOfFacesList.push_back(aCompoundOfFaces);
|
aCompoundOfFacesList.push_back(aCompoundOfFaces);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -387,7 +394,15 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
//// Groups of Edges ////
|
//// Groups of Edges ////
|
||||||
/////////////////////////
|
/////////////////////////
|
||||||
// Result of propagate
|
// Result of propagate
|
||||||
|
|
||||||
Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
|
Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
|
||||||
|
|
||||||
|
|
||||||
|
// Apply inverted transformation to shape
|
||||||
|
// BRepBuilderAPI_Transform aTransformationShapeInv(aShape, aTrsfInv, Standard_False);
|
||||||
|
// TopoDS_Shape aShapeTrsfInv = aTransformationShapeInv.Shape();
|
||||||
|
// aFunction->SetValue(aShapeTrsfInv);
|
||||||
|
|
||||||
TCollection_AsciiString theDesc = aFunction->GetDescription();
|
TCollection_AsciiString theDesc = aFunction->GetDescription();
|
||||||
Handle(TColStd_HSequenceOfTransient) aSeqPropagate = aBlocksOperations->Propagate(theShape);
|
Handle(TColStd_HSequenceOfTransient) aSeqPropagate = aBlocksOperations->Propagate(theShape);
|
||||||
if (aSeqPropagate.IsNull() || aSeqPropagate->Length() == 0) {
|
if (aSeqPropagate.IsNull() || aSeqPropagate->Length() == 0) {
|
||||||
@ -398,6 +413,12 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
// Recover previous description to get rid of Propagate dump
|
// Recover previous description to get rid of Propagate dump
|
||||||
aFunction->SetDescription(theDesc);
|
aFunction->SetDescription(theDesc);
|
||||||
|
|
||||||
|
|
||||||
|
// Apply transformation to shape
|
||||||
|
// BRepBuilderAPI_Transform aTransformationShape(theShape->GetValue(), aTrsf, Standard_False);
|
||||||
|
// TopoDS_Shape aShapeTrsf = aTransformationShape.Shape();
|
||||||
|
// aFunction->SetValue(aShapeTrsf);
|
||||||
|
|
||||||
bool addGroup;
|
bool addGroup;
|
||||||
bool circularFoundAndAdded = false;
|
bool circularFoundAndAdded = false;
|
||||||
bool incidentPipeFound = false;
|
bool incidentPipeFound = false;
|
||||||
@ -416,9 +437,11 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
TopoDS_Shape aGroupShape = aGroup->GetValue();
|
TopoDS_Shape aGroupShape = aGroup->GetValue();
|
||||||
|
BRepBuilderAPI_Transform aTransformationShapeInv(aGroupShape, aTrsfInv, Standard_False);
|
||||||
|
TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
|
||||||
|
|
||||||
TopTools_IndexedMapOfShape anEdgesMap;
|
TopTools_IndexedMapOfShape anEdgesMap;
|
||||||
TopExp::MapShapes(aGroupShape,TopAbs_EDGE, anEdgesMap);
|
TopExp::MapShapes(aGroupShapeTrsfInv,TopAbs_EDGE, anEdgesMap);
|
||||||
nbEdges = anEdgesMap.Extent();
|
nbEdges = anEdgesMap.Extent();
|
||||||
|
|
||||||
if (shapeType == TSHAPE_BASIC) {
|
if (shapeType == TSHAPE_BASIC) {
|
||||||
@ -439,7 +462,7 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
radialFound =false;
|
radialFound =false;
|
||||||
flangeFound = false;
|
flangeFound = false;
|
||||||
|
|
||||||
TopExp_Explorer Ex(aGroupShape,TopAbs_VERTEX);
|
TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
|
||||||
while (Ex.More()) {
|
while (Ex.More()) {
|
||||||
gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
|
gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
|
||||||
double x=aP.X(), y=aP.Y(), z=aP.Z();
|
double x=aP.X(), y=aP.Y(), z=aP.Z();
|
||||||
@ -505,7 +528,7 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
mainPipeFound = false;
|
mainPipeFound = false;
|
||||||
flangeFound = false;
|
flangeFound = false;
|
||||||
|
|
||||||
TopExp_Explorer Ex(aGroupShape,TopAbs_VERTEX);
|
TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
|
||||||
while (Ex.More()) {
|
while (Ex.More()) {
|
||||||
gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
|
gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
|
||||||
double x=aP.X(), y=aP.Y(), z=aP.Z();
|
double x=aP.X(), y=aP.Y(), z=aP.Z();
|
||||||
@ -567,55 +590,6 @@ bool GEOMImpl_IAdvancedOperations::MakeGroups(/*std::vector<GEOM_IOperations*> t
|
|||||||
theSeq->Append(aGroup);
|
theSeq->Append(aGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle(GEOM_Object) aGroup;
|
|
||||||
// if (shapeType == TSHAPE_BASIC) {
|
|
||||||
// // if (aNbGroups != 11) {
|
|
||||||
// // SetErrorCode("Bad number of propagation groups");
|
|
||||||
// // return false;
|
|
||||||
// // }
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(1));
|
|
||||||
// aGroup->SetName("THICKNESS");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(2));
|
|
||||||
// aGroup->SetName("CIRCULAR_QUARTER_PIPE");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(3));
|
|
||||||
// aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(6));
|
|
||||||
// aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(5));
|
|
||||||
// aGroup->SetName("FLANGE");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// } else if (shapeType == TSHAPE_CHAMFER || shapeType == TSHAPE_FILLET) {
|
|
||||||
// if (aNbGroups != 12) {
|
|
||||||
// SetErrorCode("Bad number of propagation groups");
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(3));
|
|
||||||
// aGroup->SetName("THICKNESS");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(1));
|
|
||||||
// aGroup->SetName("CIRCULAR_QUARTER_PIPE");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(4));
|
|
||||||
// aGroup->SetName("HALF_LENGTH_MAIN_PIPE");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(6));
|
|
||||||
// aGroup->SetName("HALF_LENGTH_INCIDENT_PIPE");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(2));
|
|
||||||
// aGroup->SetName("FLANGE");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// aGroup = Handle(GEOM_Object)::DownCast(aSeqPropagate->Value(7));
|
|
||||||
// if (shapeType == TSHAPE_CHAMFER)
|
|
||||||
// aGroup->SetName("CHAMFER");
|
|
||||||
// else
|
|
||||||
// aGroup->SetName("FILLET");
|
|
||||||
// theSeq->Append(aGroup);
|
|
||||||
// }
|
|
||||||
|
|
||||||
SetErrorCode(OK);
|
SetErrorCode(OK);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1071,89 +1045,89 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapePartition(/*std::vector<GEOM_IO
|
|||||||
theShapes.push_back(aPlnOXZ);
|
theShapes.push_back(aPlnOXZ);
|
||||||
|
|
||||||
// Partition
|
// Partition
|
||||||
Handle(GEOM_Object) Part0 = aBooleanOperations->MakeHalfPartition(theShape, face_t);
|
// Handle(GEOM_Object) Part0 = aBooleanOperations->MakeHalfPartition(theShape, face_t);
|
||||||
if (Part0.IsNull()) {
|
// if (Part0.IsNull()) {
|
||||||
std::cerr << "Impossible to build partition between TShape and 1st face" << std::endl;
|
// std::cerr << "Impossible to build partition between TShape and 1st face" << std::endl;
|
||||||
SetErrorCode("Impossible to build partition between TShape and 1st face");
|
// SetErrorCode("Impossible to build partition between TShape and 1st face");
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
Part0->GetLastFunction()->SetDescription("");
|
// Part0->GetLastFunction()->SetDescription("");
|
||||||
|
//
|
||||||
Handle(GEOM_Object) Te3 ;
|
// Handle(GEOM_Object) Te3 ;
|
||||||
if (isNormal) {
|
// if (isNormal) {
|
||||||
if (Abs(aR1Ext - aR2Ext) <= Precision::Approximation()) {
|
// if (Abs(aR1Ext - aR2Ext) <= Precision::Approximation()) {
|
||||||
std::cerr << "External radius are identical: we do not make partition with plane OXZ" << std::endl;
|
// std::cerr << "External radius are identical: we do not make partition with plane OXZ" << std::endl;
|
||||||
Te3 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOZ);
|
// Te3 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOZ);
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
Handle(GEOM_Object) Part1 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOXZ);
|
// Handle(GEOM_Object) Part1 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOXZ);
|
||||||
if (Part1.IsNull()) {
|
// if (Part1.IsNull()) {
|
||||||
std::cerr << "Impossible to build partition between TShape and plane OXZ" << std::endl;
|
// std::cerr << "Impossible to build partition between TShape and plane OXZ" << std::endl;
|
||||||
SetErrorCode("Impossible to build partition between TShape and plane OXZ");
|
// SetErrorCode("Impossible to build partition between TShape and plane OXZ");
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
Part1->GetLastFunction()->SetDescription("");
|
// Part1->GetLastFunction()->SetDescription("");
|
||||||
Te3 = aBooleanOperations->MakeHalfPartition(Part1, aPlnOZ);
|
// Te3 = aBooleanOperations->MakeHalfPartition(Part1, aPlnOZ);
|
||||||
}
|
// }
|
||||||
if (Te3.IsNull()) {
|
// if (Te3.IsNull()) {
|
||||||
std::cerr << "Impossible to build partition between TShape and plane OZ" << std::endl;
|
// std::cerr << "Impossible to build partition between TShape and plane OZ" << std::endl;
|
||||||
SetErrorCode("Impossible to build partition between TShape and plane OZ");
|
// SetErrorCode("Impossible to build partition between TShape and plane OZ");
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
Te3->GetLastFunction()->SetDescription("");
|
// Te3->GetLastFunction()->SetDescription("");
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
if (Abs(aR1Ext - aR2Ext) <= Precision::Approximation()){ // We should never go here
|
// if (Abs(aR1Ext - aR2Ext) <= Precision::Approximation()){ // We should never go here
|
||||||
SetErrorCode("Impossible to build TShape");
|
// SetErrorCode("Impossible to build TShape");
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
Handle(GEOM_Object) Part1 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOXZ);
|
// Handle(GEOM_Object) Part1 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOXZ);
|
||||||
if (Part1.IsNull()) {
|
// if (Part1.IsNull()) {
|
||||||
std::cerr << "Impossible to build partition between TShape and plane OXZ" << std::endl;
|
// std::cerr << "Impossible to build partition between TShape and plane OXZ" << std::endl;
|
||||||
SetErrorCode("Impossible to build partition between TShape and plane OXZ");
|
// SetErrorCode("Impossible to build partition between TShape and plane OXZ");
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
Part1->GetLastFunction()->SetDescription("");
|
// Part1->GetLastFunction()->SetDescription("");
|
||||||
Handle(GEOM_Object) Part2 = aBooleanOperations->MakeHalfPartition(Part1, aPlnOZ);
|
// Handle(GEOM_Object) Part2 = aBooleanOperations->MakeHalfPartition(Part1, aPlnOZ);
|
||||||
if (Part2.IsNull()) {
|
// if (Part2.IsNull()) {
|
||||||
std::cerr << "Impossible to build partition between TShape and plane OZ" << std::endl;
|
// std::cerr << "Impossible to build partition between TShape and plane OZ" << std::endl;
|
||||||
SetErrorCode("Impossible to build partition between TShape and plane OZ");
|
// SetErrorCode("Impossible to build partition between TShape and plane OZ");
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
Part2->GetLastFunction()->SetDescription("");
|
// Part2->GetLastFunction()->SetDescription("");
|
||||||
Te3 = aBooleanOperations->MakeHalfPartition(Part2, face_t2);
|
// Te3 = aBooleanOperations->MakeHalfPartition(Part2, face_t2);
|
||||||
if (Te3.IsNull()) {
|
// if (Te3.IsNull()) {
|
||||||
std::cerr << "Impossible to build partition between TShape and 2nd face" << std::endl;
|
// std::cerr << "Impossible to build partition between TShape and 2nd face" << std::endl;
|
||||||
SetErrorCode("Impossible to build partition between TShape and 2nd face");
|
// SetErrorCode("Impossible to build partition between TShape and 2nd face");
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
Te3->GetLastFunction()->SetDescription("");
|
// Te3->GetLastFunction()->SetDescription("");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Handle(TColStd_HSequenceOfTransient) partitionShapes = new TColStd_HSequenceOfTransient;
|
Handle(TColStd_HSequenceOfTransient) partitionShapes = new TColStd_HSequenceOfTransient;
|
||||||
// Handle(TColStd_HSequenceOfTransient) theTools = new TColStd_HSequenceOfTransient;
|
Handle(TColStd_HSequenceOfTransient) theTools = new TColStd_HSequenceOfTransient;
|
||||||
// Handle(TColStd_HSequenceOfTransient) theKeepInside = new TColStd_HSequenceOfTransient;
|
Handle(TColStd_HSequenceOfTransient) theKeepInside = new TColStd_HSequenceOfTransient;
|
||||||
// Handle(TColStd_HSequenceOfTransient) theRemoveInside = new TColStd_HSequenceOfTransient;
|
Handle(TColStd_HSequenceOfTransient) theRemoveInside = new TColStd_HSequenceOfTransient;
|
||||||
// Handle(TColStd_HArray1OfInteger) theMaterials;
|
Handle(TColStd_HArray1OfInteger) theMaterials;
|
||||||
// partitionShapes->Append(theShape);
|
partitionShapes->Append(theShape);
|
||||||
// theTools->Append(aPlnOZ);
|
theTools->Append(aPlnOZ);
|
||||||
// theTools->Append(aPlnOXZ);
|
theTools->Append(aPlnOXZ);
|
||||||
// theTools->Append(face_t);
|
theTools->Append(face_t);
|
||||||
// if (!isNormal)
|
if (!isNormal)
|
||||||
// theTools->Append(face_t2);
|
theTools->Append(face_t2);
|
||||||
//
|
|
||||||
// Handle(GEOM_Object) Te3 = aBooleanOperations->MakePartition(partitionShapes, theTools, theKeepInside, theRemoveInside, TopAbs_SOLID, false, theMaterials, 0, false);
|
Handle(GEOM_Object) Te3 = aBooleanOperations->MakePartition(partitionShapes, theTools, theKeepInside, theRemoveInside, TopAbs_SOLID, false, theMaterials, 0, false);
|
||||||
// if (Te3.IsNull()) {
|
if (Te3.IsNull()) {
|
||||||
// SetErrorCode("Impossible to build partition of TShape");
|
SetErrorCode("Impossible to build partition of TShape");
|
||||||
// Handle(GEOM_Object) aCompound = aShapesOperations->MakeCompound(theShapes);
|
// Handle(GEOM_Object) aCompound = aShapesOperations->MakeCompound(theShapes);
|
||||||
// TopoDS_Shape aCompoundShape = aCompound->GetValue();
|
// TopoDS_Shape aCompoundShape = aCompound->GetValue();
|
||||||
// theShape->GetLastFunction()->SetValue(aCompoundShape);
|
// theShape->GetLastFunction()->SetValue(aCompoundShape);
|
||||||
// return false;
|
return false;
|
||||||
// }
|
}
|
||||||
// Te3->GetLastFunction()->SetDescription("");
|
Te3->GetLastFunction()->SetDescription("");
|
||||||
//
|
|
||||||
|
|
||||||
TopoDS_Shape aShape = Te3->GetValue();
|
TopoDS_Shape aShape = Te3->GetValue();
|
||||||
theShape->GetLastFunction()->SetValue(aShape);
|
theShape->GetLastFunction()->SetValue(aShape);
|
||||||
@ -1262,8 +1236,8 @@ bool GEOMImpl_IAdvancedOperations::MakePipeTShapeMirrorAndGlue(/*std::vector<GEO
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* MakePipeTShape
|
* MakePipeTShape
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* incident pipes (radius, width, half-length).
|
* the incident pipes (radius, width, half-length).
|
||||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
* 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 theR1 Internal radius of main pipe
|
||||||
* \param theW1 Width of main pipe
|
* \param theW1 Width of main pipe
|
||||||
@ -1395,9 +1369,11 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeWithPosition
|
||||||
* incident pipes (radius, width, half-length).
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* Center of the shape is (0,0,0). The main plane of the T-shape is XOY.
|
* 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 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
|
||||||
@ -1540,8 +1516,10 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeChamfer
|
||||||
* incident pipes (radius, width, half-length).
|
* 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.
|
* 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 theR1 Internal radius of main pipe
|
||||||
* \param theW1 Width of main pipe
|
* \param theW1 Width of main pipe
|
||||||
@ -1621,12 +1599,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
else {
|
else {
|
||||||
box_e = a3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
|
box_e = a3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
|
||||||
}
|
}
|
||||||
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
box_e = aTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
|
box_e = aTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
|
||||||
box_e->GetLastFunction()->SetDescription("");
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
TCollection_AsciiString theDesc = aFunction->GetDescription();
|
|
||||||
Handle(TColStd_HSequenceOfInteger) edges_e = aShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
|
Handle(TColStd_HSequenceOfInteger) edges_e = aShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
|
||||||
aFunction->SetDescription(theDesc);
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
if (edges_e.IsNull() || edges_e->Length() == 0) {
|
if (edges_e.IsNull() || edges_e->Length() == 0) {
|
||||||
// std::cerr << "Internal edges not found" << std::endl;
|
// std::cerr << "Internal edges not found" << std::endl;
|
||||||
@ -1665,14 +1643,11 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
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());
|
||||||
try {
|
return NULL;
|
||||||
aChamfer = aLocalOperations->MakeChamferEdges(aShape, theH, theW, theEdges);
|
}
|
||||||
}
|
if (aChamfer.IsNull()) {
|
||||||
catch (Standard_Failure) {
|
SetErrorCode("Chamfer can not be computed on the given shape with the given parameters");
|
||||||
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
return NULL;
|
||||||
SetErrorCode(aFail->GetMessageString());
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
aChamfer->GetLastFunction()->SetDescription("");
|
aChamfer->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
@ -1753,9 +1728,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeChamferWithPosition
|
||||||
* incident pipes (radius, width, half-length).
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* The T-shape is placed at junction points P1, P2 and P3.
|
* 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 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
|
||||||
@ -1843,12 +1821,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
else {
|
else {
|
||||||
box_e = a3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
|
box_e = a3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
|
||||||
}
|
}
|
||||||
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
box_e = aTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
|
box_e = aTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
|
||||||
box_e->GetLastFunction()->SetDescription("");
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
TCollection_AsciiString theDesc = aFunction->GetDescription();
|
|
||||||
Handle(TColStd_HSequenceOfInteger) edges_e = aShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
|
Handle(TColStd_HSequenceOfInteger) edges_e = aShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
|
||||||
aFunction->SetDescription(theDesc);
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
if (edges_e.IsNull() || edges_e->Length() == 0) {
|
if (edges_e.IsNull() || edges_e->Length() == 0) {
|
||||||
// std::cerr << "Internal edges not found" << std::endl;
|
// std::cerr << "Internal edges not found" << std::endl;
|
||||||
@ -1879,8 +1857,14 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
try {
|
try {
|
||||||
aChamfer = aLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
|
aChamfer = aLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (Standard_Failure) {
|
||||||
aChamfer = aLocalOperations->MakeChamferEdges(aShape, theH, theW, theEdges);
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (aChamfer.IsNull()) {
|
||||||
|
SetErrorCode("Chamfer can not be computed on the given shape with the given parameters");
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
aChamfer->GetLastFunction()->SetDescription("");
|
aChamfer->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
@ -1954,9 +1938,10 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeFillet
|
||||||
* incident pipes (radius, width, half-length).A fillet is created on
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the junction of the pipes.
|
* 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.
|
* 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 theR1 Internal radius of main pipe
|
||||||
* \param theW1 Width of main pipe
|
* \param theW1 Width of main pipe
|
||||||
@ -2034,12 +2019,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
else {
|
else {
|
||||||
box_e = a3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
|
box_e = a3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
|
||||||
}
|
}
|
||||||
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
box_e = aTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
|
box_e = aTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
|
||||||
box_e->GetLastFunction()->SetDescription("");
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
TCollection_AsciiString theDesc = aFunction->GetDescription();
|
|
||||||
Handle(TColStd_HSequenceOfInteger) edges_e = aShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
|
Handle(TColStd_HSequenceOfInteger) edges_e = aShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
|
||||||
aFunction->SetDescription(theDesc);
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
if (edges_e.IsNull() || edges_e->Length() == 0) {
|
if (edges_e.IsNull() || edges_e->Length() == 0) {
|
||||||
// std::cerr << "Internal edges not found" << std::endl;
|
// std::cerr << "Internal edges not found" << std::endl;
|
||||||
@ -2066,8 +2051,20 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
if (theHexMesh && nbEdgesInFillet == 1)
|
if (theHexMesh && nbEdgesInFillet == 1)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(GEOM_Object) aFillet = aLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
|
Handle(GEOM_Object) aFillet;
|
||||||
|
try {
|
||||||
|
aFillet = aLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (aFillet.IsNull()) {
|
||||||
|
SetErrorCode("Fillet can not be computed on the given shape with the given parameters");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
aFillet->GetLastFunction()->SetDescription("");
|
aFillet->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
TopoDS_Shape aFilletShape = aFillet->GetValue();
|
TopoDS_Shape aFilletShape = aFillet->GetValue();
|
||||||
@ -2134,10 +2131,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeFilletWithPosition
|
||||||
* incident pipes (radius, width, half-length). A fillet is created on
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the junction of the pipes.
|
* the incident pipes (radius, width, half-length). A fillet is created
|
||||||
* The T-shape is placed at junction points P1, P2 and P3.
|
* 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 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
|
||||||
@ -2223,12 +2222,12 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
else {
|
else {
|
||||||
box_e = a3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
|
box_e = a3DPrimOperations->MakeBoxDXDYDZ(2*(theR2+theW2), 2*(theR2+theW2), theR1+theW1);
|
||||||
}
|
}
|
||||||
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
box_e = aTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
|
box_e = aTransformOperations->TranslateDXDYDZ(box_e, -(theR2+theW2), -(theR2+theW2), 0);
|
||||||
box_e->GetLastFunction()->SetDescription("");
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
TCollection_AsciiString theDesc = aFunction->GetDescription();
|
|
||||||
Handle(TColStd_HSequenceOfInteger) edges_e = aShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
|
Handle(TColStd_HSequenceOfInteger) edges_e = aShapesOperations->GetShapesOnBoxIDs(box_e, aShape, TopAbs_EDGE, GEOMAlgo_ST_IN);
|
||||||
aFunction->SetDescription(theDesc);
|
box_e->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
if (edges_e.IsNull() || edges_e->Length() == 0) {
|
if (edges_e.IsNull() || edges_e->Length() == 0) {
|
||||||
// std::cerr << "Internal edges not found" << std::endl;
|
// std::cerr << "Internal edges not found" << std::endl;
|
||||||
@ -2255,8 +2254,20 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IAdvancedOperations::MakePipeTShap
|
|||||||
if (theHexMesh && nbEdgesInFillet == 1)
|
if (theHexMesh && nbEdgesInFillet == 1)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle(GEOM_Object) aFillet = aLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
|
Handle(GEOM_Object) aFillet;
|
||||||
|
try {
|
||||||
|
aFillet = aLocalOperations->MakeFilletEdges(aShape, theRF, theEdges);
|
||||||
|
}
|
||||||
|
catch (Standard_Failure) {
|
||||||
|
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
|
||||||
|
SetErrorCode(aFail->GetMessageString());
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (aFillet.IsNull()) {
|
||||||
|
SetErrorCode("Fillet can not be computed on the given shape with the given parameters");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
aFillet->GetLastFunction()->SetDescription("");
|
aFillet->GetLastFunction()->SetDescription("");
|
||||||
|
|
||||||
TopoDS_Shape aFilletShape = aFillet->GetValue();
|
TopoDS_Shape aFilletShape = aFillet->GetValue();
|
||||||
|
@ -57,8 +57,9 @@ GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i()
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShape
|
||||||
* incident pipes (radius, width, half-length).
|
* 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.
|
* 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 theR1 Internal radius of main pipe
|
||||||
* \param theW1 Width of main pipe
|
* \param theW1 Width of main pipe
|
||||||
@ -66,7 +67,7 @@ GEOM_IAdvancedOperations_i::~GEOM_IAdvancedOperations_i()
|
|||||||
* \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 false = no partition, true = with partition
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh
|
||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -93,16 +94,21 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShape (CORBA::Double theR1,
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeWithPosition
|
||||||
* incident pipes (radius, width, half-length).
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* The T-shape is placed at junction points P1, P2 and P3.
|
* 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 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 false = no partition, true = with partition
|
* \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.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -136,9 +142,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::D
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeChamfer
|
||||||
* incident pipes (radius, width, half-length). A chamfer is created on
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the junction of the pipes.
|
* 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.
|
* 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 theR1 Internal radius of main pipe
|
||||||
* \param theW1 Width of main pipe
|
* \param theW1 Width of main pipe
|
||||||
@ -146,9 +153,9 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeWithPosition (CORBA::D
|
|||||||
* \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 theH Height of the chamfer.
|
* \param theH Height of chamfer.
|
||||||
* \param theW Width of the chamfer.
|
* \param theW Width of chamfer.
|
||||||
* \param theHexMesh false = no partition, true = with partition
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh
|
||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -176,10 +183,12 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeChamferWithPosition
|
||||||
* incident pipes (radius, width, half-length). A chamfer is created on
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the junction of the pipes.
|
* the incident pipes (radius, width, half-length). A chamfer is created
|
||||||
* The T-shape is placed at junction points P1, P2 and P3.
|
* 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 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
|
||||||
@ -188,7 +197,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamfer(CORBA::Double
|
|||||||
* \param theL2 Half-length of incident pipe
|
* \param theL2 Half-length of incident pipe
|
||||||
* \param theH Height of the chamfer.
|
* \param theH Height of the chamfer.
|
||||||
* \param theW Width of the chamfer.
|
* \param theW Width of the chamfer.
|
||||||
* \param theHexMesh false = no partition, true = with partition
|
* \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.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -223,9 +235,10 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition (C
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeFillet
|
||||||
* incident pipes (radius, width, half-length). A fillet is created on
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the junction of the pipes.
|
* 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.
|
* 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 theR1 Internal radius of main pipe
|
||||||
* \param theW1 Width of main pipe
|
* \param theW1 Width of main pipe
|
||||||
@ -234,7 +247,7 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeChamferWithPosition (C
|
|||||||
* \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 theRF Radius of curvature of fillet.
|
* \param theRF Radius of curvature of fillet.
|
||||||
* \param theHexMesh false = no partition, true = with partition
|
* \param theHexMesh Boolean indicating if shape is prepared for hex mesh
|
||||||
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -262,18 +275,23 @@ GEOM::ListOfGO* GEOM_IAdvancedOperations_i::MakePipeTShapeFillet (CORBA::Double
|
|||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* Create a T-shape object with specified caracteristics for the main and the
|
* MakePipeTShapeFilletWithPosition
|
||||||
* incident pipes (radius, width, half-length). A fillet is created on
|
* Create a T-shape object with specified caracteristics for the main and
|
||||||
* the junction of the pipes.
|
* the incident pipes (radius, width, half-length). A fillet is created
|
||||||
* The T-shape is placed at junction points P1, P2 and P3.
|
* 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 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 theRF Radius of curvature of fillet.
|
* \param theRF Radius of curvature of fillet
|
||||||
* \param theHexMesh false = no partition, true = with partition
|
* \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.
|
* \return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -4136,21 +4136,23 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
|
|
||||||
## 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).
|
||||||
# Center of the shape is (0,0,0). The main plane of the T-shape is
|
# The extremities of the main pipe are located on junctions points P1 and P2.
|
||||||
# XOY.
|
# The extremity of the incident pipe is located on junction point P3.
|
||||||
|
# If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
||||||
|
# the main plane of the T-shape is XOY.
|
||||||
# @param theR1 Internal radius of main pipe
|
# @param 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 false = no partition, true = with partition (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
|
||||||
# @return List of GEOM_Objects, containing the created shape and propagation groups.
|
# @return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
#
|
#
|
||||||
# @ref tui_creation_tshape "Example"
|
# @ref tui_creation_pipetshape "Example"
|
||||||
def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None):
|
def MakePipeTShape(self, theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh=True, theP1=None, theP2=None, theP3=None):
|
||||||
theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)
|
theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)
|
||||||
if (theP1 and theP2 and theP3):
|
if (theP1 and theP2 and theP3):
|
||||||
@ -4164,8 +4166,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
## 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). A chamfer is
|
# and the incident pipes (radius, width, half-length). A chamfer is
|
||||||
# created on the junction of the pipes.
|
# created on the junction of the pipes.
|
||||||
# Center of the shape is (0,0,0). The main plane of the T-shape is
|
# The extremities of the main pipe are located on junctions points P1 and P2.
|
||||||
# XOY.
|
# The extremity of the incident pipe is located on junction point P3.
|
||||||
|
# If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
||||||
|
# the main plane of the T-shape is XOY.
|
||||||
# @param theR1 Internal radius of main pipe
|
# @param 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
|
||||||
@ -4174,13 +4178,13 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @param theL2 Half-length of incident pipe
|
# @param theL2 Half-length of incident pipe
|
||||||
# @param theH Height of the chamfer.
|
# @param theH Height of the chamfer.
|
||||||
# @param theW Width of the chamfer.
|
# @param theW Width of the chamfer.
|
||||||
# @param theHexMesh false = no partition, true = with partition (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
|
||||||
# @return List of GEOM_Objects, containing the created shape and propagation groups.
|
# @return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
#
|
#
|
||||||
# @ref tui_creation_tshape "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):
|
def MakePipeTShapeChamfer(self, theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, theHexMesh=True, theP1=None, theP2=None, theP3=None):
|
||||||
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, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW)
|
||||||
if (theP1 and theP2 and theP3):
|
if (theP1 and theP2 and theP3):
|
||||||
@ -4194,8 +4198,10 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
## 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). A fillet is
|
# and the incident pipes (radius, width, half-length). A fillet is
|
||||||
# created on the junction of the pipes.
|
# created on the junction of the pipes.
|
||||||
# Center of the shape is (0,0,0). The main plane of the T-shape is
|
# The extremities of the main pipe are located on junctions points P1 and P2.
|
||||||
# XOY.
|
# The extremity of the incident pipe is located on junction point P3.
|
||||||
|
# If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
|
||||||
|
# the main plane of the T-shape is XOY.
|
||||||
# @param theR1 Internal radius of main pipe
|
# @param 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
|
||||||
@ -4203,13 +4209,13 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# @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 theRF Radius of curvature of fillet.
|
# @param theRF Radius of curvature of fillet.
|
||||||
# @param theHexMesh false = no partition, true = with partition (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
|
||||||
# @return List of GEOM_Objects, containing the created shape and propagation groups.
|
# @return List of GEOM_Objects, containing the created shape and propagation groups.
|
||||||
#
|
#
|
||||||
# @ref tui_creation_tshape "Example"
|
# @ref tui_creation_pipetshape "Example"
|
||||||
def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None):
|
def MakePipeTShapeFillet(self, theR1, theW1, theL1, theR2, theW2, theL2, theRF, theHexMesh=True, theP1=None, theP2=None, theP3=None):
|
||||||
theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
|
theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
|
||||||
if (theP1 and theP2 and theP3):
|
if (theP1 and theP2 and theP3):
|
||||||
|
Loading…
Reference in New Issue
Block a user