Rectangle3d
ReferencesRepresents the values of a plane and two intervals that form an oriented rectangle in three dimensions.
Constructors
Initializes a new rectangle from width and height.
Initializes a new rectangle from dimensions.
Initializes a new rectangle from a base plane and two corner points.
Properties
Gets the world aligned bounding box for this rectangle.
Gets the circumference of the rectangle.
Gets the signed height of the rectangle. If the Y dimension is decreasing, the height will be negative.
Gets a value indicating whether or not this is a valid rectangle. A rectangle is considered to be valid when the base plane and both dimensions are valid.
Gets the signed width of the rectangle. If the X dimension is decreasing, the width will be negative.
Gets or sets the dimensions of the rectangle along the base plane X-Axis (i.e. the width).
Methods
Gets the point on the rectangle that is closest to a test-point.
Gets the point on the rectangle that is closest to a test-point.
Parameters:
| point (Point3d) | Point to project. |
Returns: The point on or in the rectangle closest to the test point or Point3d.Unset on failure.
Determines if two plane parameters are included in this rectangle.
Determines if a point is included in this rectangle.
Parameters:
| pt (Point3d) | Point to test. The point will be projected onto the Rectangle plane before inclusion is determined. |
Returns: Point Rectangle relationship.
Gets the corner at the given index.
Parameters:
| index (int) | Index of corner, valid values are: 0 = lower left (min-x, min-y) 1 = lower right (max-x, min-y) 2 = upper right (max-x, max-y) 3 = upper left (min-x, max-y) |
Returns: The point at the given corner index.
public static Rectangle3d CreateFromPolyline(IEnumerable<Point3d> polyline, out double deviation, out double angleDeviation)
Attempts to create a rectangle from a polyline. This method only works well for polylines that already closely resemble rectangles. If the polyline contains more than four vertices, the least significant ones will be ignored. If the polylines is non-orthogonal, the discrepancies will be averaged away. This method should not be used as a Rectangle fitter.
Parameters:
| polyline (IEnumerable<Point3d>) | Polyline to parse. |
| deviation (out double) | On success, the deviation will contain the largest deviation between the polyline and the rectangle. |
| angleDeviation (out double) | On success, the angleDeviation will contain the largest deviation (in radians) between the polyline edges and the rectangle edges. |
Returns: A rectangle that is shaped similarly to the polyline or Rectangle3d.Unset if the polyline does not represent a rectangle.
Attempts to create a rectangle from a polyline. This method only works well for polylines that already closely resemble rectangles. If the polyline contains more than four vertices, the least significant ones will be ignored. If the polylines is non-orthogonal, the discrepancies will be averaged away. This method should not be used as a Rectangle fitter.
Parameters:
| polyline (IEnumerable<Point3d>) | Polyline to parse. |
Returns: A rectangle that is shaped similarly to the polyline or Rectangle3d.Unset if the polyline does not represent a rectangle.
Check that all values in other are within epsilon of the values in this
Parameters:
| other (Rectangle3d) | |
| epsilon (double) |
Implements: EpsilonEquals
public void MakeIncreasing()
Ensures the X and Y dimensions are increasing or singleton intervals.
Gets a point along the rectangle boundary.
Parameters:
| t (double) | Parameter along rectangle boundary. Valid values range from 0.0 to 4.0, where each integer domain represents a single boundary edge. |
Returns: The point at the given boundary parameter.
Gets a point in Rectangle space.
Re-centers the base plane on one of the corners.
Parameters:
| index (int) | Index of corner, valid values are: 0 = lower left (min-x, min-y) 1 = lower right (max-x, min-y) 2 = upper right (max-x, max-y) 3 = upper left (min-x, max-y) |
Re-centers the base plane on a new origin.
Parameters:
| origin (Point3d) | New origin for plane. |
Constructs a nurbs curve representation of this rectangle.
Returns: A nurbs curve with the same shape as this rectangle.
Constructs a polyline from this rectangle.
Returns: A polyline with the same shape as this rectangle.