VectorImage SetBreakAngle

The angle between contiguous vectors below which max radial error is ignored and servo dynamics smooth the transition. Often useful for vectorized fonts, where curves are approximated by polylines with small angle changes.

Overloads

public void SetBreakAngle(float breakAngle)

 

Return value

void  

 

Parameters

float breakAngle angle in degrees

 

Example

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

if (scanDocument != null)
{
    VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
    
    
    vectorImage.SetRepeatCount(1);
     
    vectorImage.SetJumpSpeed(1000);     // Ignored in Scanpack mode.  The LinkRate config variable Scanpack Vector Params regulates the jump speed
    vectorImage.SetMarkSpeed(1000);      // With this default setting. Feel free to adjust as needed for more/less speed.
    vectorImage.SetMarkDelay(400);      // Ignored in Scanpack mode
    vectorImage.SetJumpDelay(400);      // Ignored in Scanpack mode

    if (markingMode == CommandGenerationMode.ScanPack)
    {
        vectorImage.SetMaxRadialError(0.1F);        // Affects Scanpack skywriting behavior.  Not used in Traditional mode.
        vectorImage.SetBreakAngle(45.0F);           // Affects Scanpack skywriting behavior.  Not used in Traditional mode.

        vectorImage.SetLaserOnDelay(0);   // Normally set to zero when in Scanpack mode.  Use the LaserRiseTime Scanpack config variable instead.
                                          //Use this for fine adjustment.
        vectorImage.SetLaserOffDelay(0);  // Normally set to zero when in Scanpack mode.  Use the LaserFallTime Scanpack config variable instead.
                                          // Use this for fine adjustment.
    }
    else
    {
        vectorImage.SetLaserOnDelay(100);   // Normally set to zero when in Scanpack mode.  Use the LaserRiseTime Scanpack config variable instead.
                                            //Use this for fine adjustment.
        vectorImage.SetLaserOffDelay(100);  // Normally set to zero when in Scanpack mode.  Use the LaserFallTime Scanpack config variable instead.
                                            // Use this for fine adjustment.

    }
    vectorImage.SetPolyDelay(75);       // Ignored in Scanpack mode
    vectorImage.VariablePolyDelayEnabled = false;   // No angle-based optimization of delay
    vectorImage.SetPipelineDelay(0);    // For advanced laser timing control.  Used to adjust symmetry of bidirectional marking vectors
    vectorImage.SetModulationFrequency(100);    // LASERMOD1 and LASERMOD2 Frequency in KHz
    vectorImage.SetChannelOneDutyCycle(50);     // LASERMOD1 duty-cycle
    vectorImage.SetChannelTwoDutyCycle(5);      // LASERMOD2 duty-cycle
    vectorImage.SetLaserPowerPercentage(50);    // Sets the actual laser power via the analog or digital port depending on hte LaserConfig file setting
    vectorImage.SetVelocityCompensationMode(VelocityCompensationMode.Disabled, 0, 0);   // Advanced laser power control at the ends of vectors

    CircleShape circleShape = new CircleShape();
    circleShape.CenterPoint.X = 0.0f;
    circleShape.CenterPoint.Y = 0.0f;
    circleShape.CenterPoint.Z = 0.0f;
    circleShape.Clockwise = true;
    circleShape.Radius = 10;
    circleShape.StartAngle = 0;
    circleShape.MaximumSegmentationError = 0.001f;

    vectorImage.AddCircle(circleShape);

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

    try
    {
        scanDocument.StartScanning();
    }
    catch
    {

    }

}