mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
Non working hole location from datium
This commit is contained in:
parent
678005e63f
commit
7191d431e6
2 changed files with 12 additions and 15 deletions
|
|
@ -46,23 +46,21 @@ export const HoleOperation: OperationDescriptor<HoleParams> = {
|
|||
created: []
|
||||
};
|
||||
|
||||
let sketch = ctx.sketchStorageService.readSketch(params.sketch.id);
|
||||
console.log(sketch, "sketch info here");
|
||||
//let sketch = ctx.sketchStorageService.readSketch(params.sketch.id);
|
||||
//console.log(sketch, "sketch info here");
|
||||
|
||||
|
||||
oci.pcylinder("basehole", params.diameter / 2, params.depth);
|
||||
oci.pcylinder("result", params.diameter / 2, params.depth);
|
||||
|
||||
if (params.holeType == "normal") {
|
||||
returnObject.created.push(occ.io.getShell("basehole"));
|
||||
}
|
||||
// if (params.holeType == "normal") {
|
||||
// returnObject.created.push(occ.io.getShell("basehole"));
|
||||
// }
|
||||
|
||||
if (params.holeType == "counterbore") {
|
||||
oci.pcylinder("counterbore", params.counterBoreDiameter / 2, params.counterBoreDepth);
|
||||
|
||||
oci.bop("basehole", "counterbore");
|
||||
oci.bop("result", "counterbore");
|
||||
oci.bopfuse("result");
|
||||
|
||||
returnObject.created.push(occ.io.getShell("result"));
|
||||
}
|
||||
|
||||
if (params.holeType == "countersink") {
|
||||
|
|
@ -71,14 +69,13 @@ export const HoleOperation: OperationDescriptor<HoleParams> = {
|
|||
|
||||
|
||||
oci.pcone("countersink", params.countersinkDiameter / 2, 0, heightFromDiameterAndAngle);
|
||||
oci.bop("basehole", "countersink");
|
||||
oci.bop("result", "countersink");
|
||||
oci.bopfuse("result");
|
||||
returnObject.created.push(occ.io.getShell("result"));
|
||||
}
|
||||
|
||||
let ptr = Interrogate("base", true).ptr;
|
||||
let ptr = Interrogate("result", true).ptr;
|
||||
SetLocation(ptr, params.datum.csys.outTransformation.toFlatArray());
|
||||
|
||||
returnObject.created.push(occ.io.getShell("result"));
|
||||
console.log(returnObject);
|
||||
|
||||
return returnObject;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
"earcut": "2.1.1",
|
||||
"font-awesome": "4.7.0",
|
||||
"immer": "^9.0.12",
|
||||
"jsketcher-occ-engine": "1.0.1-2144340d03c052dc3c4bfab1c045ee28a6ba1528",
|
||||
"jsketcher-occ-engine": "1.0.1-0cd4fdc77e9c85bbbe6951d90646bd3361ab6797",
|
||||
"jszip": "^3.10.0",
|
||||
"less": "^3.11.1",
|
||||
"libtess": "1.2.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue