HatchShape AddHatchPatternOffsetFilling

Adds a Offset Filling pattern to the hatch shape with more controls and definitions.

Overloads

public void AddHatchPatternOffsetFilling(float offsetGap, HatchOffsetStyle style, HatchOffsetAlgorithm algorithm, HatchCornerStyle cornerStyle, bool applySmoothing)
public void AddHatchPatternOffsetFilling(float offsetGap, HatchOffsetStyle style, HatchOffsetAlgorithm algorithm, HatchCornerStyle cornerStyle, LaserParameters laserParameters)
public void AddHatchPatternOffsetFilling(float offsetGap, HatchOffsetStyle style, HatchOffsetAlgorithm algorithm, HatchCornerStyle cornerStyle, bool applySmoothing, LaserParameters laserParameters)
public void AddHatchPatternOffsetFilling(float offsetGap, HatchOffsetStyle style, HatchOffsetAlgorithm algorithm, HatchCornerStyle cornerStyle)

 

Return value

void

 

 

Parameters

float offsetGap The gap between each offset hatch
HatchOffsetStyle style Set the offset hatch style
HatchOffsetAlgorithm algorithm Set the ofsset hatching algorithm
HatchCornerStyle cornerStyle Set the corner style
bool applySmoothing Smooth hatch lines

 

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);

    CircleShape circleShape1 = new CircleShape();
    circleShape1.CenterPoint.X = 0.0f;
    circleShape1.CenterPoint.Y = 0.0f;
    circleShape1.CenterPoint.Z = 0.0f;
    circleShape1.Radius = 5;
    vectorImage.AddCircle(circleShape1);

    CircleShape circleShape2 = new CircleShape();
    circleShape2.CenterPoint.X = 2.5f;
    circleShape2.CenterPoint.Y = 2.5f;
    circleShape2.CenterPoint.Z = 0.0f;
    circleShape2.Radius = 5;
    vectorImage.AddCircle(circleShape2);


    HatchShape hatchShape = new HatchShape();
    hatchShape.AddCircle(0, 0, 0, 5, 0.5f);
    hatchShape.AddCircle(2.5f, 2.5f, 0, 5, 0.5f);

    hatchShape.AddHatchPatternOffsetFilling(0.12f, HatchOffsetStyle.InwardToOut, HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.Sharp);
    vectorImage.AddHatch(hatchShape, 0);


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

    try
    {
        scanDocument.StartScanning();
    }
    catch (Exception exp)
    {
        MessageBox.Show(exp.Message);
    }
}