discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Feature request: retrieve vertex coordinates from the viewport

CA
Carsten Arnholm
Fri, Nov 27, 2020 10:04 PM

On 27.11.2020 22:14, nop head wrote:

Simply because the coordinates are not fully calculated.

Is that really the case? Don't all vertices of the triangles drawn
correspond to vertices of primitives. How would the triangle be drawn if
OpenSCAD didn't know where it was?

No, not when previewing. That's why preview is faster than full boolean.

Carsten Arnholm

On 27.11.2020 22:14, nop head wrote: > > Simply because the coordinates are not fully calculated. > > Is that really the case? Don't all vertices of the triangles drawn > correspond to vertices of primitives. How would the triangle be drawn if > OpenSCAD didn't know where it was? No, not when previewing. That's why preview is faster than full boolean. Carsten Arnholm
JB
Jordan Brown
Fri, Nov 27, 2020 10:10 PM

On 11/27/2020 2:00 PM, nop head wrote:

If you show the edges, then if there is an actual vertex where edges
meet then it is a vertex of a primitive. So in that case only the
point in the middle.

image.png

The other six in the cut faces have no edges, so are not vertices in
that sense. I agree they are not calculated.

I suspected that we were using different meanings for "vertex".  I meant
"any corner of the resulting object where three (or more?) edges meet",
and in particular the convex ones.  In this diagram, I was specifically
looking at the three corners closest to the camera, at [5,0,5], [0,5,5],
and [5,5,0].

Or this:

intersection() {
    cube([10,5,5], center=true);
    #cube([5,10,10], center=true);
}

where the result is an obvious-looking cube, but where the vertices of
that cube do not match the vertices of either of the input cubes.

On 11/27/2020 2:00 PM, nop head wrote: > If you show the edges, then if there is an actual vertex where edges > meet then it is a vertex of a primitive. So in that case only the > point in the middle. > > image.png > > The other six in the cut faces have no edges, so are not vertices in > that sense. I agree they are not calculated. I suspected that we were using different meanings for "vertex".  I meant "any corner of the resulting object where three (or more?) edges meet", and in particular the convex ones.  In this diagram, I was specifically looking at the three corners closest to the camera, at [5,0,5], [0,5,5], and [5,5,0]. Or this: intersection() { cube([10,5,5], center=true); #cube([5,10,10], center=true); } where the result is an obvious-looking cube, but where the vertices of that cube do not match the vertices of either of the input cubes.