CropRegionToRectangle


Creates a region from a rectangular fragment of another one.

Applications:Can be used to obtain a part of a bigger region, but also to enforce specific region frame.

Syntax

C++
Python
 
def CropRegionToRectangle(
	inRegion: Region,
	inRectangle: Rectangle2D,
	outRegion: Region,
	/,
	*,
	inRectangleAlignment: CoordinateSystem2D | None = None,
	outAlignedRectangle: Rectangle2D | None = None,
	outOutputAlignment: CoordinateSystem2D | None = None
)
-> None

Parameters

Name Type Default Description
Input value inRegion Region Input region
Input value inRectangle Rectangle2D Rectangle defining a rotated subregion
Input value inRectangleAlignment CoordinateSystem2D | None None Adjusts the rectangle to the position of the inspected object
Output value outRegion Region Output region
Output value outAlignedRectangle Rectangle2D | None None Input rectangle after transformation (in the region coordinates)
Output value outOutputAlignment CoordinateSystem2D | None None Alignment of the output region