Skip to content

Commit 4dd30fc

Browse files
small update for prod build
1 parent 4849b31 commit 4dd30fc

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

src/lib/workers/occ/services/shapes/face.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,11 @@ export class OCCTFace {
6161
}
6262

6363
faceFromSurfaceAndWire(inputs: Inputs.OCCT.FaceFromSurfaceAndWireDto<Geom_Surface | TopoDS_Wire, undefined>) {
64-
if (inputs.shapes) {
65-
const face = this.och.bRepBuilderAPIMakeFaceFromSurfaceAndWire(inputs.shapes[0] as Geom_Surface, inputs.shapes[1] as TopoDS_Wire, inputs.inside) as TopoDS_Face;
66-
if (face.IsNull()) {
67-
throw new Error('Could not construct a face from the surface. Check if surface is not infinite.');
68-
} else {
69-
return face;
70-
}
64+
const face = this.och.bRepBuilderAPIMakeFaceFromSurfaceAndWire(inputs.shapes[0] as Geom_Surface, inputs.shapes[1] as TopoDS_Wire, inputs.inside) as TopoDS_Face;
65+
if (face.IsNull()) {
66+
throw new Error('Could not construct a face from the surface. Check if surface is not infinite.');
67+
} else {
68+
return face;
7169
}
7270
}
7371

@@ -166,7 +164,7 @@ export class OCCTFace {
166164
const removeEnd = inputs.removeEndPoint ? 1 : 0;
167165

168166
let param = inputs.param;
169-
167+
170168
if (inputs.isU) {
171169
param = uMin + (uMax - uMin) * param;
172170
} else {

src/lib/workers/occ/services/shapes/wire.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,10 @@ export class OCCTWire {
174174
}
175175

176176
placeWireOnFace(inputs: Inputs.OCCT.ShapesDto<TopoDS_Wire | TopoDS_Face>) {
177-
if(inputs.shapes){
178-
let wire: TopoDS_Wire = inputs.shapes[0] as TopoDS_Wire;
179-
let face: TopoDS_Face = inputs.shapes[1] as TopoDS_Face;
180-
const srf = this.och.surfaceFromFace({ shape: face });
181-
return this.placeWire(wire, srf);
182-
}
177+
let wire: TopoDS_Wire = inputs.shapes[0] as TopoDS_Wire;
178+
let face: TopoDS_Face = inputs.shapes[1] as TopoDS_Face;
179+
const srf = this.och.surfaceFromFace({ shape: face });
180+
return this.placeWire(wire, srf);
183181
}
184182

185183
placeWiresOnFace(inputs: Inputs.OCCT.ShapeShapesDto<TopoDS_Face, TopoDS_Wire>) {
@@ -201,7 +199,7 @@ export class OCCTWire {
201199
if (!crv.IsNull()) {
202200
const c2dHandle = this.occ.GeomAPI.To2d(crv, this.och.gpPln([0, 0, 0], [0, 1, 0]));
203201
const newEdgeOnSrf = this.och.makeEdgeFromGeom2dCurveAndSurfaceBounded({ shapes: [c2dHandle.get(), surface] }, umin.current, umax.current);
204-
if(newEdgeOnSrf){
202+
if (newEdgeOnSrf) {
205203
newEdges.push(newEdgeOnSrf);
206204
}
207205
}

0 commit comments

Comments
 (0)