VectorImage AddDeg3BezierPath

Adds a degree 3 Bezier shape to the VectorImage

Overloads

public void AddDeg3BezierPath(IEnumerable<Point3D> controlPoints)
public void AddDeg3BezierPath(IEnumerable<Point3D> controlPoints, float maxSegmentationError)
public void AddDeg3BezierPath(Degree3BezierShape degree3BezierShape)

 

Return value

void  

 

Parameters

IEnumerable<Point3D> controlPoints A Point3D control points array,
float maxSegmentationError Specifies the greatest deviation of a curve from a straight line segment between two points on the curve.
Degree3BezierShape degree3BezierShape Define using a Degree3BezierShape object

 

Example

Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);

if (scanDocument != null)
{
    VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

    vectorImage.SetMarkSpeed(1000);
    vectorImage.SetJumpSpeed(2000);
    vectorImage.SetJumpDelay(100);
    vectorImage.SetMarkDelay(100);

    //Set Laser Delays
    vectorImage.SetLaserOnDelay(10);
    vectorImage.SetLaserOffDelay(10);

    IList<Point3D> pl1 = new List<Point3D>();
    pl1.Clear();
    pl1.Add(new Point3D(0.5f, 0, 0));
    pl1.Add(new Point3D(1, 1, 0));
    pl1.Add(new Point3D(0.5f,2f, 0));
    pl1.Add(new Point3D(0, 2f, 0));
    pl1.Add(new Point3D(-0.5f, 2f, 0));
    pl1.Add(new Point3D(-1f, 3, 0));
    pl1.Add(new Point3D(-0.5f, 4, 0));

    vectorImage.AddDeg3BezierPath(pl1);

    scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));

    try
    {
        scanDocument.StartScanning();
    }
    catch
    {

    }
}