Implementation of the "16564: EDF 509 GEOM : 3D line with mathematical equation in GUI" issue.

This commit is contained in:
rnv 2011-05-05 08:05:36 +00:00
parent 840b3bffc5
commit 88c1447127
5 changed files with 38 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -10,21 +10,37 @@ time you define it by a list of \b Points through which the curve
passes. The three <b>Curve Construction</b> menu choices correspond to three
possible types of curves: Polyline, Besier or B-spline (Interpolated).
\n The \b Result of each operation will be a GEOM_Object (edge).
\n There are two ways to define <b>Points</b>:
<ul>
<li> <b>By Selection</b> choice of the points manually in the Object Browser or 3D Viewer.
<li> <b>Analitical</b> parametric definition of the points through python expressions.
</ul>
\n <b>TUI Commands:</b>
<ul>
<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>
<li><em>geompy.MakeCurveParametric(XExpr, YExpt, ZExpt, tMin, tMax, tStep, curveType)</em></li>
</ul>
ListOfShape is a list of points through which the curve passes.
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.
\n XExpr, YExpr, ZExpr python expressions for the X, Y and Z coordinates of the basic points of the curve.
\n tMin, tMax minimum and maximun values of the parameter \b t.
\n tStep step of the parameter \b t
\n curveType type of the curve Polyline, Bezier or Interpolation.
<b>Arguments:</b>
<ul>
<li>Name + at least 2 points which will serve as nodes on the curve, or</li>
<li>Name + 3 string + 3 values (python expressions for the X, Y and Z coordinates, minimum,
maximum and step values of the parameter)</li>
</ul>
<b>Arguments:</b> Name + at least 2 points which will serve as nodes
on the curve.
\n<b>Advanced options</b> \ref preview_anchor "Preview"
\image html curve.png

View File

@ -229,6 +229,17 @@ bezier = geompy.MakeBezier([p0, p1, p2, p3, p4])
#create a b-spline curve from a list of points
interpol = geompy.MakeInterpol([p0, p1, p2, p3, p4], False)
#create a polyline using parametric definition of the basic points
param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 5., geompy.GEOM.Polyline)
# create a bezier curve using parametric definition of the basic points
param_bezier = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 5., geompy.GEOM.Bezier)
#create a b-spline curve using parametric definition of the basic points
param_interpol = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 5., geompy.GEOM.Interpolation)
# add objects in the study
id_p0 = geompy.addToStudy(p0, "Point1")
id_p1 = geompy.addToStudy(p1, "Point2")
@ -238,6 +249,11 @@ id_p4 = geompy.addToStudy(p4, "Point5")
id_polyline = geompy.addToStudy(polyline, "Polyline")
id_bezier = geompy.addToStudy(bezier, "Bezier")
id_interpol = geompy.addToStudy(interpol, "Interpol")
id_param_polyline = geompy.addToStudy(param_polyline, "Polyline Parametric")
id_param_bezier = geompy.addToStudy(param_bezier, "Bezier Parametric")
id_param_interpol = geompy.addToStudy(param_interpol, "Interpol Parametric")
# display the points and the curves
gg.createAndDisplayGO(id_p0)
@ -248,6 +264,10 @@ gg.createAndDisplayGO(id_p4)
gg.createAndDisplayGO(id_polyline)
gg.createAndDisplayGO(id_bezier)
gg.createAndDisplayGO(id_interpol)
gg.createAndDisplayGO(id_param_polyline)
gg.createAndDisplayGO(id_param_bezier)
gg.createAndDisplayGO(id_param_interpol)
\endcode
\anchor tui_creation_vector