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,429 @@
|
|
|
1
|
+
import { PointLike, PointLikeOrAnyShapeOrCollection, ShapeType, AnyShape, AnyShapeOrSequence, AnyShapeOrCollection, AnyShapeCollection, MakeShapeCollectionInput, Pivot, AnyShapeSequence, Alignment, Bbox, Side, MeshingQualitySettings, LayoutOrderType, LayoutOptions, DimensionLevelSettings, AnnotationAutoDimStrategy, MeshShape, MeshShapeBuffer, Annotation, MainAxis, ObjStyle, toDXFOptions, toSVGOptions, Obj, Point, Shape, Wire, Brep } from './internal';
|
|
2
|
+
export declare class ShapeCollection {
|
|
3
|
+
_oc: any;
|
|
4
|
+
_brep: Brep;
|
|
5
|
+
_obj: Obj;
|
|
6
|
+
_parent: AnyShapeOrCollection;
|
|
7
|
+
shapes: Array<AnyShape>;
|
|
8
|
+
_groups: {
|
|
9
|
+
[key: string]: Array<AnyShape>;
|
|
10
|
+
};
|
|
11
|
+
_packerModule: any;
|
|
12
|
+
annotations: Array<Annotation>;
|
|
13
|
+
constructor(entities?: MakeShapeCollectionInput, ...args: any[]);
|
|
14
|
+
/** Manually clear OC Shapes instances - used to make sure memory is released
|
|
15
|
+
* NOTE: Please use automatic garbageCollection.targetOcForGarbageCollection() for more generic approach
|
|
16
|
+
*/
|
|
17
|
+
_clearOcShapes(): void;
|
|
18
|
+
/** Try to convert anything to a ShapeCollection */
|
|
19
|
+
fromAll(entities?: MakeShapeCollectionInput): AnyShapeCollection;
|
|
20
|
+
/** Class method */
|
|
21
|
+
static fromAll(s: any, ...args: any[]): ShapeCollection;
|
|
22
|
+
/** Add entities (geometry and shapes) to Shape Collection */
|
|
23
|
+
_addEntities(entities?: MakeShapeCollectionInput, group?: string): AnyShapeCollection;
|
|
24
|
+
/** Add entities as named group */
|
|
25
|
+
addGroup(group?: string, entities?: MakeShapeCollectionInput): AnyShapeCollection;
|
|
26
|
+
_defineGroup(name: string, shapes?: ShapeCollection): any;
|
|
27
|
+
/** Get available groups in this ShapeCollection */
|
|
28
|
+
groups(): Array<string>;
|
|
29
|
+
/** Get shapes in group as ShapeCollection */
|
|
30
|
+
getGroup(name: string): ShapeCollection;
|
|
31
|
+
/** Alias for getGroup */
|
|
32
|
+
group(name: string): ShapeCollection;
|
|
33
|
+
/** Iterate over Shapes by group, ungrouped Shapes are grouped together
|
|
34
|
+
* NOTE: for grouping within ShapeCollection see ShapeCollection addGroup()
|
|
35
|
+
* This is not the same as the global group() function that makes a ShapeCollection
|
|
36
|
+
*/
|
|
37
|
+
forEachGroup(func: (groupName: string, groupedShapes: ShapeCollection) => void): void;
|
|
38
|
+
/** EXPERIMENTAL: try to be compatible with Arrays by setting index keys on this instance */
|
|
39
|
+
_setFakeArrayKeys(): void;
|
|
40
|
+
/** EXPERIMENTAL: Set references to Shapes by name directly on instance */
|
|
41
|
+
_setFakeNameKeys(): void;
|
|
42
|
+
/** EXPERIMENTAL: directly access groups by adding property to instance
|
|
43
|
+
* TODO: Check for overwriting properties!
|
|
44
|
+
*/
|
|
45
|
+
_setFakeGroupKeys(): void;
|
|
46
|
+
/** Export to OC ListOfStype, used for Splitter algoritm */
|
|
47
|
+
_toOcListOfShape(): any;
|
|
48
|
+
toOcShapes(): Array<any>;
|
|
49
|
+
/** Combine all children Shapes into one Compund Shape (for export) */
|
|
50
|
+
toOcCompound(): any;
|
|
51
|
+
getShapes(): Array<AnyShape>;
|
|
52
|
+
/** Array API - for consitent API with Array */
|
|
53
|
+
get length(): number;
|
|
54
|
+
/** Array API - For consistency with Array */
|
|
55
|
+
concat(other: AnyShapeSequence): AnyShapeCollection;
|
|
56
|
+
/** Array API - For consistency with Array */
|
|
57
|
+
map(mapFunc: (element: AnyShape, index?: number, array?: Array<AnyShape>) => AnyShape): AnyShapeCollection;
|
|
58
|
+
/** Array API */
|
|
59
|
+
every(checkFunc: (element: AnyShape, index?: number, array?: Array<AnyShape>) => boolean): boolean;
|
|
60
|
+
/** Place this ShapeCollection (and all it's child Shapes) into the Obj container */
|
|
61
|
+
setObj(obj: Obj): void;
|
|
62
|
+
/** Add Shape to ShapeCollection */
|
|
63
|
+
add(shapes?: AnyShapeOrSequence, ...args: any[]): this;
|
|
64
|
+
/** Array API - Add Shape to ShapeCollection*/
|
|
65
|
+
push(shape: AnyShape): ShapeCollection;
|
|
66
|
+
/** Add Shape to ShapeCollection but not if it is already in it */
|
|
67
|
+
addUnique(shapes?: ShapeCollection, ...args: any[]): this;
|
|
68
|
+
/** Remove Shapes from ShapeCollection */
|
|
69
|
+
remove(shapes: AnyShapeOrCollection, ...args: any[]): ShapeCollection;
|
|
70
|
+
/** Clear current ShapeCollection */
|
|
71
|
+
empty(): this;
|
|
72
|
+
/** Return a new Collection of given Shapes removed */
|
|
73
|
+
removed(shapes: AnyShapeOrCollection): ShapeCollection;
|
|
74
|
+
/** Add Shape at beginning of collection */
|
|
75
|
+
prepend(shape: AnyShape): ShapeCollection;
|
|
76
|
+
/** Add Shape at beginning of collection */
|
|
77
|
+
prepended(shape: AnyShape): ShapeCollection;
|
|
78
|
+
/** Add Shape to right of current ShapeCollection */
|
|
79
|
+
addAligned(shape: AnyShape): this;
|
|
80
|
+
replace(shapes: AnyShapeOrCollection, newShapes: AnyShapeOrCollection): ShapeCollection;
|
|
81
|
+
/** Set attribute to all shapes */
|
|
82
|
+
attribute(key: string, value: any): AnyShapeCollection;
|
|
83
|
+
/** Shape API - move all Shapes in ShapeCollection */
|
|
84
|
+
move(vector: PointLike, ...args: any[]): AnyShapeCollection;
|
|
85
|
+
/** Shape API - move a copy of all Shapes in ShapeCollection */
|
|
86
|
+
moved(vector: PointLike, ...args: any[]): AnyShapeCollection;
|
|
87
|
+
/** Shape API - Move center of Collection to a given point */
|
|
88
|
+
moveTo(to: PointLike, ...args: any[]): AnyShapeCollection;
|
|
89
|
+
/** Center Shape so that the center of the Shape is at the origin */
|
|
90
|
+
moveToOrigin(): AnyShapeCollection;
|
|
91
|
+
/** Aliass for move along x-direction */
|
|
92
|
+
moveX(distance: number): this;
|
|
93
|
+
/** Aliass for move along x-direction */
|
|
94
|
+
moveY(distance: number): this;
|
|
95
|
+
/** Aliass for move along x-direction */
|
|
96
|
+
moveZ(distance: number): this;
|
|
97
|
+
/** Move shapes to given x coordinate */
|
|
98
|
+
moveToX(x: number): this;
|
|
99
|
+
/** Move shapes to given x coordinate */
|
|
100
|
+
moveToY(y: number): this;
|
|
101
|
+
/** Move shapes to given x coordinate */
|
|
102
|
+
moveToZ(z: number): this;
|
|
103
|
+
/** Shape API */
|
|
104
|
+
rotateEuler(degX?: number, degY?: number, degZ?: number, pivot?: PointLike): AnyShapeCollection;
|
|
105
|
+
/** Shape API */
|
|
106
|
+
rotatedEuler(degX?: number, degY?: number, degZ?: number, pivot?: PointLike): AnyShapeCollection;
|
|
107
|
+
/** Shape API - Rotate all Shapes around their centers with a given x,y,z angles */
|
|
108
|
+
rotate(r: PointLike, ...args: any[]): AnyShapeCollection;
|
|
109
|
+
/** Shape API - Rotate all Shapes around the x-axis with a given angle and given pivot (default: center) */
|
|
110
|
+
rotateX(deg: number, pivot?: Pivot): AnyShapeCollection;
|
|
111
|
+
/** Shape API - Rotate all Shapes around the y-axis with a given angle and given pivot (default: center) */
|
|
112
|
+
rotateY(deg: number, pivot?: Pivot): AnyShapeCollection;
|
|
113
|
+
/** Shape API - Rotate all Shapes around the z-axis with a given angle and given pivot (default: center of ShapeCollection) */
|
|
114
|
+
rotateZ(deg: number, pivot?: Pivot): AnyShapeCollection;
|
|
115
|
+
/** Shape API - Rotate all Shapes around a specific axis with a given angle (default: [0,0,1]) and given pivot (default: center) */
|
|
116
|
+
rotateAround(angle: number, axis?: PointLike, pivot?: Pivot): AnyShapeCollection;
|
|
117
|
+
/** Scale entire ShapeCollection */
|
|
118
|
+
scale(factor?: number, pivot?: PointLike): AnyShapeCollection;
|
|
119
|
+
/** Scale entire ShapeCollection and return copy */
|
|
120
|
+
scaled(factor?: number, pivot?: PointLike): AnyShapeCollection;
|
|
121
|
+
/** Shape API - Align Shapecollection to other Shape or ShapeCollection */
|
|
122
|
+
align(other: AnyShapeOrCollection, pivot?: Pivot, alignment?: Alignment): AnyShapeOrCollection;
|
|
123
|
+
/** Shape API - */
|
|
124
|
+
alignByPoints(...args: any[]): AnyShapeCollection;
|
|
125
|
+
/** Shape API - */
|
|
126
|
+
alignedByPoints(...args: any[]): AnyShapeCollection;
|
|
127
|
+
/** Shape API - */
|
|
128
|
+
rotateVecToVec(...args: any[]): AnyShapeCollection;
|
|
129
|
+
/** Shape API - Make an geometric array by offset ShapeCollection */
|
|
130
|
+
array(size: number | Array<number>, spacings: number | Array<number>): AnyShapeCollection;
|
|
131
|
+
/** Shape API */
|
|
132
|
+
_array1D(size: number, spacingOffset: PointLike): AnyShapeCollection;
|
|
133
|
+
/** Shape API - Mirror Shapes in ShapeCollection with mirror plane defined by planeNormal and origin */
|
|
134
|
+
mirrored(origin: PointLike, planeNormal: PointLike): AnyShapeCollection;
|
|
135
|
+
/** Shape API - Mirror Shapes relative to X-plane (x=0) with its collection center as pivot or given offset x-coord */
|
|
136
|
+
mirrorX(offset?: number): AnyShapeCollection;
|
|
137
|
+
/** Shape API - Mirror copies of Shapes relative to X-plane (x=0) with its collection center as pivot or given offset x-coord */
|
|
138
|
+
_mirroredX(offset?: number): ShapeCollection;
|
|
139
|
+
/** Shape API - Mirror copies of Shapes relative to X-plane (x=0) with its collection center as pivot or given offset x-coord */
|
|
140
|
+
mirroredX(offset?: number): ShapeCollection;
|
|
141
|
+
/** Shape API - Mirror Shapes relative to Y plane (y=0) with its collection center as pivot or given offset y-coord */
|
|
142
|
+
mirrorY(offset?: number): AnyShapeCollection;
|
|
143
|
+
/** Shape API - Mirror copies of Shapes relative to Y plane (y=0) with its collection center as pivot or given offset y-coord */
|
|
144
|
+
_mirroredY(offset?: number): ShapeCollection;
|
|
145
|
+
/** Shape API - Mirror copies of Shapes relative to Y plane (y=0) with its collection center as pivot or given offset y-coord */
|
|
146
|
+
mirroredY(offset?: number): ShapeCollection;
|
|
147
|
+
/** Shape API - Mirror Shapes relative to Z plane (z=0) with its collection center as pivot or given offset z-coord */
|
|
148
|
+
mirrorZ(offset?: number): AnyShapeCollection;
|
|
149
|
+
/** Shape API - Mirror copies of Shapes in Z-plane (z=0) with its collection center as pivot or given offset z-coord */
|
|
150
|
+
_mirroredZ(offset?: number): ShapeCollection;
|
|
151
|
+
/** Shape API - Mirror copies of Shapes relative to XZ plane with its collection center as pivot or given offset z-coord */
|
|
152
|
+
mirroredZ(offset?: number): ShapeCollection;
|
|
153
|
+
/** Shape API - offset Shapes in Collection */
|
|
154
|
+
offset(amount?: number, type?: string, onPlaneNormal?: PointLike): AnyShapeCollection;
|
|
155
|
+
/** Shape API - create copeis and offset Shapes in Collection */
|
|
156
|
+
offsetted(amount?: number, type?: string, onPlaneNormal?: PointLike): AnyShapeCollection;
|
|
157
|
+
/** Shape API - Extrude Shapes in ShapeCollection a certain amount in a given direction (default: [0,0,1]) */
|
|
158
|
+
extrude(amount?: number, direction?: PointLike): AnyShapeCollection;
|
|
159
|
+
/** Shape API - Extrude Shapes in ShapeCollection a certain amount in a given direction (default: [0,0,1]) */
|
|
160
|
+
extruded(amount?: number, direction?: PointLike): AnyShapeCollection;
|
|
161
|
+
thicken(amount: number, direction?: string): ShapeCollection;
|
|
162
|
+
/** Create a new ShapeCollection with thickened Shapes */
|
|
163
|
+
thickened(amount: number, direction?: string): ShapeCollection;
|
|
164
|
+
/** Just a simple forwarder fillet */
|
|
165
|
+
fillet(radius: number, at?: any): ShapeCollection;
|
|
166
|
+
/** Shape API: Copy entire ShapeCollection and its Shapes and return a new one */
|
|
167
|
+
_copy(): ShapeCollection;
|
|
168
|
+
/** Shape API: Copy entire ShapeCollection and its Shapes and return a new one (add to Scene) */
|
|
169
|
+
copy(): ShapeCollection;
|
|
170
|
+
/** Make new ShapeCollection without copying the Shapes */
|
|
171
|
+
shallowCopy(): ShapeCollection;
|
|
172
|
+
clone(): ShapeCollection;
|
|
173
|
+
/** Shape API */
|
|
174
|
+
type(): string;
|
|
175
|
+
/** Shape API */
|
|
176
|
+
isShape(): boolean;
|
|
177
|
+
/** Shape/ShapeCollection API consistency */
|
|
178
|
+
isShapeCollection(): boolean;
|
|
179
|
+
static isShapeCollection(obj: any): boolean;
|
|
180
|
+
/** Shape API */
|
|
181
|
+
center(): Point;
|
|
182
|
+
/** Check if all Shapes in this collection are 2D and on the same plane */
|
|
183
|
+
is2D(): boolean;
|
|
184
|
+
is3D(): boolean;
|
|
185
|
+
/** Shape API - get combined bbox of all Shapes in Collection */
|
|
186
|
+
bbox(withAnnotations?: boolean): Bbox | null;
|
|
187
|
+
/** Shape API: get combined Shape area */
|
|
188
|
+
area(): number;
|
|
189
|
+
/** Shape API: get combined Shape volume */
|
|
190
|
+
volume(): number;
|
|
191
|
+
/** Shape API */
|
|
192
|
+
_hashcode(): string;
|
|
193
|
+
/** Shape API */
|
|
194
|
+
_intersections(others: PointLikeOrAnyShapeOrCollection): ShapeCollection;
|
|
195
|
+
/** Create intersecting Shapes between Shapes in this collection and other Shape or Collection */
|
|
196
|
+
intersections(others: PointLikeOrAnyShapeOrCollection): ShapeCollection;
|
|
197
|
+
/** Get Shapes that intersect with given Shape(s) */
|
|
198
|
+
intersecting(other: PointLikeOrAnyShapeOrCollection): ShapeCollection;
|
|
199
|
+
/** Alias for intersecting */
|
|
200
|
+
intersectors(other: PointLikeOrAnyShapeOrCollection): ShapeCollection;
|
|
201
|
+
/** Shape API */
|
|
202
|
+
contains(other: PointLikeOrAnyShapeOrCollection): boolean;
|
|
203
|
+
/** Find Shapes within ShapeCollection that entirely contain given other Shape */
|
|
204
|
+
containers(other: PointLikeOrAnyShapeOrCollection): ShapeCollection | AnyShape;
|
|
205
|
+
/** Return nearest Shape within this Collection to other given Shape(s) */
|
|
206
|
+
nearest(other: PointLikeOrAnyShapeOrCollection): AnyShape;
|
|
207
|
+
/** Shape API */
|
|
208
|
+
_intersectionsWithEdge(): any;
|
|
209
|
+
/** Shape API: Get alle Edges of Shapes */
|
|
210
|
+
vertices(): ShapeCollection;
|
|
211
|
+
/** Shape API: Get alle Edges of Shapes */
|
|
212
|
+
edges(): ShapeCollection;
|
|
213
|
+
/** Shape API: Get all Wires of Shapes in this Collection */
|
|
214
|
+
wires(): ShapeCollection;
|
|
215
|
+
/** Shape API: Get all Faces of Shapes */
|
|
216
|
+
faces(): ShapeCollection;
|
|
217
|
+
/** Shape API: Get all Shells of Shapes */
|
|
218
|
+
shells(): ShapeCollection;
|
|
219
|
+
/** Shape API: Get all Solids of Shapes */
|
|
220
|
+
solids(): ShapeCollection;
|
|
221
|
+
/** Return new ShapeCollection with only the visible Shapes */
|
|
222
|
+
visible(): ShapeCollection | AnyShape;
|
|
223
|
+
/** Shape API
|
|
224
|
+
* IMPORTANT: ShapeCollection.select() should probably be run in the context
|
|
225
|
+
* of the collection, not of individual shapes. Improving this can greatly improve
|
|
226
|
+
* chaining like box().select('E||Z').select('E<<X') - where the last select is in context of collection
|
|
227
|
+
*/
|
|
228
|
+
select(selectString?: string): ShapeCollection;
|
|
229
|
+
/** Array API - Pop last Shape from ShapeCollection*/
|
|
230
|
+
pop(): ShapeCollection;
|
|
231
|
+
/** Reverse order of the Shapes */
|
|
232
|
+
reverse(): this;
|
|
233
|
+
/** Shape API */
|
|
234
|
+
removeFromScene(): void;
|
|
235
|
+
/** Shape API */
|
|
236
|
+
replaceShape(newShapes: Shape | ShapeCollection): void;
|
|
237
|
+
/** Shape API: Project 3D Shapes on XY plane */
|
|
238
|
+
_project(planeNormal?: PointLike, all?: boolean): ShapeCollection;
|
|
239
|
+
/** Shape API: Public Project 3D Shapes on XY plane and add result to Scene */
|
|
240
|
+
project(planeNormal?: PointLike, all?: boolean): ShapeCollection;
|
|
241
|
+
/** Shape API: Generate elevation from a given side without adding to Scene */
|
|
242
|
+
_elevation(side?: Side, all?: boolean): ShapeCollection;
|
|
243
|
+
/** Shape API: Generate elevation from a given side and add to Scene */
|
|
244
|
+
elevation(side?: Side, all?: boolean): ShapeCollection;
|
|
245
|
+
/** Shape API: Generate isometric view from Side or corner of ViewCube ('frontlefttop') or PointLike coordinate
|
|
246
|
+
* Does not add to Scene
|
|
247
|
+
* Use showHidden=true to output with hidden lines
|
|
248
|
+
*/
|
|
249
|
+
_isometry(viewpoint?: string | PointLike, showHidden?: boolean): ShapeCollection;
|
|
250
|
+
/** Shape API: Generate isometric view from Side or corner of ViewCube ('frontlefttop') or PointLike coordinate
|
|
251
|
+
* Add to scene
|
|
252
|
+
* Use showHidden=true to output with hidden lines
|
|
253
|
+
*/
|
|
254
|
+
isometry(viewpoint?: string | PointLike, showHidden?: boolean): ShapeCollection;
|
|
255
|
+
iso(viewpoint?: string | PointLike, showHidden?: boolean): ShapeCollection;
|
|
256
|
+
/** Array API - Alias for ForEach to have compatitibility with Array */
|
|
257
|
+
forEach(func: (value: AnyShape, index: number, arr: Array<any>) => void): ShapeCollection;
|
|
258
|
+
/** Array API - Alias for sort to have compatitibility with Array */
|
|
259
|
+
sort(func: (a: any, b: any) => number): ShapeCollection;
|
|
260
|
+
/** Array API - Alias for find to have compatitibility with Array */
|
|
261
|
+
find(func: (value: any, index: number, arr: Array<any>) => any): any;
|
|
262
|
+
/** Array API - Filter Shapes in this Collection and return a new ShapeCollection or single Shape
|
|
263
|
+
*/
|
|
264
|
+
filter(func: (value: any, index: number, arr: Array<any>) => boolean): ShapeCollection;
|
|
265
|
+
reduce(func: (prevValue: number, curValue: AnyShape, index: number, arr: Array<AnyShape>) => number, startSum: number): number;
|
|
266
|
+
/** Get Shapes at index. NOTE: We can also use the fake index keys like collection[0] */
|
|
267
|
+
at(index: number): AnyShape;
|
|
268
|
+
/** Exclude given Shape from current collection */
|
|
269
|
+
not(shape: AnyShape): ShapeCollection;
|
|
270
|
+
/** Check if ShapeCollection is empty */
|
|
271
|
+
isEmpty(): boolean;
|
|
272
|
+
/** Alias for length */
|
|
273
|
+
count(): number;
|
|
274
|
+
specific(): ShapeCollection | AnyShape;
|
|
275
|
+
/** Try to calculate the bounding Wire
|
|
276
|
+
* Work in progress
|
|
277
|
+
* See original code: https://github.com/Open-Cascade-SAS/OCCT/blob/ae1683705ef5c9a7e767c5c873e7d725b04d262f/src/ShapeAnalysis/ShapeAnalysis_FreeBounds.cxx#L89
|
|
278
|
+
*/
|
|
279
|
+
boundary(): Wire;
|
|
280
|
+
/** Get Shapes of given type in ShapeCollection */
|
|
281
|
+
getShapesByType(type: ShapeType): ShapeCollection;
|
|
282
|
+
getShapesByTypes(types: Array<ShapeType>): ShapeCollection;
|
|
283
|
+
/** Shape API - Get all subshapes of type from Shapes in Collection */
|
|
284
|
+
getSubShapes(type: ShapeType): ShapeCollection;
|
|
285
|
+
/** Get first Shape of Collection */
|
|
286
|
+
first(): AnyShape;
|
|
287
|
+
/** Get last Shape of Collection */
|
|
288
|
+
last(): AnyShape;
|
|
289
|
+
/** Get all direct children Shapes in this Collection */
|
|
290
|
+
children(): Array<AnyShape>;
|
|
291
|
+
/** Alias: remove this eventually! */
|
|
292
|
+
all(): Array<AnyShape>;
|
|
293
|
+
/** get lowest Shape type */
|
|
294
|
+
lowestType(): ShapeType;
|
|
295
|
+
/** check if this Collection has a specific instance of a Geometry */
|
|
296
|
+
has(s: AnyShapeOrCollection): boolean;
|
|
297
|
+
/** Array API */
|
|
298
|
+
includes(s: AnyShapeOrCollection): boolean;
|
|
299
|
+
/** Check if this Collection has a Shape of a given type */
|
|
300
|
+
hasType(type: ShapeType): boolean;
|
|
301
|
+
/** Array API - Get index of given Shape, if not exists -1 */
|
|
302
|
+
indexOf(s: Shape): number;
|
|
303
|
+
/** Array API - */
|
|
304
|
+
slice(start: number, end: number): ShapeCollection;
|
|
305
|
+
/** Get the Shapes in current collection that are also in the other one with the same Geometry */
|
|
306
|
+
getEquals(others: AnyShapeOrCollection): ShapeCollection;
|
|
307
|
+
/** Get the Shapes that the same, but might be translated
|
|
308
|
+
* NOTE: this might not be enough to establish
|
|
309
|
+
*
|
|
310
|
+
*/
|
|
311
|
+
getEqualsTranslated(others: AnyShapeOrCollection): ShapeCollection;
|
|
312
|
+
/** Combine two ShapeCollections and also try to upgrade Shapes that might be combined into higher order Shapes */
|
|
313
|
+
combine(other: ShapeCollection): ShapeCollection;
|
|
314
|
+
combined(other: ShapeCollection): ShapeCollection;
|
|
315
|
+
/** Try to combine collection of shapes into a higher order ShapeCollection */
|
|
316
|
+
upgrade(): ShapeCollection;
|
|
317
|
+
/** Try to combine collection of shapes into a higher order ShapeCollection */
|
|
318
|
+
upgraded(): ShapeCollection;
|
|
319
|
+
/** Try to combine into higher order Shape of same type of Shapes in Collection */
|
|
320
|
+
upgradeShapesByType(): this;
|
|
321
|
+
/** Combine touching Shapes into groups with names like touching{{n=0,1,2}} */
|
|
322
|
+
groupTouching(): this;
|
|
323
|
+
/** Check downgrade */
|
|
324
|
+
checkDowngrade(): ShapeCollection;
|
|
325
|
+
/** Force unique Geometry based on the equals() method ( not hash ) */
|
|
326
|
+
unique(tolerance?: number): ShapeCollection;
|
|
327
|
+
/** Remove doubles based on OC hash */
|
|
328
|
+
distinct(): ShapeCollection;
|
|
329
|
+
/** Try to sew Shapes (like Edges, Wires, Faces, Shells) together to create a Face, Shell, Solid or Compound */
|
|
330
|
+
_sewed(): AnyShapeOrCollection;
|
|
331
|
+
/** Combining Linear Shapes (Edges and Wires) into Wires connected by Vertices
|
|
332
|
+
* For Edges that overlap this does not work ( union could work: TODO )
|
|
333
|
+
* All other Shapes except Edges are kept in the collection
|
|
334
|
+
* TODO: Use OC native methods here!
|
|
335
|
+
*/
|
|
336
|
+
_connectLinearShapes(): this;
|
|
337
|
+
/** Removing Shapes that are contained by others in the Collection */
|
|
338
|
+
_removeContained(): ShapeCollection;
|
|
339
|
+
/** The same as _removeContained but returns a new Collection */
|
|
340
|
+
_removedContained(): ShapeCollection;
|
|
341
|
+
/** Test if the collections are the same */
|
|
342
|
+
equals(other: AnyShapeOrCollection): boolean;
|
|
343
|
+
/** Check null or single, and return single value if the case */
|
|
344
|
+
checkSingle(): AnyShape | ShapeCollection;
|
|
345
|
+
/** Collapse ShapeCollection into one Shape if there is only one */
|
|
346
|
+
collapse(): AnyShape | ShapeCollection;
|
|
347
|
+
toArray(): Array<AnyShape>;
|
|
348
|
+
_subtracted(other: AnyShapeOrCollection): ShapeCollection;
|
|
349
|
+
/** Subtract Shape or ShapeCollection from current ShapeCollection and return new ShapeCollection */
|
|
350
|
+
subtracted(other: AnyShapeOrCollection): ShapeCollection;
|
|
351
|
+
subtract(other: AnyShapeOrCollection): ShapeCollection;
|
|
352
|
+
/** Shape API - Try to union all shapes in Collection (without adding to Scene) */
|
|
353
|
+
_unioned(other?: AnyShapeOrCollection, noRecurse?: boolean): ShapeCollection | AnyShape;
|
|
354
|
+
/** Shape API - Try to union all shapes in Collection and add to Scene */
|
|
355
|
+
unioned(other?: AnyShapeOrCollection): ShapeCollection | AnyShape;
|
|
356
|
+
/** Shape API - Try to union all shapes in Collection
|
|
357
|
+
* TODO: test and make more robust for a variety of Shapes in a Collection
|
|
358
|
+
*/
|
|
359
|
+
union(): this;
|
|
360
|
+
/** Shape API - Add all shapes in the collection to the Scene */
|
|
361
|
+
addToScene(): ShapeCollection;
|
|
362
|
+
color(color: any): this;
|
|
363
|
+
/** Make all Shapes in this ShapeCollection dashed lines */
|
|
364
|
+
dashed(): this;
|
|
365
|
+
/** Assign lineWidth to all Shapes in collection */
|
|
366
|
+
lineWidth(lw: number): this;
|
|
367
|
+
/** Shape API - Style all Shapes in Collection */
|
|
368
|
+
style(newStyle: ObjStyle): ShapeCollection;
|
|
369
|
+
/** Return this Shape wrapped with a Obj instance for adding it to the scene */
|
|
370
|
+
object(): Obj;
|
|
371
|
+
/** Check if there is an Obj container tied to current ShapeCollection
|
|
372
|
+
* If so: return it, otherwise make one and return that
|
|
373
|
+
*/
|
|
374
|
+
checkObj(): Obj;
|
|
375
|
+
/** NOTE: We don't use set/get here, because it doesnt play well with chaining */
|
|
376
|
+
name(n?: string): this | string;
|
|
377
|
+
/** Set name */
|
|
378
|
+
setName(newName: string): this;
|
|
379
|
+
/** Get name of container Obj */
|
|
380
|
+
getName(): string | undefined;
|
|
381
|
+
/** Shape API - hide all Shapes in Collection */
|
|
382
|
+
hide(): this;
|
|
383
|
+
/** Shape API - show all Shapes in Collection */
|
|
384
|
+
show(): this;
|
|
385
|
+
/** Flatten all Shapes into new Shapes, align to one plane and return new ShapeCollection
|
|
386
|
+
* If an axis is given all Shapes are flattened along that axis and placed at 0 at that axis
|
|
387
|
+
* Otherwise we consider shapes as extrusions and we flatten according to _extrudedFace()
|
|
388
|
+
*/
|
|
389
|
+
flattened(axis?: MainAxis, filterDuplicates?: boolean): AnyShapeCollection;
|
|
390
|
+
/** Layout Shapes on XY plane within a given Layout order */
|
|
391
|
+
layout(order: LayoutOrderType, copy: boolean, options: LayoutOptions): ShapeCollection;
|
|
392
|
+
_placeLine(shape: AnyShape, prevPosition: Point, margin: number, index: number): Point;
|
|
393
|
+
pack(options: LayoutOptions, copy?: boolean): ShapeCollection;
|
|
394
|
+
_makeBinPackBox(shape: AnyShape, margin: number, index: number): any;
|
|
395
|
+
_calculateSizeSkewness(box: any): number;
|
|
396
|
+
/** Add annotations of this ShapeCollection */
|
|
397
|
+
addAnnotations(a: Annotation | Array<Annotation>): this;
|
|
398
|
+
/** Make (semi) automatic dimension lines through the Shapes of this collection at levels (in percentage of total size) along MainAxis within bbox
|
|
399
|
+
* @param options:DimensionLevelSettings
|
|
400
|
+
* {
|
|
401
|
+
* levels: Array< Record<MainAxis,number>
|
|
402
|
+
* minDistance: number (0-1)
|
|
403
|
+
* }
|
|
404
|
+
*
|
|
405
|
+
*/
|
|
406
|
+
autoDim(settings?: DimensionLevelSettings, strategy?: AnnotationAutoDimStrategy): ShapeCollection;
|
|
407
|
+
/** Shape API - Turn Edges (Line, Arc, Spline etc) into discreet (straight) edges for use in THREE JS
|
|
408
|
+
* Flattens all Shapes into one array of edges */
|
|
409
|
+
toMeshShapes(quality?: MeshingQualitySettings): Array<MeshShape>;
|
|
410
|
+
/** Output all Shapes in Collection to a single ShapeMeshBuffer */
|
|
411
|
+
toMeshShapeBuffer(quality: MeshingQualitySettings): MeshShapeBuffer;
|
|
412
|
+
toData(): Array<Object>;
|
|
413
|
+
toString(): string;
|
|
414
|
+
/** Get all edges of 2D XY Shapes in this collection
|
|
415
|
+
* Supply true to force all Shapes, even invisible ones!
|
|
416
|
+
*/
|
|
417
|
+
_get2DXYShapeEdges(all?: boolean): ShapeCollection;
|
|
418
|
+
/** Get Annotations tied to the collection or sub Shapes */
|
|
419
|
+
getAnnotations(onlyVisibleShapes?: boolean): Array<Annotation>;
|
|
420
|
+
/** Export Shapes that are 2D and on XY plane to SVG
|
|
421
|
+
* All shapes will be converted to Edges
|
|
422
|
+
* @param options { all:boolean, annotations: boolean, contours:boolean }
|
|
423
|
+
*/
|
|
424
|
+
toSVG(options?: toSVGOptions): string;
|
|
425
|
+
_getDimensionLinesSvgElems(): string;
|
|
426
|
+
toDXF(options?: toDXFOptions): string | null;
|
|
427
|
+
/** Convenience method for saving files in browser and node */
|
|
428
|
+
save(filename?: string, options?: any, shapes?: ShapeCollection | null): void;
|
|
429
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MakeShellInput, ThickenDirection, AnyShapeOrCollection, AnyShapeSequence, Vector, Point, Shape, Wire, Face, Solid } from './internal';
|
|
2
|
+
type ISolid = Solid;
|
|
3
|
+
export declare class Shell extends Shape {
|
|
4
|
+
constructor(entities?: any, ...args: Array<any>);
|
|
5
|
+
_fromOcShell(ocShell: any): Shell;
|
|
6
|
+
fromAll(entities: MakeShellInput): Shell;
|
|
7
|
+
fromFace(face: Face): Shell;
|
|
8
|
+
fromFaces(faces: MakeShellInput, forceShell?: boolean): Shell | AnyShapeOrCollection | null;
|
|
9
|
+
/** Creates an Shell by interpolating between two (=Loft) or more Edges
|
|
10
|
+
* Generally used in the context of filling but might be handy as seperate function */
|
|
11
|
+
fromEdges(edges: AnyShapeSequence): Shell;
|
|
12
|
+
/** Create a Shell from a Wireframe of planar Edges or Wires
|
|
13
|
+
* See: https://old.opencascade.com/doc/occt-7.5.0/overview/html/occt_user_guides__modeling_algos.html
|
|
14
|
+
* docs: https://dev.opencascade.org/doc/refman/html/class_b_o_p_algo___tools.html
|
|
15
|
+
*/
|
|
16
|
+
fromWireFrame(wireframe: AnyShapeOrCollection): this;
|
|
17
|
+
/** Get the outer Wire of Shell (private) */
|
|
18
|
+
_toWire(): Wire;
|
|
19
|
+
/** Get the outer Wire of Shell */
|
|
20
|
+
toWire(): Wire;
|
|
21
|
+
/** Returns the first Face. Handy for one Face Shells (private) */
|
|
22
|
+
_toFace(): Face;
|
|
23
|
+
toFace(): Face;
|
|
24
|
+
_toSolid(): ISolid;
|
|
25
|
+
toSolid(): ISolid;
|
|
26
|
+
_setToOc(): void;
|
|
27
|
+
ocGeom(): any;
|
|
28
|
+
_ocGeom(): any;
|
|
29
|
+
/** Get outer Wire of this Shell */
|
|
30
|
+
outerWire(): Wire;
|
|
31
|
+
/** Calculated center of Surface (not middle!) */
|
|
32
|
+
center(): Point;
|
|
33
|
+
is2DXY(): boolean;
|
|
34
|
+
normal(): Vector;
|
|
35
|
+
/** Get normal at a given Point on the surface */
|
|
36
|
+
normalAt(point: Point): Vector;
|
|
37
|
+
/** Thicken the shell to create a Solid (private: without adding to Scene) */
|
|
38
|
+
_thickened(amount: number, direction: ThickenDirection): ISolid;
|
|
39
|
+
/** Thicken the shell to create a Solid (private: without adding to Scene) */
|
|
40
|
+
thickened(amount: number, direction: ThickenDirection): ISolid;
|
|
41
|
+
/** Private method that is used by thickened */
|
|
42
|
+
_bridgeThickened(amount: number): ISolid;
|
|
43
|
+
/** Stitch two Shells together to create a Solid (EXPERIMENTAL) */
|
|
44
|
+
_bridge(other: Shell): ISolid;
|
|
45
|
+
/** Export entity and minimal data as string (used for outputting on console and hashing ) */
|
|
46
|
+
toString(): string;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { PointLike, Cursor, AnyShape, SketchPlaneName, PointLikeSequence, AnyShapeOrCollection, SelectionString, AnyShapeOrCollectionOrSelectionString, Point, Vector, ShapeCollection, Edge, Face, Brep } from './internal';
|
|
2
|
+
import { gp_Ax3, gp_Trsf } from './wasm/archiyou-opencascade';
|
|
3
|
+
export declare const SKETCH_FILLET_SIZE = 5;
|
|
4
|
+
export declare const SKETCH_CHAMFER_DISTANCE = 10;
|
|
5
|
+
export declare const SKETCH_CHAMFER_ANGLE = 45;
|
|
6
|
+
export interface SketchPlane {
|
|
7
|
+
origin?: Point;
|
|
8
|
+
xDir: Vector;
|
|
9
|
+
yDir: Vector;
|
|
10
|
+
zDir: Vector;
|
|
11
|
+
}
|
|
12
|
+
interface Operation {
|
|
13
|
+
type: 'union' | 'subtract' | 'intersection' | 'fillet' | 'bevel';
|
|
14
|
+
resetOps?: boolean;
|
|
15
|
+
params?: Object;
|
|
16
|
+
}
|
|
17
|
+
export declare class Sketch {
|
|
18
|
+
DEFAULT_PLANE_XDIR: number[];
|
|
19
|
+
DEFAULT_PLANE_YDIR: number[];
|
|
20
|
+
DEFAULT_PLANE_ZDIR: number[];
|
|
21
|
+
DEFAULT_PLANE_ORIGIN: number[];
|
|
22
|
+
DEFAULT_CURSOR: {
|
|
23
|
+
point: Point;
|
|
24
|
+
direction: Vector;
|
|
25
|
+
};
|
|
26
|
+
PLANE_NAME_TO_PLANE: {
|
|
27
|
+
[key: string]: SketchPlane;
|
|
28
|
+
};
|
|
29
|
+
_oc: any;
|
|
30
|
+
_brep: Brep;
|
|
31
|
+
mode: string;
|
|
32
|
+
workplane: SketchPlane;
|
|
33
|
+
cursors: Array<Cursor>;
|
|
34
|
+
activeCursor: Cursor;
|
|
35
|
+
prevLocalCursor: Cursor;
|
|
36
|
+
shapes: ShapeCollection;
|
|
37
|
+
pendingShapes: ShapeCollection;
|
|
38
|
+
pendingOperations: Array<Operation>;
|
|
39
|
+
pendingSelections: ShapeCollection;
|
|
40
|
+
_autoOp: boolean;
|
|
41
|
+
ocLcs: gp_Ax3;
|
|
42
|
+
ocGcs: gp_Ax3;
|
|
43
|
+
ocLocalToWorldTransform: gp_Trsf;
|
|
44
|
+
ocWorldToLocalTransform: gp_Trsf;
|
|
45
|
+
/** Start a 2D sketch on specific Plane */
|
|
46
|
+
constructor(plane?: SketchPlaneName | Face | PointLike, yAxis?: PointLike);
|
|
47
|
+
/** Set autoOps on or off */
|
|
48
|
+
autoOp(v: boolean): Sketch;
|
|
49
|
+
_createSketchLayer(): void;
|
|
50
|
+
_removeSketchLayer(): void;
|
|
51
|
+
/** Set workplane from x and y coordinate */
|
|
52
|
+
_makeWorkplaneFromXY(x: PointLike, y: PointLike): void;
|
|
53
|
+
/** Set workplane of Sketch from plane string (xy,xz,yz) or side (top, bottom, left, right, front, back) */
|
|
54
|
+
_planeNameToWorkplane(plane: SketchPlaneName): void;
|
|
55
|
+
/** Start a 2D Sketch workplane at a Face
|
|
56
|
+
* !!!! Not to be confused with on(Shape) which draws on a curved surface using UV coordinates !!!! */
|
|
57
|
+
_faceToWorkplane(shape: AnyShape): void;
|
|
58
|
+
/** Drawing directly on a curved surface with UV coords */
|
|
59
|
+
on(surface: Face): void;
|
|
60
|
+
/** Prepare transformations needed for turning local coords into world ones */
|
|
61
|
+
_setWorkplaneTransforms(): void;
|
|
62
|
+
/** Set origin of sketch */
|
|
63
|
+
origin(point: PointLike): Sketch;
|
|
64
|
+
/** This is the active cursor of all cursors in this.cursors */
|
|
65
|
+
_setActiveCursor(cursor?: Cursor): void;
|
|
66
|
+
/** Set given Cursor as all cursors - in world coordinates */
|
|
67
|
+
_setCursor(cursor: Cursor | PointLike): void;
|
|
68
|
+
/** Update cursor based on (just created) Shape */
|
|
69
|
+
_setCursorByShape(shape: AnyShape): void;
|
|
70
|
+
/** Used for relative coordinates between arguments.
|
|
71
|
+
* Like arcTo([100,100],['+100','+100']) - second Point is relative to [100,100], so we need to set it!
|
|
72
|
+
* NOTE: problem with using relative polar coordinates because we don't know arc tangent yet!
|
|
73
|
+
* */
|
|
74
|
+
_setPrevLocalPoint(point: PointLike): void;
|
|
75
|
+
/** Resolve PointLike based on prevLocalPoint or Cursor */
|
|
76
|
+
_resolvePointLikeToLocalPoint(point: PointLike, ...args: any[]): Vector | Point;
|
|
77
|
+
/** Transform PointLike to absolute World coordinate with:
|
|
78
|
+
*
|
|
79
|
+
* - Resolve relative coordinates (cartesian and polar) - if not the same as cursor, can be set by prevLocalPoint
|
|
80
|
+
* - Transform local coords to world coordinates
|
|
81
|
+
*/
|
|
82
|
+
_transformPointToWorld(point: PointLike): Point;
|
|
83
|
+
/** Transform local coordinate Point to world coordinates */
|
|
84
|
+
_toWorld(point: Point): Point;
|
|
85
|
+
_toLocal(p: PointLike): Point;
|
|
86
|
+
_toLocalCursor(cursor: Cursor): Cursor;
|
|
87
|
+
/** Everything after a new Edge */
|
|
88
|
+
_processNewEdge(newEdge: Edge): void;
|
|
89
|
+
/** After creating a new Shape we see if we need to run operations on them */
|
|
90
|
+
_doPendingOps(newShapes: AnyShapeOrCollection): void;
|
|
91
|
+
/** Do pending operation */
|
|
92
|
+
_doOperation(op: Operation, newShapes: AnyShapeOrCollection): void;
|
|
93
|
+
/** Convenience method combining smartFaceOps and afterNewShapes */
|
|
94
|
+
_processNewFace(newFace: Face, autoOp?: boolean): void;
|
|
95
|
+
/** Apply union or subtraction based on relation of new Shape with existing ones in this.shapes */
|
|
96
|
+
_doFaceOps(newFace: Face, autoOp?: boolean): void;
|
|
97
|
+
/** Update pending Shapes after new Shapes */
|
|
98
|
+
_setPendingShapes(newShapes: AnyShapeOrCollection): void;
|
|
99
|
+
/** Combine All linear Shapes into Wires */
|
|
100
|
+
combine(): void;
|
|
101
|
+
/** Move cursor to local coordinate */
|
|
102
|
+
moveTo(point: PointLike, ...args: any[]): Sketch;
|
|
103
|
+
/** Line from active cursors to given point */
|
|
104
|
+
lineTo(point: PointLike, ...args: any[]): Sketch;
|
|
105
|
+
/** Make Arc from active cursors to given Point */
|
|
106
|
+
arcTo(mid: PointLike, end: PointLike): Sketch;
|
|
107
|
+
/** Make Spline from active cursors to given Point */
|
|
108
|
+
splineTo(points: PointLikeSequence, ...args: any[]): Sketch;
|
|
109
|
+
/** Combine all Edges and Wires and try to close it into single Shapes */
|
|
110
|
+
close(): Sketch;
|
|
111
|
+
/** Some created Faces need to be rotated to face workplane */
|
|
112
|
+
_rotateFaceToWorkplane(face: Face): void;
|
|
113
|
+
rectTo(point: PointLike, ...args: any[]): Sketch;
|
|
114
|
+
rect(width?: number, height?: number): Sketch;
|
|
115
|
+
circleTo(point: PointLike, ...args: any[]): Sketch;
|
|
116
|
+
circle(radius: number): Sketch;
|
|
117
|
+
/** Make all shapes pending */
|
|
118
|
+
all(): Sketch;
|
|
119
|
+
/** Set pendingShapes as temporary (will not be imported) */
|
|
120
|
+
isTemp(): Sketch;
|
|
121
|
+
/** Select certain parts of pendingShapes for operations to use */
|
|
122
|
+
select(selectionString: SelectionString): Sketch;
|
|
123
|
+
/** Set vertices of pendingShapes as cursors */
|
|
124
|
+
atVertices(): Sketch;
|
|
125
|
+
/** Get and reset pending selections */
|
|
126
|
+
_getPendingSelections(): ShapeCollection;
|
|
127
|
+
/** Mirror all Shapes in Sketch */
|
|
128
|
+
mirror(origin?: PointLike, direction?: Vector, autoOp?: boolean): Sketch;
|
|
129
|
+
/** Offset pendingShapes a given amount with a specific type (tangent, arc, intersection) */
|
|
130
|
+
offset(amount?: number, type?: string): Sketch;
|
|
131
|
+
/** Offset pendingShapes of Sketch Shapes a given amount with a specific type (tangent, arc, intersection) */
|
|
132
|
+
offsetted(amount?: number, type?: string): Sketch;
|
|
133
|
+
thicken(amount: number): this;
|
|
134
|
+
thickened(amount: number): this;
|
|
135
|
+
/** Apply fillet to Edges or Faces */
|
|
136
|
+
fillet(size?: number, at?: AnyShapeOrCollectionOrSelectionString): Sketch;
|
|
137
|
+
/** Do fillet operation on last added Edge */
|
|
138
|
+
doFillet(newEdge: Edge, params: any): void;
|
|
139
|
+
chamfer(distance?: number, angle?: number, vertices?: AnyShapeOrCollectionOrSelectionString): Sketch;
|
|
140
|
+
/** Do chamfer operation on last added Edge */
|
|
141
|
+
doChamfer(newEdge: Edge, params: {
|
|
142
|
+
[key: string]: any;
|
|
143
|
+
}): void;
|
|
144
|
+
/** Combine Face Shapes into new one(s) */
|
|
145
|
+
union(): Sketch;
|
|
146
|
+
doUnion(newShapes: ShapeCollection, params: any): void;
|
|
147
|
+
/** Alias for union: Combine Face Shapes into one(s) */
|
|
148
|
+
add(): Sketch;
|
|
149
|
+
subtract(): Sketch;
|
|
150
|
+
doSubtract(newShapes: ShapeCollection, params: any): void;
|
|
151
|
+
cut(): Sketch;
|
|
152
|
+
intersection(): Sketch;
|
|
153
|
+
overlap(): Sketch;
|
|
154
|
+
/** Just get Shapes without adding to Scene (used by IO) */
|
|
155
|
+
getShapes(): ShapeCollection | AnyShape;
|
|
156
|
+
import(): ShapeCollection | AnyShape;
|
|
157
|
+
/** Alias for import */
|
|
158
|
+
importSketch(): ShapeCollection | AnyShape;
|
|
159
|
+
/** Alias for import */
|
|
160
|
+
end(): ShapeCollection | AnyShape;
|
|
161
|
+
}
|
|
162
|
+
export {};
|