Creating splines from Lisp

 How to create a quadratic spline with 3 control points or cubic spline with 4 control points from Lisp? I've tried vla-addspline but it only creates splines with fit points.

Comments

  • Create an AcDb2dPolyline and change its type to acQuadSplinePoly.
  • @Roy Klein Gebbinck:
    I need to create a spline, not a polyline, because I need to set weights of control points. And I think I can't do that with polylines.
  • I do not have AutoCAD at hand, but it seems that in AC you can set the SPLMETHOD variable to control the degree of the spline. I don't know if this also affects the 'vla' method.

    In BricsCAD 'entmaking' a quadratic spline is possible:
    [code](entmake
      '(
        (0 . "SPLINE")
        (100 . "AcDbEntity")
        (8 . "0")
        (100 . "AcDbSpline")
        (210 0.0 0.0 1.0)
        (70 . 8)
        (71 . 2)
        (72 . 6)
        (73 . 3)
        (74 . 0)
        (42 . 1e-010)
        (43 . 1e-010)
        (12 0.0 0.0 0.0)
        (13 0.0 0.0 0.0)
        (40 . 0.0)
        (40 . 0.0)
        (40 . 0.0)
        (40 . 1.0)
        (40 . 1.0)
        (40 . 1.0)
        (10 -1.0 1.0 0.0)
        (10 0.0 0.0 0.0)
        (10 1.0 1.0 0.0)
      )
    )[/code]
This discussion has been closed.