circles.append(geompy.MakeCircle(vertices[2], edges[2], 30))
circles.append(geompy.MakeCircle(vertices[3], edges[2], 20))
-# create pipe
-Pipe = geompy.MakePipeWithDifferentSections(circles, vertices, Wire_1, 0, 0)
+# create pipes
+Pipe1 = geompy.MakePipeWithDifferentSections(circles, vertices, Wire_1, 0, 0)
+Pipe2 = geompy.MakePipeWithDifferentSectionsBySteps(circles, vertices, Wire_1)
# add objects in the study
geompy.addToStudy(circles[0], "circles1")
geompy.addToStudy(circles[1], "circles2")
geompy.addToStudy(circles[2], "circles3")
geompy.addToStudy(circles[3], "circles4")
-id_wire = geompy.addToStudy(Wire_1, "Path")
-id_pipe = geompy.addToStudy(Pipe, "Pipe")
+id_wire = geompy.addToStudy(Wire_1, "Path")
+id_pipe1 = geompy.addToStudy(Pipe1, "Pipe1")
+id_pipe2 = geompy.addToStudy(Pipe2, "Pipe2")
# display the wire(path) and the pipe
gg.createAndDisplayGO(id_wire)
-gg.createAndDisplayGO(id_pipe)
-gg.setDisplayMode(id_pipe,1)
+gg.createAndDisplayGO(id_pipe1)
+gg.createAndDisplayGO(id_pipe2)
+gg.setDisplayMode(id_pipe1,1)
+gg.setDisplayMode(id_pipe2,1)
- If <b>With contact</b> is checked, the section is translated in contact with the spine.
- If <b>With correction</b> is checked, the section is rotated to be orthogonal to the spine
tangent in the corresponding point.
+- If <b>Step-by-step generation</b> is checked, the result is created
+step-by-step, i.e. it creates pipes between each pair of neighbor sections and
+fuses them into a single shape.
+
+\note If <b>Step-by-step generation</b> is checked, <b>With contact</b> and
+<b>With correction</b> controls are disabled as corrections of bases are
+not allowed in step-by-step mode.
<b>Generate groups</b> checkbox - if checked allows to create groups of
sub-shapes. For more details on groups creation please refer to
\ref create_groups_page "this description".
\n The \b Result of the operation will be a shell or a solid.
-\n <b>TUI Command:</b> <em>geompy.MakePipeWithDifferentSections(baseShape, locations, pathShape, withContact, withCorrection,
+\n <b>TUI Commands:</b>
+- <em>geompy.MakePipeWithDifferentSections(baseShape, locations, pathShape, withContact, withCorrection,
IsGenerateGroups=False)</em>
\n <b>Arguments:</b> Name + list of shapes (edges, planar wires, faces or shells) serving as base object +
list of locations (vertices) on the path corresponding specified list of the shapes +
1 shape (edge or wire) for definition of the path +
3 Boolean parameters (withContact, withCorrection, IsGenerateGroups).
+- <em>geompy.MakePipeWithDifferentSectionsBySteps(baseShape, locations, pathShape,
+ IsGenerateGroups=False)</em>
+\n <b>Arguments:</b> Name + list of shapes (edges, planar wires, faces or shells) serving as base object +
+list of locations (vertices) on the path corresponding specified list of the shapes +
+1 shape (edge or wire) for definition of the path +
+Boolean parameter.
+
\n <b>Advanced options</b> \ref preview_anchor "Preview"
\image html pipe3.png
* should be equal to number of bases or list of locations can be empty.
* \param thePath - Path shape to extrude the base shape along it.
* \param theWithContact - the mode defining that the section is translated to be in
- * contact with the spine.
+ * contact with the spine. Ignored if IsBySteps is set.
* \param theWithCorrection - defining that the section is rotated to be
- * orthogonal to the spine tangent in the correspondent point
+ * orthogonal to the spine tangent in
+ * the correspondent point. Ignored if IsBySteps is set.
+ * \param IsBySteps - flag that tells if the result should be created
+ * step by step or as a whole. If IsBySteps is set no correction
+ * of bases is allowed.
* \param IsGenerateGroups flag that tells if it is necessary to
* return groups (true) or not (false).
* \return The list of objects. The first one is a result pipe,
in GEOM_Object thePath,
in boolean theWithContact ,
in boolean theWithCorrection,
+ in boolean IsBySteps,
in boolean IsGenerateGroups);
/*!
<source>GEOM_GROUP_NAME_PREFIX</source>
<translation>Group Names Prefix</translation>
</message>
+ <message>
+ <source>GEOM_STEP_BY_STEP</source>
+ <translation>Step-by-step generation</translation>
+ </message>
<message>
<source>GEOM_PLANE</source>
<translation>Plane</translation>
const Handle(GEOM_Object) &thePath,
const bool theWithContact,
const bool theWithCorrections,
+ const bool IsBySteps,
const bool IsGenerateGroups)
{
SetErrorCode(KO);
aCI.SetBases(aSeqBases);
aCI.SetLocations(aSeqLocs);
aCI.SetPath(aRefPath);
- aCI.SetWithContactMode(theWithContact);
- aCI.SetWithCorrectionMode(theWithCorrections);
+
+ if (!IsBySteps) {
+ aCI.SetWithContactMode(theWithContact);
+ aCI.SetWithCorrectionMode(theWithCorrections);
+ }
+
+ aCI.SetIsBySteps(IsBySteps);
aCI.SetGenerateGroups(IsGenerateGroups);
//Compute the Pipe value
pyDump << aPipeDS;
}
- pyDump << " = geompy.MakePipeWithDifferentSections([";
+ if (IsBySteps) {
+ pyDump << " = geompy.MakePipeWithDifferentSectionsBySteps([";
+ } else {
+ pyDump << " = geompy.MakePipeWithDifferentSections([";
+ }
for(i =1 ; i <= nbBases; i++) {
}
}
- pyDump<< "], "<<thePath<<","<<theWithContact << "," << theWithCorrections;
+ pyDump<< "], "<<thePath;
+
+ if (!IsBySteps) {
+ pyDump<<","<<theWithContact << "," << theWithCorrections;
+ }
if (IsGenerateGroups) {
pyDump << ", True";
const Handle(GEOM_Object) &thePath,
const bool theWithContact,
const bool theWithCorrections,
+ const bool IsBySteps,
const bool IsGenerateGroups);
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakePipeWithShellSections
#define PIPEDS_LIST_LOCATIONS 3
#define PIPEDS_ARG_WITHCONTACT 4
#define PIPEDS_ARG_WITHCORRECT 5
+#define PIPEDS_ARG_BY_STEPS 6
// ---- GEOMImpl_IPipeShellSect
#define PIPEDS_LIST_SUBBASES 6
int GetWithCorrectionMode()
{ return _func->GetInteger(PIPEDS_ARG_WITHCORRECT); }
+ void SetIsBySteps (int IsBySteps)
+ { _func->SetInteger(PIPEDS_ARG_BY_STEPS, IsBySteps); }
+
+ int GetIsBySteps()
+ { return _func->GetInteger(PIPEDS_ARG_BY_STEPS); }
+
};
#endif
#include <BRep_Builder.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
+#include <BRepBuilderAPI_MakeSolid.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_Sewing.hxx>
+#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepGProp.hxx>
#include <GeomFill_Trihedron.hxx>
#include <GeomFill_CorrectedFrenet.hxx>
FS2 = Fs(numface);
}
+//=======================================================================
+//function : RemoveFaces
+//purpose : This function returns theShapeFrom without faces of the shape
+// theFacesToRm. It returns a shell if theShapeFrom is a solid or
+// a compound otherwise. Auxilary for CreatePipeWithDifferentSections
+// method.
+//=======================================================================
+static TopoDS_Shape RemoveFaces(const TopoDS_Shape &theShapeFrom,
+ const TopoDS_Shape &theFacesToRm)
+{
+ TopTools_IndexedMapOfShape aMapFaces;
+ TopExp_Explorer anExp(theShapeFrom, TopAbs_FACE);
+ BRep_Builder aBuilder;
+ TopoDS_Shape aResult;
+
+ if (theShapeFrom.ShapeType() == TopAbs_SOLID) {
+ // Create shell
+ aBuilder.MakeShell(TopoDS::Shell(aResult));
+ } else {
+ // Create compound
+ aBuilder.MakeCompound(TopoDS::Compound(aResult));
+ }
+
+ TopExp::MapShapes(theFacesToRm, TopAbs_FACE, aMapFaces);
+
+ for (; anExp.More(); anExp.Next()) {
+ const TopoDS_Shape &aFace = anExp.Current();
+
+ if (!aMapFaces.Contains(aFace)) {
+ aBuilder.Add(aResult, aFace);
+ }
+ }
+
+ return aResult;
+}
+
//=======================================================================
//function : CreatePipeWithDifferentSections
//purpose :
const Handle(TopTools_HSequenceOfShape) theHSeqLocs,
const Standard_Boolean theWithContact,
const Standard_Boolean theWithCorrect,
+ const Standard_Boolean IsBySteps,
Handle(TColStd_HArray1OfInteger) *theGroups)
{
TopoDS_Shape aShape;
}
}
- // check curvature of wire for condition that
- // max summary angle between directions along
- // wire path must be < 4*PI. If not - split wire
- // and seguences of shapes, perform pipe for each
- // and make sewing after that
- double fp,lp;
- gp_Pnt P1,P2;
- gp_Vec Vec1,Vec2;
- double SumAng = 0;
- if ( Edges.Length() > 0 ) {
- Handle(Geom_Curve) C = BRep_Tool::Curve(TopoDS::Edge(Edges.Value(1)),fp,lp);
- C->D1(fp,P1,Vec1);
- C->D1(lp,P2,Vec2);
- SumAng = fabs(Vec1.Angle(Vec2));
- Vec1 = Vec2;
- P1 = P2;
- }
TColStd_SequenceOfInteger SplitEdgeNums,SplitLocNums;
- int LastLoc = 1;
- //cout<<"Edges.Length()="<<Edges.Length()<<endl;
- for (i=2; i<=Edges.Length(); i++) {
- TopoDS_Edge edge = TopoDS::Edge(Edges.Value(i));
- double tol = BRep_Tool::Tolerance(edge);
- Handle(Geom_Curve) C = BRep_Tool::Curve(edge,fp,lp);
- C->D1(lp,P2,Vec2);
- double ang = fabs(Vec1.Angle(Vec2));
- SumAng += ang;
- if (SumAng>4*M_PI) {
- SumAng = ang;
- SplitEdgeNums.Append(i-1);
- int j;
- for (j=LastLoc+1; j<=aSeqLocs.Length(); j++) {
- TopoDS_Vertex aVert = TopoDS::Vertex(aSeqLocs.Value(j));
- gp_Pnt P = BRep_Tool::Pnt(aVert);
- if (P1.Distance(P) < tol) {
- SplitLocNums.Append(j);
- LastLoc = j;
- break;
- }
+
+ if (IsBySteps) {
+ // Fill SplitEdgeNums and SplitLocNums with intermediate location indices
+ // and corresponding edge indices.
+ Standard_Integer i = 1;
+ Standard_Integer j;
+ TopoDS_Vertex aVert;
+ gp_Pnt aP;
+
+ for (j = 2; j < aSeqLocs.Length(); j++) {
+ SplitLocNums.Append(j);
+ aVert = TopoDS::Vertex(aSeqLocs.Value(j));
+ aP = BRep_Tool::Pnt(aVert);
+
+ while (i < Edges.Length()) {
+ Standard_Real aFp;
+ Standard_Real aLp;
+ TopoDS_Edge anEdge = TopoDS::Edge(Edges.Value(i));
+ Standard_Real aTol = BRep_Tool::Tolerance(anEdge);
+ Handle(Geom_Curve) aC = BRep_Tool::Curve(anEdge, aFp, aLp);
+ gp_Pnt aPLast;
+
+ aC->D0(aLp, aPLast);
+ i++;
+
+ if (aP.Distance(aPLast) < aTol) {
+ SplitEdgeNums.Append(i - 1);
+ break;
}
}
+ }
+ } else {
+ // check curvature of wire for condition that
+ // max summary angle between directions along
+ // wire path must be < 4*PI. If not - split wire
+ // and seguences of shapes, perform pipe for each
+ // and make sewing after that
+ double fp,lp;
+ gp_Pnt P1,P2;
+ gp_Vec Vec1,Vec2;
+ double SumAng = 0;
+ if ( Edges.Length() > 0 ) {
+ Handle(Geom_Curve) C = BRep_Tool::Curve(TopoDS::Edge(Edges.Value(1)),fp,lp);
+ C->D1(fp,P1,Vec1);
+ C->D1(lp,P2,Vec2);
+ SumAng = fabs(Vec1.Angle(Vec2));
Vec1 = Vec2;
P1 = P2;
+ }
+ int LastLoc = 1;
+ //cout<<"Edges.Length()="<<Edges.Length()<<endl;
+ for (i=2; i<=Edges.Length(); i++) {
+ TopoDS_Edge edge = TopoDS::Edge(Edges.Value(i));
+ double tol = BRep_Tool::Tolerance(edge);
+ Handle(Geom_Curve) C = BRep_Tool::Curve(edge,fp,lp);
+ C->D1(lp,P2,Vec2);
+ double ang = fabs(Vec1.Angle(Vec2));
+ SumAng += ang;
+ if (SumAng>4*M_PI) {
+ SumAng = ang;
+ SplitEdgeNums.Append(i-1);
+ int j;
+ for (j=LastLoc+1; j<=aSeqLocs.Length(); j++) {
+ TopoDS_Vertex aVert = TopoDS::Vertex(aSeqLocs.Value(j));
+ gp_Pnt P = BRep_Tool::Pnt(aVert);
+ if (P1.Distance(P) < tol) {
+ SplitLocNums.Append(j);
+ LastLoc = j;
+ break;
+ }
+ }
+ }
+ Vec1 = Vec2;
+ P1 = P2;
+ }
}
bool isCreateGroups = (theGroups != NULL);
Standard_ConstructionError::Raise("Invalid input data for building PIPE: bases are invalid");
}
- BuildPipeShell(aBuilder);
+ Standard_Boolean isDone = BuildPipeShell(aBuilder);
+
+ if (isDone && NeedCreateSolid && nn == 1) {
+ // Make solid for the first step.
+ isDone = aBuilder.MakeSolid();
+ }
+
+ if (!isDone) {
+ Standard_ConstructionError::Raise("Pipe construction failure");
+ }
TopoDS_Shape resShape = aBuilder.Shape();
+
+ if (NeedCreateSolid && nn == 1) {
+ // Remove top lid from the result.
+ resShape = RemoveFaces(resShape, aBuilder.LastShape());
+ }
+
aSeqRes.Append(resShape);
// Create groups.
Standard_ConstructionError::Raise("Invalid input data for building PIPE: bases are invalid");
}
- BuildPipeShell(aBuilder);
+ Standard_Boolean isDone = BuildPipeShell(aBuilder);
+
+ if (isDone && NeedCreateSolid) {
+ isDone = aBuilder.MakeSolid();
+ }
+
+ if (!isDone) {
+ Standard_ConstructionError::Raise("Pipe construction failure");
+ }
TopoDS_Shape resShape = aBuilder.Shape();
+
+ if (NeedCreateSolid) {
+ // Remove bottom lid from the result.
+ resShape = RemoveFaces(resShape, aBuilder.FirstShape());
+ }
+
aSeqRes.Append(resShape);
// Create groups.
aSewing->Perform();
aShape = aSewing->SewedShape();
+ if (NeedCreateSolid && aShape.ShapeType() == TopAbs_SHELL) {
+ // Build a solid.
+ BRepBuilderAPI_MakeSolid aMkSolid;
+
+ aMkSolid.Add(TopoDS::Shell(aShape));
+
+ if (!aMkSolid.IsDone()) {
+ Standard_ConstructionError::Raise("Can't create solid pipe");
+ }
+
+ TopoDS_Solid aSolid = aMkSolid.Solid();
+ BRepClass3d_SolidClassifier aSC(aSolid);
+
+ aSC.PerformInfinitePoint(Precision::Confusion());
+
+ if (aSC.State() == TopAbs_IN) {
+ aShape = aSolid.Reversed();
+ } else {
+ aShape = aSolid;
+ }
+ }
+
if (isCreateGroups) {
// Replase Group shapes by modified ones.
TopTools_SequenceOfShape aSeqGroups[5];
Handle(TColStd_HSequenceOfTransient) aLocObjs = aCIDS->GetLocations ();
Standard_Boolean aWithContact = (aCIDS->GetWithContactMode());
Standard_Boolean aWithCorrect = (aCIDS->GetWithCorrectionMode());
+ Standard_Boolean isBySteps = aCIDS->GetIsBySteps();
if (aCI) {
delete aCI;
aShape = CreatePipeWithDifferentSections
(aWirePath, aHSeqBases, aHSeqLocs,
- aWithContact, aWithCorrect, pGroups);
+ aWithContact, aWithCorrect, isBySteps, pGroups);
if (isGenerateGroups) {
// Store created groups.
AddParam( theParams, "Bases", aCI.GetBases() );
AddParam( theParams, "Locations", aCI.GetLocations() );
AddParam( theParams, "Path", aCI.GetPath() );
- AddParam( theParams, "With contact", aCI.GetWithContactMode() );
- AddParam( theParams, "With correction", aCI.GetWithCorrectionMode() );
+
+ if (!aCI.GetIsBySteps()) {
+ AddParam( theParams, "With contact", aCI.GetWithContactMode() );
+ AddParam( theParams, "With correction", aCI.GetWithCorrectionMode() );
+ }
+
+ AddParam( theParams, "Step by step", aCI.GetIsBySteps() );
break;
}
case PIPE_SHELL_SECTIONS:
const Handle(TopTools_HSequenceOfShape) theLocs,
const Standard_Boolean theWithContact,
const Standard_Boolean theWithCorrect,
+ const Standard_Boolean IsBySteps,
Handle(TColStd_HArray1OfInteger) *theGroups = NULL);
Standard_EXPORT virtual
aLocs->Append(aShapeCDG_1);
aLocs->Append(aShapeCDG_2);
- aShape = GEOMImpl_PipeDriver::CreatePipeWithDifferentSections(aWirePath, aBases, aLocs, false, false);
+ aShape = GEOMImpl_PipeDriver::CreatePipeWithDifferentSections
+ (aWirePath, aBases, aLocs, false, false, false);
// 7. Make a solid, if possible
if (theShapeBase.ShapeType() == TopAbs_FACE) {
GEOM::GEOM_Object_ptr thePath,
CORBA::Boolean theWithContact,
CORBA::Boolean theWithCorrections,
+ CORBA::Boolean IsBySteps,
CORBA::Boolean IsGenerateGroups)
{
GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
GetOperations()->MakePipeWithDifferentSections
(aSeqBases, aSeqLocations,
aPath, theWithContact,
- theWithCorrections, IsGenerateGroups);
+ theWithCorrections, IsBySteps, IsGenerateGroups);
if (!GetOperations()->IsDone() || aHSeq.IsNull())
return aSeq._retn();
GEOM::GEOM_Object_ptr thePath,
CORBA::Boolean theWithContact,
CORBA::Boolean theWithCorrections,
+ CORBA::Boolean IsBySteps,
CORBA::Boolean IsGenerateGroups);
GEOM::ListOfGO* MakePipeWithShellSections
beginService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
get3DPrimOp();
- GEOM::ListOfGO_var aList = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections, false);
+ GEOM::ListOfGO_var aList = my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections, false, false);
endService( " GEOM_Superv_i::MakePipeWithDifferentSections" );
return aList[0];
}
face2 = self.geom.MakeFace(wire2, True)
shell = self.geom.MakePipeWithDifferentSections([wire1, wire2],
[point1, point2],
- path, False, False)
+ path, False, False,
+ False)
closedShell = self.geom.MakeShell([face1, face2, shell])
solid = self.geom.MakeSolid([closedShell])
return solid
aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
theLocations, thePath,
theWithContact, theWithCorrection,
- IsGenerateGroups)
+ False, IsGenerateGroups)
RaiseIfFailed("MakePipeWithDifferentSections", self.PrimOp)
if IsGenerateGroups:
self._autoPublish(aList[0], theName, "pipe")
return aList[0]
+ ## Create a shape by extrusion of the profile shape along
+ # the path shape. This function is a version of
+ # MakePipeWithShellSections() with the same parameters, except
+ # eliminated theWithContact and theWithCorrection. So it is
+ # possible to find the description of all parameters is in this
+ # method. The difference is that this method performs the operation
+ # step by step, i.e. it creates pipes between each pair of neighbor
+ # sections and fuses them into a single shape.
+ #
+ # @ref tui_creation_pipe_with_diff_sec "Example"
+ @ManageTransactions("PrimOp")
+ def MakePipeWithDifferentSectionsBySteps(self, theSeqBases,
+ theLocations, thePath,
+ IsGenerateGroups=False, theName=None):
+ """
+ Create a shape by extrusion of the profile shape along
+ the path shape. This function is a version of
+ MakePipeWithShellSections() with the same parameters, except
+ eliminated theWithContact and theWithCorrection. So it is
+ possible to find the description of all parameters is in this
+ method. The difference is that this method performs the operation
+ step by step, i.e. it creates pipes between each pair of neighbor
+ sections and fuses them into a single shape.
+ """
+ aList = self.PrimOp.MakePipeWithDifferentSections(theSeqBases,
+ theLocations, thePath,
+ False, False,
+ True, IsGenerateGroups)
+ RaiseIfFailed("MakePipeWithDifferentSectionsBySteps", self.PrimOp)
+
+ if IsGenerateGroups:
+ self._autoPublish(aList, theName, "pipe")
+ return aList
+
+ self._autoPublish(aList[0], theName, "pipe")
+ return aList[0]
+
## Create a shape by extrusion of the profile shape along
# the path shape. The path shape can be a wire or an edge.
# the several profiles can be specified in the several locations of path.
//=================================================================================
GenerationGUI_PipeDlg::GenerationGUI_PipeDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
bool modal, Qt::WindowFlags fl)
- : GEOMBase_Skeleton (theGeometryGUI, parent, modal, fl),
- myGenGroupCheckGP (0),
- myPrefixLblGP (0),
- myPrefixEditGP (0),
- myGenGroupCheckGMP (0),
- myPrefixLblGMP (0),
- myPrefixEditGMP (0)
+ : GEOMBase_Skeleton (theGeometryGUI, parent, modal, fl),
+ myGenGroupCheckGP (0),
+ myPrefixLblGP (0),
+ myPrefixEditGP (0),
+ myStepByStepCheckGMP (0),
+ myGenGroupCheckGMP (0),
+ myPrefixLblGMP (0),
+ myPrefixEditGMP (0)
{
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_PIPE")));
QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
// Add widgets for group generation
QGridLayout *aLayoutGMP = (QGridLayout *)GroupMakePoints->GroupBox1->layout();
- myGenGroupCheckGMP =
+ myStepByStepCheckGMP =
+ new QCheckBox(tr("GEOM_STEP_BY_STEP"), GroupMakePoints->GroupBox1);
+ myGenGroupCheckGMP =
new QCheckBox(tr("GEOM_GENERATE_GROUPS"), GroupMakePoints->GroupBox1);
- myPrefixLblGMP =
+ myPrefixLblGMP =
new QLabel (tr("GEOM_GROUP_NAME_PREFIX"), GroupMakePoints->GroupBox1);
- myPrefixEditGMP = new QLineEdit(GroupMakePoints->GroupBox1);
+ myPrefixEditGMP = new QLineEdit(GroupMakePoints->GroupBox1);
- aLayoutGMP->addWidget(myGenGroupCheckGMP, 8, 0, 1, 3);
- aLayoutGMP->addWidget(myPrefixLblGMP, 9, 0, 1, 2);
- aLayoutGMP->addWidget(myPrefixEditGMP, 9, 2);
+ aLayoutGMP->addWidget(myStepByStepCheckGMP, 8, 0, 1, 3);
+ aLayoutGMP->addWidget(myGenGroupCheckGMP, 9, 0, 1, 3);
+ aLayoutGMP->addWidget(myPrefixLblGMP, 10, 0, 1, 2);
+ aLayoutGMP->addWidget(myPrefixEditGMP, 10, 2);
QVBoxLayout* layout = new QVBoxLayout(centralWidget());
layout->setMargin(0); layout->setSpacing(6);
connect(GroupMakePoints->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
connect(GroupMakePoints->CheckBox1, SIGNAL(clicked()), this, SLOT(processPreview()));
connect(GroupMakePoints->CheckBox2, SIGNAL(clicked()), this, SLOT(processPreview()));
- connect(myGenGroupCheckGP, SIGNAL(toggled(bool)), this, SLOT(GenGroupClicked(bool)));
- connect(myGenGroupCheckGMP, SIGNAL(toggled(bool)), this, SLOT(GenGroupClicked(bool)));
+ connect(myStepByStepCheckGMP, SIGNAL(clicked()), this, SLOT(processPreview()));
+ connect(myGenGroupCheckGP, SIGNAL(toggled(bool)), this, SLOT(GenGroupClicked(bool)));
+ connect(myGenGroupCheckGMP, SIGNAL(toggled(bool)), this, SLOT(GenGroupClicked(bool)));
+ connect(myStepByStepCheckGMP, SIGNAL(toggled(bool)), this, SLOT(StepByStepClicked(bool)));
initName(tr("GEOM_PIPE"));
resize(100,100);
GroupPoints->hide();
GroupMakePoints->show();
GroupMakePoints->PushButton1->click();
+ myStepByStepCheckGMP->setChecked(false);
myGenGroupCheckGMP->setChecked(false);
resetGenGroup(myGenGroupCheckGMP, false, true);
break;
myGenGroupCheckGMP->isChecked();
}
+ bool isWithContact = GroupMakePoints->CheckBox1->isEnabled() &&
+ GroupMakePoints->CheckBox1->isChecked();
+ bool isWithCorrection = GroupMakePoints->CheckBox2->isEnabled() &&
+ GroupMakePoints->CheckBox2->isChecked();
+
aList = anOper->MakePipeWithDifferentSections
- (myBaseGO.in(), myLocationsGO.in(), myPath.get(),
- GroupMakePoints->CheckBox1->isChecked(),
- GroupMakePoints->CheckBox2->isChecked(), doGroups);
+ (myBaseGO.in(), myLocationsGO.in(), myPath.get(),
+ isWithContact, isWithCorrection,
+ myStepByStepCheckGMP->isChecked(),
+ doGroups);
if (aList->length() > 0) {
if (doGroups) {
resetGenGroup((QCheckBox *)sender(), isChecked, false);
}
+//=================================================================================
+// function : StepByStepClicked
+// purpose : Slot to treat checking "Step-by-step generation" check box.
+//=================================================================================
+void GenerationGUI_PipeDlg::StepByStepClicked(bool isChecked)
+{
+ GroupMakePoints->CheckBox1->setEnabled(!isChecked);
+ GroupMakePoints->CheckBox2->setEnabled(!isChecked);
+}
+
//=================================================================================
// function : updateGenGroup
// purpose : Update "Generate groups" widgets depending on the path.
QCheckBox *myGenGroupCheckGP;
QLabel *myPrefixLblGP;
QLineEdit *myPrefixEditGP;
+ QCheckBox *myStepByStepCheckGMP;
QCheckBox *myGenGroupCheckGMP;
QLabel *myPrefixLblGMP;
QLineEdit *myPrefixEditGMP;
void ConstructorsClicked( int );
void SelectionTypeButtonClicked();
void GenGroupClicked(bool);
+ void StepByStepClicked(bool);
};
#endif // GENERATIONGUI_PIPEDLG_H