add todo notes
This commit is contained in:
parent
8c4f4198be
commit
ce2d9b38a8
2 changed files with 6 additions and 7 deletions
|
|
@ -84,6 +84,8 @@ class OpArea extends CamOp {
|
|||
// add in unioned surface areas
|
||||
polys.push(...POLY.setZ(POLY.union(fpoly, 0.00001, true), fminz));
|
||||
|
||||
// todo: implement `refine` and `smooth`
|
||||
|
||||
// expand selections (flattens z variable polys)
|
||||
if (Math.abs(expand) > 0) {
|
||||
let nupolys = polys.filter(p => p.open); // set aside open
|
||||
|
|
@ -225,7 +227,7 @@ class OpArea extends CamOp {
|
|||
paths = paths.map(poly => poly.points.map(p => [ p.x, p.y ]).flat().toFloat32());
|
||||
} else
|
||||
if (sr_type === 'offset') {
|
||||
// progressive inset from perimeter
|
||||
// todo: progressive inset from perimeter
|
||||
console.log({ sr_offset: toolOver });
|
||||
}
|
||||
|
||||
|
|
@ -259,6 +261,8 @@ class OpArea extends CamOp {
|
|||
});
|
||||
raster.terminate();
|
||||
|
||||
// todo: port clever bits from topo3 for inside/outside detection and tab clipping
|
||||
|
||||
// convert terrain raster output back to open polylines
|
||||
for (let path of output.paths) {
|
||||
path = newPolygon().fromArray([1, ...path]);
|
||||
|
|
@ -347,7 +351,6 @@ class OpArea extends CamOp {
|
|||
function scanBoxAtAngle(box2, angle, step) {
|
||||
const cx = (box2.min.x + box2.max.x) * 0.5;
|
||||
const cy = (box2.min.y + box2.max.y) * 0.5;
|
||||
|
||||
const w = box2.max.x - box2.min.x;
|
||||
const h = box2.max.y - box2.min.y;
|
||||
|
||||
|
|
@ -370,13 +373,11 @@ function scanBoxAtAngle(box2, angle, step) {
|
|||
|
||||
const halfSpan = step * (count - 1) * 0.5;
|
||||
const halfD = extentD * 0.5;
|
||||
|
||||
const rays = [];
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
// offset along normal
|
||||
const o = -halfSpan + i * step;
|
||||
|
||||
const ox = cx + nx * o;
|
||||
const oy = cy + ny * o;
|
||||
|
||||
|
|
@ -387,10 +388,8 @@ function scanBoxAtAngle(box2, angle, step) {
|
|||
const by = oy + dy * halfD;
|
||||
|
||||
rays.push({
|
||||
origin: new THREE.Vector2(ox, oy),
|
||||
a: new THREE.Vector2(ax, ay),
|
||||
b: new THREE.Vector2(bx, by),
|
||||
length: extentD
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ export class Topo {
|
|||
if (poly.length > 1) {
|
||||
lines.push(poly);
|
||||
}
|
||||
// raize output points when inside tab boundaries
|
||||
// raise output points when inside tab boundaries
|
||||
if (!inside && tabsOn && clipTab.length)
|
||||
for (let poly of lines) {
|
||||
for (let p of poly.points) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue