mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-08 01:13:27 +01:00
brep operand mode / debug framework
This commit is contained in:
parent
effc9b0543
commit
6add3d6c7b
1 changed files with 10 additions and 5 deletions
|
|
@ -38,19 +38,24 @@ function addGlobalDebugActions(app) {
|
||||||
for (let e of face.edges) __DEBUG__.AddHalfEdge(e, color);
|
for (let e of face.edges) __DEBUG__.AddHalfEdge(e, color);
|
||||||
},
|
},
|
||||||
AddVolume: (shell, color) => {
|
AddVolume: (shell, color) => {
|
||||||
|
color = color || 0xffffff;
|
||||||
app.addShellOnScene(shell, {
|
app.addShellOnScene(shell, {
|
||||||
color,
|
color,
|
||||||
transparent: true,
|
transparent: true,
|
||||||
opacity: 0.5,
|
opacity: 0.5,
|
||||||
});
|
}).__debug__ = true;
|
||||||
},
|
},
|
||||||
HideSolids: () => {
|
HideSolids: () => {
|
||||||
app.findAllSolids().forEach(s => s.cadGroup.traverse(o => o.visible = false));
|
app.findAllSolidsOnScene().forEach(s => s.cadGroup.traverse(o => o.visible = false));
|
||||||
app.viewer.render();
|
app.viewer.render();
|
||||||
},
|
},
|
||||||
Clear: () => {
|
Clear: () => {
|
||||||
while (debugGroup.children.length) debugGroup.remove(debugGroup.children[0]);
|
while (debugGroup.children.length) debugGroup.remove(debugGroup.children[0]);
|
||||||
app.viewer.render();
|
app.viewer.render();
|
||||||
|
},
|
||||||
|
ClearVolumes: () => {
|
||||||
|
app.findAllSolidsOnScene().filter(s => s.__debug__ === true).forEach(s => s.vanish());
|
||||||
|
app.viewer.render();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue