Skip to content

Commit 6bf5d83

Browse files
removed bad code
1 parent fe3cb38 commit 6bf5d83

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

react/laptop-holder/src/laptop.ts

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,22 @@ export class LaptopLogic {
5353
totalDistance += this.distanceBetweenLaptops + laptop.length / 2 + previousLaptopLength / 2;
5454
previousLaptopLength = laptop.length;
5555
laptop.center[2] = totalDistance;
56-
const laptopBaseModel = await this.bitbybit.occt.shapes.solid.createBox({
56+
const laptopBaseModel = await this.occt.shapes.solid.createBox({
5757
width: laptop.width,
5858
length: laptop.length,
5959
height: laptop.height,
6060
center: laptop.center
6161
});
62-
const laptopFillet = await this.bitbybit.occt.fillets.filletEdges({ shape: laptopBaseModel, radius: 0.2 });
62+
const laptopFillet = await this.occt.fillets.filletEdges({ shape: laptopBaseModel, radius: 0.2 });
6363
laptopFillets.push(laptopFillet);
6464

65-
const laptopVisModel = await this.bitbybit.occt.shapes.solid.createBox({
65+
const laptopVisModel = await this.occt.shapes.solid.createBox({
6666
width: laptop.width,
6767
length: laptop.length - 0.01,
6868
height: laptop.height,
6969
center: laptop.center
7070
});
71-
const laptopVisFillet = await this.bitbybit.occt.fillets.filletEdges({ shape: laptopVisModel, radius: 0.2 });
71+
const laptopVisFillet = await this.occt.fillets.filletEdges({ shape: laptopVisModel, radius: 0.2 });
7272
laptopFillets.push(laptopFillet);
7373

7474
const di = new Inputs.OCCT.DrawShapeDto(laptopVisFillet);
@@ -105,17 +105,6 @@ export class LaptopLogic {
105105
return fillet;
106106
}
107107

108-
async createRotatedArcsAroundCenterPoint({ center, radius, startAngle, endAngle, angleStep, axis }) {
109-
const arcs = [];
110-
for (let angle = startAngle; angle < endAngle; angle += angleStep) {
111-
const arc = await this.occt.shapes.wire.createArc({
112-
center, radius, startAngle: angle, endAngle: angle + angleStep, axis
113-
});
114-
arcs.push(arc);
115-
}
116-
return arcs;
117-
}
118-
119108
async do() {
120109
this.bitbybit.babylon.scene.backgroundColour({ colour: '#bbbbbb' });
121110

@@ -137,15 +126,15 @@ export class LaptopLogic {
137126

138127
await this.renderLaptops(this.laptops);
139128

140-
const ground = await this.bitbybit.occt.shapes.face.createCircleFace({ center: [0, 0, 0], direction: [0, 1, 0], radius: 75, });
129+
const ground = await this.occt.shapes.face.createCircleFace({ center: [0, 0, 0], direction: [0, 1, 0], radius: 75, });
141130
const groundOptions = new Draw.DrawOcctShapeOptions();
142131
groundOptions.faceColour = this.whiteColor;
143132
groundOptions.drawEdges = false;
144133
await this.bitbybit.draw.drawAnyAsync({ entity: ground, options: groundOptions });
145134
}
146135

147136
downloadStep() {
148-
this.bitbybit.occt.io.saveShapeSTEP({ shape: this.laptopStand, filename: 'laptop-stand.step', adjustYtoZ: false, });
137+
this.occt.io.saveShapeSTEP({ shape: this.laptopStand, filename: 'laptop-stand.step', adjustYtoZ: false, });
149138
}
150139

151140
downloadStl() {

0 commit comments

Comments
 (0)