Logo Euclid

Rect3D Type

A struct containing a 3D Origin point and two 3D Edge vectors, representing an immutable planar 3D-rectangle with any rotation in 3D space. Similar to PPlane, however the two vectors are not unitized. This implementation guarantees the 3D-rectangle to be always valid. That means the X and Y axes are always perpendicular to each other. However the length of one of these axes might still be zero.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Record fields

Record Field Description

OriginX

Full Usage: OriginX

Field type: float

The X coordinate of the Origin Corner of the 3D-rectangle.

Field type: float

OriginY

Full Usage: OriginY

Field type: float

The Y coordinate of the Origin Corner of the 3D-rectangle.

Field type: float

OriginZ

Full Usage: OriginZ

Field type: float

The Z coordinate of the Origin Corner of the 3D-rectangle.

Field type: float

XAxisX

Full Usage: XAxisX

Field type: float

The X component of the edge vector representing the X-axis of the 3D-rectangle.

Field type: float

XAxisY

Full Usage: XAxisY

Field type: float

The Y component of the edge vector representing the X-axis of the 3D-rectangle.

Field type: float

XAxisZ

Full Usage: XAxisZ

Field type: float

The Z component of the edge vector representing the X-axis of the 3D-rectangle.

Field type: float

YAxisX

Full Usage: YAxisX

Field type: float

The X component of the edge vector representing the Y-axis of the 3D-rectangle.

Field type: float

YAxisY

Full Usage: YAxisY

Field type: float

The Y component of the edge vector representing the Y-axis of the 3D-rectangle.

Field type: float

YAxisZ

Full Usage: YAxisZ

Field type: float

The Z component of the edge vector representing the Y-axis of the 3D-rectangle.

Field type: float

Instance members

Instance member Description

this.Area

Full Usage: this.Area

Returns: float
Modifiers: inline

Calculates the area of the 3D-rectangle.

Returns: float

this.AsFSharpCode

Full Usage: this.AsFSharpCode

Returns: string

Format Rect3D into an F# code string that can be used to recreate the rectangle.

Returns: string

this.AsString

Full Usage: this.AsString

Returns: string

Format the 3D-rectangle into string with nice floating point number formatting of X and Y size only. But without type name as in v.ToString()

Returns: string

this.Center

Full Usage: this.Center

Returns: Pnt
Modifiers: inline

Returns the center of the 3D-rectangle.

Returns: Pnt

this.ClosestParameters

Full Usage: this.ClosestParameters

Parameters:
Returns: float * float

Returns the X and Y parameters of the closest point on the 3D-rectangle to a given point. If the parameters are outside the range of 0.0 to 1.0, the closest point is outside the rectangle.

p : Pnt
Returns: float * float

this.ClosestPoint

Full Usage: this.ClosestPoint

Parameters:
Returns: Pnt

Returns the closest point on the 3D-rectangle to a given point. If the closest parameter is outside 0.0 to 1.0, the closest point will still be clamped onto the edge of the rectangle.

p : Pnt
Returns: Pnt

this.CountZeroSides

Full Usage: this.CountZeroSides

Returns: int
Modifiers: inline

Counts the amount of sides that are smaller than the zeroLength tolerance. This is 0, 1, 2 .

Returns: int

this.Diagonal

Full Usage: this.Diagonal

Returns: Vec
Modifiers: inline

Returns the diagonal vector of the 3D-rectangle. From Origin to FarCorner.

Returns: Vec

this.DiagonalLine

Full Usage: this.DiagonalLine

Returns: Line3D
Modifiers: inline

Returns the diagonal 3D line from point 0 to 2 of the 3D-rectangle.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.Edge01

Full Usage: this.Edge01

Returns: Line3D
Modifiers: inline

Returns a 3D line from point 0 to 1 of the 3D-rectangle.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.Edge03

Full Usage: this.Edge03

Returns: Line3D
Modifiers: inline

Returns a 3D line from point 0 to 3 of the 3D-rectangle. This is the reverse of Edge30.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.Edge10

Full Usage: this.Edge10

Returns: Line3D
Modifiers: inline

Returns a 3D line from point 1 to 0 of the 3D-rectangle. This is the reverse of Edge01.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.Edge12

Full Usage: this.Edge12

Returns: Line3D
Modifiers: inline

Returns a 3D line from point 1 to 2 of the 3D-rectangle.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.Edge21

Full Usage: this.Edge21

Returns: Line3D
Modifiers: inline

Returns a 3D line from point 2 to 1 of the 3D-rectangle. This is the reverse of Edge12.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.Edge23

Full Usage: this.Edge23

Returns: Line3D
Modifiers: inline

Returns a 3D line from point 2 to 3 of the 3D-rectangle.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.Edge30

Full Usage: this.Edge30

Returns: Line3D
Modifiers: inline

Returns a 3D line from point 3 to 0 of the 3D-rectangle.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.Edge32

Full Usage: this.Edge32

Returns: Line3D
Modifiers: inline

Returns a 3D line from point 3 to 2 of the 3D-rectangle. This is the reverse of Edge23.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.EdgeX

Full Usage: this.EdgeX

Returns: Line3D
Modifiers: inline

Returns the local X side as the 3D line from point 0 to 1 of the 3D-rectangle.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.EdgeY

Full Usage: this.EdgeY

Returns: Line3D
Modifiers: inline

Returns the local Y side as 3D line from point 0 to 3 of the 3D-rectangle. This is the reverse of Edge30.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D

this.Edges

Full Usage: this.Edges

Returns: Line3D[]

Returns the 4 Edges of the 3D-rectangle in counter-clockwise order, starting at Origin. Returns an array of 4 Lines: from point 0 to 1, 1 to 2, 2 to 3, 3 to 0.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Line3D[]

this.EvaluateAt

Full Usage: this.EvaluateAt

Parameters:
    xParameter : float
    yParameter : float

Returns: Pnt
Modifiers: inline
 Evaluate an X and Y parameter of the 3D rectangle.
  0.0, 0.0 returns the Origin.
  1.0, 1.0 returns the FarCorner.
xParameter : float
yParameter : float
Returns: Pnt

this.EvaluateDistance

Full Usage: this.EvaluateDistance

Parameters:
    xDistance : float
    yDistance : float

Returns: Pnt
Modifiers: inline

Evaluate a point at X and Y distance on the respective axes of the 3D-rectangle.

xDistance : float
yDistance : float
Returns: Pnt

this.FarCorner

Full Usage: this.FarCorner

Returns: Pnt
Modifiers: inline

Returns the corner diagonally opposite of corner from Origin (point 2).

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Pnt

this.FlipOnDiagonal02

Full Usage: this.FlipOnDiagonal02

Returns: Rect3D

Returns the rectangle rotated by 180 degrees around its diagonal from point 0 to 2. The four corners stay in place, but the normal points in the opposite direction. Origin stays at point 0, X-axis points to point 3, Y-axis points to point 1. So SizeX and SizeY are swapped.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Rect3D

this.FlipOnDiagonal13

Full Usage: this.FlipOnDiagonal13

Returns: Rect3D

Returns the rectangle rotated by 180 degrees around its diagonal from point 1 to 3. The four corners stay in place, but the normal points in the opposite direction. Origin will be at point 2, X-axis points to point 1, Y-axis points to point 3. So SizeX and SizeY are swapped.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Rect3D

this.FlipOnLocalX

Full Usage: this.FlipOnLocalX

Returns: Rect3D

Returns the rectangle rotated by 180 degrees around its center line that is parallel to the local X-axis. The four corners stay in place, but the normal points in the opposite direction. The X-axis keeps its direction, the Y-axis is reversed. Origin will be at point 3, X-axis points to point 2, Y-axis points to point 0. SizeX and SizeY are unchanged.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Rect3D

this.FlipOnLocalY

Full Usage: this.FlipOnLocalY

Returns: Rect3D

Returns the rectangle rotated by 180 degrees around its center line that is parallel to the local Y-axis. The four corners stay in place, but the normal points in the opposite direction. The Y-axis keeps its direction, the X-axis is reversed. Origin will be at point 1, X-axis points to point 0, Y-axis points to point 2. SizeX and SizeY are unchanged.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Rect3D

this.GetEdge

Full Usage: this.GetEdge

Parameters:
    i : int

Returns: Line3D

Returns one of the 4 Edges as 3D Line: Edge 0: from point 0 to 1 Edge 1: from point 1 to 2 Edge 2: from point 2 to 3 Edge 3: from point 3 to 0

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

i : int
Returns: Line3D

this.HasArea

Full Usage: this.HasArea

Returns: bool
Modifiers: inline

Tests if neither the X nor Y-axis is smaller than the zeroLength tolerance. Same as .IsValid

Returns: bool

this.IsLine

Full Usage: this.IsLine

Returns: bool
Modifiers: inline

Tests if one of the X and Y axes is smaller than the zeroLength tolerance.

Returns: bool

this.IsPoint

Full Usage: this.IsPoint

Returns: bool
Modifiers: inline

Tests if all sides are smaller than the zeroLength tolerance. Same as b.IsZero.

Returns: bool

this.IsValid

Full Usage: this.IsValid

Returns: bool
Modifiers: inline

Tests if neither the X nor Y-axis is smaller than the zeroLength tolerance. Same as .HasArea

Returns: bool

this.IsZero

Full Usage: this.IsZero

Returns: bool
Modifiers: inline

Tests if all sides are smaller than the zeroLength tolerance. Same as b.IsPoint.

Returns: bool

this.LongestEdge

Full Usage: this.LongestEdge

Returns: float
Modifiers: inline

Returns the longest edge of the Rect3D.

Returns: float

this.LongestEdgeSq

Full Usage: this.LongestEdgeSq

Returns: float
Modifiers: inline

Returns the square length of longest edge of the Rect3D.

Returns: float

this.Move

Full Usage: this.Move

Parameters:
Returns: Rect3D
Modifiers: inline

Returns a 3D rectangle moved by a vector in world space. Same as Rect3D.move.

v : Vec
Returns: Rect3D

this.MoveX

Full Usage: this.MoveX

Parameters:
    distance : float

Returns: Rect3D
Modifiers: inline

Returns a 3D rectangle moved by a given distance along the world X-axis. This is not the rectangle's own (possibly rotated) local X-axis, use Rect3D.moveAlongLocalX for that.

distance : float
Returns: Rect3D

this.MoveY

Full Usage: this.MoveY

Parameters:
    distance : float

Returns: Rect3D
Modifiers: inline

Returns a 3D rectangle moved by a given distance along the world Y-axis. This is not the rectangle's own (possibly rotated) local Y-axis, use Rect3D.moveAlongLocalY for that.

distance : float
Returns: Rect3D

this.MoveZ

Full Usage: this.MoveZ

Parameters:
    distance : float

Returns: Rect3D
Modifiers: inline

Returns a 3D rectangle moved by a given distance along the world Z-axis. This is not the rectangle's own (possibly rotated) local Z-axis, use Rect3D.moveAlongLocalZ for that.

distance : float
Returns: Rect3D

this.Normal

Full Usage: this.Normal

Returns: Vec
Modifiers: inline

Returns the Normal Resulting from the Cross Product of r.XAxis with r.YAxis.

Returns: Vec

this.NormalUnit

Full Usage: this.NormalUnit

Returns: UnitVec

Returns the unitized Normal. Resulting from the Cross Product of r.XAxis with r.YAxis.

Returns: UnitVec

this.Origin

Full Usage: this.Origin

Returns: Pnt

Creates a 3D Point from r.OriginX, r.OriginY and r.OriginZ

Returns: Pnt

this.Plane

Full Usage: this.Plane

Returns: PPlane
Modifiers: inline

Gets the Plane that this 3D-rectangle is based on.

Returns: PPlane

this.Pnt0

Full Usage: this.Pnt0

Returns: Pnt
Modifiers: inline

Returns point 0 of the 3D-rectangle. Same as member rect.Origin.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Pnt

this.Pnt1

Full Usage: this.Pnt1

Returns: Pnt
Modifiers: inline

Returns point 1 of the 3D-rectangle.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Pnt

this.Pnt2

Full Usage: this.Pnt2

Returns: Pnt
Modifiers: inline

Returns point 2 of the 3D-rectangle. Same as rect.FarCorner.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Pnt

this.Pnt3

Full Usage: this.Pnt3

Returns: Pnt
Modifiers: inline

Returns point 3 of the 3D-rectangle.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Pnt

this.Points

Full Usage: this.Points

Returns: Pnt[]

Returns the 4 corners of the 3D-rectangle in counter-clockwise order, starting at Origin. Returns an array of 4 Points: point 0 then 1, 2 and 3.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Pnt[]

this.PointsLooped

Full Usage: this.PointsLooped

Returns: Pnt[]

Returns the 4 corners of the 3D rectangle as a closed loop in counter-clockwise order, starting at Origin. First and last point are the same. Returns an array of 5 Points: point 0 then 1, 2, 3 and again 0.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Pnt[]

this.PointsXYZ

Full Usage: this.PointsXYZ

Returns: ResizeArray<float>

Returns the 4 corners of the 3D rectangle as an open loop of 12 floats, starting at Origin. Returns a ResizeArray of 12 floats: x, y, and z of point 0, point 1, point 2 and point 3.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: ResizeArray<float>

this.PointsXYZLooped

Full Usage: this.PointsXYZLooped

Returns: ResizeArray<float>

Returns the 5 corners of the 3D rectangle as closed loop of 15 floats, starting at Origin. Returns a ResizeArray of 15 floats: x, y, and z of point 0, point 1, point 2, point 3 and point 0 again.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: ResizeArray<float>

this.Rotate

Full Usage: this.Rotate

Parameters:
Returns: Rect3D
Modifiers: inline

Multiplies (or applies) a Quaternion to a 3D rectangle. The rectangle is rotated around the World Origin.

q : Quaternion
Returns: Rect3D

this.RotateAround

Full Usage: this.RotateAround

Parameters:
    cen : Pnt - The center point of the rotation.
    q : Quaternion - The rotation to apply.

Returns: Rect3D The rotated 3D rectangle.
Modifiers: inline

Multiplies (or applies) a Quaternion to a 3D rectangle around a given center point.

cen : Pnt

The center point of the rotation.

q : Quaternion

The rotation to apply.

Returns: Rect3D

The rotated 3D rectangle.

this.RotateOrientation180

Full Usage: this.RotateOrientation180

Returns: Rect3D

Returns the rectangle rotated 180 degrees around its center. Returns the same rectangle with a new orientation rotated by 180 degrees around its center. This only changes the internal representation of the rectangle, the appearance is not changed. Origin will be at point 2, X-axis to point 3, Y-axis to point 1.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Rect3D

this.RotateOrientation90CCW

Full Usage: this.RotateOrientation90CCW

Returns: Rect3D

Returns the same rectangle with a new orientation rotated by 90 degrees counter-clockwise around its center. This only changes the internal representation of the rectangle, the appearance is not changed. Origin will be at point 1, X-axis to point 2, Y-axis to point 0.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Rect3D

this.RotateOrientation90CW

Full Usage: this.RotateOrientation90CW

Returns: Rect3D

Returns the same rectangle with a new orientation rotated by 90 degrees clockwise around its center. This only changes the internal representation of the rectangle, the appearance is not changed. Origin will be at point 3, X-axis to point 0, Y-axis to point 2.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Rect3D

this.Scale

Full Usage: this.Scale

Parameters:
    factor : float

Returns: Rect3D
Modifiers: inline

Scales the 3D rectangle by a given factor. Scale center is World Origin 0,0

factor : float
Returns: Rect3D

this.ScaleOn

Full Usage: this.ScaleOn

Parameters:
    cen : Pnt - The center point of the scaling.
    factor : float - The scale factor.

Returns: Rect3D The scaled 3D rectangle.
Modifiers: inline

Scales the 3D rectangle by a given factor around a given center point.

cen : Pnt

The center point of the scaling.

factor : float

The scale factor.

Returns: Rect3D

The scaled 3D rectangle.

this.ShortestEdge

Full Usage: this.ShortestEdge

Returns: float
Modifiers: inline

Returns the shortest edge of the Rect3D.

Returns: float

this.ShortestEdgeSq

Full Usage: this.ShortestEdgeSq

Returns: float
Modifiers: inline

Returns the square length of shortest edge of the Rect3D.

Returns: float

this.SizeX

Full Usage: this.SizeX

Returns: float
Modifiers: inline

The size in X direction

Returns: float

this.SizeXSq

Full Usage: this.SizeXSq

Returns: float
Modifiers: inline

The squared size in X direction

Returns: float

this.SizeY

Full Usage: this.SizeY

Returns: float
Modifiers: inline

The size in Y direction

Returns: float

this.SizeYSq

Full Usage: this.SizeYSq

Returns: float
Modifiers: inline

The squared size in Y direction

Returns: float

this.TransformRigid

Full Usage: this.TransformRigid

Parameters:
Returns: Rect3D
Modifiers: inline

Multiplies (or applies) a RigidMatrix to a 3D rectangle. The returned 3D rectangle is guaranteed to have still orthogonal vectors.

m : RigidMatrix
Returns: Rect3D

this.XAxis

Full Usage: this.XAxis

Returns: Vec

Creates a 3D Vector from r.XAxisX, r.XAxisY and r.XAxisZ

Returns: Vec

this.XAxisUnit

Full Usage: this.XAxisUnit

Returns: UnitVec
Modifiers: inline

Creates a unitized version of the local X-axis.

Returns: UnitVec

this.XCorner

Full Usage: this.XCorner

Returns: Pnt
Modifiers: inline

Returns the corner at end of X-axis (point 1).

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Pnt

this.YAxis

Full Usage: this.YAxis

Returns: Vec

Creates a 3D Vector from r.YAxisX, r.YAxisY and r.YAxisZ

Returns: Vec

this.YAxisUnit

Full Usage: this.YAxisUnit

Returns: UnitVec
Modifiers: inline

Creates a unitized version of the local Y-axis.

Returns: UnitVec

this.YCorner

Full Usage: this.YCorner

Returns: Pnt
Modifiers: inline

Returns the corner at end of Y-axis (point 3).

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

Returns: Pnt

Static members

Static member Description

Rect3D.area r

Full Usage: Rect3D.area r

Parameters:
Returns: float
Modifiers: inline

Calculates the area of the 3D-rectangle.

r : Rect3D
Returns: float

Rect3D.asFSharpCode r

Full Usage: Rect3D.asFSharpCode r

Parameters:
Returns: string
Modifiers: inline

Format Rect3D into an F# code string that can be used to recreate the rectangle.

r : Rect3D
Returns: string

Rect3D.asString r

Full Usage: Rect3D.asString r

Parameters:
Returns: string
Modifiers: inline

Format the 3D-rectangle into string with nice floating point number formatting of X and Y size only.

r : Rect3D
Returns: string

Rect3D.center r

Full Usage: Rect3D.center r

Parameters:
Returns: Pnt
Modifiers: inline

Returns the center of the 3D-rectangle.

r : Rect3D
Returns: Pnt

Rect3D.closestParameters p r

Full Usage: Rect3D.closestParameters p r

Parameters:
Returns: float * float
Modifiers: inline

Returns the X and Y parameters of the closest point on the 3D-rectangle to a given point. If the parameters are outside the range of 0.0 to 1.0, the closest point is outside the rectangle.

p : Pnt
r : Rect3D
Returns: float * float

Rect3D.closestPoint p r

Full Usage: Rect3D.closestPoint p r

Parameters:
Returns: Pnt
Modifiers: inline

Returns the closest point on the 3D-rectangle to a given point. If the closest parameter is outside 0.0 to 1.0, the closest point will still be clamped onto the edge of the rectangle.

p : Pnt
r : Rect3D
Returns: Pnt

Rect3D.countZeroSides r

Full Usage: Rect3D.countZeroSides r

Parameters:
Returns: int
Modifiers: inline

Counts the amount of sides that are smaller than the zeroLength tolerance.

r : Rect3D
Returns: int

Rect3D.createCenteredFromPlane sizeX sizeY pl

Full Usage: Rect3D.createCenteredFromPlane sizeX sizeY pl

Parameters:
    sizeX : float
    sizeY : float
    pl : PPlane

Returns: Rect3D

Give sizes and PPlane. The Rect3D's center will be at the plane's Origin. Fails on negative sizes.

sizeX : float
sizeY : float
pl : PPlane
Returns: Rect3D

Rect3D.createFrom3Pnts origin xPnt yPnt

Full Usage: Rect3D.createFrom3Pnts origin xPnt yPnt

Parameters:
Returns: Rect3D

Creates a 3D-rectangle from three points. Fails if points are too close to each other or all collinear. The Origin, a point in X-axis direction and length, and a point for the length in Y-axis direction. Origin and x-point define the X-axis orientation of the Rectangle. The y-point only defines the length and side of the Y-axis.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

origin : Pnt
xPnt : Pnt
yPnt : Pnt
Returns: Rect3D

Rect3D.createFromBounds2D (minX, minY, maxX, maxY)

Full Usage: Rect3D.createFromBounds2D (minX, minY, maxX, maxY)

Parameters:
    minX : float
    minY : float
    maxX : float
    maxY : float

Returns: Rect3D

Creates a 3D-rectangle from the given bounds in 2D. The rectangle will be in the XY-plane with Z=0.

minX : float
minY : float
maxX : float
maxY : float
Returns: Rect3D

Rect3D.createFromPlane sizeX sizeY pl

Full Usage: Rect3D.createFromPlane sizeX sizeY pl

Parameters:
    sizeX : float
    sizeY : float
    pl : PPlane

Returns: Rect3D

Give sizes and PPlane. The Rect3D's Origin will be at the plane's Origin. Fails on negative sizes.

sizeX : float
sizeY : float
pl : PPlane
Returns: Rect3D

Rect3D.createFromVecs x y origin

Full Usage: Rect3D.createFromVecs x y origin

Parameters:
Returns: Rect3D

Create a 3D-rectangle from an x-edge, an y-edge and the origin point. Fails if x and y are not perpendicular. Fails on vectors shorter than 1e-6.

x : Vec
y : Vec
origin : Pnt
Returns: Rect3D

Rect3D.createFromVecsUnchecked (origin, x, y)

Full Usage: Rect3D.createFromVecsUnchecked (origin, x, y)

Parameters:
Returns: Rect3D
Modifiers: inline

Create a 3D-rectangle from the origin point and X-edge and Y edge. Does not check for perpendicularity.

origin : Pnt
x : Vec
y : Vec
Returns: Rect3D

Rect3D.createUnchecked (originX, originY, originZ, xAxisX, xAxisY, xAxisZ, yAxisX, yAxisY, yAxisZ)

Full Usage: Rect3D.createUnchecked (originX, originY, originZ, xAxisX, xAxisY, xAxisZ, yAxisX, yAxisY, yAxisZ)

Parameters:
    originX : float
    originY : float
    originZ : float
    xAxisX : float
    xAxisY : float
    xAxisZ : float
    yAxisX : float
    yAxisY : float
    yAxisZ : float

Returns: Rect3D
Modifiers: inline

Create a 3D-rectangle from origin coordinates and X- and Y-axis vector components. Does not check for perpendicularity.

originX : float
originY : float
originZ : float
xAxisX : float
xAxisY : float
xAxisZ : float
yAxisX : float
yAxisY : float
yAxisZ : float
Returns: Rect3D

Rect3D.diagonal r

Full Usage: Rect3D.diagonal r

Parameters:
Returns: Vec
Modifiers: inline

Returns the diagonal vector of the 3D-rectangle.

r : Rect3D
Returns: Vec

Rect3D.diagonalLine r

Full Usage: Rect3D.diagonalLine r

Parameters:
Returns: Line3D
Modifiers: inline

Returns the diagonal 3D line from point 0 to 2.

r : Rect3D
Returns: Line3D

Rect3D.edge01 r

Full Usage: Rect3D.edge01 r

Parameters:
Returns: Line3D
Modifiers: inline

Returns a 3D line from point 0 to 1 of the rectangle.

r : Rect3D
Returns: Line3D

Rect3D.edge03 r

Full Usage: Rect3D.edge03 r

Parameters:
Returns: Line3D
Modifiers: inline

Returns a 3D line from point 0 to 3 of the rectangle. This is the reverse of Edge30.

r : Rect3D
Returns: Line3D

Rect3D.edge10 r

Full Usage: Rect3D.edge10 r

Parameters:
Returns: Line3D
Modifiers: inline

Returns a 3D line from point 1 to 0 of the rectangle. This is the reverse of Edge01.

r : Rect3D
Returns: Line3D

Rect3D.edge12 r

Full Usage: Rect3D.edge12 r

Parameters:
Returns: Line3D
Modifiers: inline

Returns a 3D line from point 1 to 2 of the rectangle.

r : Rect3D
Returns: Line3D

Rect3D.edge21 r

Full Usage: Rect3D.edge21 r

Parameters:
Returns: Line3D
Modifiers: inline

Returns a 3D line from point 2 to 1 of the rectangle. This is the reverse of Edge12.

r : Rect3D
Returns: Line3D

Rect3D.edge23 r

Full Usage: Rect3D.edge23 r

Parameters:
Returns: Line3D
Modifiers: inline

Returns a 3D line from point 2 to 3 of the rectangle.

r : Rect3D
Returns: Line3D

Rect3D.edge30 r

Full Usage: Rect3D.edge30 r

Parameters:
Returns: Line3D
Modifiers: inline

Returns a 3D line from point 3 to 0 of the rectangle.

r : Rect3D
Returns: Line3D

Rect3D.edge32 r

Full Usage: Rect3D.edge32 r

Parameters:
Returns: Line3D
Modifiers: inline

Returns a 3D line from point 3 to 2 of the rectangle. This is the reverse of Edge23.

r : Rect3D
Returns: Line3D

Rect3D.edgeX r

Full Usage: Rect3D.edgeX r

Parameters:
Returns: Line3D
Modifiers: inline

Returns the local X side as a 3D line from point 0 to 1.

r : Rect3D
Returns: Line3D

Rect3D.edgeY r

Full Usage: Rect3D.edgeY r

Parameters:
Returns: Line3D
Modifiers: inline

Returns the local Y side as a 3D line from point 0 to 3.

r : Rect3D
Returns: Line3D

Rect3D.edges r

Full Usage: Rect3D.edges r

Parameters:
Returns: Line3D[]
Modifiers: inline

Returns the 4 edges of the 3D-rectangle in counter-clockwise order, starting at origin.

r : Rect3D
Returns: Line3D[]

Rect3D.equalsExact a b

Full Usage: Rect3D.equalsExact a b

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D-rectangles are exactly equal. Compares each field with the = operator, so a NaN value is never equal.

a : Rect3D
b : Rect3D
Returns: bool

Rect3D.equalsWithin tol a b

Full Usage: Rect3D.equalsWithin tol a b

Parameters:
Returns: bool

Checks if two 3D-rectangles are equal within tolerance. Does not recognize congruent rectangles with different rotation as equal. The tolerance applies to each coordinate of the origin and of the axis vectors separately, not to the Euclidean distance between them. Use Rect3D.equalsExact to check for an exact match.

tol : float
a : Rect3D
b : Rect3D
Returns: bool

Rect3D.evaluateAt xParameter yParameter r

Full Usage: Rect3D.evaluateAt xParameter yParameter r

Parameters:
    xParameter : float
    yParameter : float
    r : Rect3D

Returns: Pnt
Modifiers: inline

Evaluate an X and Y parameter of the 3D rectangle.

xParameter : float
yParameter : float
r : Rect3D
Returns: Pnt

Rect3D.evaluateDistance xDistance yDistance r

Full Usage: Rect3D.evaluateDistance xDistance yDistance r

Parameters:
    xDistance : float
    yDistance : float
    r : Rect3D

Returns: Pnt
Modifiers: inline

Evaluate a point at X and Y distance on the respective axes of the 3D-rectangle.

xDistance : float
yDistance : float
r : Rect3D
Returns: Pnt

Rect3D.expand dist r

Full Usage: Rect3D.expand dist r

Parameters:
Returns: Rect3D

Returns the 3D-rectangle expanded by distance on all four sides. Does check for underflow if distance is negative and raises EuclidException.

dist : float
r : Rect3D
Returns: Rect3D

Rect3D.expandRelative factor r

Full Usage: Rect3D.expandRelative factor r

Parameters:
Returns: Rect3D

Returns the 3D-rectangle expanded by a relative factor on all four sides. Values between 0.0 and 1.0 shrink the rectangle. Values larger than 1.0 expand the rectangle. Does check for underflow if factor is negative and raises EuclidException.

factor : float
r : Rect3D
Returns: Rect3D

Rect3D.expandRelativeXY factorX factorY r

Full Usage: Rect3D.expandRelativeXY factorX factorY r

Parameters:
    factorX : float
    factorY : float
    r : Rect3D

Returns: Rect3D

Returns the 3D-rectangle expanded by a relative factor on all four sides. Values between 0.0 and 1.0 shrink the rectangle. Values larger than 1.0 expand the rectangle. Does check for underflow if factor is negative and raises EuclidException.

factorX : float
factorY : float
r : Rect3D
Returns: Rect3D

Rect3D.expandXY distX distY r

Full Usage: Rect3D.expandXY distX distY r

Parameters:
    distX : float
    distY : float
    r : Rect3D

Returns: Rect3D

Returns the 3D-rectangle expanded by respective distances on all four sides. Does check for overflow if distance is negative and fails. distX, distY are for the local X- and Y-axis respectively.

distX : float
distY : float
r : Rect3D
Returns: Rect3D

Rect3D.farCorner r

Full Usage: Rect3D.farCorner r

Parameters:
Returns: Pnt
Modifiers: inline

Returns the corner diagonally opposite of the origin corner.

r : Rect3D
Returns: Pnt

Rect3D.fitToPoints pts refRect

Full Usage: Rect3D.fitToPoints pts refRect

Parameters:
Returns: Rect3D

Creates a new 3D rectangle( = oriented bounding rectangle ) to contain the projections of all given points. But not the corners of the reference rectangle. Keeps the same plane and the same X- and Y-axis orientation as the input rectangle. For a 3D oriented bounding box use the Box.createFromPntsAndPlane function.

pts : IList<Pnt>
refRect : Rect3D
Returns: Rect3D

Rect3D.fitToPointsXYZ xyzs refRect

Full Usage: Rect3D.fitToPointsXYZ xyzs refRect

Parameters:
    xyzs : IList<float> - Coordinates in the order x0, y0, z0, x1, y1, z1, ...
    refRect : Rect3D - The reference rectangle defining the plane and orientation.

Returns: Rect3D The nondegenerate rectangle bounding the projected points.

Fits a rectangle to the projections of interleaved XYZ points onto the reference plane. Keeps the reference plane and axis orientations; excludes the reference corners. Fails for null, empty or incomplete coordinate triples, zero-length reference axes, or fitted axis lengths that are non-finite or at most 1e-6.

xyzs : IList<float>

Coordinates in the order x0, y0, z0, x1, y1, z1, ...

refRect : Rect3D

The reference rectangle defining the plane and orientation.

Returns: Rect3D

The nondegenerate rectangle bounding the projected points.

Rect3D.flipOnDiagonal02 r

Full Usage: Rect3D.flipOnDiagonal02 r

Parameters:
    r : Rect3D - The 3D-rectangle to flip.

Returns: Rect3D A new 3D-rectangle with the opposite normal.
Modifiers: inline

Returns the rectangle rotated by 180 degrees around its diagonal from point 0 to 2. The four corners stay in place, but the normal points in the opposite direction. Origin stays at point 0, X-axis points to point 3, Y-axis points to point 1. So SizeX and SizeY are swapped.

r : Rect3D

The 3D-rectangle to flip.

Returns: Rect3D

A new 3D-rectangle with the opposite normal.

Rect3D.flipOnDiagonal13 r

Full Usage: Rect3D.flipOnDiagonal13 r

Parameters:
    r : Rect3D - The 3D-rectangle to flip.

Returns: Rect3D A new 3D-rectangle with the opposite normal.
Modifiers: inline

Returns the rectangle rotated by 180 degrees around its diagonal from point 1 to 3. The four corners stay in place, but the normal points in the opposite direction. Origin will be at point 2, X-axis points to point 1, Y-axis points to point 3. So SizeX and SizeY are swapped.

r : Rect3D

The 3D-rectangle to flip.

Returns: Rect3D

A new 3D-rectangle with the opposite normal.

Rect3D.flipOnLocalX r

Full Usage: Rect3D.flipOnLocalX r

Parameters:
    r : Rect3D - The 3D-rectangle to flip.

Returns: Rect3D A new 3D-rectangle with the opposite normal.
Modifiers: inline

Returns the rectangle rotated by 180 degrees around its center line that is parallel to the local X-axis. The four corners stay in place, but the normal points in the opposite direction. The X-axis keeps its direction, the Y-axis is reversed. Origin will be at point 3, X-axis points to point 2, Y-axis points to point 0.

r : Rect3D

The 3D-rectangle to flip.

Returns: Rect3D

A new 3D-rectangle with the opposite normal.

Rect3D.flipOnLocalY r

Full Usage: Rect3D.flipOnLocalY r

Parameters:
    r : Rect3D - The 3D-rectangle to flip.

Returns: Rect3D A new 3D-rectangle with the opposite normal.
Modifiers: inline

Returns the rectangle rotated by 180 degrees around its center line that is parallel to the local Y-axis. The four corners stay in place, but the normal points in the opposite direction. The Y-axis keeps its direction, the X-axis is reversed. Origin will be at point 1, X-axis points to point 0, Y-axis points to point 2.

r : Rect3D

The 3D-rectangle to flip.

Returns: Rect3D

A new 3D-rectangle with the opposite normal.

Rect3D.getEdge i r

Full Usage: Rect3D.getEdge i r

Parameters:
Returns: Line3D
Modifiers: inline

Returns one of the 4 edges as a 3D line.

i : int
r : Rect3D
Returns: Line3D

Rect3D.grid xCount yCount rect

Full Usage: Rect3D.grid xCount yCount rect

Parameters:
    xCount : int
    yCount : int
    rect : Rect3D

Returns: Pnt[][]

Divides a 3D-rectangle into a grid of points. The points are returned as an array of arrays. A xCount and yCount of 2 will only return the 4 corners of the rectangle.

xCount : int
yCount : int
rect : Rect3D
Returns: Pnt[][]

Rect3D.gridMaxLength xMaxLen yMaxLen rect

Full Usage: Rect3D.gridMaxLength xMaxLen yMaxLen rect

Parameters:
    xMaxLen : float
    yMaxLen : float
    rect : Rect3D

Returns: Pnt array array

Divides a 3D rectangle into a grid of points. It will create as few as points as possible respecting the maximum segment length. The input maxSegmentLength is multiplied by factor 1.00001 to avoid numerical errors. That means in an edge case there are fewer segments returned, not more. The returned array is divided along the X-axis. The sub-array is divided along the Y-axis.

xMaxLen : float
yMaxLen : float
rect : Rect3D
Returns: Pnt array array

Rect3D.gridMinLength xMinLen yMinLen rect

Full Usage: Rect3D.gridMinLength xMinLen yMinLen rect

Parameters:
    xMinLen : float
    yMinLen : float
    rect : Rect3D

Returns: Pnt array array

Divides a 3D rectangle into a grid of points. It will create as many points as possible respecting the minimum side length for x and y. The input minSegmentLength is multiplied by factor 0.9999 of to avoid numerical errors. That means in an edge case there are more segments returned, not fewer. The returned array is divided along the X-axis. The sub-array is divided along the Y-axis.

xMinLen : float
yMinLen : float
rect : Rect3D
Returns: Pnt array array

Rect3D.hasArea r

Full Usage: Rect3D.hasArea r

Parameters:
Returns: bool
Modifiers: inline

Tests if neither the X nor Y-axis is smaller than the zeroLength tolerance. Same as Rect3D.isValid

r : Rect3D
Returns: bool

Rect3D.intersectLine ln r

Full Usage: Rect3D.intersectLine ln r

Parameters:
Returns: Pnt

Returns intersection point of a Line3D with Rect3D. If the intersection parameters on the line and the rectangle are within 1e-6 of the bounds 0.0 or 1.0, it will still be considered as inside the rectangle and line. Fails if they are parallel or coincident, if the line has zero length, or if the intersection point is outside their bounds. Use Rect3D.tryIntersectLine to get ValueNone instead.

ln : Line3D
r : Rect3D
Returns: Pnt

Rect3D.intersectRay ln r

Full Usage: Rect3D.intersectRay ln r

Parameters:
Returns: float

Returns the line parameter. The parameter is the intersection point of the ray with the infinitely extended Rect3D. The intersection point lies on the line segment itself only if the parameter is within the range 0.0 to 1.0. Fails if they are parallel or coincident. Use Rect3D.tryIntersectRay to get ValueNone instead.

ln : Line3D
r : Rect3D
Returns: float

Rect3D.isLine r

Full Usage: Rect3D.isLine r

Parameters:
Returns: bool
Modifiers: inline

Tests if one of the X and Y axes is smaller than the zeroLength tolerance.

r : Rect3D
Returns: bool

Rect3D.isPoint r

Full Usage: Rect3D.isPoint r

Parameters:
Returns: bool
Modifiers: inline

Tests if all sides are smaller than the zeroLength tolerance. Same as Rect3D.isZero.

r : Rect3D
Returns: bool

Rect3D.isValid r

Full Usage: Rect3D.isValid r

Parameters:
Returns: bool
Modifiers: inline

Tests if neither the X nor Y-axis is smaller than the zeroLength tolerance. Same as Rect3D.hasArea

r : Rect3D
Returns: bool

Rect3D.isZero r

Full Usage: Rect3D.isZero r

Parameters:
Returns: bool
Modifiers: inline

Tests if all sides are smaller than the zeroLength tolerance. Same as Rect3D.isPoint.

r : Rect3D
Returns: bool

Rect3D.iterPointsCCW action r

Full Usage: Rect3D.iterPointsCCW action r

Parameters:
    action : float -> float -> float -> unit - The action to call 4 times. Once for each corner, with x, y and z as parameters.
    r : Rect3D - The rectangle to iterate the corners of.

Iterates the 4 corners of the 3D rectangle in counter-clockwise order, starting at Origin.

action : float -> float -> float -> unit

The action to call 4 times. Once for each corner, with x, y and z as parameters.

r : Rect3D

The rectangle to iterate the corners of.

Rect3D.iterPointsCW action r

Full Usage: Rect3D.iterPointsCW action r

Parameters:
    action : float -> float -> float -> unit - The action to call 4 times. Once for each corner, with x, y and z as parameters.
    r : Rect3D - The rectangle to iterate the corners of.

Iterates the 4 corners of the 3D rectangle in Clockwise order, starting at Origin.

action : float -> float -> float -> unit

The action to call 4 times. Once for each corner, with x, y and z as parameters.

r : Rect3D

The rectangle to iterate the corners of.

Rect3D.iterPointsLoopedCCW action r

Full Usage: Rect3D.iterPointsLoopedCCW action r

Parameters:
    action : float -> float -> float -> unit - The action to call 5 times, with x, y and z as parameters.
    r : Rect3D - The rectangle to iterate the corners of.

Iterates the 4 corners of the 3D rectangle as closed loop in counter-clockwise order, starting and ending at Origin.

action : float -> float -> float -> unit

The action to call 5 times, with x, y and z as parameters.

r : Rect3D

The rectangle to iterate the corners of.

Rect3D.iterPointsLoopedCW action r

Full Usage: Rect3D.iterPointsLoopedCW action r

Parameters:
    action : float -> float -> float -> unit - The action to call 5 times, with x, y and z as parameters.
    r : Rect3D - The rectangle to iterate the corners of.

Iterates the 4 corners of the 3D rectangle as closed loop in Clockwise order, starting and ending at Origin.

action : float -> float -> float -> unit

The action to call 5 times, with x, y and z as parameters.

r : Rect3D

The rectangle to iterate the corners of.

Rect3D.longestEdge r

Full Usage: Rect3D.longestEdge r

Parameters:
Returns: float
Modifiers: inline

Returns the longest edge of the Rect3D.

r : Rect3D
Returns: float

Rect3D.longestEdgeSq r

Full Usage: Rect3D.longestEdgeSq r

Parameters:
Returns: float
Modifiers: inline

Returns the square length of longest edge of the Rect3D.

r : Rect3D
Returns: float

Rect3D.move v r

Full Usage: Rect3D.move v r

Parameters:
Returns: Rect3D

Move the 3D rectangle by a vector in world space. Same as Rect3D.Move.

v : Vec
r : Rect3D
Returns: Rect3D

Rect3D.moveAlongLocalX distX r

Full Usage: Rect3D.moveAlongLocalX distX r

Parameters:
Returns: Rect3D

Translate along the local X-axis of the 3D-rectangle.

distX : float
r : Rect3D
Returns: Rect3D

Rect3D.moveAlongLocalY distY r

Full Usage: Rect3D.moveAlongLocalY distY r

Parameters:
Returns: Rect3D

Translate along the local Y-axis of the 3D-rectangle.

distY : float
r : Rect3D
Returns: Rect3D

Rect3D.moveAlongLocalZ distZ r

Full Usage: Rect3D.moveAlongLocalZ distZ r

Parameters:
Returns: Rect3D

Moves the 3D-rectangle rigidly along its local Z-axis by the given distance. Same as Rect3D.offsetZ. The local Z-axis is calculated from the Cross Product of the X- and Y-axis of the 3D-rectangle. The rectangle's Origin moves but its SizeX, SizeY and axes are unchanged. This is unrelated to Rect3D.offset, which resizes the rectangle in its own plane instead of moving it.

distZ : float
r : Rect3D
Returns: Rect3D

Rect3D.moveX distance r

Full Usage: Rect3D.moveX distance r

Parameters:
Returns: Rect3D
Modifiers: inline

Returns a 3D rectangle moved by a given distance along the world X-axis. This is not the rectangle's own (possibly rotated) local X-axis, use Rect3D.moveAlongLocalX for that.

distance : float
r : Rect3D
Returns: Rect3D

Rect3D.moveY distance r

Full Usage: Rect3D.moveY distance r

Parameters:
Returns: Rect3D
Modifiers: inline

Returns a 3D rectangle moved by a given distance along the world Y-axis. This is not the rectangle's own (possibly rotated) local Y-axis, use Rect3D.moveAlongLocalY for that.

distance : float
r : Rect3D
Returns: Rect3D

Rect3D.moveZ distance r

Full Usage: Rect3D.moveZ distance r

Parameters:
Returns: Rect3D
Modifiers: inline

Returns a 3D rectangle moved by a given distance along the world Z-axis. This is not the rectangle's own (possibly rotated) local Z-axis, use Rect3D.moveAlongLocalZ for that.

distance : float
r : Rect3D
Returns: Rect3D

Rect3D.normal r

Full Usage: Rect3D.normal r

Parameters:
Returns: Vec
Modifiers: inline

Returns the Normal resulting from the Cross Product of XAxis with YAxis.

r : Rect3D
Returns: Vec

Rect3D.normalUnit r

Full Usage: Rect3D.normalUnit r

Parameters:
Returns: UnitVec
Modifiers: inline

Returns the unitized Normal resulting from the Cross Product of XAxis with YAxis.

r : Rect3D
Returns: UnitVec

Rect3D.notEqualsWithin tol a b

Full Usage: Rect3D.notEqualsWithin tol a b

Parameters:
Returns: bool

Check if two 3D-rectangles are not equal within a given tolerance. The tolerance applies to each coordinate of the origin and of the axis vectors separately, not to the Euclidean distance between them.

tol : float
a : Rect3D
b : Rect3D
Returns: bool

Rect3D.offset dist rect

Full Usage: Rect3D.offset dist rect

Parameters:
Returns: Rect3D

Resizes a Rect3D like a Polyline offset, shrinking it inwards on all four edges by a given distance, within the rectangle's own X-Y plane. The rectangle stays in the same plane; SizeX and SizeY shrink by twice the distance and the Origin re-centers, but the rectangle does not move along its local Z-axis. Negative distances will offset outwards, growing the rectangle instead. Fails if the distance is larger than half the size of the rectangle. This is unrelated to Rect3D.offsetZ / moveAlongLocalZ, which move the rectangle instead of resizing it.

dist : float
rect : Rect3D
Returns: Rect3D

Rect3D.offsetCorner (rect, corner, xOffset, yOffset, xSize, ySize)

Full Usage: Rect3D.offsetCorner (rect, corner, xOffset, yOffset, xSize, ySize)

Parameters:
    rect : Rect3D - The 3D-rectangle
    corner : int - The Index of the corner to Offset
       local
       Y-axis
       ^
       |
       |             2
     3 +------------+
       |            |
       |            |
       |            |
       |            |
       |            |       local
       +------------+-----> X-axis
      0-Origin       1
    

    xOffset : float - The local offset distances in x direction. (Applies to the y side.) Positive values offset to the inside of the rectangle, negative values will offset outwards.
    yOffset : float - The local offset distances in y direction. (Applies to the x side.) Positive values offset to the inside of the rectangle, negative values will offset outwards.
    xSize : float - The size in x direction that will be added to the current offset.
    ySize : float - The size in y direction that will be added to the current offset.

Returns: Rect3D A new 3D-rectangle. It will always have the same X- and Y-axis orientation as the input rectangle. Independent of negative or positive offsets

Offsets a local Rect3D at one of the four corners.

rect : Rect3D

The 3D-rectangle

corner : int

The Index of the corner to Offset

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

xOffset : float

The local offset distances in x direction. (Applies to the y side.) Positive values offset to the inside of the rectangle, negative values will offset outwards.

yOffset : float

The local offset distances in y direction. (Applies to the x side.) Positive values offset to the inside of the rectangle, negative values will offset outwards.

xSize : float

The size in x direction that will be added to the current offset.

ySize : float

The size in y direction that will be added to the current offset.

Returns: Rect3D

A new 3D-rectangle. It will always have the same X- and Y-axis orientation as the input rectangle. Independent of negative or positive offsets

Rect3D.offsetEdge (rect, edgeIdx, offEdge, width, offStart, offEnd)

Full Usage: Rect3D.offsetEdge (rect, edgeIdx, offEdge, width, offStart, offEnd)

Parameters:
    rect : Rect3D - The 3D-rectangle
    edgeIdx : int - The Index of the edge to offset
       local
       Y-axis
       ^
       |
       |      2
       +------------+
       |            |
       |            |
      3|            |1
       |            |
       |            |       local
       +------------+-----> X-axis
             0
    

    offEdge : float - The local offset distances parallel to the edge.
    width : float - The width of the new rectangle. This is like the second offset to be applied to the first offset of offEdge
    offStart : float - The local offset distances perpendicular to the edge at the start.
    offEnd : float - The local offset distances perpendicular to the edge at the end.

Returns: Rect3D A new 3D-rectangle. It will always have the same X- and Y-axis orientation as the input rectangle. Independent of negative or positive offsets

Offsets a local Rect3D at one of the four edges.

rect : Rect3D

The 3D-rectangle

edgeIdx : int

The Index of the edge to offset

   local
   Y-axis
   ^
   |
   |      2
   +------------+
   |            |
   |            |
  3|            |1
   |            |
   |            |       local
   +------------+-----> X-axis
         0

offEdge : float

The local offset distances parallel to the edge.

width : float

The width of the new rectangle. This is like the second offset to be applied to the first offset of offEdge

offStart : float

The local offset distances perpendicular to the edge at the start.

offEnd : float

The local offset distances perpendicular to the edge at the end.

Returns: Rect3D

A new 3D-rectangle. It will always have the same X- and Y-axis orientation as the input rectangle. Independent of negative or positive offsets

Rect3D.offsetVariable dist rect

Full Usage: Rect3D.offsetVariable dist rect

Parameters:
    dist : float[]
    rect : Rect3D

Returns: Rect3D

Offset a Rect3D like a Polyline inwards by four distances. The distance array is for Edge01, Edge12, Edge23, and Edge30 respectively. Fails if the distance is larger than half the size of the rectangle.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

dist : float[]
rect : Rect3D
Returns: Rect3D

Rect3D.offsetZ offsetDistance r

Full Usage: Rect3D.offsetZ offsetDistance r

Parameters:
    offsetDistance : float
    r : Rect3D

Returns: Rect3D

Moves the 3D-rectangle rigidly along its local Z-axis by the given distance. Same as Rect3D.moveAlongLocalZ. The local Z-axis is calculated from Cross Product of X- and Y-axis of the 3D-rectangle. The rectangle's Origin moves but its SizeX, SizeY and axes are unchanged. This is unrelated to Rect3D.offset, which resizes the rectangle in its own plane instead of moving it.

offsetDistance : float
r : Rect3D
Returns: Rect3D

Rect3D.origin r

Full Usage: Rect3D.origin r

Parameters:
Returns: Pnt
Modifiers: inline

Creates a 3D Point from r.OriginX, r.OriginY and r.OriginZ

r : Rect3D
Returns: Pnt

Rect3D.plane r

Full Usage: Rect3D.plane r

Parameters:
Returns: PPlane
Modifiers: inline

Gets the Plane that this 3D-rectangle is based on.

r : Rect3D
Returns: PPlane

Rect3D.pnt0 r

Full Usage: Rect3D.pnt0 r

Parameters:
Returns: Pnt
Modifiers: inline

Returns point 0 of the 3D-rectangle.

r : Rect3D
Returns: Pnt

Rect3D.pnt1 r

Full Usage: Rect3D.pnt1 r

Parameters:
Returns: Pnt
Modifiers: inline

Returns point 1 of the 3D-rectangle.

r : Rect3D
Returns: Pnt

Rect3D.pnt2 r

Full Usage: Rect3D.pnt2 r

Parameters:
Returns: Pnt
Modifiers: inline

Returns point 2 of the 3D-rectangle.

r : Rect3D
Returns: Pnt

Rect3D.pnt3 r

Full Usage: Rect3D.pnt3 r

Parameters:
Returns: Pnt
Modifiers: inline

Returns point 3 of the 3D-rectangle.

r : Rect3D
Returns: Pnt

Rect3D.points r

Full Usage: Rect3D.points r

Parameters:
Returns: Pnt[]
Modifiers: inline

Returns the 4 corners of the 3D-rectangle in counter-clockwise order, starting at origin.

r : Rect3D
Returns: Pnt[]

Rect3D.pointsLooped r

Full Usage: Rect3D.pointsLooped r

Parameters:
Returns: Pnt[]
Modifiers: inline

Returns the 4 corners of the 3D-rectangle as closed loop in counter-clockwise order, starting at origin.

r : Rect3D
Returns: Pnt[]

Rect3D.pointsXYZ r

Full Usage: Rect3D.pointsXYZ r

Parameters:
Returns: ResizeArray<float>
Modifiers: inline

Returns the 4 corners of the 3D rectangle as open loop, starting at Origin. Returns a ResizeArray of 12 floats: x, y, and z of point 0, point 1, point 2 and point 3.

r : Rect3D
Returns: ResizeArray<float>

Rect3D.pointsXYZLooped r

Full Usage: Rect3D.pointsXYZLooped r

Parameters:
Returns: ResizeArray<float>
Modifiers: inline

Returns the 5 corners of the 3D rectangle as a closed loop, starting at Origin. Returns a ResizeArray of 15 floats: x, y, and z of point 0, point 1, point 2, point 3 and point 0 again.

r : Rect3D
Returns: ResizeArray<float>

Rect3D.rotate q r

Full Usage: Rect3D.rotate q r

Parameters:
Returns: Rect3D
Modifiers: inline

Multiplies (or applies) a Quaternion to a 3D rectangle. The rectangle is rotated around the World Origin.

q : Quaternion
r : Rect3D
Returns: Rect3D

Rect3D.rotateAround cen q r

Full Usage: Rect3D.rotateAround cen q r

Parameters:
    cen : Pnt - The center point of the rotation.
    q : Quaternion - The rotation to apply.
    r : Rect3D - The 3D rectangle to rotate.

Returns: Rect3D The rotated 3D rectangle.
Modifiers: inline

Multiplies (or applies) a Quaternion to a 3D rectangle around a given center point.

cen : Pnt

The center point of the rotation.

q : Quaternion

The rotation to apply.

r : Rect3D

The 3D rectangle to rotate.

Returns: Rect3D

The rotated 3D rectangle.

Rect3D.rotateOrientation180 r

Full Usage: Rect3D.rotateOrientation180 r

Parameters:
Returns: Rect3D
Modifiers: inline

Returns the same rectangle with orientation rotated by 180 degrees around its center.

r : Rect3D
Returns: Rect3D

Rect3D.rotateOrientation90CCW r

Full Usage: Rect3D.rotateOrientation90CCW r

Parameters:
Returns: Rect3D
Modifiers: inline

Returns the same rectangle with orientation rotated by 90 degrees counter-clockwise around its center.

r : Rect3D
Returns: Rect3D

Rect3D.rotateOrientation90CW r

Full Usage: Rect3D.rotateOrientation90CW r

Parameters:
Returns: Rect3D
Modifiers: inline

Returns the same rectangle with orientation rotated by 90 degrees clockwise around its center.

r : Rect3D
Returns: Rect3D

Rect3D.scale factor r

Full Usage: Rect3D.scale factor r

Parameters:
Returns: Rect3D
Modifiers: inline

Scales the 3D rectangle by a given factor. Scale center is World Origin 0,0,0

factor : float
r : Rect3D
Returns: Rect3D

Rect3D.scaleOn cen factor r

Full Usage: Rect3D.scaleOn cen factor r

Parameters:
    cen : Pnt - The center point of the scaling.
    factor : float - The scale factor.
    r : Rect3D - The 3D rectangle to scale.

Returns: Rect3D The scaled 3D rectangle.
Modifiers: inline

Scales a 3D rectangle by a given factor around a given center point.

cen : Pnt

The center point of the scaling.

factor : float

The scale factor.

r : Rect3D

The 3D rectangle to scale.

Returns: Rect3D

The scaled 3D rectangle.

Rect3D.shortestEdge r

Full Usage: Rect3D.shortestEdge r

Parameters:
Returns: float
Modifiers: inline

Returns the shortest edge of the Rect3D.

r : Rect3D
Returns: float

Rect3D.shortestEdgeSq r

Full Usage: Rect3D.shortestEdgeSq r

Parameters:
Returns: float
Modifiers: inline

Returns the square length of shortest edge of the Rect3D.

r : Rect3D
Returns: float

Rect3D.sizeX r

Full Usage: Rect3D.sizeX r

Parameters:
Returns: float
Modifiers: inline

The size in X direction.

r : Rect3D
Returns: float

Rect3D.sizeXSq r

Full Usage: Rect3D.sizeXSq r

Parameters:
Returns: float
Modifiers: inline

The squared size in X direction.

r : Rect3D
Returns: float

Rect3D.sizeY r

Full Usage: Rect3D.sizeY r

Parameters:
Returns: float
Modifiers: inline

The size in Y direction.

r : Rect3D
Returns: float

Rect3D.sizeYSq r

Full Usage: Rect3D.sizeYSq r

Parameters:
Returns: float
Modifiers: inline

The squared size in Y direction.

r : Rect3D
Returns: float

Rect3D.subDivide xCount yCount xGap yGap rect

Full Usage: Rect3D.subDivide xCount yCount xGap yGap rect

Parameters:
    xCount : int
    yCount : int
    xGap : float
    yGap : float
    rect : Rect3D

Returns: Rect3D array array

Divides a 3D-rectangle into a grid of sub-rectangles. The sub-rectangles are returned as an array of arrays. The gap between the sub-rectangles is given in x and y direction. It does not apply to the outer edges of the 3D-rectangle. The returned array has xCount elements, each element is an array of yCount sub-rectangles.

xCount : int
yCount : int
xGap : float
yGap : float
rect : Rect3D
Returns: Rect3D array array

Rect3D.subDivideMaxLength (rect, xMaxLen, yMaxLen, xGap, yGap)

Full Usage: Rect3D.subDivideMaxLength (rect, xMaxLen, yMaxLen, xGap, yGap)

Parameters:
    rect : Rect3D
    xMaxLen : float
    yMaxLen : float
    xGap : float
    yGap : float

Returns: Rect3D array array

Divides a 3D rectangle into a grid of sub-rectangles. The gap between the sub-rectangles is given in x and y direction. It does not apply to the outer edges of the 3D-rectangle. It will create as few segments as possible respecting the maximum segment length. The input maxSegmentLength is multiplied by factor 1.00001 to avoid numerical errors. That means in an edge case there are fewer segments returned, not more. The returned array is divided along the X-axis. The sub-array is divided along the Y-axis.

rect : Rect3D
xMaxLen : float
yMaxLen : float
xGap : float
yGap : float
Returns: Rect3D array array

Rect3D.subDivideMinLength (rect, xMinLen, yMinLen, xGap, yGap)

Full Usage: Rect3D.subDivideMinLength (rect, xMinLen, yMinLen, xGap, yGap)

Parameters:
    rect : Rect3D
    xMinLen : float
    yMinLen : float
    xGap : float
    yGap : float

Returns: Rect3D array array

Divides a 3D rectangle into a grid of sub-rectangles. The gap between the sub-rectangles is given in x and y direction. It does not apply to the outer edges of the 3D-rectangle. It will create as many sub-rectangles as possible, respecting the minimum side length for x and y. The input minSegmentLength is multiplied by factor 0.9999 to avoid numerical errors. That means in an edge case there are more segments returned, not fewer. The returned array is divided along the X-axis. The sub-array is divided along the Y-axis.

rect : Rect3D
xMinLen : float
yMinLen : float
xGap : float
yGap : float
Returns: Rect3D array array

Rect3D.transformRigid m r

Full Usage: Rect3D.transformRigid m r

Parameters:
Returns: Rect3D
Modifiers: inline

Transforms the 3D-rectangle by the given RigidMatrix. The returned 3D-rectangle is guaranteed to have orthogonal vectors.

m : RigidMatrix
r : Rect3D
Returns: Rect3D

Rect3D.tryCreateFrom3Pnts origin xPnt yPnt

Full Usage: Rect3D.tryCreateFrom3Pnts origin xPnt yPnt

Parameters:
Returns: Rect3D voption

Tries to create a 3D-rectangle from three points. Returns ValueNone if points are too close to each other or all collinear. The Origin, a point in X-axis direction and length, and a point for the length in Y-axis direction. Origin and x-point define the X-axis orientation of the Rectangle. The y-point only defines the length and side of the Y-axis.

   local
   Y-axis
   ^
   |
   |             2
 3 +------------+
   |            |
   |            |
   |            |
   |            |
   |            |       local
   +------------+-----> X-axis
  0-Origin       1

origin : Pnt
xPnt : Pnt
yPnt : Pnt
Returns: Rect3D voption

Rect3D.tryIntersectLine ln r

Full Usage: Rect3D.tryIntersectLine ln r

Parameters:
Returns: Pnt voption

Returns intersection point of a Line3D with Rect3D. Returns ValueNone if the intersection point is outside their bounds. Use Rect3D.tryIntersectRay to get the parameters of the intersection point. Returns ValueNone if they are parallel or coincident, or if the line has zero length. If the intersection parameters on the line and the rectangle are within 1e-6 of the bounds 0.0 or 1.0, it will still be considered as inside the rectangle and line.

ln : Line3D
r : Rect3D
Returns: Pnt voption

Rect3D.tryIntersectRay ln r

Full Usage: Rect3D.tryIntersectRay ln r

Parameters:
Returns: float voption

Returns the line parameter. The parameter is the intersection point of the ray with the infinitely extended Rect3D. The intersection point lies on the line segment itself only if the parameter is within the range 0.0 to 1.0. Returns ValueNone if they are parallel or coincident.

ln : Line3D
r : Rect3D
Returns: float voption

Rect3D.xAxis r

Full Usage: Rect3D.xAxis r

Parameters:
Returns: Vec
Modifiers: inline

Creates a 3D Vector from r.XAxisX, r.XAxisY and r.XAxisZ

r : Rect3D
Returns: Vec

Rect3D.xAxisUnit r

Full Usage: Rect3D.xAxisUnit r

Parameters:
Returns: UnitVec
Modifiers: inline

Creates a unitized version of the local X-axis.

r : Rect3D
Returns: UnitVec

Rect3D.xCorner r

Full Usage: Rect3D.xCorner r

Parameters:
Returns: Pnt
Modifiers: inline

Returns the corner at end of X-axis.

r : Rect3D
Returns: Pnt

Rect3D.yAxis r

Full Usage: Rect3D.yAxis r

Parameters:
Returns: Vec
Modifiers: inline

Creates a 3D Vector from r.YAxisX, r.YAxisY and r.YAxisZ

r : Rect3D
Returns: Vec

Rect3D.yAxisUnit r

Full Usage: Rect3D.yAxisUnit r

Parameters:
Returns: UnitVec
Modifiers: inline

Creates a unitized version of the local Y-axis.

r : Rect3D
Returns: UnitVec

Rect3D.yCorner r

Full Usage: Rect3D.yCorner r

Parameters:
Returns: Pnt
Modifiers: inline

Returns the corner at end of Y-axis.

r : Rect3D
Returns: Pnt

Type something to start searching.