Skip to content

[mxcad_3d API Document](../README. md)/Mx3dGeCylinder

Class: Mx3dGeCylinder

Represents a class of cylinders.

Hierarchy

Table of contents

Constructors

Methods

Constructors

constructor

new Mx3dGeCylinder()

Create a default cylindrical object.

Overrides

Mx3dGeObject.constructor

new Mx3dGeCylinder(theA3, theRadius)

Create a cylindrical object using a coordinate system and radius.

Parameters

NameTypeDescription
TheA3[Mx3dGeCSYS] (Mx3dGeCSYS. md)Coordinate system
TheRadiusNumberThe radius of a cylinder

Overrides

Mx3dGeObject.constructor

Methods

Axis

Axis(): Mx3dGeAxis

Obtain the axis of the cylinder.

Returns

Mx3dGeAxis

The axis of a cylinder.


Direct

Direct(): boolean

Check if the direction of the cylinder is positive.

Returns

boolean

Is it positive.


Location

Location(): Mx3dGePoint

Get the origin position of the cylinder.

Returns

Mx3dGePoint

Origin position.


MirrorByAxis

MirrorByAxis(theA1): void

Mirror the cylinder through an axis.

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Mirror axis

Returns

void


MirrorByCSYSR

MirrorByCSYSR(theA2): void

Mirror the cylinder using the right-hand coordinate system.

Parameters

NameTypeDescription
TheA2[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Right hand coordinate system

Returns

void


MirrorByPoint

MirrorByPoint(theP): void

Mirror a cylinder through a point.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Mirror point

Returns

void


MirroredByAxis

MirroredByAxis(theA1): Mx3dGeCylinder

Mirror a cylinder through an axis and return the mirrored cylinder object.

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Mirror axis

Returns

Mx3dGeCylinder

The mirrored cylindrical object.


MirroredByCSYSR

MirroredByCSYSR(theA2): Mx3dGeCylinder

Mirror the cylinder using the right-hand coordinate system and return the mirrored cylinder object.

Parameters

NameTypeDescription
TheA2[Mx3dGeCSYSR] (Mx3dGeCSYSR. md)Right hand coordinate system

Returns

Mx3dGeCylinder

The mirrored cylindrical object.


MirroredByPoint

MirroredByPoint(theP): Mx3dGeCylinder

Mirror a cylinder through a point and return the mirrored cylinder object.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Mirror point

Returns

Mx3dGeCylinder

The mirrored cylindrical object.


Position

Position(): Mx3dGeCSYS

Get the position of the cylinder.

Returns

Mx3dGeCSYS

The position of the cylinder.


Radius

Radius(): number

Get the radius of the cylinder.

Returns

number

The radius of a cylinder.


Rotate

Rotate(theA1, theAng): void

Rotate the cylinder around its axis.

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Rotation axis
TheAngNumberRotation angle

Returns

void


Rotated

Rotated(theA1, theAng): Mx3dGeCylinder

Rotate the cylinder around its axis and return the rotated cylinder object.

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Rotation axis
TheAngNumberRotation angle

Returns

Mx3dGeCylinder

The rotated cylindrical object.


Scale

Scale(theP, theS): void

Scale the cylinder.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Zoom center point
TheSNumberScale ratio

Returns

void


Scaled

Scaled(theP, theS): Mx3dGeCylinder

Scale the cylinder and return the scaled cylinder object.

Parameters

NameTypeDescription
TheP[Mx3dGePoint] (Mx3dGePoint. md)Zoom center point
TheSNumberScale ratio

Returns

Mx3dGeCylinder

The scaled cylindrical object.


SetAxis

SetAxis(theA1): void

Set the axis of the cylinder.

Parameters

NameTypeDescription
TheA1[Mx3dGeAxis] (Mx3dGeAxis. md)Axis of the cylinder

Returns

void


SetLocation

SetLocation(theLoc): void

Set the origin position of the cylinder.

Parameters

NameTypeDescription
TheLoc[Mx3dGePoint] (Mx3dGePoint. md)Origin position

Returns

void


SetPosition

SetPosition(theA3): void

Set the position of the cylinder.

Parameters

NameTypeDescription
TheA3[Mx3dGeCSYS] (Mx3dGeCSYS. md)Coordinate system

Returns

void


SetRadius

SetRadius(theR): void

Set the radius of the cylinder.

Parameters

NameTypeDescription
TheRNumberThe radius of the cylinder

Returns

void


Shape

Shape(H, Angle?): Mx3dShapeObject

Create an Mx3dShapeObject object to represent the shape of a cylinder.

Parameters

NameTypeDescription
HnumberThe height of the cylinder
Angle?NumberOptional parameter, representing the angle of the cylinder

Returns

Mx3dShapeObject

Return a new Mx3dShapeObject object representing the shape of a cylinder.


Transform

Transform(theT): void

Transform the cylinder.

Parameters

NameTypeDescription
theT[Mx3dGeTsf] (Mx3dGeTsf. md)Transform matrix

Returns

void


Transformed

Transformed(theT): Mx3dGeCylinder

Transform the cylinder and return the transformed cylinder object.

Parameters

NameTypeDescription
theT[Mx3dGeTsf] (Mx3dGeTsf. md)Transform matrix

Returns

Mx3dGeCylinder

The transformed cylindrical object.


TranslateBy2Points

TranslateBy2Points(theP1, theP2): void

Translate the position of the cylinder along a straight line between two points.

Parameters

NameTypeDescription
TheP1[Mx3dGePoint] (Mx3dGePoint. md)The first point used to determine the starting point of translation
TheP2[Mx3dGePoint] (Mx3dGePoint. md)The second point is used to determine the endpoint of the translation

Returns

void


TranslateByVec

TranslateByVec(theV): void

Translate the cylinder through a vector.

Parameters

NameTypeDescription
TheV[Mx3dGeVec] (Mx3dGeVec. md)Translation vector

Returns

void


TranslatedBy2Points

TranslatedBy2Points(theP1, theP2): Mx3dGeCylinder

Create a new cylindrical object and translate its position along a line between two points.

Parameters

NameTypeDescription
TheP1[Mx3dGePoint] (Mx3dGePoint. md)The first point used to determine the starting point of translation
TheP2[Mx3dGePoint] (Mx3dGePoint. md)The second point is used to determine the endpoint of the translation

Returns

Mx3dGeCylinder

Return a new Mx3dGeCylinder object, the translated cylinder.


TranslatedByVec

TranslatedByVec(theV): Mx3dGeCylinder

Translate the cylinder through a vector and return the translated cylinder object.

Parameters

NameTypeDescription
TheV[Mx3dGeVec] (Mx3dGeVec. md)Translation vector

Returns

Mx3dGeCylinder

Translated cylindrical object.


UReverse

UReverse(): void

Reverse the U-parameter direction of the cylinder.

Returns

void


VReverse

VReverse(): void

Reverse the V-parameter direction of the cylinder.

Returns

void


XAxis

XAxis(): Mx3dGeAxis

Obtain the X-axis of the cylinder.

Returns

Mx3dGeAxis

X-axis.


YAxis

YAxis(): Mx3dGeAxis

Obtain the Y-axis of the cylinder.

Returns

Mx3dGeAxis

Y-axis.