Skip to content

Commit 064549b

Browse files
renmed Outputs to Models
1 parent 7306fab commit 064549b

7 files changed

Lines changed: 15 additions & 14 deletions

File tree

packages/dev/base/lib/api/inputs/point-inputs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,11 @@ export namespace Point {
352352
transformation: Base.TransformMatrixes[];
353353
}
354354
export class ThreePointsNormalDto {
355-
constructor(point1?: Base.Point3, point2?: Base.Point3, point3?: Base.Point3) {
355+
constructor(point1?: Base.Point3, point2?: Base.Point3, point3?: Base.Point3, reverseNormal?: boolean) {
356356
if (point1 !== undefined) { this.point1 = point1; }
357357
if (point2 !== undefined) { this.point2 = point2; }
358358
if (point3 !== undefined) { this.point3 = point3; }
359+
if (reverseNormal !== undefined) { this.reverseNormal = reverseNormal; }
359360
}
360361
/**
361362
* Point 1

packages/dev/occt-worker/lib/api/occt/shapes/wire.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Inputs, Outputs } from "@bitbybit-dev/occt";
1+
import { Inputs, Models } from "@bitbybit-dev/occt";
22
import { ShapeParser } from "../../../shape-parser";
33
import { OCCTWorkerManager } from "../../../occ-worker/occ-worker-manager";
44
export class OCCTWire {
@@ -594,10 +594,10 @@ export class OCCTWire {
594594
* @shortname text wires deriv
595595
* @drawable true
596596
*/
597-
async textWiresWithData(inputs: Inputs.OCCT.TextWiresDto): Promise<Outputs.OCCT.TextWiresDataDto<Inputs.OCCT.TopoDSCompoundPointer>> {
598-
const res: Outputs.OCCT.ObjectDefinition<Outputs.OCCT.TextWiresDataDto<Inputs.OCCT.TopoDSCompoundPointer>, Inputs.OCCT.TopoDSShapePointer> = await this.occWorkerManager.genericCallToWorkerPromise("shapes.wire.textWiresWithData", inputs);
597+
async textWiresWithData(inputs: Inputs.OCCT.TextWiresDto): Promise<Models.OCCT.TextWiresDataDto<Inputs.OCCT.TopoDSCompoundPointer>> {
598+
const res: Models.OCCT.ObjectDefinition<Models.OCCT.TextWiresDataDto<Inputs.OCCT.TopoDSCompoundPointer>, Inputs.OCCT.TopoDSShapePointer> = await this.occWorkerManager.genericCallToWorkerPromise("shapes.wire.textWiresWithData", inputs);
599599
const mapped = ShapeParser.parse(res.data, res.shapes);
600-
const r: Outputs.OCCT.TextWiresDataDto<Inputs.OCCT.TopoDSShapePointer> = {
600+
const r: Models.OCCT.TextWiresDataDto<Inputs.OCCT.TopoDSShapePointer> = {
601601
...mapped,
602602
type: res.data.type,
603603
name: res.data.name,

packages/dev/occt-worker/lib/occ-worker/cache-helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { OpenCascadeInstance } from "@bitbybit-dev/occt/bitbybit-dev-occt/bitbybit-dev-occt";
2-
import { Outputs } from "@bitbybit-dev/occt";
2+
import { Models } from "@bitbybit-dev/occt";
33

44
export class CacheHelper {
55

@@ -114,7 +114,7 @@ export class CacheHelper {
114114
toReturn.hash = curHash;
115115
this.addToCache(curHash, toReturn);
116116
} else if (toReturn && toReturn.compound && toReturn.data && toReturn.shapes && toReturn.shapes.length > 0) {
117-
const objDef: Outputs.OCCT.ObjectDefinition<any, any> = toReturn;
117+
const objDef: Models.OCCT.ObjectDefinition<any, any> = toReturn;
118118
const compoundHash = this.computeHash({ ...args, index: "compound" });
119119
objDef.compound.hash = compoundHash;
120120
this.addToCache(compoundHash, objDef.compound);

packages/dev/occt-worker/lib/occ-worker/occ-worker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { OpenCascadeInstance } from "@bitbybit-dev/occt/bitbybit-dev-occt/bitbybit-dev-occt";
2-
import { ShapesHelperService, VectorHelperService, OccHelper, OCCTService, Outputs } from "@bitbybit-dev/occt";
2+
import { ShapesHelperService, VectorHelperService, OccHelper, OCCTService, Models } from "@bitbybit-dev/occt";
33
import { CacheHelper } from "./cache-helper";
44

55
let openCascade: OCCTService;
@@ -85,7 +85,7 @@ export const onMessageInput = (d: DataInput, postMessage) => {
8585

8686
if (!cacheHelper.isOCCTObject(res)) {
8787
if (res.compound && res.data && res.shapes && res.shapes.length > 0) {
88-
const r: Outputs.OCCT.ObjectDefinition<any, any> = res;
88+
const r: Models.OCCT.ObjectDefinition<any, any> = res;
8989
r.shapes = r.shapes.map(s => ({ id: s.id, shape: { hash: s.shape.hash, type: "occ-shape" } }));
9090
r.compound = { hash: r.compound.hash, type: "occ-shape" };
9191
result = r;

packages/dev/occt-worker/lib/shape-parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Inputs, Outputs } from "@bitbybit-dev/occt";
1+
import { Inputs, Models } from "@bitbybit-dev/occt";
22

33
export class ShapeParser {
4-
static parse(obj, partShapes: Outputs.OCCT.ShapeWithId<Inputs.OCCT.TopoDSShapePointer>[]) {
4+
static parse(obj, partShapes: Models.OCCT.ShapeWithId<Inputs.OCCT.TopoDSShapePointer>[]) {
55
const stack = [obj];
66
const visited = new Set();
77

packages/dev/occt/lib/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export * from "./shapes-helper.service";
22
export * from "./vector-helper.service";
33
export * as Inputs from "./inputs";
4-
export * as Outputs from "./outputs";
4+
export * as Models from "./outputs";

packages/dev/occt/lib/shape-parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { TopoDS_Shape } from "../bitbybit-dev-occt/bitbybit-dev-occt";
2-
import { Inputs, OCCTTransforms, Outputs } from "./index";
2+
import { Inputs, OCCTTransforms, Models } from "./index";
33

44
export class ShapeParser {
55

6-
static parse(obj, partShapes: Outputs.OCCT.ShapeWithId<TopoDS_Shape>[], prefix: string) {
6+
static parse(obj, partShapes: Models.OCCT.ShapeWithId<TopoDS_Shape>[], prefix: string) {
77
const stack = [obj];
88
let index = 0;
99
while (stack.length > 0) {

0 commit comments

Comments
 (0)