Hide menu
Loading...
Searching...
No Matches
Axis1d

Defines an axis placement as a combination of point and direction.

Constructors

new Axis1d()

new Axis1d(location, direction): Axis1d

Parameters

location

Point = ...

Location point of the axis.

direction

Direction = ...

Direction of the axis placement.

Returns

Axis1d

Properties

direction

readonly direction: Direction

Direction of the axis placement.


location

readonly location: Point

Location point of the axis.

Methods

clone()

clone(): Axis1d

Creates new Axis1d axis with location and direction same as this.

Returns

Axis1d


copy()

copy(other): this

Copies location and direction of the other axis to this.

Parameters

other

Axis1d

Copied object.

Returns

this


isCoaxial()

isCoaxial(other, isAllowOpposite, angularTolerance, distanceTolerance): boolean

Returns true if other axis is coaxial to this axis.

Parameters

other

Axis1d

Other axis.

isAllowOpposite

boolean = false

Allow or not opposite axis to be coaxial.

angularTolerance

number = 1e-7

Angular tolerance.

distanceTolerance

number = 1e-7

Distance tolerance.

Returns

boolean


mirror()

Call Signature

mirror(point): this

Mirrors this axis relative to other point.

Parameters

point

Point

Other point.

Returns

this

Call Signature

mirror(axis): this

Mirrors this axis relative to axis.

Parameters

axis

Axis1d

Axis.

Returns

this

Call Signature

mirror(axis): this

Mirrors this axis relative to axis.

Parameters

axis

Axis3d

Axis.

Returns

this


mirrored()

Call Signature

mirrored(point): Axis1d

Returns new Axis1d object with coordinates received by performing a mirror() operation to this object.

Parameters

point

Point

Point.

Returns

Axis1d

Call Signature

mirrored(axis): Axis1d

Returns new Axis1d object with coordinates received by performing a mirror() operation to this object.

Parameters

axis

Axis1d

Axis.

Returns

Axis1d

Call Signature

mirrored(axis): Axis1d

Returns new Axis1d object with coordinates received by performing a mirror() operation to this object.

Parameters

axis

Axis3d

Axis.

Returns

Axis1d


reverse()

reverse(): this

Reverses coordinates of this axis direction.

Returns

this


reversed()

reversed(): Axis1d

Returns new Axis1d object with direction received by performing a reverse() operation to this object.

Returns

Axis1d


rotate()

rotate(axis, angle): this

Rotates this axis around axis on angle.

Parameters

axis

Axis1d

Rotation axis.

angle

number

Rotation angle.

Returns

this


rotated()

rotated(axis, angle): Axis1d

Returns new Axis1d object with coordinates received by performing a rotate() operation to this object.

Parameters

axis

Axis1d

Rotation axis.

angle

number

Rotation angle.

Returns

Axis1d


scale()

scale(point, scale): this

Scales this location.

Parameters

point

Point

Other point.

scale

number

Scale value.

Returns

this


scaled()

scaled(point, scale): Axis1d

Returns new Axis1d object with location received by performing a scale() operation to this object.

Parameters

point

Point

Other point.

scale

number

Scale value.

Returns

Axis1d


transform()

transform(transformation): this

Transforms coordinates of this axis according to transformation.

Parameters

transformation

Transformation

Transformation.

Returns

this


transformed()

transformed(transformation): Axis1d

Returns new Axis1d object with coordinates received by performing a Axis1::transform transform() operation to this object.

Parameters

transformation

Transformation

Transformation.

Returns

Axis1d


translate()

translate(vector): this

Translates this axis.

Parameters

vector

Vector

Translation vector.

Returns

this


translated()

translated(vector): Axis1d

Returns new Axis1d object with coordinates received by performing a translate() operation to this object.

Parameters

vector

Vector

Translation vector.

Returns

Axis1d


ox()

static ox(): Axis1d

Returns Axis1d with location in Point::origin origin and direction as Direction::xDir xDir.

Returns

Axis1d


oy()

static oy(): Axis1d

Returns Axis1d with location in Point::origin origin and direction as Direction::yDir yDir.

Returns

Axis1d


oz()

static oz(): Axis1d

Returns Axis1d with location in Point::origin origin and direction as Direction::zDir zDir.

Returns

Axis1d