partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglepartition_rectangle (算子名称)

名称

partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglepartition_rectangle — Partition a region into rectangles of approximately equal size.

参数签名

partition_rectangle(区域 : Partitioned : Width, Height : )

Herror partition_rectangle(const Hobject 区域, Hobject* Partitioned, double Width, double Height)

Herror T_partition_rectangle(const Hobject 区域, Hobject* Partitioned, const Htuple Width, const Htuple Height)

void PartitionRectangle(const HObject& 区域, HObject* Partitioned, const HTuple& Width, const HTuple& Height)

HRegion HRegion::PartitionRectangle(double Width, double Height) const

static void HOperatorSet.PartitionRectangle(HObject 区域, out HObject partitioned, HTuple width, HTuple height)

HRegion HRegion.PartitionRectangle(double width, double height)

def partition_rectangle(区域: HObject, width: float, height: float) -> HObject

描述

partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglePartitionRectanglepartition_rectangle partitions the input region into rectangles having an extent of WidthWidthWidthWidthwidthwidth times HeightHeightHeightHeightheightheight. The rectangles are returned in PartitionedPartitionedPartitionedPartitionedpartitionedpartitioned. The region is always split into rectangles of approximately equal size. If this is not possible with the requested rectangle size, then WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight are adapted so that the size of the resulting rectangles is approximately equal. If the region is smaller than the given size, its output remains unchanged. A partition is only done if the size of the region is at least 1.5 times the size of the rectangle given by the parameters.

运行信息

参数表

区域区域区域区域区域区域 (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Region to be partitioned.

PartitionedPartitionedPartitionedPartitionedpartitionedpartitioned (output_object)  region(-array) objectHRegionHObjectHRegionHobject *

Partitioned region.

WidthWidthWidthWidthwidthwidth (input_control)  extent.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Width of the individual rectangles.

HeightHeightHeightHeightheightheight (input_control)  extent.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Height of the individual rectangles.

结果

partition_rectanglepartition_rectanglePartitionRectanglePartitionRectanglePartitionRectanglepartition_rectangle returns 2 ( H_MSG_TRUE) if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>), the behavior in case of an empty input region via set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>), and the behavior in case of an empty result region via set_system('store_empty_region',<'true'/'false'>)set_system("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)set_system("store_empty_region",<"true"/"false">). If necessary, an exception is raised.

可能的前置算子

thresholdthresholdThresholdThresholdThresholdthreshold, connectionconnectionConnectionConnectionConnectionconnection

可替代算子

partition_dynamicpartition_dynamicPartitionDynamicPartitionDynamicPartitionDynamicpartition_dynamic

参考其它

intersectionintersectionIntersectionIntersectionIntersectionintersection, smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1smallest_rectangle1, shape_transshape_transShapeTransShapeTransShapeTransshape_trans, clip_regionclip_regionClipRegionClipRegionClipRegionclip_region

模块

Foundation