From: rnv Date: Thu, 5 May 2011 08:05:36 +0000 (+0000) Subject: Implementation of the "16564: EDF 509 GEOM : 3D line with mathematical equation in... X-Git-Tag: V6_3_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=88c1447127c6c04e2ce24e5f06ea2e83e7b848a5;p=modules%2Fgeom.git Implementation of the "16564: EDF 509 GEOM : 3D line with mathematical equation in GUI" issue. --- diff --git a/doc/salome/gui/GEOM/images/curve.png b/doc/salome/gui/GEOM/images/curve.png index 524587bae..53582446f 100755 Binary files a/doc/salome/gui/GEOM/images/curve.png and b/doc/salome/gui/GEOM/images/curve.png differ diff --git a/doc/salome/gui/GEOM/images/curve1.png b/doc/salome/gui/GEOM/images/curve1.png index a6bb83f54..3a271f221 100644 Binary files a/doc/salome/gui/GEOM/images/curve1.png and b/doc/salome/gui/GEOM/images/curve1.png differ diff --git a/doc/salome/gui/GEOM/images/curve2.png b/doc/salome/gui/GEOM/images/curve2.png index 28575122f..370df7128 100644 Binary files a/doc/salome/gui/GEOM/images/curve2.png and b/doc/salome/gui/GEOM/images/curve2.png differ diff --git a/doc/salome/gui/GEOM/input/creating_curve.doc b/doc/salome/gui/GEOM/input/creating_curve.doc index 483032476..3d9a1fcb8 100644 --- a/doc/salome/gui/GEOM/input/creating_curve.doc +++ b/doc/salome/gui/GEOM/input/creating_curve.doc @@ -10,21 +10,37 @@ time you define it by a list of \b Points through which the curve passes. The three Curve Construction 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 Points: + \n TUI Commands: 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. + +Arguments: + + -Arguments: Name + at least 2 points which will serve as nodes -on the curve. \nAdvanced options \ref preview_anchor "Preview" \image html curve.png diff --git a/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc index 3bd2107c7..45136089e 100644 --- a/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc +++ b/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc @@ -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