[mxcad_3d API Document](../README. md)/Mx3dGeomBizierSurface
Class: Mx3dGeomBezierSurface
Represents a Bezier surface, inherited from Mx3dGeomSounddSurface. Provide multiple operations and query methods to handle Bezier surfaces.
Hierarchy
↳
Mx3dGeomBezierSurface
Table of contents
Constructors
Methods
- Bounds
- Continuity
- Copy
- D0
- D1
- D2
- D3
- DN
- DynCast
- DynamicType
- ExchangeUV
- Face
- Increase
- InsertPoleColAfter
- InsertPoleColBefore
- InsertPoleRowAfter
- InsertPoleRowBefore
- IsCNu
- IsCNv
- IsUClosed
- IsUPeriodic
- IsURational
- IsVClosed
- IsVPeriodic
- IsVRational
- MirrorByAxis
- MirrorByCSYSR
- MirrorByPoint
- MirroredByAxis
- MirroredByCSYSR
- MirroredByPoint
- NbUPoles
- NbVPoles
- Pole
- Poles
- RemovePoleCol
- RemovePoleRow
- Rotate
- Rotated
- Scale
- Scaled
- Segment
- SetPole
- SetPoleCol
- SetPoleRow
- SetWeight
- SetWeightCol
- SetWeightRow
- Transform
- TransformParameters
- Transformed
- TranslateBy2Points
- TranslateByVec
- TranslatedBy2Points
- TranslatedByVec
- UDegree
- UPeriod
- UReverse
- UReversed
- UReversedParameter
- VPeriod
- VReverse
- VReversed
- VReversedParameter
- Value
- Weight
- Weights
- DownCast
Constructors
constructor
• new Mx3dGeomBezierSurface(SurfacePoles
, PoleWeights?
)
Constructor is used to create a Bezier surface.
Parameters
Name | Type | Description |
---|---|---|
SurfacePoles | [Mx3dGePoint. md] [] | Control point array, in the form of a two-dimensional array |
PoleWeights? | Number [] [] | Control point weight array (optional) |
Overrides
Mx3dGeomBoundedSurface.constructor
Methods
Bounds
▸ Bounds(U1U2V1V2
): void
Obtain the boundary range of the surface.
Parameters
Name | Type | Description |
---|---|---|
U1U2V1V2 | [dU1: number, dU2: number, dV1: number, dV2: number] | Range array |
Returns
void
Continuity
▸ Continuity(): MxGAShapeEnum
Obtain the continuity of the surface.
Returns
Return the continuity enumeration value.
Copy
▸ Copy(): Mx3dGeomObject
Copy the current surface object.
Returns
Return a new surface object.
D0
▸ D0(U
, V
, P
): void
Calculate the zero derivative of a surface at a specified point.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U value |
V | number | parameter V value |
P | [Mx3dGePoint] (Mx3dGePoint. md) | Output point |
Returns
void
D1
▸ D1(U
, V
, P
, D1U
, D1V
): void
Calculate the first derivative of a surface at a specified point.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U value |
V | number | parameter V value |
P | [Mx3dGePoint] (Mx3dGePoint. md) | Output point |
D1U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first-order derivative vector in the U direction |
D1V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first derivative vector in the V direction |
Returns
void
D2
▸ D2(U
, V
, P
, D1U
, D1V
, D2U
, D2V
, D2UV
): void
Calculate the second derivative of a surface at a specified point.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U value |
V | number | parameter V value |
P | [Mx3dGePoint] (Mx3dGePoint. md) | Output point |
D1U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first-order derivative vector in the U direction |
D1V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first derivative vector in the V direction |
D2U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative vector in the U direction |
D2V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative vector in the V direction |
D2UV | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative vector in the UV direction |
Returns
void
D3
▸ D3(U
, V
, P
, D1U
, D1V
, D2U
, D2V
, D2UV
, D3U
, D3V
, D3UUV
, D3UVV
): void
Calculate the third derivative of a surface at a specified point.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U value |
V | number | parameter V value |
P | [Mx3dGePoint] (Mx3dGePoint. md) | Output point |
D1U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first-order derivative vector in the U direction |
D1V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the first derivative vector in the V direction |
D2U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative vector in the U direction |
D2V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative vector in the V direction |
D2UV | [Mx3dGeVec] (Mx3dGeVec. md) | Output the second derivative vector in the UV direction |
D3U | [Mx3dGeVec] (Mx3dGeVec. md) | Output the third derivative vector in the U direction |
D3V | [Mx3dGeVec] (Mx3dGeVec. md) | Output the third derivative vector in the V direction |
D3UUV | [Mx3dGeVec] (Mx3dGeVec. md) | Output the third derivative vector in the UU direction |
D3UVV | [Mx3dGeVec] (Mx3dGeVec. md) | Output the third derivative vector in the UV direction |
Returns
void
DN
▸ DN(U
, V
, Nu
, Nv
): Mx3dGeVec
Calculate the Nth derivative of a surface at a specified point.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U value |
V | number | parameter V value |
Nu | number | U-direction order |
Nv | number | order in the V direction |
Returns
Return the derivative vector.
DynCast
▸ DynCast(theObject
): Mx3dGeomBezierSurface
Parameters
Name | Type |
---|---|
theObject | Mx3dGeomObject |
Returns
Overrides
Mx3dGeomBoundedSurface.DynCast
DynamicType
▸ DynamicType(): string
Return the dynamic type string of the object.
Returns
string
Dynamic type string.
Inherited from
Mx3dGeomBoundedSurface.DynamicType
ExchangeUV
▸ ExchangeUV(): void
Exchange the order of U and V directions.
Returns
void
Face
▸ Face(TolDegen
): Mx3dShapeFace
Generate patches based on tolerance.
Parameters
Name | Type | Description |
---|---|---|
Tolerant | Number | Tolerance |
Returns
Return the generated patch object.
▸ Face(W
, Inside
): Mx3dShapeFace
Generate patches based on lines and whether they are generated internally.
Parameters
Name | Type | Description |
---|---|---|
W | [Mx3dShapeWire] (Mx3dShapeWire. md) | Line object |
Inside | boolean | Is it inside |
Returns
Return the generated patch object.
▸ Face(UMin
, UMax
, VMin
, VMax
, TolDegen
): Mx3dShapeFace
Generate patches based on U, V range and tolerance.
Parameters
Name | Type | Description |
---|---|---|
UMin | number | minimum value in the U direction |
UMax | number | maximum value in the U direction |
VMin | number | minimum value in the V direction |
VMax | number | maximum value in the V direction |
Tolerant | Number | Tolerance |
Returns
Return the generated patch object.
Increase
▸ Increase(UDeg
, VDeg
): void
Increase the order of the surface.
Parameters
Name | Type | Description |
---|---|---|
UDeg | number | increase order in the U direction |
VDeg | number | increase order in the V direction |
Returns
void
InsertPoleColAfter
▸ InsertPoleColAfter(VIndex
, CPoles
, CPoleWeights?
): void
Insert a new control point column after the specified column.
Parameters
Name | Type | Description |
---|---|---|
Index of column 'VIndes' | ' number ' | |
CPoles | [Mx3dGePoint] (Mx3dGePoint. md) [] | Control point array to be inserted |
CPoleWeights? | Number [] | Control point weight array (optional) |
Returns
void
InsertPoleColBefore
▸ InsertPoleColBefore(VIndex
, CPoles
, CPoleWeights?
): void
Insert a new control point column before the specified column.
Parameters
Name | Type | Description |
---|---|---|
Index of column 'VIndes' | ' number ' | |
CPoles | [Mx3dGePoint] (Mx3dGePoint. md) [] | Control point array to be inserted |
CPoleWeights? | Number [] | Control point weight array (optional) |
Returns
void
InsertPoleRowAfter
▸ InsertPoleRowAfter(UIndex
, CPoles
, CPoleWeights?
): void
Insert a new control point row after the specified row.
Parameters
Name | Type | Description |
---|---|---|
The index of the 'UIndes' | ' number ' | row |
CPoles | [Mx3dGePoint] (Mx3dGePoint. md) [] | Control point array to be inserted |
CPoleWeights? | Number [] | Control point weight array (optional) |
Returns
void
InsertPoleRowBefore
▸ InsertPoleRowBefore(UIndex
, CPoles
, CPoleWeights?
): void
Insert a new control point line before the specified line.
Parameters
Name | Type | Description |
---|---|---|
The index of the 'UIndes' | ' number ' | row |
CPoles | [Mx3dGePoint] (Mx3dGePoint. md) [] | Control point array to be inserted |
CPoleWeights? | Number [] | Control point weight array (optional) |
Returns
void
IsCNu
▸ IsCNu(N
): boolean
Determine the continuous order in the U direction.
Parameters
Name | Type | Description |
---|---|---|
N | number | order |
Returns
boolean
Returns a Boolean value indicating whether it is continuous.
IsCNv
▸ IsCNv(N
): boolean
Determine the continuous order in the V direction.
Parameters
Name | Type | Description |
---|---|---|
N | number | order |
Returns
boolean
Returns a Boolean value indicating whether it is continuous.
IsUClosed
▸ IsUClosed(): boolean
Determine whether the U direction is closed.
Returns
boolean
Returns a Boolean value indicating whether it is closed or not.
IsUPeriodic
▸ IsUPeriodic(): boolean
Determine whether the U direction is periodic.
Returns
boolean
Return a Boolean value indicating whether it is periodic.
IsURational
▸ IsURational(): boolean
Determine whether the U direction is a rational surface.
Returns
boolean
Returns the Boolean value of a rational surface.
IsVClosed
▸ IsVClosed(): boolean
Determine whether the V direction is closed.
Returns
boolean
Returns a Boolean value indicating whether it is closed or not.
IsVPeriodic
▸ IsVPeriodic(): boolean
Determine whether the V direction is periodic.
Returns
boolean
Return a Boolean value indicating whether it is periodic.
IsVRational
▸ IsVRational(): boolean
Determine whether the V direction is a rational surface.
Returns
boolean
Returns the Boolean value of a rational surface.
MirrorByAxis
▸ MirrorByAxis(A1
): void
Mirror transform geometric objects through axes.
Parameters
Name | Type | Description |
---|---|---|
A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object |
Returns
void
Inherited from
Mx3dGeomBoundedSurface.MirrorByAxis
MirrorByCSYSR
▸ MirrorByCSYSR(A2
): void
Mirror transform geometric objects using a right-handed coordinate system.
Parameters
Name | Type | Description |
---|---|---|
A2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Right hand coordinate system object |
Returns
void
Inherited from
Mx3dGeomBoundedSurface.MirrorByCSYSR
MirrorByPoint
▸ MirrorByPoint(P
): void
Mirror transform geometric objects through points.
Parameters
Name | Type | Description |
---|---|---|
P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object |
Returns
void
Inherited from
Mx3dGeomBoundedSurface.MirrorByPoint
MirroredByAxis
▸ MirroredByAxis(A1
): Mx3dGeomBezierSurface
Return the new geometric object transformed through axis mirroring.
Parameters
Name | Type | Description |
---|---|---|
A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object |
Returns
New geometric objects.
Inherited from
Mx3dGeomBoundedSurface.MirroredByAxis
MirroredByCSYSR
▸ MirroredByCSYSR(A2
): Mx3dGeomBezierSurface
Return the new geometric object after mirror transformation through the right-handed coordinate system.
Parameters
Name | Type | Description |
---|---|---|
A2 | [Mx3dGeCSYSR] (Mx3dGeCSYSR. md) | Right hand coordinate system object |
Returns
New geometric objects.
Inherited from
Mx3dGeomBoundedSurface.MirroredByCSYSR
MirroredByPoint
▸ MirroredByPoint(P
): Mx3dGeomBezierSurface
Return the new geometric object after point mirror transformation.
Parameters
Name | Type | Description |
---|---|---|
P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object |
Returns
New geometric objects.
Inherited from
Mx3dGeomBoundedSurface.MirroredByPoint
NbUPoles
▸ NbUPoles(): number
Obtain the number of control points in the U direction.
Returns
number
Return the number of control points in the U direction.
NbVPoles
▸ NbVPoles(): number
Obtain the number of control points in the V direction.
Returns
number
Return the number of control points in the V direction.
Pole
▸ Pole(UIndex
, VIndex
): Mx3dGePoint
Retrieve the specified control point location.
Parameters
Name | Type | Description |
---|---|---|
UIndes | number | U-direction index |
VIndes | number | index in the V direction |
Returns
Return to the control point location.
Poles
▸ Poles(): Mx3dGePoint
[][]
Retrieve all control point arrays.
Returns
Mx3dGePoint
[][]
Return a two-dimensional array of control points.
RemovePoleCol
▸ RemovePoleCol(VIndex
): void
Remove the control point of the specified column.
Parameters
Name | Type | Description |
---|---|---|
Index of column 'VIndes' | ' number ' |
Returns
void
RemovePoleRow
▸ RemovePoleRow(UIndex
): void
Remove the control point of the specified row.
Parameters
Name | Type | Description |
---|---|---|
The index of the 'UIndes' | ' number ' | row |
Returns
void
Rotate
▸ Rotate(A1
, Ang
): void
Rotate geometric objects.
Parameters
Name | Type | Description |
---|---|---|
A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object |
Ang | number | Rotation angle |
Returns
void
Inherited from
Rotated
▸ Rotated(A1
, Ang
): Mx3dGeomBezierSurface
Return the rotated new geometric object.
Parameters
Name | Type | Description |
---|---|---|
A1 | [Mx3dGeAxis] (Mx3dGeAxis. md) | Axis object |
Ang | number | Rotation angle |
Returns
New geometric objects.
Inherited from
Mx3dGeomBoundedSurface.Rotated
Scale
▸ Scale(P
, S
): void
Scale geometric objects.
Parameters
Name | Type | Description |
---|---|---|
P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object |
S | number | scaling ratio |
Returns
void
Inherited from
Scaled
▸ Scaled(P
, S
): Mx3dGeomBezierSurface
Return the scaled new geometric object.
Parameters
Name | Type | Description |
---|---|---|
P | [Mx3dGePoint] (Mx3dGePoint. md) | Point object |
S | number | scaling ratio |
Returns
New geometric objects.
Inherited from
Segment
▸ Segment(U1
, U2
, V1
, V2
): void
Define a part of the surface and specify the range of U and V.
Parameters
Name | Type | Description |
---|---|---|
U1 | number | Starting U value |
U2 | number | End U value |
V1 | number | Starting V value |
V2 | Number | End V value |
Returns
void
SetPole
▸ SetPole(UIndex
, VIndex
, P
, Weight?
): void
Set control points and weights for the specified location.
Parameters
Name | Type | Description |
---|---|---|
UIndes | number | U-direction index |
VIndes | number | index in the V direction |
P | [Mx3dGePoint] (Mx3dGePoint. md) | Control point position |
Weight? | Number | Control point weights (optional) |
Returns
void
SetPoleCol
▸ SetPoleCol(VIndex
, CPoles
, CPoleWeights?
): void
Set the control points and weights for the specified column.
Parameters
Name | Type | Description |
---|---|---|
Index of column 'VIndes' | ' number ' | |
CPoles | [Mx3dGePoint] (Mx3dGePoint. md) [] | Control point array |
CPoleWeights? | Number [] | Control point weight array (optional) |
Returns
void
SetPoleRow
▸ SetPoleRow(UIndex
, CPoles
, CPoleWeights?
): void
Set the control points and weights for the specified row.
Parameters
Name | Type | Description |
---|---|---|
The index of the 'UIndes' | ' number ' | row |
CPoles | [Mx3dGePoint] (Mx3dGePoint. md) [] | Control point array |
CPoleWeights? | Number [] | Control point weight array (optional) |
Returns
void
SetWeight
▸ SetWeight(UIndex
, VIndex
, Weight
): void
Set the weight of the specified control point.
Parameters
Name | Type | Description |
---|---|---|
UIndes | number | U-direction index |
VIndes | number | index in the V direction |
Weight | number | weight value |
Returns
void
SetWeightCol
▸ SetWeightCol(VIndex
, CPoleWeights
): void
Set the control point weights for the specified column.
Parameters
Name | Type | Description |
---|---|---|
Index of column 'VIndes' | ' number ' | |
CPoleWeights | number [] | Control point weight array |
Returns
void
SetWeightRow
▸ SetWeightRow(UIndex
, CPoleWeights
): void
Set the control point weights for the specified row.
Parameters
Name | Type | Description |
---|---|---|
The index of the 'UIndes' | ' number ' | row |
CPoleWeights | number [] | Control point weight array |
Returns
void
Transform
▸ Transform(T
): void
Apply transformation matrix to surface.
Parameters
Name | Type | Description |
---|---|---|
T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform matrix |
Returns
void
TransformParameters
▸ TransformParameters(UV
, T
): void
Transform the surface parameters according to the given transformation matrix T.
Parameters
Name | Type | Description |
---|---|---|
UV | [dU: number, dV: number] | Parameter array containing the values of U and V |
T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform matrix |
Returns
void
Inherited from
Mx3dGeomBoundedSurface.TransformParameters
Transformed
▸ Transformed(T
): Mx3dGeomBezierSurface
Return the transformed new geometric object.
Parameters
Name | Type | Description |
---|---|---|
T | [Mx3dGetStrf] (Mx3dGetStrf. md) | Transform the object |
Returns
New geometric objects.
Inherited from
Mx3dGeomBoundedSurface.Transformed
TranslateBy2Points
▸ TranslateBy2Points(P1
, P2
): void
Translate geometric objects through two points.
Parameters
Name | Type | Description |
---|---|---|
P1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting point object |
P2 | [Mx3dGePoint] (Mx3dGePoint. md) | End point object |
Returns
void
Inherited from
Mx3dGeomBoundedSurface.TranslateBy2Points
TranslateByVec
▸ TranslateByVec(V
): void
Translate geometric objects through vectors.
Parameters
Name | Type | Description |
---|---|---|
V | [Mx3dGeVec] (Mx3dGeVec. md) | Vector object |
Returns
void
Inherited from
Mx3dGeomBoundedSurface.TranslateByVec
TranslatedBy2Points
▸ TranslatedBy2Points(P1
, P2
): Mx3dGeomBezierSurface
Return the new geometric object after translating through two points.
Parameters
Name | Type | Description |
---|---|---|
P1 | [Mx3dGePoint] (Mx3dGePoint. md) | Starting point object |
P2 | [Mx3dGePoint] (Mx3dGePoint. md) | End point object |
Returns
New geometric objects.
Inherited from
Mx3dGeomBoundedSurface.TranslatedBy2Points
TranslatedByVec
▸ TranslatedByVec(V
): Mx3dGeomBezierSurface
Return the new geometric object after vector translation.
Parameters
Name | Type | Description |
---|---|---|
V | [Mx3dGeVec] (Mx3dGeVec. md) | Vector object |
Returns
New geometric objects.
Inherited from
Mx3dGeomBoundedSurface.TranslatedByVec
UDegree
▸ UDegree(): number
Obtain the order in the U direction.
Returns
number
Return the order in the U direction.
UPeriod
▸ UPeriod(): number
Return the period of the surface in the U direction.
Returns
number
The period of the surface in the U direction.
Inherited from
Mx3dGeomBoundedSurface.UPeriod
UReverse
▸ UReverse(): void
Reverse the parameter in the U direction.
Returns
void
UReversed
▸ UReversed(): Mx3dGeomBezierSurface
Parameterization of reversing the U direction.
Returns
Return the current object to implement a chain call.
Inherited from
Mx3dGeomBoundedSurface.UReversed
UReversedParameter
▸ UReversedParameter(U
): number
Calculate the reverse U parameter.
Parameters
Name | Type | Description |
---|---|---|
U | number | parameter U value |
Returns
number
Return the reverse parameter.
VPeriod
▸ VPeriod(): number
Return the period of the surface in the V direction.
Returns
number
The period of the surface in the V direction.
Inherited from
Mx3dGeomBoundedSurface.VPeriod
VReverse
▸ VReverse(): void
Reverse the parameters in the V direction.
Returns
void
VReversed
▸ VReversed(): Mx3dGeomBezierSurface
Parameterization of reversing the V direction.
Returns
Return the current object to implement a chain call.
Inherited from
Mx3dGeomBoundedSurface.VReversed
VReversedParameter
▸ VReversedParameter(V
): number
Calculate the reverse V parameter.
Parameters
Name | Type | Description |
---|---|---|
V | number | parameter V value |
Returns
number
Return the reverse parameter.
Value
▸ Value(U
, V
): Mx3dGePoint
Calculate the points on the surface corresponding to the parameters (U, V).
Parameters
Name | Type | Description |
---|---|---|
U | number | Surface parameter U |
V | number | Surface parameter V |
Returns
Corresponding point.
Inherited from
Weight
▸ Weight(UIndex
, VIndex
): number
Obtain the weight of the specified control point.
Parameters
Name | Type | Description |
---|---|---|
UIndes | number | U-direction index |
VIndes | number | index in the V direction |
Returns
number
Return weight values.
Weights
▸ Weights(): number
[][]
Retrieve an array of all control point weights.
Returns
number
[][]
Return a two-dimensional array of control point weights.
DownCast
▸ Static
DownCast(theObject
): Mx3dGeomBezierSurface
Parameters
Name | Type |
---|---|
theObject | Mx3dGeomObject |