Logo Euclid

FreeBox Type

A mutable class containing a flat array of 24 floats representing an arbitrary 3D box-like topology. The 8 corner points are stored interleaved as x0, y0, z0, x1, y1, z1, ... x7, y7, z7. The points can be in arbitrary position in space. The instance members for transformations, like Move, Scale or Rotate, mutate the FreeBox in place and return unit. Their static counterparts, like FreeBox.move, FreeBox.scale or FreeBox.rotate, return a new FreeBox and leave the input unchanged. The indexed point setters and movers, setPoint, setXYZ, movePoint and moveXYZ, mutate in place and return unit, as instance and as static members. So do the setters of the corner properties, like Pnt0 or Pnt0X. Taking a point index alone does not mean mutation: getPoint and getLine only read the FreeBox. XYZs and xyzs expose the live coordinate array, changes to it change the FreeBox.

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Instance members

Instance member Description

this.AsFSharpCode

Full Usage: this.AsFSharpCode

Returns: string

Format FreeBox into an F# code string that can be used to recreate the box.

Returns: string

this.AsPoints

Full Usage: this.AsPoints

Returns: Pnt array

Converts the flat float buffer of the FreeBox into an array of the 8 corner points. Use .XYZs to access the live internal buffer.

Returns: Pnt array

this.AsString

Full Usage: this.AsString

Returns: string

Nicely formatted string representation of the box including Pnt0.

Returns: string

this.Clone

Full Usage: this.Clone

Returns: FreeBox A new FreeBox with its own flat array of 24 floats.

Creates a copy of this FreeBox. Same as Duplicate().

Returns: FreeBox

A new FreeBox with its own flat array of 24 floats.

this.Duplicate

Full Usage: this.Duplicate

Returns: FreeBox A new FreeBox with its own flat array of 24 floats.

Creates a copy of this FreeBox. Same as Clone().

Returns: FreeBox

A new FreeBox with its own flat array of 24 floats.

this.Edge01

Full Usage: this.Edge01

Returns: Line3D

Returns the edge between point 0 and point 1.

Returns: Line3D

this.Edge03

Full Usage: this.Edge03

Returns: Line3D

Returns the edge between point 0 and point 3.

Returns: Line3D

this.Edge04

Full Usage: this.Edge04

Returns: Line3D

Returns the edge between point 0 and point 4.

Returns: Line3D

this.Edge10

Full Usage: this.Edge10

Returns: Line3D

Returns the edge between point 1 and point 0. This is the reverse of Edge01.

Returns: Line3D

this.Edge12

Full Usage: this.Edge12

Returns: Line3D

Returns the edge between point 1 and point 2.

Returns: Line3D

this.Edge15

Full Usage: this.Edge15

Returns: Line3D

Returns the edge between point 1 and point 5.

Returns: Line3D

this.Edge21

Full Usage: this.Edge21

Returns: Line3D

Returns the edge between point 2 and point 1. This is the reverse of Edge12.

Returns: Line3D

this.Edge23

Full Usage: this.Edge23

Returns: Line3D

Returns the edge between point 2 and point 3. This is the reverse of Edge32.

Returns: Line3D

this.Edge26

Full Usage: this.Edge26

Returns: Line3D

Returns the edge between point 2 and point 6.

Returns: Line3D

this.Edge30

Full Usage: this.Edge30

Returns: Line3D

Returns the edge between point 3 and point 0. This is the reverse of Edge03.

Returns: Line3D

this.Edge32

Full Usage: this.Edge32

Returns: Line3D

Returns the edge between point 3 and point 2.

Returns: Line3D

this.Edge37

Full Usage: this.Edge37

Returns: Line3D

Returns the edge between point 3 and point 7.

Returns: Line3D

this.Edge40

Full Usage: this.Edge40

Returns: Line3D

Returns the edge between point 4 and point 0. This is the reverse of Edge04.

Returns: Line3D

this.Edge45

Full Usage: this.Edge45

Returns: Line3D

Returns the edge between point 4 and point 5.

Returns: Line3D

this.Edge47

Full Usage: this.Edge47

Returns: Line3D

Returns the edge between point 4 and point 7.

Returns: Line3D

this.Edge51

Full Usage: this.Edge51

Returns: Line3D

Returns the edge between point 5 and point 1. This is the reverse of Edge15.

Returns: Line3D

this.Edge54

Full Usage: this.Edge54

Returns: Line3D

Returns the edge between point 5 and point 4. This is the reverse of Edge45.

Returns: Line3D

this.Edge56

Full Usage: this.Edge56

Returns: Line3D

Returns the edge between point 5 and point 6.

Returns: Line3D

this.Edge62

Full Usage: this.Edge62

Returns: Line3D

Returns the edge between point 6 and point 2. This is the reverse of Edge26.

Returns: Line3D

this.Edge65

Full Usage: this.Edge65

Returns: Line3D

Returns the edge between point 6 and point 5. This is the reverse of Edge56.

Returns: Line3D

this.Edge67

Full Usage: this.Edge67

Returns: Line3D

Returns the edge between point 6 and point 7. This is the reverse of Edge76.

Returns: Line3D

this.Edge73

Full Usage: this.Edge73

Returns: Line3D

Returns the edge between point 7 and point 3. This is the reverse of Edge37.

Returns: Line3D

this.Edge74

Full Usage: this.Edge74

Returns: Line3D

Returns the edge between point 7 and point 4. This is the reverse of Edge47.

Returns: Line3D

this.Edge76

Full Usage: this.Edge76

Returns: Line3D

Returns the edge between point 7 and point 6.

Returns: Line3D

this.Edges

Full Usage: this.Edges

Returns: Line3D[]

Returns the 12 box edges. Pairs in this order: 0-1, 1-2, 3-2, 0-3, 0-4, 1-5, 2-6, 3-7, 4-5, 5-6, 7-6, 4-7

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Returns: Line3D[]

this.GetLine

Full Usage: this.GetLine

Parameters:
    startPointIndex : int - The index of the corner point where the line starts. Must be between 0 and 7.
    endPointIndex : int - The index of the corner point where the line ends. Must be between 0 and 7 and different from startPointIndex.

Returns: Line3D A Line3D from the start corner point to the end corner point.

Returns the line from the corner point at the start index to the corner point at the end index. Any two different indices from 0 to 7 are valid, so besides the 12 edges this also returns face diagonals and space diagonals. The direction of the line follows the order of the indices: GetLine 0 1 is Edge01 and GetLine 1 0 is Edge10.

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

startPointIndex : int

The index of the corner point where the line starts. Must be between 0 and 7.

endPointIndex : int

The index of the corner point where the line ends. Must be between 0 and 7 and different from startPointIndex.

Returns: Line3D

A Line3D from the start corner point to the end corner point.

this.GetPoint

Full Usage: this.GetPoint

Parameters:
    pointIndex : int

Returns: Pnt

Get the point at the given point index. The index must be between 0 and 7. (this gets Pnt(XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1], XYZs.[pointIndex * 3 + 2]) from the internal flat array of x, y, and z coordinates)

pointIndex : int
Returns: Pnt

this.GetX

Full Usage: this.GetX

Parameters:
    pointIndex : int

Returns: float

Get the x coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3] from the internal flat array of x, y, and z coordinates)

pointIndex : int
Returns: float

this.GetY

Full Usage: this.GetY

Parameters:
    pointIndex : int

Returns: float

Get the y coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3 + 1] from the internal flat array of x, y, and z coordinates)

pointIndex : int
Returns: float

this.GetZ

Full Usage: this.GetZ

Parameters:
    pointIndex : int

Returns: float

Get the z coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3 + 2] from the internal flat array of x, y, and z coordinates)

pointIndex : int
Returns: float

this.Move

Full Usage: this.Move

Parameters:

Moves the FreeBox in place by a vector.

v : Vec

this.MovePoint

Full Usage: this.MovePoint

Parameters:
    pointIndex : int - The index of the point to move. Must be between 0 and 7.
    v : Vec - The vector to move the point by.

Moves the point at the given point index in place by a vector. The other 7 points stay where they are. (this adds v.X, v.Y and v.Z to XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1] and XYZs.[pointIndex * 3 + 2] of the internal flat array of x, y, and z coordinates)

pointIndex : int

The index of the point to move. Must be between 0 and 7.

v : Vec

The vector to move the point by.

this.MoveX

Full Usage: this.MoveX

Parameters:
    distance : float

Moves the FreeBox in place by a given distance in world X direction.

distance : float

this.MoveXYZ

Full Usage: this.MoveXYZ

Parameters:
    pointIndex : int - The index of the point to move. Must be between 0 and 7.
    x : float - The distance to move the point in X direction.
    y : float - The distance to move the point in Y direction.
    z : float - The distance to move the point in Z direction.

Moves the point at the given point index in place by the given x, y, and z distances. The other 7 points stay where they are. (this adds x, y and z to XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1] and XYZs.[pointIndex * 3 + 2] of the internal flat array of x, y, and z coordinates)

pointIndex : int

The index of the point to move. Must be between 0 and 7.

x : float

The distance to move the point in X direction.

y : float

The distance to move the point in Y direction.

z : float

The distance to move the point in Z direction.

this.MoveY

Full Usage: this.MoveY

Parameters:
    distance : float

Moves the FreeBox in place by a given distance in world Y direction.

distance : float

this.MoveZ

Full Usage: this.MoveZ

Parameters:
    distance : float

Moves the FreeBox in place by a given distance in world Z direction.

distance : float

this.Pnt0

Full Usage: this.Pnt0

Returns: Pnt

Gets or sets the point 0 of the box. (this gets or sets XYZs.[0], XYZs.[1] and XYZs.[2] of the internal flat array of x, y, and z coordinates)

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Returns: Pnt

this.Pnt0X

Full Usage: this.Pnt0X

Returns: float

Gets or sets the X coordinate of the point 0 of the box. (this gets or sets XYZs.[0] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt0Y

Full Usage: this.Pnt0Y

Returns: float

Gets or sets the Y coordinate of the point 0 of the box. (this gets or sets XYZs.[1] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt0Z

Full Usage: this.Pnt0Z

Returns: float

Gets or sets the Z coordinate of the point 0 of the box. (this gets or sets XYZs.[2] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt1

Full Usage: this.Pnt1

Returns: Pnt

Gets or sets the point 1 of the box. (this gets or sets XYZs.[3], XYZs.[4] and XYZs.[5] of the internal flat array of x, y, and z coordinates)

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Returns: Pnt

this.Pnt1X

Full Usage: this.Pnt1X

Returns: float

Gets or sets the X coordinate of the point 1 of the box. (this gets or sets XYZs.[3] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt1Y

Full Usage: this.Pnt1Y

Returns: float

Gets or sets the Y coordinate of the point 1 of the box. (this gets or sets XYZs.[4] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt1Z

Full Usage: this.Pnt1Z

Returns: float

Gets or sets the Z coordinate of the point 1 of the box. (this gets or sets XYZs.[5] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt2

Full Usage: this.Pnt2

Returns: Pnt

Gets or sets the point 2 of the box. (this gets or sets XYZs.[6], XYZs.[7] and XYZs.[8] of the internal flat array of x, y, and z coordinates)

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Returns: Pnt

this.Pnt2X

Full Usage: this.Pnt2X

Returns: float

Gets or sets the X coordinate of the point 2 of the box. (this gets or sets XYZs.[6] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt2Y

Full Usage: this.Pnt2Y

Returns: float

Gets or sets the Y coordinate of the point 2 of the box. (this gets or sets XYZs.[7] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt2Z

Full Usage: this.Pnt2Z

Returns: float

Gets or sets the Z coordinate of the point 2 of the box. (this gets or sets XYZs.[8] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt3

Full Usage: this.Pnt3

Returns: Pnt

Gets or sets the point 3 of the box. (this gets or sets XYZs.[9], XYZs.[10] and XYZs.[11] of the internal flat array of x, y, and z coordinates)

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Returns: Pnt

this.Pnt3X

Full Usage: this.Pnt3X

Returns: float

Gets or sets the X coordinate of the point 3 of the box. (this gets or sets XYZs.[9] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt3Y

Full Usage: this.Pnt3Y

Returns: float

Gets or sets the Y coordinate of the point 3 of the box. (this gets or sets XYZs.[10] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt3Z

Full Usage: this.Pnt3Z

Returns: float

Gets or sets the Z coordinate of the point 3 of the box. (this gets or sets XYZs.[11] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt4

Full Usage: this.Pnt4

Returns: Pnt

Gets or sets the point 4 of the box. (this gets or sets XYZs.[12], XYZs.[13] and XYZs.[14] of the internal flat array of x, y, and z coordinates)

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Returns: Pnt

this.Pnt4X

Full Usage: this.Pnt4X

Returns: float

Gets or sets the X coordinate of the point 4 of the box. (this gets or sets XYZs.[12] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt4Y

Full Usage: this.Pnt4Y

Returns: float

Gets or sets the Y coordinate of the point 4 of the box. (this gets or sets XYZs.[13] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt4Z

Full Usage: this.Pnt4Z

Returns: float

Gets or sets the Z coordinate of the point 4 of the box. (this gets or sets XYZs.[14] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt5

Full Usage: this.Pnt5

Returns: Pnt

Gets or sets the point 5 of the box. (this gets or sets XYZs.[15], XYZs.[16] and XYZs.[17] of the internal flat array of x, y, and z coordinates)

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Returns: Pnt

this.Pnt5X

Full Usage: this.Pnt5X

Returns: float

Gets or sets the X coordinate of the point 5 of the box. (this gets or sets XYZs.[15] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt5Y

Full Usage: this.Pnt5Y

Returns: float

Gets or sets the Y coordinate of the point 5 of the box. (this gets or sets XYZs.[16] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt5Z

Full Usage: this.Pnt5Z

Returns: float

Gets or sets the Z coordinate of the point 5 of the box. (this gets or sets XYZs.[17] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt6

Full Usage: this.Pnt6

Returns: Pnt

Gets or sets the point 6 of the box. (this gets or sets XYZs.[18], XYZs.[19] and XYZs.[20] of the internal flat array of x, y, and z coordinates)

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Returns: Pnt

this.Pnt6X

Full Usage: this.Pnt6X

Returns: float

Gets or sets the X coordinate of the point 6 of the box. (this gets or sets XYZs.[18] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt6Y

Full Usage: this.Pnt6Y

Returns: float

Gets or sets the Y coordinate of the point 6 of the box. (this gets or sets XYZs.[19] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt6Z

Full Usage: this.Pnt6Z

Returns: float

Gets or sets the Z coordinate of the point 6 of the box. (this gets or sets XYZs.[20] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt7

Full Usage: this.Pnt7

Returns: Pnt

Gets or sets the point 7 of the box. (this gets or sets XYZs.[21], XYZs.[22] and XYZs.[23] of the internal flat array of x, y, and z coordinates)

       7               6
       +---------------+
      /|              /|
     / |             / |
 4  /  |          5 /  |
   +---------------+   |
   |   |           |   |
   |   +-----------|---+
   |  / 3          |  / 2
   | /             | /
   |/              |/
   +---------------+
   0               1

Returns: Pnt

this.Pnt7X

Full Usage: this.Pnt7X

Returns: float

Gets or sets the X coordinate of the point 7 of the box. (this gets or sets XYZs.[21] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt7Y

Full Usage: this.Pnt7Y

Returns: float

Gets or sets the Y coordinate of the point 7 of the box. (this gets or sets XYZs.[22] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Pnt7Z

Full Usage: this.Pnt7Z

Returns: float

Gets or sets the Z coordinate of the point 7 of the box. (this gets or sets XYZs.[23] of the internal flat array of x, y, and z coordinates) Setting it mutates the FreeBox in place.

Returns: float

this.Rotate

Full Usage: this.Rotate

Parameters:

Rotates the FreeBox in place by a Quaternion. The box is rotated around the World Origin.

q : Quaternion

this.RotateAround

Full Usage: this.RotateAround

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

Rotates the FreeBox in place by a Quaternion around a given center point.

cen : Pnt

The center point of the rotation.

q : Quaternion

The rotation to apply.

this.Scale

Full Usage: this.Scale

Parameters:
    factor : float

Scales the FreeBox in place by a given factor on the world origin (0, 0, 0).

factor : float

this.ScaleOn

Full Usage: this.ScaleOn

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

Scales the FreeBox in place by a given factor around a given center point.

cen : Pnt

The center point of the scaling.

factor : float

The scale factor.

this.SetPoint

Full Usage: this.SetPoint

Parameters:
    pointIndex : int
    p : Pnt

Sets the point at the given point index. The index must be between 0 and 7. (this sets XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1] and XYZs.[pointIndex * 3 + 2] of the internal flat array of x, y, and z coordinates)

pointIndex : int
p : Pnt

this.SetXYZ

Full Usage: this.SetXYZ

Parameters:
    pointIndex : int
    x : float
    y : float
    z : float

Sets the x, y, and z coordinates of the point at the given point index. The index must be between 0 and 7. (this sets XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1] and XYZs.[pointIndex * 3 + 2] of the internal flat array of x, y, and z coordinates)

pointIndex : int
x : float
y : float
z : float

this.Transform

Full Usage: this.Transform

Parameters:

Applies a 4x4 transformation matrix to the FreeBox in place.

m : Matrix

this.TransformRigid

Full Usage: this.TransformRigid

Parameters:

Applies a RigidMatrix to the FreeBox in place.

m : RigidMatrix

this.XYZs

Full Usage: this.XYZs

Returns: float[]
Gets the X, Y and Z interleaved array of 24 floats of the box:
 x0, y0, z0, x1, y1, z1, ... x7, y7, z7.
 This is the live internal buffer, so changes to the array will be reflected in the FreeBox.
Returns: float[]

Static members

Static member Description

FreeBox.asFSharpCode b

Full Usage: FreeBox.asFSharpCode b

Parameters:
Returns: string
Modifiers: inline

Format FreeBox into an F# code string that can be used to recreate the box.

b : FreeBox
Returns: string

FreeBox.asPoints b

Full Usage: FreeBox.asPoints b

Parameters:
Returns: Pnt array
Modifiers: inline

Converts the flat float buffer of the FreeBox into an array of the 8 corner points. Use .XYZs to access the live internal buffer.

b : FreeBox
Returns: Pnt array

FreeBox.asString b

Full Usage: FreeBox.asString b

Parameters:
Returns: string
Modifiers: inline

Nicely formatted string representation of the box including Pnt0.

b : FreeBox
Returns: string

FreeBox.clone b

Full Usage: FreeBox.clone b

Parameters:
    b : FreeBox - The FreeBox to copy.

Returns: FreeBox A new FreeBox with its own flat array of 24 floats.
Modifiers: inline

Creates a copy of the given FreeBox. Same as FreeBox.duplicate.

b : FreeBox

The FreeBox to copy.

Returns: FreeBox

A new FreeBox with its own flat array of 24 floats.

FreeBox.createFrom4PtArray zMin zMax pts

Full Usage: FreeBox.createFrom4PtArray zMin zMax pts

Parameters:
    zMin : float
    zMax : float
    pts : Pt[]

Returns: FreeBox

Creates a FreeBox from a zMin and zMax value and an array of four 2D points.

zMin : float
zMax : float
pts : Pt[]
Returns: FreeBox

FreeBox.createFrom4Pts (zMin, zMax, a, b, c, d)

Full Usage: FreeBox.createFrom4Pts (zMin, zMax, a, b, c, d)

Parameters:
    zMin : float
    zMax : float
    a : Pt
    b : Pt
    c : Pt
    d : Pt

Returns: FreeBox

Creates a FreeBox from a zMin and zMax value and four 2D points in counter-clockwise order. This is tupled because it takes four points.

zMin : float
zMax : float
a : Pt
b : Pt
c : Pt
d : Pt
Returns: FreeBox

FreeBox.createFrom8PntArray pts

Full Usage: FreeBox.createFrom8PntArray pts

Parameters:
Returns: FreeBox

Creates a FreeBox from an array of 8 points. The points can be in arbitrary position in space. The points are copied into a flat array of 24 floats.

pts : Pnt[]
Returns: FreeBox

FreeBox.createFromBox box

Full Usage: FreeBox.createFromBox box

Parameters:
Returns: FreeBox

Creates a FreeBox from a Box. The 8 points of the FreeBox are the 8 corners of the Box.

box : Box
Returns: FreeBox

FreeBox.createFromXYZs xyzs

Full Usage: FreeBox.createFromXYZs xyzs

Parameters:
    xyzs : float[]

Returns: FreeBox
Creates a FreeBox from a flat array of 24 floats:
 x0, y0, z0, x1, y1, z1, ... x7, y7, z7.
 The array is used directly as the internal buffer, it is not copied:
 later changes to the array will be reflected in the FreeBox, and vice versa.
xyzs : float[]
Returns: FreeBox

FreeBox.duplicate b

Full Usage: FreeBox.duplicate b

Parameters:
    b : FreeBox - The FreeBox to copy.

Returns: FreeBox A new FreeBox with its own flat array of 24 floats.
Modifiers: inline

Creates a copy of the given FreeBox. Same as FreeBox.clone.

b : FreeBox

The FreeBox to copy.

Returns: FreeBox

A new FreeBox with its own flat array of 24 floats.

FreeBox.edge01 b

Full Usage: FreeBox.edge01 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 0 and point 1.

b : FreeBox
Returns: Line3D

FreeBox.edge03 b

Full Usage: FreeBox.edge03 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 0 and point 3.

b : FreeBox
Returns: Line3D

FreeBox.edge04 b

Full Usage: FreeBox.edge04 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 0 and point 4.

b : FreeBox
Returns: Line3D

FreeBox.edge10 b

Full Usage: FreeBox.edge10 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 1 and point 0. This is the reverse of Edge01.

b : FreeBox
Returns: Line3D

FreeBox.edge12 b

Full Usage: FreeBox.edge12 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 1 and point 2.

b : FreeBox
Returns: Line3D

FreeBox.edge15 b

Full Usage: FreeBox.edge15 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 1 and point 5.

b : FreeBox
Returns: Line3D

FreeBox.edge21 b

Full Usage: FreeBox.edge21 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 2 and point 1. This is the reverse of Edge12.

b : FreeBox
Returns: Line3D

FreeBox.edge23 b

Full Usage: FreeBox.edge23 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 2 and point 3. This is the reverse of Edge32.

b : FreeBox
Returns: Line3D

FreeBox.edge26 b

Full Usage: FreeBox.edge26 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 2 and point 6.

b : FreeBox
Returns: Line3D

FreeBox.edge30 b

Full Usage: FreeBox.edge30 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 3 and point 0. This is the reverse of Edge03.

b : FreeBox
Returns: Line3D

FreeBox.edge32 b

Full Usage: FreeBox.edge32 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 3 and point 2.

b : FreeBox
Returns: Line3D

FreeBox.edge37 b

Full Usage: FreeBox.edge37 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 3 and point 7.

b : FreeBox
Returns: Line3D

FreeBox.edge40 b

Full Usage: FreeBox.edge40 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 4 and point 0. This is the reverse of Edge04.

b : FreeBox
Returns: Line3D

FreeBox.edge45 b

Full Usage: FreeBox.edge45 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 4 and point 5.

b : FreeBox
Returns: Line3D

FreeBox.edge47 b

Full Usage: FreeBox.edge47 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 4 and point 7.

b : FreeBox
Returns: Line3D

FreeBox.edge51 b

Full Usage: FreeBox.edge51 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 5 and point 1. This is the reverse of Edge15.

b : FreeBox
Returns: Line3D

FreeBox.edge54 b

Full Usage: FreeBox.edge54 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 5 and point 4. This is the reverse of Edge45.

b : FreeBox
Returns: Line3D

FreeBox.edge56 b

Full Usage: FreeBox.edge56 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 5 and point 6.

b : FreeBox
Returns: Line3D

FreeBox.edge62 b

Full Usage: FreeBox.edge62 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 6 and point 2. This is the reverse of Edge26.

b : FreeBox
Returns: Line3D

FreeBox.edge65 b

Full Usage: FreeBox.edge65 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 6 and point 5. This is the reverse of Edge56.

b : FreeBox
Returns: Line3D

FreeBox.edge67 b

Full Usage: FreeBox.edge67 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 6 and point 7. This is the reverse of Edge76.

b : FreeBox
Returns: Line3D

FreeBox.edge73 b

Full Usage: FreeBox.edge73 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 7 and point 3. This is the reverse of Edge37.

b : FreeBox
Returns: Line3D

FreeBox.edge74 b

Full Usage: FreeBox.edge74 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 7 and point 4. This is the reverse of Edge47.

b : FreeBox
Returns: Line3D

FreeBox.edge76 b

Full Usage: FreeBox.edge76 b

Parameters:
Returns: Line3D
Modifiers: inline

Returns the edge between point 7 and point 6.

b : FreeBox
Returns: Line3D

FreeBox.edges b

Full Usage: FreeBox.edges b

Parameters:
Returns: Line3D[]
Modifiers: inline

Returns the 12 box edges.

b : FreeBox
Returns: Line3D[]

FreeBox.getLine startPointIndex endPointIndex b

Full Usage: FreeBox.getLine startPointIndex endPointIndex b

Parameters:
    startPointIndex : int
    endPointIndex : int
    b : FreeBox

Returns: Line3D
Modifiers: inline

Returns the line from the corner point at the start index to the corner point at the end index of the FreeBox. Any two different indices from 0 to 7 are valid.

startPointIndex : int
endPointIndex : int
b : FreeBox
Returns: Line3D

FreeBox.getPoint pointIndex b

Full Usage: FreeBox.getPoint pointIndex b

Parameters:
Returns: Pnt
Modifiers: inline

Get the point at the given point index. The index must be between 0 and 7. (this gets Pnt(XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1], XYZs.[pointIndex * 3 + 2]) from the internal flat array of x, y, and z coordinates)

pointIndex : int
b : FreeBox
Returns: Pnt

FreeBox.getX pointIndex b

Full Usage: FreeBox.getX pointIndex b

Parameters:
Returns: float
Modifiers: inline

Get the x coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3] from the internal flat array of x, y, and z coordinates)

pointIndex : int
b : FreeBox
Returns: float

FreeBox.getY pointIndex b

Full Usage: FreeBox.getY pointIndex b

Parameters:
Returns: float
Modifiers: inline

Get the y coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3 + 1] from the internal flat array of x, y, and z coordinates)

pointIndex : int
b : FreeBox
Returns: float

FreeBox.getZ pointIndex b

Full Usage: FreeBox.getZ pointIndex b

Parameters:
Returns: float
Modifiers: inline

Get the z coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3 + 2] from the internal flat array of x, y, and z coordinates)

pointIndex : int
b : FreeBox
Returns: float

FreeBox.move v b

Full Usage: FreeBox.move v b

Parameters:
Returns: FreeBox
Modifiers: inline

Returns a new FreeBox moved by a vector. The input FreeBox is not changed.

v : Vec
b : FreeBox
Returns: FreeBox

FreeBox.movePoint pointIndex v b

Full Usage: FreeBox.movePoint pointIndex v b

Parameters:
    pointIndex : int - The index of the point to move. Must be between 0 and 7.
    v : Vec - The vector to move the point by.
    b : FreeBox - The FreeBox to change.

Modifiers: inline

Moves the point at the given point index in place by a vector. The other 7 points stay where they are.

pointIndex : int

The index of the point to move. Must be between 0 and 7.

v : Vec

The vector to move the point by.

b : FreeBox

The FreeBox to change.

FreeBox.moveX distance b

Full Usage: FreeBox.moveX distance b

Parameters:
Returns: FreeBox
Modifiers: inline

Returns a new FreeBox moved by a given distance in world X direction. The input FreeBox is not changed.

distance : float
b : FreeBox
Returns: FreeBox

FreeBox.moveXYZ pointIndex x y z b

Full Usage: FreeBox.moveXYZ pointIndex x y z b

Parameters:
    pointIndex : int - The index of the point to move. Must be between 0 and 7.
    x : float - The distance to move the point in X direction.
    y : float - The distance to move the point in Y direction.
    z : float - The distance to move the point in Z direction.
    b : FreeBox - The FreeBox to change.

Modifiers: inline

Moves the point at the given point index in place by the given x, y, and z distances. The other 7 points stay where they are.

pointIndex : int

The index of the point to move. Must be between 0 and 7.

x : float

The distance to move the point in X direction.

y : float

The distance to move the point in Y direction.

z : float

The distance to move the point in Z direction.

b : FreeBox

The FreeBox to change.

FreeBox.moveY distance b

Full Usage: FreeBox.moveY distance b

Parameters:
Returns: FreeBox
Modifiers: inline

Returns a new FreeBox moved by a given distance in world Y direction. The input FreeBox is not changed.

distance : float
b : FreeBox
Returns: FreeBox

FreeBox.moveZ distance b

Full Usage: FreeBox.moveZ distance b

Parameters:
Returns: FreeBox
Modifiers: inline

Returns a new FreeBox moved by a given distance in world Z direction. The input FreeBox is not changed.

distance : float
b : FreeBox
Returns: FreeBox

FreeBox.pnt0 b

Full Usage: FreeBox.pnt0 b

Parameters:
Returns: Pnt
Modifiers: inline

Point 0 of the box.

b : FreeBox
Returns: Pnt

FreeBox.pnt0X b

Full Usage: FreeBox.pnt0X b

Parameters:
Returns: float
Modifiers: inline

The X coordinate of the point 0 of the box. (this is XYZs.[0])

b : FreeBox
Returns: float

FreeBox.pnt0Y b

Full Usage: FreeBox.pnt0Y b

Parameters:
Returns: float
Modifiers: inline

The Y coordinate of the point 0 of the box. (this is XYZs.[1])

b : FreeBox
Returns: float

FreeBox.pnt0Z b

Full Usage: FreeBox.pnt0Z b

Parameters:
Returns: float
Modifiers: inline

The Z coordinate of the point 0 of the box. (this is XYZs.[2])

b : FreeBox
Returns: float

FreeBox.pnt1 b

Full Usage: FreeBox.pnt1 b

Parameters:
Returns: Pnt
Modifiers: inline

Point 1 of the box.

b : FreeBox
Returns: Pnt

FreeBox.pnt1X b

Full Usage: FreeBox.pnt1X b

Parameters:
Returns: float
Modifiers: inline

The X coordinate of the point 1 of the box. (this is XYZs.[3])

b : FreeBox
Returns: float

FreeBox.pnt1Y b

Full Usage: FreeBox.pnt1Y b

Parameters:
Returns: float
Modifiers: inline

The Y coordinate of the point 1 of the box. (this is XYZs.[4])

b : FreeBox
Returns: float

FreeBox.pnt1Z b

Full Usage: FreeBox.pnt1Z b

Parameters:
Returns: float
Modifiers: inline

The Z coordinate of the point 1 of the box. (this is XYZs.[5])

b : FreeBox
Returns: float

FreeBox.pnt2 b

Full Usage: FreeBox.pnt2 b

Parameters:
Returns: Pnt
Modifiers: inline

Point 2 of the box.

b : FreeBox
Returns: Pnt

FreeBox.pnt2X b

Full Usage: FreeBox.pnt2X b

Parameters:
Returns: float
Modifiers: inline

The X coordinate of the point 2 of the box. (this is XYZs.[6])

b : FreeBox
Returns: float

FreeBox.pnt2Y b

Full Usage: FreeBox.pnt2Y b

Parameters:
Returns: float
Modifiers: inline

The Y coordinate of the point 2 of the box. (this is XYZs.[7])

b : FreeBox
Returns: float

FreeBox.pnt2Z b

Full Usage: FreeBox.pnt2Z b

Parameters:
Returns: float
Modifiers: inline

The Z coordinate of the point 2 of the box. (this is XYZs.[8])

b : FreeBox
Returns: float

FreeBox.pnt3 b

Full Usage: FreeBox.pnt3 b

Parameters:
Returns: Pnt
Modifiers: inline

Point 3 of the box.

b : FreeBox
Returns: Pnt

FreeBox.pnt3X b

Full Usage: FreeBox.pnt3X b

Parameters:
Returns: float
Modifiers: inline

The X coordinate of the point 3 of the box. (this is XYZs.[9])

b : FreeBox
Returns: float

FreeBox.pnt3Y b

Full Usage: FreeBox.pnt3Y b

Parameters:
Returns: float
Modifiers: inline

The Y coordinate of the point 3 of the box. (this is XYZs.[10])

b : FreeBox
Returns: float

FreeBox.pnt3Z b

Full Usage: FreeBox.pnt3Z b

Parameters:
Returns: float
Modifiers: inline

The Z coordinate of the point 3 of the box. (this is XYZs.[11])

b : FreeBox
Returns: float

FreeBox.pnt4 b

Full Usage: FreeBox.pnt4 b

Parameters:
Returns: Pnt
Modifiers: inline

Point 4 of the box.

b : FreeBox
Returns: Pnt

FreeBox.pnt4X b

Full Usage: FreeBox.pnt4X b

Parameters:
Returns: float
Modifiers: inline

The X coordinate of the point 4 of the box. (this is XYZs.[12])

b : FreeBox
Returns: float

FreeBox.pnt4Y b

Full Usage: FreeBox.pnt4Y b

Parameters:
Returns: float
Modifiers: inline

The Y coordinate of the point 4 of the box. (this is XYZs.[13])

b : FreeBox
Returns: float

FreeBox.pnt4Z b

Full Usage: FreeBox.pnt4Z b

Parameters:
Returns: float
Modifiers: inline

The Z coordinate of the point 4 of the box. (this is XYZs.[14])

b : FreeBox
Returns: float

FreeBox.pnt5 b

Full Usage: FreeBox.pnt5 b

Parameters:
Returns: Pnt
Modifiers: inline

Point 5 of the box.

b : FreeBox
Returns: Pnt

FreeBox.pnt5X b

Full Usage: FreeBox.pnt5X b

Parameters:
Returns: float
Modifiers: inline

The X coordinate of the point 5 of the box. (this is XYZs.[15])

b : FreeBox
Returns: float

FreeBox.pnt5Y b

Full Usage: FreeBox.pnt5Y b

Parameters:
Returns: float
Modifiers: inline

The Y coordinate of the point 5 of the box. (this is XYZs.[16])

b : FreeBox
Returns: float

FreeBox.pnt5Z b

Full Usage: FreeBox.pnt5Z b

Parameters:
Returns: float
Modifiers: inline

The Z coordinate of the point 5 of the box. (this is XYZs.[17])

b : FreeBox
Returns: float

FreeBox.pnt6 b

Full Usage: FreeBox.pnt6 b

Parameters:
Returns: Pnt
Modifiers: inline

Point 6 of the box.

b : FreeBox
Returns: Pnt

FreeBox.pnt6X b

Full Usage: FreeBox.pnt6X b

Parameters:
Returns: float
Modifiers: inline

The X coordinate of the point 6 of the box. (this is XYZs.[18])

b : FreeBox
Returns: float

FreeBox.pnt6Y b

Full Usage: FreeBox.pnt6Y b

Parameters:
Returns: float
Modifiers: inline

The Y coordinate of the point 6 of the box. (this is XYZs.[19])

b : FreeBox
Returns: float

FreeBox.pnt6Z b

Full Usage: FreeBox.pnt6Z b

Parameters:
Returns: float
Modifiers: inline

The Z coordinate of the point 6 of the box. (this is XYZs.[20])

b : FreeBox
Returns: float

FreeBox.pnt7 b

Full Usage: FreeBox.pnt7 b

Parameters:
Returns: Pnt
Modifiers: inline

Point 7 of the box.

b : FreeBox
Returns: Pnt

FreeBox.pnt7X b

Full Usage: FreeBox.pnt7X b

Parameters:
Returns: float
Modifiers: inline

The X coordinate of the point 7 of the box. (this is XYZs.[21])

b : FreeBox
Returns: float

FreeBox.pnt7Y b

Full Usage: FreeBox.pnt7Y b

Parameters:
Returns: float
Modifiers: inline

The Y coordinate of the point 7 of the box. (this is XYZs.[22])

b : FreeBox
Returns: float

FreeBox.pnt7Z b

Full Usage: FreeBox.pnt7Z b

Parameters:
Returns: float
Modifiers: inline

The Z coordinate of the point 7 of the box. (this is XYZs.[23])

b : FreeBox
Returns: float

FreeBox.rotate q b

Full Usage: FreeBox.rotate q b

Parameters:
Returns: FreeBox
Modifiers: inline

Returns a new FreeBox rotated by a Quaternion. The input FreeBox is not changed. The box is rotated around the World Origin.

q : Quaternion
b : FreeBox
Returns: FreeBox

FreeBox.rotateAround cen q b

Full Usage: FreeBox.rotateAround cen q b

Parameters:
    cen : Pnt - The center point of the rotation.
    q : Quaternion - The rotation to apply.
    b : FreeBox - The FreeBox to rotate. It is not changed.

Returns: FreeBox A new FreeBox. Use b.RotateAround to rotate in place.
Modifiers: inline

Returns a new FreeBox rotated by a Quaternion around a given center point.

cen : Pnt

The center point of the rotation.

q : Quaternion

The rotation to apply.

b : FreeBox

The FreeBox to rotate. It is not changed.

Returns: FreeBox

A new FreeBox. Use b.RotateAround to rotate in place.

FreeBox.scale factor b

Full Usage: FreeBox.scale factor b

Parameters:
Returns: FreeBox
Modifiers: inline

Returns a new FreeBox scaled by a given factor. The input FreeBox is not changed. Scale center is World Origin 0,0,0

factor : float
b : FreeBox
Returns: FreeBox

FreeBox.scaleOn cen factor b

Full Usage: FreeBox.scaleOn cen factor b

Parameters:
    cen : Pnt - The center point of the scaling.
    factor : float - The scale factor.
    b : FreeBox - The FreeBox to scale. It is not changed.

Returns: FreeBox A new FreeBox. Use b.ScaleOn to scale in place.
Modifiers: inline

Returns a new FreeBox scaled by a given factor around a given center point.

cen : Pnt

The center point of the scaling.

factor : float

The scale factor.

b : FreeBox

The FreeBox to scale. It is not changed.

Returns: FreeBox

A new FreeBox. Use b.ScaleOn to scale in place.

FreeBox.setPoint pointIndex p b

Full Usage: FreeBox.setPoint pointIndex p b

Parameters:
Modifiers: inline

Sets the point at the given point index. The index must be between 0 and 7. (this sets XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1] and XYZs.[pointIndex * 3 + 2] of the internal flat array of x, y, and z coordinates)

pointIndex : int
p : Pnt
b : FreeBox

FreeBox.setXYZ pointIndex x y z b

Full Usage: FreeBox.setXYZ pointIndex x y z b

Parameters:
    pointIndex : int
    x : float
    y : float
    z : float
    b : FreeBox

Modifiers: inline

Sets the x, y, and z coordinates of the point at the given point index. The index must be between 0 and 7. (this sets XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1] and XYZs.[pointIndex * 3 + 2] of the internal flat array of x, y, and z coordinates)

pointIndex : int
x : float
y : float
z : float
b : FreeBox

FreeBox.transform m b

Full Usage: FreeBox.transform m b

Parameters:
Returns: FreeBox
Modifiers: inline

Returns a new FreeBox transformed by a 4x4 transformation matrix. The input FreeBox is not changed.

m : Matrix
b : FreeBox
Returns: FreeBox

FreeBox.transformRigid m b

Full Usage: FreeBox.transformRigid m b

Parameters:
Returns: FreeBox
Modifiers: inline

Returns a new FreeBox transformed by a RigidMatrix. The input FreeBox is not changed.

m : RigidMatrix
b : FreeBox
Returns: FreeBox

FreeBox.xyzs b

Full Usage: FreeBox.xyzs b

Parameters:
Returns: float[]
Modifiers: inline
Gets the X, Y and Z interleaved array of 24 floats of the box:
 x0, y0, z0, x1, y1, z1, ... x7, y7, z7.
 This is the live internal buffer, so changes to the array will be reflected in the FreeBox.
b : FreeBox
Returns: float[]

Type something to start searching.