a little tidying

This commit is contained in:
Stewart Allen 2025-12-06 18:08:09 -05:00
commit 6ad3f7c94b
3 changed files with 9 additions and 14 deletions

View file

@ -3,10 +3,10 @@
import { api } from '../../core/api.js';
import { env, clearPops } from './client.js';
import { CAM } from './driver-fe.js';
import { lastTrace, setLastTrace } from './cl-trace.js';
export let holeSelOn = false;
export let lastSelHoles;
let holeGeo = new THREE.CylinderGeometry(1,1,1,20);
let holeMaterial = new THREE.MeshPhongMaterial( );
let alert;

View file

@ -82,12 +82,7 @@ function holes(indiv, rec, onProgress, onDone) {
})
};
function cylinderShow(onProgress,onDone){
kiri.client.sync();
const settings = api.conf.get();
}
function cylinderToggle(widget, face, onDone){
function cylinderToggle(widget, face, onDone) {
let cyls = widget._cylinders = widget._cylinders || {};
for (let [root, faces] of Object.entries(cyls)) {
if (faces.contains(face)) { // if a face group contains the selected face
@ -99,16 +94,16 @@ function cylinderShow(onProgress,onDone){
}
}
//send
api.client.send("cam_cylinder_find", { id: widget.id, face }, ({faces,error}) => {
api.client.send("cam_cylinder_find", { id: widget.id, face }, ({ faces, error }) => {
if (faces?.length) {
cyls[face] = faces;
CAM.cylinder_show(widget);
}
onDone({faces:Object.keys(cyls).map(v => parseInt(v)),error});
onDone({ faces: Object.keys(cyls).map(v => parseInt(v)), error });
});
}
function cylinderClear(widget){
function cylinderClear(widget) {
widget.selectFaces([]);
widget._cylinders = {};
}

View file

@ -1,15 +1,15 @@
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
import { util } from '../../../geo/base.js';
import { CAM } from './driver-be.js';
import { newLine } from '../../../geo/line.js';
import { newPoint } from '../../../geo/point.js';
import { newPolygon } from '../../../geo/polygon.js';
import { ops as OPS } from './ops.js';
import { polygons as POLY } from '../../../geo/polygons.js';
import { setSliceTracker } from '../../core/slice.js';
import { ops as OPS } from './ops.js';
import { Tool } from './tool.js';
import { Slicer as cam_slicer } from './slicer_cam.js';
import { CAM } from './driver-be.js';
import { Tool } from './tool.js';
import { util } from '../../../geo/base.js';
/**
* DRIVER SLICE CONTRACT