样条函数

autocad_entity:autocad_splines

花键特性基于“增大化现实”技术e linear or area features – depending on whether or not they are closed – and are used to represent features that have smooth curves.Each spline has a number of attributes that completely make up the spline.WhenSTORE_SPLINE_DEFSis set toyes,the reader sets the coordinates to be either the fit points or the control points (depending on what is used to define the spline).样条函数 are always 3D – there is no way in AutoCAD to indicate if the feature was intended to be only 2D.IfSTORE_SPLINE_DEFSis not specified or set tono,then the coordinates of the spline returned by the reader are interpolated values based on the spline definition.

Tip:Tip: When you are performing an AutoCAD-to-AutoCAD translation, then you should always setSTORE_SPLINE_DEFStoyesto get the best results.

AutoCAD splines have several attributes, which are returned when reading and must be specified when writing.

Attribute Name

Content

autocad_degree

The degree of the polynomial used to form the spline.

autocad_knot_tolerance

The tolerance of the spline knots.

autocad_degree

The degree of the spline.

autocad_cntl_pt_tolerance

The tolerance of the control points.

autocad_fit_tolerance

The tolerance of fit points.

autocad_knot_tolerance

The tolerance of knots.

autocad_num_cntl_pts

The number of control points.

autocad_control_x

autocad_control_y

autocad_control_z

The comma-separated lists representing the coordinates of the control points of a spline.There should be exactly n entries in each list, where n is the value of autocad_num_cntl_pts

autocad_num_fit_pts

The number of fit points.

autocad_fit_x

autocad_fit_y

autocad_fit_z

The comma-separated lists representing the coordinates of the fit points of a fit point type spline.There should be exactly n entries in each list, where n is the value of autocad_num_fit_pts.

autocad_num_knots

The number of knots.

autocad_knot_param

The computation method used to determine the curvature of the spline between fit points, for fit point type splines.

Range:chord | sqrtchord | uniform | custom

autocad_flag

The flag that indicates the type of spline.It is a bit vector normally only used when going from AutoCAD to AutoCAD.

1.CLOSED

2.PERIODIC

4.RATIONAL

8.PLANAR

16.LINEAR

autocad_start_tangent_x

autocad_start_tangent_y

autocad_start_tangent_z

A vector representing the start tangent for fit point type splines.

autocad_end_tangent_x

autocad_end_tangent_y

autocad_end_tangent_z

A vector representing the end tangent for fit point type splines.

autocad_control_x

autocad_control_y

autocad_control_z

A comma separated list.The control point coordinates in comma separated values.IfSTORE_SPLINE_DEFSis specified, then the control points are also stored as the coordinates.

autocad_control_weights

控制点的权重。一个以逗号分隔 of the weight values for each control vertex.

autocad_spline_type

A value representing the form of the spline.A spline can be defined as either a control point spline with no fit points, or a fit point spline with fit points and possibly control points as well.

Range:fit | control_vertices

When writing to splines, the spline must be specified exactly as it is returned from the reader with STORE_SPLINE_DEFS set toyes:

  1. A spline can be defined from control point attributes as a control point type spline.These would be attributes such as autocad_control_x, autocad_num_cntl_points, and autocad_cntl_pt_tolerance.Additionally a spline can be defined from similar fit point attributes, with or without control point attributes, as a fit point type spline.
  2. If the spline is defined by control points then the autocad_num_fit_pts must be zero and autocad_num_cntl_pts must be the same as the number of values in the autocad_control_x, autocad_control_y, and autocad_control_z attributes.