Skip to content

Commit 5b2298d

Browse files
committed
writeStep and readSter use Shape rather than Solid
1 parent faf288e commit 5b2298d

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

lib/interfaces.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ export interface IWire extends IShape<IWire> {
243243
polygonize(): Float32Array;
244244
}
245245

246+
export type Shape = ISolid | IWire | IFace | IShell | IVertex;
247+
246248
export interface OCC {
247249
makeAxis(): IAxis;
248250

@@ -383,13 +385,10 @@ export interface OCC {
383385

384386
gc(): void;
385387

386-
writeSTEP(filename: string, solid: ISolid): boolean;
387-
writeSTEP(filename: string, solids: ISolid[]): boolean;
388-
writeSTEP(filename: string, ...solids: ISolid[]): boolean;
389-
readSTEP(
390-
filename: string,
391-
callback: (err: Error | null, solids: ISolid[]) => void
392-
): void;
388+
writeSTEP(filename: string, shape: Shape): boolean;
389+
writeSTEP(filename: string, shapes: Shape[]): boolean;
390+
writeSTEP(filename: string, ...shapes: Shape[]): boolean;
391+
readSTEP(filename: string, callback: (err: Error | null, shapes: Shape[]) => void): void;
393392

394393
writeBREP(filename: string, solid: ISolid): boolean;
395394
writeBREP(filename: string, solids: ISolid[]): boolean;

test/test_makePipeShell.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ describe("makePipeShell", () => {
7878
const spine = occ.makeWire(occ.makeLine([0, 0, 0], [0, 0, 10]));
7979

8080

81-
const angleInDegree = 180;
82-
const height = 40;
81+
const angleInDegree = 90;
82+
const height = 10;
8383
const points = makeHelixPoints({ startPoint: p1, angleInDegree, height, nbPoints: 10 });
8484

8585
// we want a auxilary curve, one point should coincide with one edge of the triangle and

0 commit comments

Comments
 (0)