\n <b>TUI Commands:</b>
<ul>
-<li><em>geompy.MakePolyline(ListOfShapes)</em></li>
-<li><em>geompy.MakeBezier(ListOfShapes)</em></li>
-<li><em>geompy.MakeInterpol(ListOfShapes,isClosed)</em></li>
+<li><em>geompy.MakePolyline(ListOfShapes,isClosed)</em></li>
+<li><em>geompy.MakeBezier(ListOfShapes,isClosed)</em></li>
+<li><em>geompy.MakeInterpol(ListOfShapes,isClosed,doReordering)</em></li>
</ul>
ListOfShape is a list of points through which the curve passes.
-If isClosed is True, MakeInterpol builds a closed edge.
+If isClosed is True, MakeBezier and MakeInterpol builds a closed edge,
+MakePolyline builds a closed wire. If doReordering is True,
+MakeInterpol does not follow the order of vertices but searches for the
+closest vertex.
<b>Arguments:</b> Name + at least 2 points which will serve as nodes
on the curve.
\image html curve.png
+\image html curve1.png
+\image html curve2.png
<b>Examples:</b>
\n Firstly, you can define the <b>Base Shape</b> (a basis of the
extrusion), the \b Vector (a direction of the extrusion) and the \b
-Height of extrusion.<br>
-It is possible to select in GUI several Base Shapes to make several extrusions (using Shift button).
+Height of extrusion. Optionally you can define the <b>Scale Factor</b> to
+build extrusion with scaled opposite base. Scaling is possible only
+with 1D and 2D bases.
+<br>It is possible to select in GUI several Base Shapes to make
+several extrusions (using Shift button).
\n The \b Result of the operation will be a GEOM_Object (edge, face,
shell, solid or compsolid).
-\n <b> Both Directions </b> checkbox allows extruiding the source
-object both forward and backward.
-\n <b>TUI Command:</b> <em>geompy.MakePrismVecH(Base, Vector, Height)</em>
+\n <b> Both Directions </b> checkbox allows extruding the source
+object both forward and backward. With this option scaling is not possible.
+\n <b>TUI Command:</b> <em>geompy.MakePrismVecH(Base, Vector, Height, theScaleFactor = -1.0)</em>
\n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
shell) serving as base objects + 1 vector (for direction of the
-extrusion) + 1 value (dimension).
+extrusion) + 1 value (dimension) + 1 optional value (scale factor for
+the opposite base).
\image html extrusion1.png
\n Secondly, you can define the \b Extrusion by the <b>Base Shape(s)</b>
and the \b Start and <b>End Point</b> of the \b Vector (in this way
-you don't need to create it in advance).
-\n <b> Both Directions </b> checkbox allows extruiding the source
-object both forward and backward.
-\n <b>TUI Command:</b> <em>geompy.MakePrism(Base, Point1, Point2)</em>
+you don't need to create it in advance). Optionally you can define the
+<b>Scale Factor</b> to build extrusion with scaled opposite
+base. Scaling is possible only with 1D and 2D bases.
+\n <b> Both Directions </b> checkbox allows extruding the source
+object both forward and backward. With this option scaling is not possible.
+\n <b>TUI Command:</b> <em>geompy.MakePrism(Base, Point1, Point2, theScaleFactor = -1.0)</em>
\n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
-shell) serving as base objects + 2 vertices.
+shell) serving as base objects + 2 vertices + 1 optional value (scale factor for
+the opposite base).
\image html extrusion2.png
\n Finally, you can define the \b Extrusion by the <b>Base Shape(s)</b>
-and the <b>DX, DY, DZ</b> Vector\n
+and the <b>DX, DY, DZ</b> Vector. Optionally you can define the
+<b>Scale Factor</b> to build extrusion with scaled opposite
+base. Scaling is possible only with 1D and 2D bases.\n
<b>Both Directions</b> checkbox allows extruding the
-source objects both forward and backward.
-\n <b>TUI Command:</b> <em>geompy.MakePrismDXDYDZ(Base, dx, dy, dz)</em>
+source objects both forward and backward. With this option scaling is not possible.
+\n <b>TUI Command:</b> <em>geompy.MakePrismDXDYDZ(Base, dx, dy, dz, theScaleFactor = -1.0)</em>
\n <b>Arguments:</b> Name + one or several shapes (vertex, edge, planar wire, face or
-shell) serving as base objects + 3 axis directions.
+shell) serving as base objects + 3 axis directions + 1 optional value (scale factor for
+the opposite base).
\image html extrusion3.png
#include <TopExp.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+#include <Precision.hxx>
#include <GEOMImpl_Types.hxx>
// min, max, step and decimals for spin boxes & initial values
double aScaleFactor = 2.0;
double aScaleStep = 0.5;
+ double aScaleMin = Precision::Confusion() * 10.0;
initSpinBox(GroupVecH->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
GroupVecH->SpinBox_DX->setValue(100.0);
GroupDXDYDZ->SpinBox_DY->setValue(0.0);
GroupDXDYDZ->SpinBox_DZ->setValue(0.0);
- initSpinBox(GroupVecH->SpinBox_DY, 0.0, COORD_MAX, aScaleStep, "parametric_precision" );
- initSpinBox(Group2Points->SpinBox1, 0.0, COORD_MAX, aScaleStep, "parametric_precision" );
- initSpinBox(GroupDXDYDZ->SpinBox_SC, 0.0, COORD_MAX, aScaleStep, "parametric_precision" );
+ initSpinBox(GroupVecH->SpinBox_DY, aScaleMin, COORD_MAX, aScaleStep, "parametric_precision" );
+ initSpinBox(Group2Points->SpinBox1, aScaleMin, COORD_MAX, aScaleStep, "parametric_precision" );
+ initSpinBox(GroupDXDYDZ->SpinBox_SC, aScaleMin, COORD_MAX, aScaleStep, "parametric_precision" );
GroupVecH->SpinBox_DY->setValue(aScaleFactor);
Group2Points->SpinBox1->setValue(aScaleFactor);