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.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.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.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.EvaluateDist

Full Usage: this.EvaluateDist

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.Flipped

Full Usage: this.Flipped

Returns: Rect3D

Returns the rectangle flipped. Or rotated 180 around its diagonal from point 1 to 3. The normal of the rectangle gets flipped. Origin will be at point 2, X-axis points down to point 1, Y-axis points left to point 3.

   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. Same as Rect3D.move and Rect3D.translate.

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 in X direction.

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 in Y direction.

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 in Z direction.

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.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.Pt0

Full Usage: this.Pt0

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.Pt1

Full Usage: this.Pt1

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.Pt2

Full Usage: this.Pt2

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.Pt3

Full Usage: this.Pt3

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.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.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.RotateWithCenter

Full Usage: this.RotateWithCenter

Parameters:
Returns: Rect3D
Modifiers: inline

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

cen : Pnt
q : Quaternion
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
    factor : float

Returns: Rect3D
Modifiers: inline

Scales the 3D rectangle by a given factor on a given center point

cen : Pnt
factor : float
Returns: Rect3D

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.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.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.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

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

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 (pl, sizeX, sizeY)

Full Usage: Rect3D.createCenteredFromPlane (pl, sizeX, sizeY)

Parameters:
    pl : PPlane
    sizeX : float
    sizeY : float

Returns: Rect3D

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

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

Rect3D.createFrom3Points (origin, xPt, yPt)

Full Usage: Rect3D.createFrom3Points (origin, xPt, yPt)

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
xPt : Pnt
yPt : 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 (pl, sizeX, sizeY)

Full Usage: Rect3D.createFromPlane (pl, sizeX, sizeY)

Parameters:
    pl : PPlane
    sizeX : float
    sizeY : float

Returns: Rect3D

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

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

Rect3D.createFromVectors (origin, x, y)

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

Parameters:
Returns: Rect3D

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

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.createUncheckedVec (origin, x, y)

Full Usage: Rect3D.createUncheckedVec (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.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.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.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.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.equals tol a b

Full Usage: Rect3D.equals 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. Use a tolerance of 0.0 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.evaluateDist xDistance yDistance r

Full Usage: Rect3D.evaluateDist 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.expandRel factor r

Full Usage: Rect3D.expandRel 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.expandRelXY factorX factorY r

Full Usage: Rect3D.expandRelXY 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.createFromPlaneAndPoints function.

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

Rect3D.flip r

Full Usage: Rect3D.flip r

Parameters:
Returns: Rect3D
Modifiers: inline

Returns the rectangle flipped. Or rotated 180 around its diagonal from point 1 to 3. Origin will be at point 2, X-axis points down to point 1, Y-axis points left to point 3.

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

r : Rect3D
Returns: Rect3D

Rect3D.flipped r

Full Usage: Rect3D.flipped r

Parameters:
Returns: Rect3D
Modifiers: inline

Returns the rectangle flipped.

r : Rect3D
Returns: Rect3D

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 (rect, xCount, yCount)

Full Usage: Rect3D.grid (rect, xCount, yCount)

Parameters:
    rect : Rect3D
    xCount : int
    yCount : int

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.

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

Rect3D.gridMaxLength (rect, xMaxLen, yMaxLen)

Full Usage: Rect3D.gridMaxLength (rect, xMaxLen, yMaxLen)

Parameters:
    rect : Rect3D
    xMaxLen : float
    yMaxLen : float

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.

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

Rect3D.gridMinLength (rect, xMinLen, yMinLen)

Full Usage: Rect3D.gridMinLength (rect, xMinLen, yMinLen)

Parameters:
    rect : Rect3D
    xMinLen : float
    yMinLen : float

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.

rect : Rect3D
xMinLen : float
yMinLen : float
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 voption

Returns intersection point of a Line3D with Rect3D. Returns ValueNone if the intersection point is outside their bounds. Use Rect3D.intersectRay 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.intersectRay ln r

Full Usage: Rect3D.intersectRay 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.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. Same as Rect3D.translate.

v : Vec
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 in X direction.

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 in Y direction.

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 in Z direction.

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.notEquals tol a b

Full Usage: Rect3D.notEquals tol a b

Parameters:
Returns: bool

Check if two 3D-rectangles are not equal within a given tolerance. Use a tolerance of 0.0 to check if the two rectangles are not exactly equal.

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

Rect3D.offset dist rect

Full Usage: Rect3D.offset dist rect

Parameters:
Returns: Rect3D

Offset a Rect3D like a Polyline inwards by a given distance. Negative distances will offset outwards. Fails if the distance is larger than half the size of the rectangle.

dist : float
rect : Rect3D
Returns: Rect3D

Rect3D.offsetCorner (rect, corner, xOffset, yOffset, xWidth, yHeight)

Full Usage: Rect3D.offsetCorner (rect, corner, xOffset, yOffset, xWidth, yHeight)

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.
    xWidth : float - The width (or size in x direction) that will be added to the current offset.
    yHeight : float - The height (or 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.

xWidth : float

The width (or size in x direction) that will be added to the current offset.

yHeight : float

The height (or 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.offsetVar dist rect

Full Usage: Rect3D.offsetVar 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

Offset or Translate along the local Z-axis. The local Z-axis is calculated from Cross Product of X- and Y-axis of the 3D-rectangle.

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.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.pt0 r

Full Usage: Rect3D.pt0 r

Parameters:
Returns: Pnt
Modifiers: inline

Returns point 0 of the 3D-rectangle.

r : Rect3D
Returns: Pnt

Rect3D.pt1 r

Full Usage: Rect3D.pt1 r

Parameters:
Returns: Pnt
Modifiers: inline

Returns point 1 of the 3D-rectangle.

r : Rect3D
Returns: Pnt

Rect3D.pt2 r

Full Usage: Rect3D.pt2 r

Parameters:
Returns: Pnt
Modifiers: inline

Returns point 2 of the 3D-rectangle.

r : Rect3D
Returns: Pnt

Rect3D.pt3 r

Full Usage: Rect3D.pt3 r

Parameters:
Returns: Pnt
Modifiers: inline

Returns point 3 of the 3D-rectangle.

r : Rect3D
Returns: Pnt

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.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.rotateWithCenter cen q r

Full Usage: Rect3D.rotateWithCenter cen q r

Parameters:
Returns: Rect3D
Modifiers: inline

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

cen : Pnt
q : Quaternion
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:
Returns: Rect3D
Modifiers: inline

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

cen : Pnt
factor : float
r : Rect3D
Returns: Rect3D

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 (rect, xCount, yCount, xGap, yGap)

Full Usage: Rect3D.subDivide (rect, xCount, yCount, xGap, yGap)

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

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.

rect : Rect3D
xCount : int
yCount : int
xGap : float
yGap : float
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.translate v r

Full Usage: Rect3D.translate v r

Parameters:
Returns: Rect3D

Translate by a 3D vector. Same as Rect3D.move.

v : Vec
r : Rect3D
Returns: Rect3D

Rect3D.translateLocalX distX r

Full Usage: Rect3D.translateLocalX distX r

Parameters:
Returns: Rect3D

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

distX : float
r : Rect3D
Returns: Rect3D

Rect3D.translateLocalY distY r

Full Usage: Rect3D.translateLocalY distY r

Parameters:
Returns: Rect3D

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

distY : float
r : Rect3D
Returns: Rect3D

Rect3D.tryCreateFrom3Points (origin, xPt, yPt)

Full Usage: Rect3D.tryCreateFrom3Points (origin, xPt, yPt)

Parameters:
Returns: Rect3D option

Tries to create a 3D-rectangle from three points. Returns None 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
xPt : Pnt
yPt : Pnt
Returns: Rect3D option

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.