Skip to content

Commit

Permalink
writeStep and readSter use Shape rather than Solid
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Jul 20, 2023
1 parent faf288e commit 5b2298d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions lib/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ export interface IWire extends IShape<IWire> {
polygonize(): Float32Array;
}

export type Shape = ISolid | IWire | IFace | IShell | IVertex;

export interface OCC {
makeAxis(): IAxis;

Expand Down Expand Up @@ -383,13 +385,10 @@ export interface OCC {

gc(): void;

writeSTEP(filename: string, solid: ISolid): boolean;
writeSTEP(filename: string, solids: ISolid[]): boolean;
writeSTEP(filename: string, ...solids: ISolid[]): boolean;
readSTEP(
filename: string,
callback: (err: Error | null, solids: ISolid[]) => void
): void;
writeSTEP(filename: string, shape: Shape): boolean;
writeSTEP(filename: string, shapes: Shape[]): boolean;
writeSTEP(filename: string, ...shapes: Shape[]): boolean;
readSTEP(filename: string, callback: (err: Error | null, shapes: Shape[]) => void): void;

writeBREP(filename: string, solid: ISolid): boolean;
writeBREP(filename: string, solids: ISolid[]): boolean;
Expand Down
4 changes: 2 additions & 2 deletions test/test_makePipeShell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ describe("makePipeShell", () => {
const spine = occ.makeWire(occ.makeLine([0, 0, 0], [0, 0, 10]));


const angleInDegree = 180;
const height = 40;
const angleInDegree = 90;
const height = 10;
const points = makeHelixPoints({ startPoint: p1, angleInDegree, height, nbPoints: 10 });

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

0 comments on commit 5b2298d

Please sign in to comment.