<b>New Entity -> Advanced </b> submenu allows to create additional complex topological objects.
<ul>
+<li>\subpage create_pipetshape_page</li>
<!--@@ insert new functions before this line @@-->
</ul>
--- /dev/null
+/*!
+
+\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".
+
+*/
gg.createAndDisplayGO(id_compound)
\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 @@-->
*/
* \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 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.
*/
ListOfGO MakePipeTShape (in double theR1, in double theW1, in double theL1,
in double theR2, in double theW2, in double theL2,
in boolean theHexMesh);
-
/*!
* 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 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 theP2 2nd junction point of main pipe
* \param theP3 Junction point of incident pipe
in double theR2, in double theW2, in double theL2,
in boolean theHexMesh,
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
-
/*!
* 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 theL2 Half-length of incident pipe
* \param theH Height 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.
*/
ListOfGO MakePipeTShapeChamfer (in double theR1, in double theW1, in double theL1,
in double theR2, in double theW2, in double theL2,
in double theH, in double theW, in boolean theHexMesh);
-
/*!
* 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 theL2 Half-length of incident pipe
* \param theH Height 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 theP2 2nd junction point of main pipe
* \param theP3 Junction point of incident pipe
in double theR2, in double theW2, in double theL2,
in double theH, in double theW, in boolean theHexMesh,
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
-
/*!
* 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 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 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.
*/
ListOfGO MakePipeTShapeFillet (in double theR1, in double theW1, in double theL1,
in double theR2, in double theW2, in double theL2,
in double theRF, in boolean theHexMesh);
-
/*!
* 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 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 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 theP2 2nd junction point of main pipe
* \param theP3 Junction point of incident pipe
in double theR2, in double theW2, in double theL2,
in double theRF, in boolean theHexMesh,
in GEOM_Object theP1, in GEOM_Object theP2, in GEOM_Object theP3);
-
/*@@ insert new functions before this line @@*/
};
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")));
- 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"));
setWindowTitle(tr("GEOM_PIPE_TSHAPE_TITLE"));
JunctionPointsSel->TextLabel6->setAttribute(Qt::WA_DeleteOnClose);
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
int rowPict = 0, colPict = 0, rowspanPict = 1, colspanPict = 3;
// 2nd row, height = 4, col 1
myMainLayout->addWidget(JunctionPointsSel, rowNewPosVal, colNewPosVal, rowspanNewPosVal, colspanNewPosVal);
/***************************************************************/
- setHelpFileName("create_pipe_tshape_page.html");
+ setHelpFileName("create__pipetshape__page.html");
Init();
}
ChamferGroupParams->SpinBox_DX->setValue(20);
ChamferGroupParams->SpinBox_DY->setValue(10);
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
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
bool AdvancedGUI_PipeTShapeDlg::CheckCompatiblePosition(GEOM::GEOM_Object_var theP1,
GEOM::GEOM_Object_var theP2, GEOM::GEOM_Object_var theP3, double theTolerance) {
- MainTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
- IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
+ MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
+ IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
+ JunctionPointsSel->PushButton4->setStyleSheet(CssNormal);
+ JunctionPointsSel->PushButton5->setStyleSheet(CssNormal);
CORBA::Double theL1 = MainTubeGroupParams->SpinBox_DZ->value();
CORBA::Double theL2 = IncidentTubeGroupParams->SpinBox_DZ->value();
MainTubeGroupParams->SpinBox_DZ->setValue(newL1);
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->setStyleSheet("background-color: rgb(85, 170, 127);");
+ MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssAcceptable);
+ JunctionPointsSel->PushButton4->setStyleSheet(CssAcceptable);
}
else {
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
- MainTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
+ else {
+ MainTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
+ JunctionPointsSel->PushButton4->setStyleSheet(CssNormal);
+ }
// std::cerr << "fabs(newL2 - theL2) = " << fabs(newL2 - theL2) << std::endl;
if (fabs(newL2 - theL2) > Precision::Approximation()) {
IncidentTubeGroupParams->SpinBox_DZ->setValue(newL2);
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->setStyleSheet("background-color: rgb(85, 170, 127);");
+ IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet(CssAcceptable);
+ JunctionPointsSel->PushButton5->setStyleSheet(CssAcceptable);
}
else {
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
- IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet("background-color: rgb(255, 255, 255);");
+ else {
+ IncidentTubeGroupParams->SpinBox_DZ->setStyleSheet(CssNormal);
+ JunctionPointsSel->PushButton5->setStyleSheet(CssNormal);
+ }
return true;
}
DlgRef_2Spin* ChamferGroupParams;
DlgRef_1Spin* FilletGroupParams;
DlgRef_6Sel* JunctionPointsSel;
+ QPixmap imageImp;
+ QString CssNormal, CssAcceptable, CssRefused;
// QLineEdit* NewPosValL1;
// QLineEdit* NewPosValL2;
// QPushButton* ApplyNewL1;
return false;
}
+ gp_Trsf aTrsfInv = aTrsf.Inverted();
+
int expectedGroups = 0;
if (shapeType == TSHAPE_BASIC)
if (Abs(theR2+theW2-theR1-theW1) <= Precision::Approximation())
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
// Workaround of GetInPlace bug
// Create a bounding box that fits the shape
aBox->GetLastFunction()->SetDescription("");
aTransformOperations->TranslateDXDYDZ(aBox, -theL1, -aR1Ext, -aR1Ext);
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
Handle(GEOM_Object) aShell = Handle(GEOM_Object)::DownCast(aShapesOperations->MakeExplode(aBox, TopAbs_SHELL, true)->Value(1));
aBox->GetLastFunction()->SetDescription("");
if (!aCompoundOfFaces.IsNull()) {
aCompoundOfFaces->GetLastFunction()->SetDescription("");
// Apply transformation to compound of faces
- BRepBuilderAPI_Transform aTransformationCompoundOfFaces(aCompoundOfFaces->GetValue(), aTrsf, Standard_False);
- TopoDS_Shape aTrsf_CompoundOfFacesShape = aTransformationCompoundOfFaces.Shape();
- aCompoundOfFaces->GetLastFunction()->SetValue(aTrsf_CompoundOfFacesShape);
+// BRepBuilderAPI_Transform aTransformationCompoundOfFaces(aCompoundOfFaces->GetValue(), aTrsf, Standard_False);
+// TopoDS_Shape aTrsf_CompoundOfFacesShape = aTransformationCompoundOfFaces.Shape();
+// aCompoundOfFaces->GetLastFunction()->SetValue(aTrsf_CompoundOfFacesShape);
aCompoundOfFacesList.push_back(aCompoundOfFaces);
}
}
//// Groups of Edges ////
/////////////////////////
// Result of propagate
+
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();
Handle(TColStd_HSequenceOfTransient) aSeqPropagate = aBlocksOperations->Propagate(theShape);
if (aSeqPropagate.IsNull() || aSeqPropagate->Length() == 0) {
// Recover previous description to get rid of Propagate dump
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 circularFoundAndAdded = false;
bool incidentPipeFound = false;
continue;
TopoDS_Shape aGroupShape = aGroup->GetValue();
+ BRepBuilderAPI_Transform aTransformationShapeInv(aGroupShape, aTrsfInv, Standard_False);
+ TopoDS_Shape aGroupShapeTrsfInv = aTransformationShapeInv.Shape();
TopTools_IndexedMapOfShape anEdgesMap;
- TopExp::MapShapes(aGroupShape,TopAbs_EDGE, anEdgesMap);
+ TopExp::MapShapes(aGroupShapeTrsfInv,TopAbs_EDGE, anEdgesMap);
nbEdges = anEdgesMap.Extent();
if (shapeType == TSHAPE_BASIC) {
radialFound =false;
flangeFound = false;
- TopExp_Explorer Ex(aGroupShape,TopAbs_VERTEX);
+ TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
while (Ex.More()) {
gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
double x=aP.X(), y=aP.Y(), z=aP.Z();
mainPipeFound = false;
flangeFound = false;
- TopExp_Explorer Ex(aGroupShape,TopAbs_VERTEX);
+ TopExp_Explorer Ex(aGroupShapeTrsfInv,TopAbs_VERTEX);
while (Ex.More()) {
gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(Ex.Current()));
double x=aP.X(), y=aP.Y(), z=aP.Z();
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);
return true;
}
theShapes.push_back(aPlnOXZ);
// Partition
- Handle(GEOM_Object) Part0 = aBooleanOperations->MakeHalfPartition(theShape, face_t);
- if (Part0.IsNull()) {
- std::cerr << "Impossible to build partition between TShape and 1st face" << std::endl;
- SetErrorCode("Impossible to build partition between TShape and 1st face");
- return false;
- }
- Part0->GetLastFunction()->SetDescription("");
-
- Handle(GEOM_Object) Te3 ;
- if (isNormal) {
- if (Abs(aR1Ext - aR2Ext) <= Precision::Approximation()) {
- std::cerr << "External radius are identical: we do not make partition with plane OXZ" << std::endl;
- Te3 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOZ);
- }
- else {
- Handle(GEOM_Object) Part1 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOXZ);
- if (Part1.IsNull()) {
- std::cerr << "Impossible to build partition between TShape and plane OXZ" << std::endl;
- SetErrorCode("Impossible to build partition between TShape and plane OXZ");
- return false;
- }
- Part1->GetLastFunction()->SetDescription("");
- Te3 = aBooleanOperations->MakeHalfPartition(Part1, aPlnOZ);
- }
- if (Te3.IsNull()) {
- std::cerr << "Impossible to build partition between TShape and plane OZ" << std::endl;
- SetErrorCode("Impossible to build partition between TShape and plane OZ");
- return false;
- }
- Te3->GetLastFunction()->SetDescription("");
- }
- else {
- if (Abs(aR1Ext - aR2Ext) <= Precision::Approximation()){ // We should never go here
- SetErrorCode("Impossible to build TShape");
- return false;
- }
- else {
- Handle(GEOM_Object) Part1 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOXZ);
- if (Part1.IsNull()) {
- std::cerr << "Impossible to build partition between TShape and plane OXZ" << std::endl;
- SetErrorCode("Impossible to build partition between TShape and plane OXZ");
- return false;
- }
- Part1->GetLastFunction()->SetDescription("");
- Handle(GEOM_Object) Part2 = aBooleanOperations->MakeHalfPartition(Part1, aPlnOZ);
- if (Part2.IsNull()) {
- std::cerr << "Impossible to build partition between TShape and plane OZ" << std::endl;
- SetErrorCode("Impossible to build partition between TShape and plane OZ");
- return false;
- }
- Part2->GetLastFunction()->SetDescription("");
- Te3 = aBooleanOperations->MakeHalfPartition(Part2, face_t2);
- if (Te3.IsNull()) {
- std::cerr << "Impossible to build partition between TShape and 2nd face" << std::endl;
- SetErrorCode("Impossible to build partition between TShape and 2nd face");
- return false;
- }
- Te3->GetLastFunction()->SetDescription("");
- }
- }
+// Handle(GEOM_Object) Part0 = aBooleanOperations->MakeHalfPartition(theShape, face_t);
+// if (Part0.IsNull()) {
+// std::cerr << "Impossible to build partition between TShape and 1st face" << std::endl;
+// SetErrorCode("Impossible to build partition between TShape and 1st face");
+// return false;
+// }
+// Part0->GetLastFunction()->SetDescription("");
+//
+// Handle(GEOM_Object) Te3 ;
+// if (isNormal) {
+// if (Abs(aR1Ext - aR2Ext) <= Precision::Approximation()) {
+// std::cerr << "External radius are identical: we do not make partition with plane OXZ" << std::endl;
+// Te3 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOZ);
+// }
+// else {
+// Handle(GEOM_Object) Part1 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOXZ);
+// if (Part1.IsNull()) {
+// std::cerr << "Impossible to build partition between TShape and plane OXZ" << std::endl;
+// SetErrorCode("Impossible to build partition between TShape and plane OXZ");
+// return false;
+// }
+// Part1->GetLastFunction()->SetDescription("");
+// Te3 = aBooleanOperations->MakeHalfPartition(Part1, aPlnOZ);
+// }
+// if (Te3.IsNull()) {
+// std::cerr << "Impossible to build partition between TShape and plane OZ" << std::endl;
+// SetErrorCode("Impossible to build partition between TShape and plane OZ");
+// return false;
+// }
+// Te3->GetLastFunction()->SetDescription("");
+// }
+// else {
+// if (Abs(aR1Ext - aR2Ext) <= Precision::Approximation()){ // We should never go here
+// SetErrorCode("Impossible to build TShape");
+// return false;
+// }
+// else {
+// Handle(GEOM_Object) Part1 = aBooleanOperations->MakeHalfPartition(Part0, aPlnOXZ);
+// if (Part1.IsNull()) {
+// std::cerr << "Impossible to build partition between TShape and plane OXZ" << std::endl;
+// SetErrorCode("Impossible to build partition between TShape and plane OXZ");
+// return false;
+// }
+// Part1->GetLastFunction()->SetDescription("");
+// Handle(GEOM_Object) Part2 = aBooleanOperations->MakeHalfPartition(Part1, aPlnOZ);
+// if (Part2.IsNull()) {
+// std::cerr << "Impossible to build partition between TShape and plane OZ" << std::endl;
+// SetErrorCode("Impossible to build partition between TShape and plane OZ");
+// return false;
+// }
+// Part2->GetLastFunction()->SetDescription("");
+// Te3 = aBooleanOperations->MakeHalfPartition(Part2, face_t2);
+// if (Te3.IsNull()) {
+// std::cerr << "Impossible to build partition between TShape and 2nd face" << std::endl;
+// SetErrorCode("Impossible to build partition between TShape and 2nd face");
+// return false;
+// }
+// Te3->GetLastFunction()->SetDescription("");
+// }
+// }
-// Handle(TColStd_HSequenceOfTransient) partitionShapes = new TColStd_HSequenceOfTransient;
-// Handle(TColStd_HSequenceOfTransient) theTools = new TColStd_HSequenceOfTransient;
-// Handle(TColStd_HSequenceOfTransient) theKeepInside = new TColStd_HSequenceOfTransient;
-// Handle(TColStd_HSequenceOfTransient) theRemoveInside = new TColStd_HSequenceOfTransient;
-// Handle(TColStd_HArray1OfInteger) theMaterials;
-// partitionShapes->Append(theShape);
-// theTools->Append(aPlnOZ);
-// theTools->Append(aPlnOXZ);
-// theTools->Append(face_t);
-// if (!isNormal)
-// theTools->Append(face_t2);
-//
-// Handle(GEOM_Object) Te3 = aBooleanOperations->MakePartition(partitionShapes, theTools, theKeepInside, theRemoveInside, TopAbs_SOLID, false, theMaterials, 0, false);
-// if (Te3.IsNull()) {
-// SetErrorCode("Impossible to build partition of TShape");
+ Handle(TColStd_HSequenceOfTransient) partitionShapes = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) theTools = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) theKeepInside = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) theRemoveInside = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HArray1OfInteger) theMaterials;
+ partitionShapes->Append(theShape);
+ theTools->Append(aPlnOZ);
+ theTools->Append(aPlnOXZ);
+ theTools->Append(face_t);
+ if (!isNormal)
+ theTools->Append(face_t2);
+
+ Handle(GEOM_Object) Te3 = aBooleanOperations->MakePartition(partitionShapes, theTools, theKeepInside, theRemoveInside, TopAbs_SOLID, false, theMaterials, 0, false);
+ if (Te3.IsNull()) {
+ SetErrorCode("Impossible to build partition of TShape");
// Handle(GEOM_Object) aCompound = aShapesOperations->MakeCompound(theShapes);
// TopoDS_Shape aCompoundShape = aCompound->GetValue();
// theShape->GetLastFunction()->SetValue(aCompoundShape);
-// return false;
-// }
-// Te3->GetLastFunction()->SetDescription("");
-//
+ return false;
+ }
+ Te3->GetLastFunction()->SetDescription("");
+
TopoDS_Shape aShape = Te3->GetValue();
theShape->GetLastFunction()->SetValue(aShape);
//=============================================================================
/*!
* MakePipeTShape
- * Create a T-shape object with specified caracteristics for the main and the
- * 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.
* \param theR1 Internal radius of main pipe
* \param theW1 Width of main pipe
//=============================================================================
/*!
- * 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.
+ * MakePipeTShapeWithPosition
+ * 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
//=============================================================================
/*!
- * Create a T-shape object with specified caracteristics for the main and the
- * incident pipes (radius, width, half-length).
+ * MakePipeTShapeChamfer
+ * 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
else {
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->GetLastFunction()->SetDescription("");
- TCollection_AsciiString theDesc = aFunction->GetDescription();
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) {
// std::cerr << "Internal edges not found" << std::endl;
catch (Standard_Failure) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
SetErrorCode(aFail->GetMessageString());
- try {
- aChamfer = aLocalOperations->MakeChamferEdges(aShape, theH, theW, theEdges);
- }
- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- SetErrorCode(aFail->GetMessageString());
- return NULL;
- }
+ return NULL;
+ }
+ if (aChamfer.IsNull()) {
+ SetErrorCode("Chamfer can not be computed on the given shape with the given parameters");
+ return NULL;
}
aChamfer->GetLastFunction()->SetDescription("");
//=============================================================================
/*!
- * Create a T-shape object with specified caracteristics for the main and the
- * incident pipes (radius, width, half-length).
- * The T-shape is placed at junction points P1, P2 and P3.
+ * MakePipeTShapeChamferWithPosition
+ * 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
else {
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->GetLastFunction()->SetDescription("");
- TCollection_AsciiString theDesc = aFunction->GetDescription();
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) {
// std::cerr << "Internal edges not found" << std::endl;
try {
aChamfer = aLocalOperations->MakeChamferEdges(aShape, theW, theH, theEdges);
}
- catch (...) {
- aChamfer = aLocalOperations->MakeChamferEdges(aShape, theH, theW, theEdges);
+ catch (Standard_Failure) {
+ 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("");
//=============================================================================
/*!
- * 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.
+ * MakePipeTShapeFillet
+ * 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
else {
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->GetLastFunction()->SetDescription("");
- TCollection_AsciiString theDesc = aFunction->GetDescription();
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) {
// std::cerr << "Internal edges not found" << std::endl;
if (theHexMesh && nbEdgesInFillet == 1)
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("");
TopoDS_Shape aFilletShape = aFillet->GetValue();
//=============================================================================
/*!
- * 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 T-shape is placed at junction points P1, P2 and P3.
+ * MakePipeTShapeFilletWithPosition
+ * 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
else {
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->GetLastFunction()->SetDescription("");
- TCollection_AsciiString theDesc = aFunction->GetDescription();
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) {
// std::cerr << "Internal edges not found" << std::endl;
if (theHexMesh && nbEdgesInFillet == 1)
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("");
TopoDS_Shape aFilletShape = aFillet->GetValue();
//=============================================================================
/*!
- * Create a T-shape object with specified caracteristics for the main and the
- * incident pipes (radius, width, half-length).
+ * MakePipeTShape
+ * 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 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 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.
*/
//=============================================================================
//=============================================================================
/*!
- * Create a T-shape object with specified caracteristics for the main and the
- * incident pipes (radius, width, half-length).
- * The T-shape is placed at junction points P1, P2 and P3.
+ * MakePipeTShapeWithPosition
+ * 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 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.
*/
//=============================================================================
//=============================================================================
/*!
- * 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.
+ * MakePipeTShapeChamfer
+ * 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 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 false = no partition, true = with partition
+ * \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.
*/
//=============================================================================
//=============================================================================
/*!
- * 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 T-shape is placed at junction points P1, P2 and P3.
+ * MakePipeTShapeChamferWithPosition
+ * 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 theL2 Half-length of incident pipe
* \param theH Height 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.
*/
//=============================================================================
//=============================================================================
/*!
- * 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.
+ * MakePipeTShapeFillet
+ * 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 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 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.
*/
//=============================================================================
//=============================================================================
/*!
- * 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 T-shape is placed at junction points P1, P2 and P3.
+ * MakePipeTShapeFilletWithPosition
+ * 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 false = no partition, true = with partition
+ * \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.
*/
//=============================================================================
## 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.
+ # 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.
+ # If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
+ # the main plane of the T-shape is XOY.
# @param theR1 Internal radius of main pipe
# @param theW1 Width of main pipe
# @param theL1 Half-length of main pipe
# @param theR2 Internal radius of incident pipe (R2 < R1)
# @param theW2 Width of incident pipe (R2+W2 < R1+W1)
# @param theL2 Half-length of incident pipe
- # @param theHexMesh 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 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.
#
- # @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):
theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)
if (theP1 and theP2 and theP3):
## 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.
+ # 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.
+ # If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
+ # the main plane of the T-shape is XOY.
# @param theR1 Internal radius of main pipe
# @param theW1 Width of main pipe
# @param theL1 Half-length of main pipe
# @param theL2 Half-length of incident pipe
# @param theH Height 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 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.
#
- # @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):
theR1, theW1, theL1, theR2, theW2, theL2, theH, theW, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theH, theW)
if (theP1 and theP2 and theP3):
## 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.
+ # 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.
+ # If P1, P2 and P3 are not given, the center of the shape is (0,0,0) and
+ # the main plane of the T-shape is XOY.
# @param theR1 Internal radius of main pipe
# @param theW1 Width of main pipe
# @param theL1 Half-length of main pipe
# @param 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 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 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.
#
- # @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):
theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
if (theP1 and theP2 and theP3):