您可以使用 AutoCAD 创建各种曲线对象,包括样条曲线、圆、圆弧和椭圆。 所有曲线都在当前WCS 的 XY平面上创建。 要创建曲线,请使用下列方法之一:
创建样条线对象本示例使用三个点 (0, 0, 0)、(5, 5, 0) 和 (10, 0, 0) 在模型空间中创建样条曲线。样条的开始切线和结束切线为 (0.5, 0.5, 0.0)。 Sub Ch4_CreateSpline() ' This example creates a spline object in model space. ' Declare the variables needed 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 ' Define the variables 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 ' Create the spline Set splineObj = ThisDrawing.ModelSpace.AddSpline(fitPoints, startTan, endTan) ZoomAll End Sub |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )
GMT+8, 2024-5-12 10:09
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.