WARNING: This function is experimental and may change or be removed.
Create a region from closed segments.
Form the region from sketch block segments that have a given point within a
closed boundary. When using a 2D point, not a point from the sketch, the
sketch parameter is required to specify which sketch the region is from.
Alternatively, form the region by tracing the first segment from its start
point to the intersection with the second segment, and turn at each
intersection using the direction until returning back to the first
segment.
Arguments
| Name | Type | Description | Required |
|---|---|---|---|
point | Point2d or Segment | A point that is within the region's boundary. | No |
segments | [Segment; 1+] | The first two segments that form the region's boundary. In case of a circle, the one circle segment that forms the region. | No |
intersectionIndex | number(_) | Index of the intersection of the first segment with the second segment to use as the region's boundary. The default is -1, which uses the last intersection. | No |
direction | string | CCW for counterclockwise, CW for clockwise. Default is CCW. | No |
sketch | any | The sketch that the region is from. This is required when point is a Point2d. | No |
Returns
Sketch - A sketch is a collection of paths.