Creating a basic B-spline curve


Your Ad Here


Topsolid online Help Index

This example shows how to create a basic B-spline curve.

 

Dim TopDoc As TopSolid.DocumentDesign

 

...

    Dim pxs(1) As Double

    Dim pys(1) As Double

    Dim pzs(1) As Double

    Dim vpxs As Variant

    Dim vpys As Variant

    Dim vpzs As Variant

    Dim cv As TopSolid.Curve

    

    ' make interpolation points

    

    pxs(0) = 0

    pys(0) = 0

    pzs(0) = 0

    

    pxs(1) = 0.05

    pys(1) = 0

    pzs(1) = 0

 

    ' make curve

 

    vpxs = pxs

    vpys = pys

    vpzs = pzs

    

    Set cv = TopDoc.Curves.AddBasicBSplineByInterpolation(vpxs, vpys, vpzs, 0, 0.02, 0, 0, 0, 0)

...

 

Topsolid online Help Index

Your Ad Here