@manycore/idp-sdk
Advanced tools
Comparing version 1.0.0-alpha.11 to 1.0.0-alpha.12
{ | ||
"name": "@manycore/idp-sdk", | ||
"version": "1.0.0-alpha.11", | ||
"version": "1.0.0-alpha.12", | ||
"description": "idp sdk typings", | ||
@@ -5,0 +5,0 @@ "homepage": "", |
@@ -525,2 +525,15 @@ // QunHe Math API: | ||
/** | ||
* Face2d boolean result | ||
*/ | ||
export interface KFaceBooleanRet { | ||
/** | ||
* Whether the boolean operation is succeeded or not. | ||
*/ | ||
success: boolean; | ||
/** | ||
* The result faces of boolean operation. | ||
*/ | ||
resultFaces: KFace2d[]; | ||
} | ||
/** | ||
* The KGeometry class defines a number of methods that let you perform different geometric operations, | ||
@@ -546,2 +559,8 @@ * such as creating geometric curves, surfaces, using geometric algorithms, etc. | ||
/** | ||
* Creates an instance of KVector2d | ||
* @param x The x value of the 2D vector | ||
* @param y The y value of the 2D vector | ||
*/ | ||
createVector2d(x: number, y: number): KVector2d; | ||
/** | ||
* Creates an instance of KVector3d. | ||
@@ -565,2 +584,29 @@ * @param x The x value of the 3D vector. | ||
*/ | ||
createIdentityMatrix3(): KMatrix4; | ||
/** | ||
* Create an translation transform matrix. | ||
* @param x The amount to translate in the X axis. | ||
* @param y The amount to translate in the Y axis. | ||
* @returns The translation transform matrix. | ||
*/ | ||
createTranslationMatrix3(x: number, y: number): KMatrix3; | ||
/** | ||
* Create an transform matrix that does rotation about an axis. | ||
* The axis is defined by a point and a vector. The angle is given in radians. | ||
* @param angle The angle of rotation in radians. | ||
* @param center The point to define the axis. | ||
* @returns The rotation transform matrix. | ||
*/ | ||
createRotateMatrix3(angle: number, center: KPoint2d): KMatrix3; | ||
/** | ||
* Create a matrix as scale transform. | ||
* @param x The amount to scale in the X axis. | ||
* @param y The amount to scale in the Y axis. | ||
* @returns The scale transform matrix. | ||
*/ | ||
createScaleMatrix3(x: number, y: number): KMatrix3; | ||
/** | ||
* Create an identity matrix. | ||
* @returns The identity matrix. | ||
*/ | ||
createIdentityMatrix4(): KMatrix4; | ||
@@ -593,2 +639,11 @@ /** | ||
/** | ||
* Create a transformation matrix which align global ccs to the given ccs. | ||
* @param x The x direction of the given coordinate system. | ||
* @param y The y direction of the given coordinate system. | ||
* @param z The z direction of the given coordinate system. | ||
* @param origin The origin of the given coordinate system. | ||
* @returns The transformation matrix. | ||
*/ | ||
createAlignCCSMatrix4(x: KVector3d, y: KVector3d, z: KVector3d, origin: KPoint3d): KMatrix4; | ||
/** | ||
* Creates an instance of KLine3d. | ||
@@ -775,5 +830,5 @@ * @param point The origin point of the 3D line. | ||
* @param type the boolean type | ||
* @param resultFaces the boolean result. | ||
* @returns The KFaceBooleanRet includes result faces and success status. | ||
*/ | ||
faces2dBoolean(faces1: KFace2d[], faces2: KFace2d[], type: KFaceBooleanType, resultFaces: KFace2d[]): boolean; | ||
faces2dBoolean(faces1: KFace2d[], faces2: KFace2d[], type: KFaceBooleanType): KFaceBooleanRet; | ||
} | ||
@@ -1164,2 +1219,9 @@ /** | ||
/** | ||
* Get signed distance between the point and the plane. | ||
* If the point is on the positive normal side, the sign is +, otherwise it's - | ||
* @param point | ||
* @return | ||
*/ | ||
signedDistanceTo(point: KPoint3d): number; | ||
/** | ||
* Return the cloned surface of this. | ||
@@ -1331,2 +1393,11 @@ * @returns The cloned surface. | ||
/** | ||
* Check if the two vectors are in same direction, meaning on the same side. | ||
* @param other The vector to compare this vector with. | ||
* @param distanceTolerance It will provide distance tolerance when the length of vectors are measured.The default value is 1e-6. | ||
* @param cosTolerance It will provide cosine tolerance when the direction of vectors are measured.The default value is 1e-6. | ||
* @param checkFuzzyZeroVec The default value is true. | ||
* @returns Return true if same, otherwise return false. | ||
*/ | ||
isOnSameSide(other: KVector2d, distanceTolerance?: number, cosTolerance?: number, checkFuzzyZeroVec?: boolean): boolean; | ||
/** | ||
* Check if this vector is opposite with other vector with specified tolerance. | ||
@@ -1467,3 +1538,3 @@ * If checkFuzzyZeroVec is true, any vector's length is nearly zero within the tolerance, false will be returned directly. | ||
/** | ||
* Check if this vector is same direction with other vector with specified tolerance. | ||
* Check if the directions of two vectors are equal within specified tolerance. | ||
* If checkFuzzyZeroVec is true, any vector's length is nearly zero within the tolerance, false will be returned directly. | ||
@@ -1479,2 +1550,11 @@ * If checkFuzzyZeroVec if false, only when any vector's length is exact 0, false will be returned directly. | ||
/** | ||
* Check if the two vectors are in same direction, meaning on the same side. | ||
* @param other The vector to compare this vector with. | ||
* @param distanceTolerance It will provide distance tolerance when the length of vectors are measured.The default value is 1e-6. | ||
* @param cosTolerance It will provide cosine tolerance when the direction of vectors are measured.The default value is 1e-6. | ||
* @param checkFuzzyZeroVec The default value is true. | ||
* @returns Return true if same, otherwise return false. | ||
*/ | ||
isOnSameSide(other: KVector3d, distanceTolerance?: number, cosTolerance?: number, checkFuzzyZeroVec?: boolean): boolean; | ||
/** | ||
* Check if this vector is opposite with other vector with specified tolerance. | ||
@@ -1481,0 +1561,0 @@ * If checkFuzzyZeroVec is true, any vector's length is nearly zero within the tolerance, false will be returned directly. |
64512
1805