addspline用法:
Signature
RetVal = object.AddSpline(PointsArray, StartTangent, EndTangent)
Object
MSITStore:C:\Program%20Files\MDT6\HELP\ACADAUTO.CHM::/idh_modelspace_collection.htm" target="_blank" >ModelSpace Collection, MSITStore:C:\Program%20Files\MDT6\HELP\ACADAUTO.CHM::/idh_paperspace_collection.htm" target="_blank" >PaperSpace Collection, MSITStore:C:\Program%20Files\MDT6\HELP\ACADAUTO.CHM::/idh_block_object.htm" target="_blank" >Block The object or objects this method applies to.
PointsArray
Variant (array of doubles); input-only An array of 3D WCS coordinates defining the spline curve. At least two points (six elements) are required for constructing a Spline object. The array size must be in multiples of three.
StartTangent
Variant (three-element array of doubles); input-only A 3D vector specifying the tangency of the spline curve at the first point.
EndTangent
Variant (three-element array of doubles); input-only A 3D vector specifying the tangency of the spline curve at the last point.
RetVal
MSITStore:C:\Program%20Files\MDT6\HELP\ACADAUTO.CHM::/idh_spline_object.htm" target="_blank" >Spline object The newly created Spline object.
例子如下:
Dim splineObj As AcadSpline Dim startTan(0 To 2) As Double Dim endTan(0 To 2) As Double Dim fitPoints(0 To 8) As Double startTan(0) = 0.5: startTan(1) = 0.5: startTan(2) = 0 endTan(0) = 0.5: endTan(1) = 0.5: endTan(2) = 0 fitPoints(0) = 1: fitPoints(1) = 1: fitPoints(2) = 0 fitPoints(3) = 5: fitPoints(4) = 5: fitPoints(5) = 0 fitPoints(6) = 10: fitPoints(7) = 0: fitPoints(8) = 0 Set splineObj = ThisDrawing.ModelSpace.AddSpline(fitPoints, startTan, endTan) ZoomAll
|