archiyou 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +215 -0
- package/dist/archiyou.js +35969 -0
- package/dist/index.d.ts +2 -0
- package/dist/src/Annotator.d.ts +55 -0
- package/dist/src/AnnotatorBaseAnnotation.d.ts +16 -0
- package/dist/src/AnnotatorDimensionLine.d.ts +92 -0
- package/dist/src/Bbox.d.ts +126 -0
- package/dist/src/Beams.d.ts +316 -0
- package/dist/src/Brep.d.ts +152 -0
- package/dist/src/Calc.d.ts +48 -0
- package/dist/src/CalcDb.d.ts +33 -0
- package/dist/src/CalcTable.d.ts +60 -0
- package/dist/src/CalcTableIO.d.ts +130 -0
- package/dist/src/CodeParser.d.ts +58 -0
- package/dist/src/ComponentManager.d.ts +33 -0
- package/dist/src/Console.d.ts +34 -0
- package/dist/src/Doc.d.ts +181 -0
- package/dist/src/DocDocument.d.ts +27 -0
- package/dist/src/DocPDFExporter.d.ts +105 -0
- package/dist/src/DocPage.d.ts +75 -0
- package/dist/src/DocPageContainer.d.ts +65 -0
- package/dist/src/DocPageContainerGraphic.d.ts +10 -0
- package/dist/src/DocPageContainerImage.d.ts +21 -0
- package/dist/src/DocPageContainerTable.d.ts +21 -0
- package/dist/src/DocPageContainerText.d.ts +23 -0
- package/dist/src/DocPageContainerTextArea.d.ts +23 -0
- package/dist/src/DocPageContainerView.d.ts +22 -0
- package/dist/src/DocUtils.d.ts +12 -0
- package/dist/src/DocViewSVGManager.d.ts +91 -0
- package/dist/src/Edge.d.ts +190 -0
- package/dist/src/Exporter.d.ts +100 -0
- package/dist/src/Face.d.ts +134 -0
- package/dist/src/GLTFBuilder.d.ts +30 -0
- package/dist/src/IO.d.ts +87 -0
- package/dist/src/LibraryConnector.d.ts +56 -0
- package/dist/src/Make.d.ts +85 -0
- package/dist/src/MakeOperations.d.ts +32 -0
- package/dist/src/OBbox.d.ts +121 -0
- package/dist/src/Obj.d.ts +104 -0
- package/dist/src/OcLoader.d.ts +39 -0
- package/dist/src/ParamManager.d.ts +57 -0
- package/dist/src/ParamManagerOperator.d.ts +68 -0
- package/dist/src/Pipeline.d.ts +20 -0
- package/dist/src/Point.d.ts +88 -0
- package/dist/src/Runner.d.ts +230 -0
- package/dist/src/RunnerComponentImporter.d.ts +71 -0
- package/dist/src/RunnerOps.d.ts +15 -0
- package/dist/src/Script.d.ts +78 -0
- package/dist/src/ScriptOutputManager.d.ts +19 -0
- package/dist/src/ScriptOutputPath.d.ts +48 -0
- package/dist/src/ScriptParam.d.ts +78 -0
- package/dist/src/Selector.d.ts +48 -0
- package/dist/src/Services.d.ts +68 -0
- package/dist/src/Shape.d.ts +628 -0
- package/dist/src/ShapeCollection.d.ts +429 -0
- package/dist/src/Shell.d.ts +48 -0
- package/dist/src/Sketch.d.ts +162 -0
- package/dist/src/Solid.d.ts +54 -0
- package/dist/src/Vector.d.ts +167 -0
- package/dist/src/Vertex.d.ts +57 -0
- package/dist/src/VertexCollection.d.ts +11 -0
- package/dist/src/Wire.d.ts +180 -0
- package/dist/src/constants.d.ts +112 -0
- package/dist/src/decorators.d.ts +27 -0
- package/dist/src/garbageCollection.d.ts +4 -0
- package/dist/src/init.d.ts +5 -0
- package/dist/src/internal.d.ts +67 -0
- package/dist/src/models.d.ts +40 -0
- package/dist/src/typeguards.d.ts +88 -0
- package/dist/src/types.d.ts +944 -0
- package/dist/src/utils.d.ts +140 -0
- package/dist/src/wasm/build-scripts/build_wasm_base64.d.ts +8 -0
- package/dist/src/wasm/index.d.ts +8 -0
- package/dist/src/workerUtils.d.ts +14 -0
- package/dist/wasm/README.md +13 -0
- package/dist/wasm/archiyou-opencascade.d.ts +9933 -0
- package/dist/wasm/archiyou-opencascade.js +16 -0
- package/dist/wasm/archiyou-opencascade.wasm +0 -0
- package/dist/wasm/index.js +32 -0
- package/dist/wasm/node.d.ts +16 -0
- package/dist/wasm/node.js +40 -0
- package/package.json +66 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AnyShapeOrCollection, PointLike, ThickenDirection, MakeSolidInput, AnyShapeOrCollectionOrSelectionString, Vector, Point, Shape, Shell } from './internal';
|
|
2
|
+
export declare class Solid extends Shape {
|
|
3
|
+
constructor(o?: any, ...args: any[]);
|
|
4
|
+
fromAll(shells: MakeSolidInput, ...args: any[]): Solid;
|
|
5
|
+
/** Created an solid out of closed Shell */
|
|
6
|
+
fromShell(shell: Shell): Solid;
|
|
7
|
+
/** Create Solid by sewing multiple Shells */
|
|
8
|
+
fromShells(shells: AnyShapeOrCollection): Solid;
|
|
9
|
+
_fromOcSolid(ocSolid: any, fix?: boolean): Solid;
|
|
10
|
+
_setToOc(): void;
|
|
11
|
+
ocGeom(): any;
|
|
12
|
+
/** Creates a box of size given by width, depth and height and position */
|
|
13
|
+
makeBox(width?: number, depth?: number, height?: number, position?: PointLike): Solid;
|
|
14
|
+
/** Creates a Box by giving two extreme points ( not the same, and not on the same axis ) */
|
|
15
|
+
makeBoxBetween(from: PointLike, to: PointLike): Solid;
|
|
16
|
+
/** Creates a Sphere Solid */
|
|
17
|
+
makeSphere(radius?: number, position?: PointLike, angle?: number): Solid;
|
|
18
|
+
/** Creates a Cone Solid */
|
|
19
|
+
makeCone(bottomRadius?: number, topRadius?: number, height?: number, position?: PointLike, angle?: number): Solid;
|
|
20
|
+
/** Creates a Cylinder with a given radius, height and position */
|
|
21
|
+
makeCylinder(radius?: number, height?: number, position?: PointLike, angle?: number): Solid;
|
|
22
|
+
/** Determine if Solid is a primitive type */
|
|
23
|
+
solidType(): string;
|
|
24
|
+
/** Get center of mass of Solid */
|
|
25
|
+
center(): Point;
|
|
26
|
+
/** Is 2D and on XY plane */
|
|
27
|
+
is2DXY(): boolean;
|
|
28
|
+
_fix(): Solid;
|
|
29
|
+
_fixReversedFaces(): Solid;
|
|
30
|
+
/** Give the Solid rounded corners at its Edges with a given radius */
|
|
31
|
+
fillet(radius?: number, at?: null | AnyShapeOrCollectionOrSelectionString): this;
|
|
32
|
+
/** Alias for filleted but with making copy */
|
|
33
|
+
filleted(radius?: number, edges?: AnyShapeOrCollectionOrSelectionString): Solid;
|
|
34
|
+
/** Chamfer Solid at given Edges with given size */
|
|
35
|
+
chamfer(distance?: number, edges?: AnyShapeOrCollectionOrSelectionString): this;
|
|
36
|
+
/** Same of chamfer but with a copied Shape */
|
|
37
|
+
chamfered(distance?: number, edges?: AnyShapeOrCollectionOrSelectionString): Solid;
|
|
38
|
+
/** Alias for chamfer */
|
|
39
|
+
bevel(distance?: number, edges?: AnyShapeOrCollection): Solid;
|
|
40
|
+
/** Alias for chamfered */
|
|
41
|
+
beveled(distance?: number, edges?: AnyShapeOrCollection): Solid;
|
|
42
|
+
/** Alias for shelled with same API as thicken in Wire/Edge and Shell */
|
|
43
|
+
thickened(amount?: number, direction?: ThickenDirection, excludeFaces?: AnyShapeOrCollectionOrSelectionString): Solid;
|
|
44
|
+
thicken(amount: number, direction?: ThickenDirection, excludeFaces?: AnyShapeOrCollectionOrSelectionString): Solid;
|
|
45
|
+
normalAt(point: Point): Vector;
|
|
46
|
+
/** Even for Volume we try to calculate length
|
|
47
|
+
* For now just the largest size of the bbox
|
|
48
|
+
* Works well for boxes, but not more complex
|
|
49
|
+
*/
|
|
50
|
+
length(): number;
|
|
51
|
+
area(): number;
|
|
52
|
+
/** Export entity and minimal data as string (used for outputting on console and hashing ) */
|
|
53
|
+
toString(): string;
|
|
54
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { MainAxis, PointLike, Point, Vertex } from './internal';
|
|
2
|
+
export declare class Vector extends Point {
|
|
3
|
+
_ocVector: any;
|
|
4
|
+
constructor(p?: PointLike, ...args: any[]);
|
|
5
|
+
_clearOcVector(): void;
|
|
6
|
+
static isVector(obj: any): boolean;
|
|
7
|
+
/** Overload from Point */
|
|
8
|
+
fromPointLike(p?: PointLike, ...args: any[]): Vector;
|
|
9
|
+
/** Class method */
|
|
10
|
+
static fromPointLike(v: any, ...args: any[]): Vector;
|
|
11
|
+
/** Sets OC Vector from x,y,z coordinates */
|
|
12
|
+
_updateOcVector(): Vector;
|
|
13
|
+
/** Update properties from _ocVector */
|
|
14
|
+
_updateFromOcVector(): Vector;
|
|
15
|
+
_toOcLocation(): any;
|
|
16
|
+
/** Try to convert anything to a Vector
|
|
17
|
+
mostly here for backwards compatibiliy
|
|
18
|
+
TODO: slowly move this out since the constructor does the same */
|
|
19
|
+
fromAll(v: any, ...args: any[]): Vector;
|
|
20
|
+
/** Set internal properties x,y,z from a given or already wrapped OC gp_Vec instance */
|
|
21
|
+
_fromOcVec(ocVec?: any): Vector;
|
|
22
|
+
/** Copy OC Vector from given Vector */
|
|
23
|
+
_copyOcFromVec(vector: Vector): void;
|
|
24
|
+
/** Create Vector from OC Point instance */
|
|
25
|
+
_fromOcPoint(ocPoint: any): Vector;
|
|
26
|
+
/** Create Vector from OC Direction instance */
|
|
27
|
+
_fromOcDir(ocDir: any): Vector;
|
|
28
|
+
/** Random Vector in a circle of given radius */
|
|
29
|
+
random(radius?: number): Vector;
|
|
30
|
+
toVector(): Vector;
|
|
31
|
+
toPoint(): Point;
|
|
32
|
+
toVertex(): Vertex;
|
|
33
|
+
toArray(): [number, number, number];
|
|
34
|
+
_ocGeom(): any;
|
|
35
|
+
/** Sets x,y,z components of Vector */
|
|
36
|
+
set(vector: PointLike, ...args: any[]): Vector;
|
|
37
|
+
/** Sets x component of Vector */
|
|
38
|
+
setX(x: number): Vector;
|
|
39
|
+
/** Sets y component of Vector */
|
|
40
|
+
setY(y: number): Vector;
|
|
41
|
+
/** Sets z component of Vector */
|
|
42
|
+
setZ(z: number): Vector;
|
|
43
|
+
setComponent(a: MainAxis, v: number): any;
|
|
44
|
+
/** Return the magnitude/length of this Vector */
|
|
45
|
+
magnitude(): any;
|
|
46
|
+
/** Return the magnitude/length of this Vector */
|
|
47
|
+
length(): any;
|
|
48
|
+
/** Return the squared magnitude/length of this Vector */
|
|
49
|
+
squareMagnitude(): any;
|
|
50
|
+
/** Check if this Vector is normal to the another: abs(<me>.Angle(Other) - PI/2.) <= AngularToleranc */
|
|
51
|
+
isNormalTo(other: PointLike, ...args: any[]): boolean;
|
|
52
|
+
/** Return the angles around the different axis
|
|
53
|
+
* !!!! Some of these values can be null - for example for [100,0,0] => rotation around X axis = null !!!!
|
|
54
|
+
*/
|
|
55
|
+
angles(): Array<number>;
|
|
56
|
+
/** Returns the angles of rotation (intrinsic YZX Euler angles) around each axis that transform the given normalized Vector to the normalized other
|
|
57
|
+
* Important: When rotation around axis apply in order YZX
|
|
58
|
+
* docs:
|
|
59
|
+
* - https://dev.opencascade.org/content/get-euler-angles-gptrsf-gpquaterniongeteulerangles
|
|
60
|
+
* - https://dev.opencascade.org/content/gpquaternion-changes-regarding-euler-angles-700
|
|
61
|
+
* - https://en.wikipedia.org/wiki/Euler_angles
|
|
62
|
+
* - https://www.mathworks.com/matlabcentral/answers/407489-rotate-vectors-onto-each-other-and-euler-angles
|
|
63
|
+
* - http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/index.htm
|
|
64
|
+
*/
|
|
65
|
+
/** Return a new Vector with all its coordinates positive */
|
|
66
|
+
abs(): Vector;
|
|
67
|
+
/** Move the Vector - mainly for consistency for example Vertex */
|
|
68
|
+
move(p: PointLike, ...args: any[]): Vector;
|
|
69
|
+
/** Copy Vector and return a new one */
|
|
70
|
+
copy(): Vector;
|
|
71
|
+
/** Add a PointLike to this Vector */
|
|
72
|
+
add(vector: PointLike, ...args: any[]): Vector;
|
|
73
|
+
/** Add PointLike to this one and return a new Vector */
|
|
74
|
+
added(vector: PointLike, ...args: any[]): Vector;
|
|
75
|
+
/** Subtract a PointLike from current Vector */
|
|
76
|
+
subtract(vector: PointLike, ...args: any[]): this;
|
|
77
|
+
/** Subtract a PointLike from this one and return a new Vector */
|
|
78
|
+
subtracted(vector: PointLike, ...args: any[]): Vector;
|
|
79
|
+
/** Multiple Vector with scalar (1D,2D,3D) and return current Vector
|
|
80
|
+
* We can multiple with one number or by axis with Array [x,y,z]
|
|
81
|
+
*/
|
|
82
|
+
multiply(scalar: number | PointLike, ...args: any[]): Vector;
|
|
83
|
+
/** Multiply Vector with scalar and return a copy of Vector */
|
|
84
|
+
multiplied(scalar: number | PointLike, ...args: any[]): Vector;
|
|
85
|
+
/** Scale is an alias for multiply */
|
|
86
|
+
scale(scalar: number | PointLike, ...args: any[]): Vector;
|
|
87
|
+
/** Scaled is an alias for multiplied */
|
|
88
|
+
scaled(scalar: number | PointLike, ...args: any[]): Vector;
|
|
89
|
+
/** Divide Vector by scalar and return current Vector */
|
|
90
|
+
divide(scalar: number | PointLike, ...args: any[]): Vector;
|
|
91
|
+
/** Divide Vector by this one and return a new Vector */
|
|
92
|
+
divided(scalar: PointLike, ...args: any[]): Vector;
|
|
93
|
+
/** Calculate Cross Vector with this and other vector and return a new Vector */
|
|
94
|
+
crossed(other: PointLike, ...args: any[]): Vector;
|
|
95
|
+
/** Calculate Dot / Inner product with this and other Vector */
|
|
96
|
+
dot(other: PointLike, ...args: any[]): number;
|
|
97
|
+
/** Normalize current Vector and return */
|
|
98
|
+
normalize(): Vector;
|
|
99
|
+
/** Normalize current Vector and return a copy */
|
|
100
|
+
normalized(): Vector;
|
|
101
|
+
/** Reverse current Vector and return current Vector */
|
|
102
|
+
reverse(): this;
|
|
103
|
+
/** Reverse current Vector and return a copy */
|
|
104
|
+
reversed(): Vector;
|
|
105
|
+
/** Mirror current Vector
|
|
106
|
+
@param position position of mirror axis
|
|
107
|
+
@param direction direction of mirror axis - default is the Y axis
|
|
108
|
+
*/
|
|
109
|
+
mirror(position?: PointLike, direction?: PointLike): Vector;
|
|
110
|
+
/** Mirror current Vector and return a copy */
|
|
111
|
+
mirrored(position?: PointLike, direction?: PointLike): Vector;
|
|
112
|
+
/**
|
|
113
|
+
* Rotates current Vector along a axis defined by position and direction
|
|
114
|
+
* @param angle in degrees
|
|
115
|
+
*/
|
|
116
|
+
rotate(angle: number, position?: PointLike, direction?: PointLike): this;
|
|
117
|
+
/**
|
|
118
|
+
* Same as rotate() but returns a copy
|
|
119
|
+
* @param angle in degrees
|
|
120
|
+
*/
|
|
121
|
+
rotated(angle: number, position?: PointLike, direction?: PointLike): Vector;
|
|
122
|
+
rotateX(angle: number): this;
|
|
123
|
+
rotateY(angle: number): this;
|
|
124
|
+
rotateZ(angle: number): this;
|
|
125
|
+
/** Swap x,y coordinates for some 2D applications */
|
|
126
|
+
swappedXY(): Vector;
|
|
127
|
+
/** Get largest component along any (negative) axis */
|
|
128
|
+
largestAxis(): MainAxis;
|
|
129
|
+
isOrtho(): boolean;
|
|
130
|
+
/** Check if this Vector is the opposite of another Vector */
|
|
131
|
+
isOpposite(other: PointLike, ...args: any[]): boolean;
|
|
132
|
+
/** Check if this Vector is parallel to another Vector */
|
|
133
|
+
isParallel(other: PointLike, ...args: any[]): boolean;
|
|
134
|
+
/** Get the axis that this Vector could represent, if not null */
|
|
135
|
+
isWhatAxis(): string;
|
|
136
|
+
/** Return the smallest angle between this and another Vector in degrees */
|
|
137
|
+
angle(other: PointLike, ...args: any[]): number;
|
|
138
|
+
/** Angle [0-360] on XY plane
|
|
139
|
+
* alias backwards compat
|
|
140
|
+
*/
|
|
141
|
+
angle2D(): number;
|
|
142
|
+
/** Angle [0-360] on XY plane */
|
|
143
|
+
angleXY(): number;
|
|
144
|
+
/** Angle on XY (top) plane */
|
|
145
|
+
angleXZ(): number;
|
|
146
|
+
/** Angle around Y-axis, alias of angleXZ */
|
|
147
|
+
angleY(): number;
|
|
148
|
+
/** Angle on YZ (right) plane */
|
|
149
|
+
angleYZ(): number;
|
|
150
|
+
/** Angle around X-axis, alias of angleYZ */
|
|
151
|
+
angleX(): number;
|
|
152
|
+
/** Return the angle between one Vector and another where ref defines the positive sense of rotation */
|
|
153
|
+
angleRef(other: PointLike, ref: PointLike): number;
|
|
154
|
+
projectedToPlane(normal: PointLike): Vector;
|
|
155
|
+
/** Get smallest angle with another Vector around a axis direction */
|
|
156
|
+
angleAround(other: PointLike, axis: PointLike): number;
|
|
157
|
+
/** Check if this Vector is the same as another */
|
|
158
|
+
equals(other: PointLike, ...args: any[]): boolean;
|
|
159
|
+
/** Returns distance between current Vector with another */
|
|
160
|
+
distance(other: PointLike, ...args: any[]): number;
|
|
161
|
+
/** Returns the X/Y/Z Plane that Vectors share */
|
|
162
|
+
sharedPlanes(other: PointLike, ...args: any[]): Array<string>;
|
|
163
|
+
round(): Vector;
|
|
164
|
+
rounded(): Vector;
|
|
165
|
+
/** Export entity and minimal data as string (used for outputting on console and hashing ) */
|
|
166
|
+
toString(): string;
|
|
167
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PointLike, Point, Vector, Shape, Edge } from './internal';
|
|
2
|
+
type IEdge = Edge;
|
|
3
|
+
export declare class Vertex extends Shape {
|
|
4
|
+
_x: number;
|
|
5
|
+
_y: number;
|
|
6
|
+
_z: number;
|
|
7
|
+
constructor(p?: PointLike, ...args: any[]);
|
|
8
|
+
/** Create Vertex from PointLike input */
|
|
9
|
+
fromPointLike(p?: PointLike, ...args: any[]): Vertex;
|
|
10
|
+
/** Class method */
|
|
11
|
+
static fromPointLike(p: any, ...args: any[]): Vertex;
|
|
12
|
+
/** For backwards compatibility
|
|
13
|
+
TODO: Up for removal
|
|
14
|
+
*/
|
|
15
|
+
fromAll(v?: PointLike, ...args: any[]): Vertex;
|
|
16
|
+
/**
|
|
17
|
+
* Create Vertex from given ocVertex
|
|
18
|
+
* We take some effort to round the Vertex because OC native rounding with Shape.round() does not work for Vertices?
|
|
19
|
+
*/
|
|
20
|
+
_fromOcVertex(ocVertex?: any, round?: boolean): Vertex;
|
|
21
|
+
/** Set OC Shape from given [x,y,z] or if not present the existing [x,y,z] */
|
|
22
|
+
_updateOcShape(x?: number, y?: number, z?: number): Vertex;
|
|
23
|
+
/** Updates properties from this._ocShape */
|
|
24
|
+
_updateFromOcShape(): Vertex;
|
|
25
|
+
/** For backward compatibility: Better to use constructor */
|
|
26
|
+
fromVector(v: Vector): Vertex;
|
|
27
|
+
/** For backward compatibility: could just use constructor */
|
|
28
|
+
fromPoint(p: Point): this;
|
|
29
|
+
_fromOcPoint(ocPoint: any): Vertex;
|
|
30
|
+
get x(): number;
|
|
31
|
+
get y(): number;
|
|
32
|
+
get z(): number;
|
|
33
|
+
set x(x: number);
|
|
34
|
+
set y(y: number);
|
|
35
|
+
set z(z: number);
|
|
36
|
+
setX(x: number): Vertex;
|
|
37
|
+
/** Sets y component of Vector */
|
|
38
|
+
setY(y: number): Vertex;
|
|
39
|
+
/** Sets z component of Vector */
|
|
40
|
+
setZ(z: number): Vertex;
|
|
41
|
+
toVector(): Vector;
|
|
42
|
+
toArray(): Array<number>;
|
|
43
|
+
toPoint(): Point;
|
|
44
|
+
_toOcPoint(): any;
|
|
45
|
+
/** The position of the Vertex. Method is for consistency with other Shapes */
|
|
46
|
+
center(): any;
|
|
47
|
+
/** Extrudes the Vertex to create a Edge with certain length along a Direction Vector: default direction: Z-axis */
|
|
48
|
+
extrude(amount: number, direction?: PointLike): IEdge;
|
|
49
|
+
/** Extrude a copy of Vertex to create a Edge with certain length along a Direction Vector: default direction: Z-axis */
|
|
50
|
+
extruded(amount: number, direction?: PointLike): IEdge;
|
|
51
|
+
/** Rounds this Vertex (avoids very small values like 2.0e-15 */
|
|
52
|
+
rounded(): Vertex;
|
|
53
|
+
toData(): Array<number>;
|
|
54
|
+
/** Export entity and minimal data as string (used for outputting on console and hashing ) */
|
|
55
|
+
toString(): string;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MakeShapeCollectionInput, ShapeCollection } from './internal';
|
|
2
|
+
/** A ShapeCollection with only Vertices */
|
|
3
|
+
export declare class VertexCollection extends ShapeCollection {
|
|
4
|
+
constructor(entities?: MakeShapeCollectionInput, ...args: any[]);
|
|
5
|
+
/** Try to turn anything into a VertexCollection (based on ShapeCollection._addEntities) ) */
|
|
6
|
+
fromAll(entities?: MakeShapeCollectionInput, ...args: any[]): VertexCollection;
|
|
7
|
+
/** Class method */
|
|
8
|
+
static fromAll(v: any, ...args: any[]): VertexCollection;
|
|
9
|
+
/** Check and filter all shapes in ShapeCollection that are Vertices */
|
|
10
|
+
_check(): VertexCollection;
|
|
11
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { PointLike, Cursor, AnyShape, AnyShapeOrCollection, Alignment, LinearShape, PointLikeSequence, PointLikeOrVertexCollection, LinearShapeTail, AnyShapeSequence, ThickenDirection, MakeWireInput, DimensionOptions, Vector, Shape, Vertex, Point, Edge, Face, Shell, Solid, ShapeCollection, DimensionLine } from './internal';
|
|
2
|
+
type IFace = Face;
|
|
3
|
+
type IShell = Shell;
|
|
4
|
+
type ISolid = Solid;
|
|
5
|
+
export declare class Wire extends Shape {
|
|
6
|
+
constructor(entities?: MakeWireInput, ...args: any[]);
|
|
7
|
+
/** Copy a other Wire instance
|
|
8
|
+
* NOTE: Is this still needed, as we have a copy method?
|
|
9
|
+
*/
|
|
10
|
+
_fromWire(w: Wire): Wire;
|
|
11
|
+
_fromOcWire(ocWire: any, fix?: boolean): Wire;
|
|
12
|
+
/** Try to convert something into a Wire */
|
|
13
|
+
fromAll(o: MakeWireInput): Wire;
|
|
14
|
+
/** Class method */
|
|
15
|
+
static fromAll(o: any): Wire;
|
|
16
|
+
/** Sequentually build a Wire */
|
|
17
|
+
_addEntities(entities: MakeWireInput): this;
|
|
18
|
+
/** Process Shapes sequentially and combine them into a Wire */
|
|
19
|
+
_fromShapeCollection(shapes: ShapeCollection): Wire;
|
|
20
|
+
getCursor(): Cursor;
|
|
21
|
+
fromEdges(edges: AnyShapeSequence, ...args: any[]): Wire;
|
|
22
|
+
/** Create Wire with Line Edges from Vertices **/
|
|
23
|
+
fromVertices(vertices: PointLikeSequence, ...args: any[]): Wire;
|
|
24
|
+
/** Create Wire from Points (Vertices or an Array or coords) */
|
|
25
|
+
fromPoints(points: PointLikeSequence): Wire;
|
|
26
|
+
/** Create flat Rectangular Wire */
|
|
27
|
+
makeRect(width?: number, depth?: number, position?: PointLike): Wire;
|
|
28
|
+
/** Create a (righthand or lefthand) Helix with a radius, height and angle. Advanced coneSemiAngle (angle at top) for making a changing Helix radius (- for smaller to top) */
|
|
29
|
+
makeHelix(radius?: number, height?: number, angle?: number, pivot?: PointLike, direction?: PointLike, lefthand?: boolean, coneSemiAngle?: number): Wire;
|
|
30
|
+
/** Make 2D Spiral */
|
|
31
|
+
makeSpiral(firstRadius: number, secondRadius: number, angle: number, lefthand: boolean): Wire;
|
|
32
|
+
/** Return the first Edge (private)) */
|
|
33
|
+
_toEdge(): any;
|
|
34
|
+
/** Return the first Edge (comes in handy when using Wire methods on single Edge Wire) */
|
|
35
|
+
toEdge(): any;
|
|
36
|
+
/** For consistency */
|
|
37
|
+
_toWire(): this;
|
|
38
|
+
/** For consistency */
|
|
39
|
+
toWire(): this;
|
|
40
|
+
/** Try to convert Wire to Face (private) */
|
|
41
|
+
_toFace(): Face;
|
|
42
|
+
/** Try to convert Wire to Face */
|
|
43
|
+
toFace(): IFace;
|
|
44
|
+
/** This returns the most specified subclass of Shape */
|
|
45
|
+
_ocGeom(): any;
|
|
46
|
+
_toOcCurve(): any;
|
|
47
|
+
_toOcCurveHandle(): any;
|
|
48
|
+
/** Check if Wire is coplanar */
|
|
49
|
+
planar(): boolean;
|
|
50
|
+
/** Get subtype of Wire, used for selecting */
|
|
51
|
+
wireType(): string;
|
|
52
|
+
/** Check if a Wire is closed */
|
|
53
|
+
closed(): boolean;
|
|
54
|
+
/** Check if Wire is continuous */
|
|
55
|
+
checkConnections(): boolean;
|
|
56
|
+
selfIntersecting(): boolean;
|
|
57
|
+
/** Get the start Vertex of the Wire */
|
|
58
|
+
start(): Vertex;
|
|
59
|
+
/** Get the end Vertex of the Wire */
|
|
60
|
+
end(): Vertex;
|
|
61
|
+
is2DXY(): boolean;
|
|
62
|
+
/** Get Normal of the Wire at the start Vertex */
|
|
63
|
+
normalAtStart(): Vector;
|
|
64
|
+
/** Get Normal of the Wire at the end Vertex */
|
|
65
|
+
normalAtEnd(): Vector;
|
|
66
|
+
/** Get workplane normal if Wire is planar */
|
|
67
|
+
workPlaneNormal(): Vector;
|
|
68
|
+
/** Get Direction Vector of Wire at the start Vertex */
|
|
69
|
+
directionAtStart(): Vector;
|
|
70
|
+
/** Get Direction Vector of Wire at the end Vertex */
|
|
71
|
+
directionAtEnd(): Vector;
|
|
72
|
+
/** Get Edge that contains or is closest to Point */
|
|
73
|
+
edgeAtPoint(point: PointLike, ...args: any[]): Edge;
|
|
74
|
+
/** Get the normal on a Point on the Wire */
|
|
75
|
+
normalAt(point: PointLike, ...args: any[]): Vector;
|
|
76
|
+
/** Get normal of Face bounded by Wire
|
|
77
|
+
* NOTE: NormalAt gives on point on the Wire, normal that of the workplane
|
|
78
|
+
*/
|
|
79
|
+
normal(): Vector;
|
|
80
|
+
directionAt(point: PointLike, ...args: any[]): Vector;
|
|
81
|
+
/** Get a Point at a certain percentage of the Wire */
|
|
82
|
+
pointAt(perc: number): Vector;
|
|
83
|
+
pointAtParam(param: number): Vector;
|
|
84
|
+
/** Generate a Collection of a given number of Vertices equally spaces over this Wire including the start and end
|
|
85
|
+
* IMPORTANT: Parameters on a Wire are not homogenous with length units: We need a bit more advanced solution
|
|
86
|
+
*/
|
|
87
|
+
populated(num?: number): ShapeCollection;
|
|
88
|
+
/** Get the length of this Wire */
|
|
89
|
+
length(): number;
|
|
90
|
+
/** Get center of Wire - This is not the middle Point! See middle() */
|
|
91
|
+
center(): Point;
|
|
92
|
+
/** Return middle of Wire */
|
|
93
|
+
middle(): Point;
|
|
94
|
+
/** Do checks and fix Wire
|
|
95
|
+
* WARNING: This does more bad than good, so disabled in _fromOcWir
|
|
96
|
+
*/
|
|
97
|
+
checkAndFix(): Wire;
|
|
98
|
+
/** Close this Wire by creating Edge from last Vertex to first */
|
|
99
|
+
close(): Wire;
|
|
100
|
+
/** Reverse order of Wire by reversing Edges */
|
|
101
|
+
reverse(): Wire;
|
|
102
|
+
/** Same as reverse but return a copy */
|
|
103
|
+
reversed(): Wire;
|
|
104
|
+
/** Connect two Wires together into new one: introducing new line Edges distance is less than radius */
|
|
105
|
+
combined(other: Wire, radius?: number): Wire;
|
|
106
|
+
/** Extra algorithm to combine Edges into Wire - The OC WireBuilder does this mostly too - but this is triggered as last resort */
|
|
107
|
+
combineEdges(edges: AnyShapeSequence, radius?: number): Wire;
|
|
108
|
+
/** We get unconnected Edges a lot ( because OC is somewhat loose with Edges in Wires )
|
|
109
|
+
This algorithm reconstructs a Collection of Array of Edges into a ordered (by number of Edges) Array of Wires */
|
|
110
|
+
_groupEdges(edges: AnyShapeSequence, radius?: number): Array<Array<Edge>>;
|
|
111
|
+
/** Make a Solid by lofting from one Wire through section Wires (private: without adding to Scene) */
|
|
112
|
+
_lofted(sections: AnyShapeOrCollection, solid?: boolean): IShell | Solid;
|
|
113
|
+
/** Make a new Solid by lofting from a flat Shape through a number of sections */
|
|
114
|
+
lofted(sections: AnyShapeOrCollection, solid?: boolean): IShell | Solid;
|
|
115
|
+
/** Make a Solid by lofting a flat Shape through a number of sections */
|
|
116
|
+
loft(sections: AnyShapeOrCollection, solid?: boolean): IShell | Solid;
|
|
117
|
+
/** Sweep a profile Wire or Face ( see Face.ts implementation: splitting inner and outerwires) along a path to create a Shell or Solid
|
|
118
|
+
* TODO: holes in profile from Face
|
|
119
|
+
*/
|
|
120
|
+
_sweeped(path: LinearShape, solid?: boolean, autoRotate?: boolean, alignToPath?: Alignment): IFace | Shell | Solid;
|
|
121
|
+
/** Sweep a profile Wire or Face ( see Face.ts implementation: splitting inner and outerwires) along a path to create a Shell or Solid */
|
|
122
|
+
sweeped(path: LinearShape, solid?: boolean, autoRotate?: boolean, alignToPath?: Alignment): IFace | Shell | Solid;
|
|
123
|
+
/** Sweep a profile Wire or Face ( see Face.ts implementation: splitting inner and outerwires) along a path to create a Shell or Solid */
|
|
124
|
+
sweep(path: LinearShape, solid?: boolean, autoRotate?: boolean, alignToPath?: Alignment): IFace | Shell | Solid;
|
|
125
|
+
/** Thicken (2D) Wire to create a thick Face (private: without adding to Scene)
|
|
126
|
+
* Compared to offset thickening creates a higher order Shape while offset keeps original Shape type
|
|
127
|
+
* @param amount The total thickness added
|
|
128
|
+
* @param direction PointLike or Side (top,bottom,left,right,front,back)
|
|
129
|
+
* @param onPlaneNormal Force the resulting Face to be on a specific plane given by its normal
|
|
130
|
+
*/
|
|
131
|
+
_thickened(amount: number, direction?: ThickenDirection, onPlaneNormal?: PointLike): IFace;
|
|
132
|
+
thickened(amount: number, direction?: ThickenDirection, onPlaneNormal?: PointLike): IFace;
|
|
133
|
+
/** Thicken (2D) Wire to create a thick Face
|
|
134
|
+
@param direction PointLike or Side (top,bottom,left,right,front,back)
|
|
135
|
+
*/
|
|
136
|
+
thicken(amount: number, direction?: ThickenDirection, onPlaneNormal?: PointLike): IFace;
|
|
137
|
+
/** Offset Wire to create a new parallel Wire at given distance (private)
|
|
138
|
+
* IMPORTANT: minus amount means the Wire becomes smaller. We will check for that!
|
|
139
|
+
* TODO: Offsetting a simple Wire can generate unordered Edges and problems later on. Need to introduce checks
|
|
140
|
+
* ex: polyline([0,0,25],[50,0,50],[100,0,25]).offsetted(5) => 2 vertices!
|
|
141
|
+
*/
|
|
142
|
+
_offsetted(amount?: number, type?: string, onPlaneNormal?: PointLike): Wire;
|
|
143
|
+
/** Offset Wire to create a new parallel Wire at given distance */
|
|
144
|
+
offsetted(amount?: number, type?: string, onPlaneNormal?: PointLike): Wire;
|
|
145
|
+
/** Create a new version of current Wire that is parallel at a given distance */
|
|
146
|
+
offset(amount?: number, type?: string, onPlaneNormal?: PointLike): Wire;
|
|
147
|
+
/** Extrude a Wire while rotating around the center with a given angle (private: without adding to Scene) */
|
|
148
|
+
_twistExtruded(amount?: number, angle?: number, pivot?: PointLike, direction?: PointLike, lefthand?: boolean): ISolid;
|
|
149
|
+
twistExtruded(amount?: number, angle?: number, pivot?: PointLike, direction?: PointLike, lefthand?: boolean): ISolid;
|
|
150
|
+
twistExtrude(amount?: number, angle?: number, pivot?: PointLike, direction?: PointLike, lefthand?: boolean): ISolid;
|
|
151
|
+
/** Create a new Wire by projecting this Wire onto another Shape
|
|
152
|
+
* either from one direction or concentric
|
|
153
|
+
*
|
|
154
|
+
* Returns a ShapeCollection with front and back groups
|
|
155
|
+
*
|
|
156
|
+
* TODO: When projecting on surface that has same dimensions as projecting Face results can wrong,
|
|
157
|
+
* edges are added between front and back projection
|
|
158
|
+
* NOTE: Converted from code by Roger Maitland for CadQuery: https://github.com/CadQuery/cadquery/issues/562
|
|
159
|
+
|
|
160
|
+
*/
|
|
161
|
+
_projectTo(other: AnyShape, direction: Vector, center?: Vector): ShapeCollection | null;
|
|
162
|
+
projectTo(other: AnyShape, direction: Vector, center: Vector): ShapeCollection | null;
|
|
163
|
+
/** Aligning linear Shapes to each other so they form a connected Line */
|
|
164
|
+
alignTo(other: LinearShape, pivot?: LinearShapeTail, alignment?: LinearShapeTail): this;
|
|
165
|
+
/** Fillet Wire at given Vertices or all */
|
|
166
|
+
fillet(radius?: number, at?: PointLikeOrVertexCollection): this;
|
|
167
|
+
/** Fillet Wire at given Vertices or all */
|
|
168
|
+
chamfer(distance?: number, angle?: number, vertices?: PointLikeOrVertexCollection): this;
|
|
169
|
+
_intersectionsWithWire(other: Wire | Edge): ShapeCollection;
|
|
170
|
+
/** Simply generate dimension lines for all visible Edges in this Face
|
|
171
|
+
* TODO: make sure offsets are right, skip same edges in boxes
|
|
172
|
+
*/
|
|
173
|
+
dimension(dim?: DimensionOptions): DimensionLine | Array<DimensionLine>;
|
|
174
|
+
/** Alias for dimension() */
|
|
175
|
+
dim(dim?: DimensionOptions): DimensionLine | Array<DimensionLine>;
|
|
176
|
+
_hasClosingEdges(): boolean;
|
|
177
|
+
/** Export entity and minimal data as string (used for outputting on console and hashing ) */
|
|
178
|
+
toString(): string;
|
|
179
|
+
}
|
|
180
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { DocPathStyle } from './internal';
|
|
2
|
+
export declare const USE_GARBAGE_COLLECTION = false;
|
|
3
|
+
export declare const SHAPE_CACHE_ENABLED = false;
|
|
4
|
+
export declare const SCRIPT_OUTPUT_CATEGORIES: string[];
|
|
5
|
+
export declare const SCRIPT_OUTPUT_MODEL_FORMATS: string[];
|
|
6
|
+
export declare const SCRIPT_OUTPUT_METRIC_FORMATS: string[];
|
|
7
|
+
export declare const SCRIPT_OUTPUT_TABLE_FORMATS: string[];
|
|
8
|
+
export declare const SCRIPT_OUTPUT_DOC_FORMATS: string[];
|
|
9
|
+
export declare const MESHING_MAX_DEVIATION = 0.1;
|
|
10
|
+
export declare const MESHING_ANGULAR_DEFLECTION = 0.5;
|
|
11
|
+
export declare const MESHING_MINIMUM_POINTS = 2;
|
|
12
|
+
export declare const MESHING_TOLERANCE = 0.000001;
|
|
13
|
+
export declare const MESHING_EDGE_MIN_LENGTH = 0.000001;
|
|
14
|
+
export declare const DEFAULT_WORKPLANE: number[];
|
|
15
|
+
export declare const SHAPE_ARRAY_DEFAULT_OFFSET = 100;
|
|
16
|
+
export declare const SHAPE_EXTRUDE_DEFAULT_AMOUNT = 100;
|
|
17
|
+
export declare const SHAPE_SWEEP_DEFAULT_SOLID = true;
|
|
18
|
+
export declare const SHAPE_SWEEP_DEFAULT_AUTOROTATE = true;
|
|
19
|
+
export declare const SHAPE_SWEEP_DEFAULT_ALIGNMENT_TO_PATH = "center";
|
|
20
|
+
export declare const SHAPE_SCALE_DEFAULT_FACTOR = 2;
|
|
21
|
+
export declare const SHAPE_ALIGNMENT_DEFAULT = "center";
|
|
22
|
+
export declare const SHAPE_SHELL_AMOUNT = 5;
|
|
23
|
+
export declare const EDGE_DEFAULT_START: number[];
|
|
24
|
+
export declare const EDGE_DEFAULT_END: number[];
|
|
25
|
+
export declare const EDGE_DEFAULT_CIRCLE_RADIUS = 50;
|
|
26
|
+
export declare const EDGE_DEFAULT_OFFSET = 10;
|
|
27
|
+
export declare const EDGE_DEFAULT_THICKEN = 50;
|
|
28
|
+
export declare const EDGE_DEFAULT_POPULATE_NUM = 10;
|
|
29
|
+
export declare const EDGE_DEFAULT_EXTEND_AMOUNT = 10;
|
|
30
|
+
export declare const EDGE_DEFAULT_EXTEND_DIRECTION = "end";
|
|
31
|
+
export declare const EDGE_DEFAULT_ALIGNTO_FROM = "start";
|
|
32
|
+
export declare const EDGE_DEFAULT_ALIGNTO_TO = "end";
|
|
33
|
+
export declare const EDGE_DEFAULT_SEGMENTS_ANGLE = 10;
|
|
34
|
+
export declare const EDGE_DEFAULT_SEGMENTS_ANGLE_SVG = 2;
|
|
35
|
+
export declare const EDGE_DEFAULT_SEGMENTS_SIZE = 100;
|
|
36
|
+
export declare const WIRE_RECT_WIDTH = 100;
|
|
37
|
+
export declare const WIRE_RECT_DEPTH = 100;
|
|
38
|
+
export declare const WIRE_RECT_POSITION: number[];
|
|
39
|
+
export declare const WIRE_POPULATE_NUM = 10;
|
|
40
|
+
export declare const WIRE_COMBINE_RADIUS = 1;
|
|
41
|
+
export declare const WIRE_LOFTED_SOLID = true;
|
|
42
|
+
export declare const WIRE_SWEEPED_SOLID = true;
|
|
43
|
+
export declare const WIRE_SWEEPED_AUTOROTATE = true;
|
|
44
|
+
export declare const WIRE_SWEEPED_ALIGNTOPATH = "center";
|
|
45
|
+
export declare const WIRE_THICKEN_AMOUNT = 10;
|
|
46
|
+
export declare const WIRE_THICKEN_DIRECTION: any;
|
|
47
|
+
export declare const WIRE_OFFSET_AMOUNT = 10;
|
|
48
|
+
export declare const WIRE_OFFSET_TYPE = "tangent";
|
|
49
|
+
export declare const WIRE_ALIGNTO_TAIL = "start";
|
|
50
|
+
export declare const WIRE_FILLET_RADIUS = 10;
|
|
51
|
+
export declare const WIRE_CHAMFER_DISTANCE = 10;
|
|
52
|
+
export declare const WIRE_CHAMFER_ANGLE = 45;
|
|
53
|
+
export declare const SOLID_MAKEBOX_SIZE = 50;
|
|
54
|
+
export declare const SOLID_MAKESPHERE_RADIUS = 50;
|
|
55
|
+
export declare const SOLID_MAKESPHERE_ANGLE = 360;
|
|
56
|
+
export declare const SOLID_MAKECONE_BOTTOM_RADIUS = 50;
|
|
57
|
+
export declare const SOLID_MAKECONE_TOP_RADIUS = 0;
|
|
58
|
+
export declare const SOLID_MAKECONE_HEIGHT = 50;
|
|
59
|
+
export declare const SOLID_CYLINDER_RADIUS = 50;
|
|
60
|
+
export declare const SOLID_CYLINDER_HEIGHT = 50;
|
|
61
|
+
export declare const SOLID_CYLINDER_ANGLE = 360;
|
|
62
|
+
export declare const SOLID_FILLET_RADIUS = 5;
|
|
63
|
+
export declare const SOLID_CHAMFER_DISTANCE = 5;
|
|
64
|
+
export declare const SOLID_THICKEN_AMOUNT = 5;
|
|
65
|
+
export declare const SOLID_THICKEN_DIRECTION = "center";
|
|
66
|
+
export declare const FACE_PLANE_WIDTH = 50;
|
|
67
|
+
export declare const FACE_PLANE_DEPTH = 50;
|
|
68
|
+
export declare const FACE_PLANE_POSITION: number[];
|
|
69
|
+
export declare const FACE_PLANE_NORMAL: number[];
|
|
70
|
+
export declare const FACE_BASEPLANE_AXIS = "xy";
|
|
71
|
+
export declare const FACE_BASEPLANE_SIZE = 1000;
|
|
72
|
+
export declare const FACE_CIRCLE_RADIUS = 50;
|
|
73
|
+
export declare const FACE_EXTRUDE_AMOUNT = 100;
|
|
74
|
+
export declare const FACE_OFFSET_AMOUNT = 10;
|
|
75
|
+
export declare const FACE_OFFSET_TYPE = "tangent";
|
|
76
|
+
export declare const FACE_THICKEN_AMOUNT = 10;
|
|
77
|
+
export declare const FACE_THICKEN_DIRECTION = "center";
|
|
78
|
+
export declare const FACE_LOFT_SOLID = true;
|
|
79
|
+
export declare const FACE_NORMAL_EDGE_SIZE = 10;
|
|
80
|
+
export declare const FACE_FILLET_RADIUS = 5;
|
|
81
|
+
export declare const FACE_CHAMFER_DISTANCE = 10;
|
|
82
|
+
export declare const FACE_CHAMFER_ANGLE = 45;
|
|
83
|
+
export declare const DOC_DIMENSION_LINES_TEXT_HEIGHT = 2.5;
|
|
84
|
+
export declare const DOC_CONTAINER_TITLE_TEXT_HEIGHT = 6;
|
|
85
|
+
export declare const DOC_CONTAINER_CAPTION_TEXT_HEIGHT = 3;
|
|
86
|
+
export declare const DOC_CONTAINER_CAPTION_TEXT_PADDING_FACTOR = 2;
|
|
87
|
+
export declare const CLASS_TO_STYLE: Record<string, DocPathStyle>;
|
|
88
|
+
export declare const MESH_QUALITY_PRESETS: {
|
|
89
|
+
low: {
|
|
90
|
+
linearDeflection: number;
|
|
91
|
+
angularDeflection: number;
|
|
92
|
+
tolerance: number;
|
|
93
|
+
edgeMinimalPoints: number;
|
|
94
|
+
edgeMinimalLength: number;
|
|
95
|
+
};
|
|
96
|
+
medium: {
|
|
97
|
+
linearDeflection: number;
|
|
98
|
+
angularDeflection: number;
|
|
99
|
+
tolerance: number;
|
|
100
|
+
edgeMinimalPoints: number;
|
|
101
|
+
edgeMinimalLength: number;
|
|
102
|
+
};
|
|
103
|
+
high: {
|
|
104
|
+
linearDeflection: number;
|
|
105
|
+
angularDeflection: number;
|
|
106
|
+
tolerance: number;
|
|
107
|
+
edgeMinimalPoints: number;
|
|
108
|
+
edgeMinimalLength: number;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export declare const METRICS: string[];
|
|
112
|
+
export declare const BREP_METHODS_INTO_GLOBAL: string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decorators for Geom API
|
|
3
|
+
*
|
|
4
|
+
* See TS docs: https://www.typescriptlang.org/docs/handbook/decorators.html
|
|
5
|
+
* or https://blog.logrocket.com/a-practical-guide-to-typescript-decorators/
|
|
6
|
+
*
|
|
7
|
+
* */
|
|
8
|
+
/**
|
|
9
|
+
* Decorator for caching the results of operations and getting them when needed
|
|
10
|
+
* !!!! This function does not work anymore !!!!
|
|
11
|
+
* TODO: Check TS version and see why this is not working: https://www.typescriptlang.org/docs/handbook/decorators.html
|
|
12
|
+
*/
|
|
13
|
+
export declare function cacheOperation(targetPrototype: any, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
14
|
+
/** TODO */
|
|
15
|
+
export declare function ocCheck(target: Object, method: string, descriptor: PropertyDescriptor): void;
|
|
16
|
+
/** Main @checkInput decorator
|
|
17
|
+
|
|
18
|
+
@param inputChecks - Per input the desired checks. NOTE: we can only supply typeguard functions (not types) or Classes or a Array with check and default value
|
|
19
|
+
@param uniformizeToTypes - Per input supply a type (Class or typeguard function) to convert into
|
|
20
|
+
*/
|
|
21
|
+
export declare function checkInput(inputChecks: any | Array<any>, uniformizeToTypes: any | Array<any>): MethodDecorator;
|
|
22
|
+
export declare function addResultShapesToScene(targetPrototype: any, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
23
|
+
/**
|
|
24
|
+
* Decorator to catch errors in OC and give sane error messages
|
|
25
|
+
*/
|
|
26
|
+
export declare function protectOC(hints?: string | Array<string>): MethodDecorator;
|
|
27
|
+
export declare function asSketch(targetPrototype: any, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** This is the main method to target one or more OC objects for deletion after main class is garbage collected */
|
|
2
|
+
export declare function targetOcForGarbageCollection(obj: any, ocObj: any): void;
|
|
3
|
+
/** Unregister with token (the Oc instance) */
|
|
4
|
+
export declare function removeOcTargetForGarbageCollection(ocObj: any): any;
|