mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 08:25:19 +01:00
flange logic changes. Incomplete.
This commit is contained in:
parent
a6aa53fc9d
commit
05a03a8f1a
1 changed files with 5 additions and 21 deletions
|
|
@ -54,7 +54,7 @@ export const smFlangeOperation: OperationDescriptor<smFlangeParams> = {
|
|||
|
||||
const tools = occFaces.map((faceName, i) => {
|
||||
const shapeName = "Tool/" + i;
|
||||
const args = [shapeName, faceName, ...params.axis.origin.data(), ...params.axis.direction.negate().data(), params.angle];
|
||||
const args = [shapeName, faceName, ...revolveVectorOrigin.data(), ...revolveVectorDirection.data(), params.angle];
|
||||
oci.revol(...args);
|
||||
|
||||
return shapeName;
|
||||
|
|
@ -65,28 +65,12 @@ export const smFlangeOperation: OperationDescriptor<smFlangeParams> = {
|
|||
targets: [params.face.shell]
|
||||
}
|
||||
|
||||
console.log(params.face.shell);
|
||||
|
||||
tools[0].edges.forEach(async (newEdge) => {
|
||||
params.face.shell.edges.forEach(async (edgeToLookAt) => {
|
||||
if (JSON.stringify(newEdge.topology.data.tessellation) == JSON.stringify(edgeToLookAt.topology.data.tessellation)) {
|
||||
console.log("We have a match", edgeToLookAt.productionInfo.sheetMetal.kind);
|
||||
newEdge.productionInfo ={};
|
||||
newEdge.productionInfo = { sheetMetal: { kind: edgeToLookAt.productionInfo.sheetMetal.kind } };
|
||||
//newEdge.productionInfo.sheetMetal.kind = edgeToLookAt.productionInfo.sheetMetal.kind;
|
||||
console.log(newEdge, edgeToLookAt);
|
||||
console.log(newEdge.productionInfo);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const booleanOperation = {
|
||||
kind: "UNION",
|
||||
targets:[params.face.shell]
|
||||
//return occ.utils.applyBooleanModifier(tools, booleanOperation);
|
||||
return {
|
||||
created: tools,
|
||||
consumed: []
|
||||
}
|
||||
|
||||
return occ.utils.applyBooleanModifier(tools, booleanOperation);
|
||||
|
||||
},
|
||||
form: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue