Add command V_Clothoid of FairCurveModeler COM app AutoCAD
Add command V_Clothoid of the Program is intended for modeling French Curves on base of Clothoid.
When designing the products with functional curves is often necessary to use curves with specific properties:
 a conical curve for modeling circles, ellipses, parabolas and hyperbolas, whose properties are widely used in engineering;
 a catenary is used for modeling of construction elements of the form of domes or hanging constructions;
 a line of steepest descent is used for time synchronization of motion of particles under the action of gravity from any point of the curve to the end point;
 Archimedes spiral (as involute of circle) commonly used in the technician, for example, in involute gears;
 Cornu spiral (or clothoid) with a linear change of curvature is used for tracing roads and in other areas of engineering;
The application allows the use of various analytic curves. The method of approximation of geometric determinant of Hermite provides accurate and shape preserving approximation of analytic curves.
Such fundamental analytic curve as conic a method for constructing of vcurve models geometrically precisely directly in the command V_Model.
Construction of the site of clothoid with various options of creating and approximation is implemented by command V_Clothoid.
To construct an arbitrary analytic curve you have to write a AutoLISP function for preparation of Hermite geometric determinant in as three lists: the coordinates of points, tangent vectors and curvature values. An example of writing the function given in Example 17_Crt_Tmpl_Crcl.scr.
After preparing the geometric determinant of Hermite you have to execute the command V_Hermite or directly call in Lispprocedure the program French_Curve.
Exercises for studying add commands of the program FairCurveModeler.
Command V_Clothoid
forms a site of clothoid spiral (Cornu's spiral). The spiral possesses unique property: curvature linearly increases from zero value. This property is used at modeling functional curves and surfaces in CAD.
Actually the spiral is determined by speed of linear change of curvature on length of a curve. It is set in procedure in length of a site of a curve from a zero point and radius of curvature in a final point of a site of a spiral. Or the fixed point through which should pass a spiral.
The Initial site of a spiral from a zero point can be allocated with various way:
 by length of a site from a zero point;
 by value of radius of curvature in a end point.
From an initial site it is possible to allocate a site with the set radius of curvature in an index point. The generated site of a spiral is approximated by a NURBzS model and can be used in the combined modeling curves.
Command: v_clothoid
Sets dynamic parameter a spiral: length l_max an initial site and radius r_min in a final point of a site.
Specify dynamic params for curve r_min<...: (enter radius in a end point)
Specify dynamic params for curve l_max<...: (enter length of a site)
Forms a site of a spiral.
Command line: Enter an option [Dynamic/Radius/Length/Point/Startr]:
Command line: Enter an option [Dynamic/Radius/Length/Point/Startr/Create]: (Enter an option)
Parameters and functions:
Dynamic  redefines dynamic parameter of a spiral;
Radius  allocates an initial site of a spiral on radius r (r> r_min);
Length  allocates an initial site of a spiral on length l (l Startr  allocates a site with the fixed radius in an index point.
Create  fixes a site of a spiral in the form of a cubic NURBzSmodel or the interpolated set of points.
Function  Create
Command line: Enter an option [toNurbzs/toPolyline/eXit]: (enter an option)
Parameters:
toNurbzs  forms a cubic NURBzS model of a site of a spiral. Sets quantity of segments of a curve.
Enter a number of segms of NURBzS: (enter value).
toPolyline  forms a 3d polyline on the interpolated points of a spiral;
Exercises for studying commands of the program FairCurveModeler
Exercises are made so, that for studying commands they are necessary for carrying out strictly consistentl.
Exercise 1. Construction of an initial site of a clothoid spiral.
Exercise 2. Construction of a site of a clothoid spiral on two radiuses.
Exercise 3. Approximation by a NURBzS model of the curves set by the table.
Exercise 1. Construction of an initial site of a spiral
Set a window 50,50 300,300. Execute
Command: _zoom 50,50 300,300
Construct an initial site of a spiral. Execute
Command: v_clothoid
Set dynamic parameter of a clothoid spiral: length l_max = 500 initial sites and radius r_min = 50 in a final point of a site.
Specify dynamic params for curve r_min<...: 50
Specify dynamic params for curve l_max<...: 500
the Program draws the phantom of a spiral with a length 500 and radius in a final point 50.
Set parameters for construction of a model of a site of a spiral.
Set radius of curvature in final point Radius = 60
Command line: Enter an option [Dynamic/Radius/Length/Point/Startr]: R [ENTER]
Specify end radius on clothoid curve:60 [ENTER]
The Program draws a site of a spiral.
Construct a model of a site of a spiral in format NURBzS of a curve
Enter an option [Dynamic/Radius/Length/Point/Startr/Create]:c [ENTER]
Enter an option [toNurbzs/toPolyline/eXit]:n [ENTER]
Enter a number of segms of NURBzS:10 [ENTER]
the Program draws a NURBzS model of an initial site of clothoid spiral.
Investigatep the curvature graph of a site of a spiral.
Команда:V_Test [ENTER]
Select spline curve: (specify the constructed curve)
Specify options to display evolute or curvature graph of a curve
Enter an option for curvature graph [0  Radiuses / 1  Curvature] <0 :0 [ENTER]
Enter a number of interpolated points <100>: [ENTER]
The Program displays the graph of the centers of curvature
Create boundary objects and a smooth curve
Команда:V_Testb [ENTER]
the Program draws a smooth curve in the form of 3м polylines of interpolated points, Tangents pieces and circles of curvature in boundary points.
Exercise 2. Construction of a site of a clothoid on two radiuses
Set a window 50,50 300,300. Execute
Command: _zoom50,50 300,300
Construct a site клотоиды. Execute
Command: v_clothoid
Set dynamic parameter of a clothoid: length l_max = 500 initial sites and radius r_min = 50 in a final point of a site.
Specify dynamic params for curve r_min<...: 50
Specify dynamic params for curve l_max<...: 500
The Program draws the phantom of clothoid spiral with a length 500 and radius in a final point 50.
Set parameters for construction of a model of a site клотоиды.
Set radius of curvature in a final point of site Radius = 60
Command line: Enter an option [Dynamic/Radius/Length/Point/Startr]: R [ENTER]
Specify end radius on clothoid curve:60 [ENTER]
The Program draws a site of Clothoid.
Set radius of curvature in an index point of site Radius = 300
Command line: Enter an option [Dynamic/Radius/Length/Point/Startr]: S [ENTER]
Specify end radius on clothoid curve:300 [ENTER]
The Program draws a site of Clothoid.
Construct a pattern of a site of Clothoid in format NURBzS of a curve
Enter an option [Dynamic/Radius/Length/Point/Startr/Create]:c [ENTER]
Enter an option [toNurbzs/toPolyline/eXit]:n [ENTER]
Enter a number of segms of NURBzS:10 [ENTER]
The Program draws a NURBzS model of a site Clothoid.
Check up the graph of curvature of a site Clothoid.
Command:V_Test [ENTER]
Select spline curve: (select constructed a bspline curve)
Specify Params to Dispay Evolute or Curvature graph of curve
Enter an option for curvature graph [0  Radiuses / 1  Curvature] <0 :1 [ENTER]
Enter a scale with sign for curvature <0.25>: [ENTER]
Enter a number of interpolated points <100>: [ENTER]
The Program displays the graphs of curvature
Create boundary objects and a interpolated curve
Command:V_Testb [ENTER]
The Program draws a interpolated curve in the form of 3м polylines of interpolated points, tangents lines and circles of curvature in boundary points.
Exercise 3. Approximation of curves set with table by a NURBzS model
Construct a NURBzS model of a circle by means of procedure FrenchCurve. Debugging Procedure AutoLISP (defun TEST_Create_French_Curve.....) prepares data for construction a NURBzS model under the table of points (the list xyz), vectors of tangents (the list dxyz), curvature (the list cvt).
Allocate a belowmentioned fragment of the text from (defun.. Up to;;;
(defun TEST_Create_French_Curve (/xyz dxyz cvt)
(setq xyz (list (list100.0.0.) (list 0.100.0.) (list 70.7107 70.7107 0.)
(list 0.100.0.) (list100.0.0.)))
(setq dxyz (list (list 0.1.0.) (list 1.0.0.) (list 0.7071070.707107 0.)
(list1.0.0.) (list 0.1.0.)))
(setq cvt (list 0.01 0.01 0.01 0.01 0.01))
(FrenchCurve xyz dxyz cvt)
) (TEST_Create_French_Curve)
_zoom _all
;;;
Bring the cursor to command line AutoCAD and insert the copied text into a command line. AutoCAD executes procedure AutoLISP TEST_Create_French_Curve. Constructs a NURBzS model of a circle.
Analyse the text of procedure. Try to change reasonably values of points, tangents of vectors and curvature and construct another a NURBzS model.
