You are here: Start » AVL.NET » AVS.FitPathToPath Method

AVS.FitPathToPath Method

Rotates and shifts a path to minimize average distance between its points and a reference path.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void FitPathToPath
(
	AvlNet.Path inPath,
	AvlNet.Path inReferencePath,
	AvlNet.PathOrientationAlignment inPathOrientationAlignment,
	int inIterations,
	float inFirstShift,
	float inFirstRotation,
	AvlNet.Path outPath,
	out AvlNet.CoordinateSystem2D outAlignment,
	out float outPathDistance
)

Parameters

Name Type Range Default Description
inPathAvlNet.PathPath to be aligned.
inReferencePathAvlNet.PathPath to align to.
inPathOrientationAlignmentAvlNet.PathOrientationAlignmentEllipticAxesDetermines how to align paths orientation before the main algorithm. Default value: EllipticAxes.
inIterationsint<1, INF>5Number of algorithm steps. Default value: 5.
inFirstShiftfloat10.0fMagnitude of possible shift at the first step in pixels. Default value: 10.0f.
inFirstRotationfloat10.0fMagnitude of possible rotation at the first step in degrees. Default value: 10.0f.
outPathAvlNet.PathAligned path.
outAlignmentAvlNet.CoordinateSystem2DThe coordinate system that geometrical objects defined in the context of the path should be aligned to.
outPathDistancefloatAverage distance of characteristic points of the input path from the reference path.

See also