trim curves for all surfaces lie between 0 and 1. And add routines
to merge the curves and surfaces from two shells into one, and to
split the trim curves into their piecewise linear segments and then
reassemble them into trim curves.
[git-p4: depot-paths = "//depot/solvespace/": change = 1905]
the same precedence as sqrt. Add the code to find naked edges, and
draw them highlighted on the model. And make the direction of trim
curves consistent, always ccw with normal toward viewer; so there's
no need to fix the directions before triangulating.
[git-p4: depot-paths = "//depot/solvespace/": change = 1903]
Add stubs for functions to perform Booleans, and get rid of mesh
stuff, including the kd tree accelerated snap to vertex (which
should not be required if the shell triangulation performs as it
should).
Also check that a sketch is not self-intersecting before extruding
it or whatever. This is dead slow, needs n*log(n) implementation.
[git-p4: depot-paths = "//depot/solvespace/": change = 1902]
A touches edge B, but does not share a vertex with edge B, then
that's an intersection.
Adjust the ear clipping so that it generates strip-like
triangulations, not fan-like.
And rearrange deck chairs on the bridge-finding code, which is
still pathetically slow. It may not be possible to get reasonable
performance without kd tree type acceleration.
[git-p4: depot-paths = "//depot/solvespace/": change = 1901]
is O(n^2), not perfectly robust, and the bridge-finding code is
particularly bad. But it works, triangulates, and shouldn't ever
generate zero-area triangles like gl does.
[git-p4: depot-paths = "//depot/solvespace/": change = 1900]
from an extrusion, with piecewise linear trim curves for everything
(that are shared, so that they appear only once for the two
surfaces that each trims). No Boolean operations on them, and the
triangulation is bad, because gl seems to merge collinear edges.
So before going further, I seem to need my own triangulation code.
I have not had great luck in the past, but I can't live without it
now.
[git-p4: depot-paths = "//depot/solvespace/": change = 1899]
so now we've got the exact curve loops, with their direction
standardized so that we can tell which direction is out. We still
need the polygon in any case, since that's a convenient way to find
each curve's winding number.
And remove some more leftover code from mesh sweeps.
[git-p4: depot-paths = "//depot/solvespace/": change = 1897]
just applies an offset to the DXF before exporting. Useful enough
to be worth the ugliness, though.
This is the stupid routines from SketchFlat, slightly reworked.
[git-p4: depot-paths = "//depot/solvespace/": change = 1866]
specify the plane from which we want to grab the triangles. Shared
edges are then removed with the same code used to check for
watertight meshes, and the remaining edges are assembled into
polygons.
[git-p4: depot-paths = "//depot/solvespace/": change = 1823]
introduced by the bsp routines. It's usually, though not always,
possible to generate a watertight mesh. The occasions where it's
not look ugly, floating point issues, no quick fix.
And use those to generate a list of edges where two different faces
meet, which I can emphasize for cosmetic reasons (and some UI to
specify whether to do that, and with what color).
And make the right mouse button rotate the model, since that was
previously doing nothing.
[git-p4: depot-paths = "//depot/solvespace/": change = 1821]
which I will shortly revert. gl does a much better job, and I'll
have to spend more time to get something reasonable.
[git-p4: depot-paths = "//depot/solvespace/": change = 1809]
separate groups. The section is swept normal to the trajectory,
producing a mesh. I'm doing the triangles only now, not copying
over any entities.
Also fix a bug in the PNG export; rows are 4-aligned, so that was
breaking when the width of the image wasn't divisible by four. Also
fix a bug in lathes, where it generated overlapping triangles for
one segment.
And change the groups to record both "this mesh", the contribution
due to the extrude/lathe/whatever, and the "running mesh", that we
get after applying the requested Boolean op between "this mesh" and
the previous group's "running mesh". I'll use that to make step and
repeats step the mesh too.
[git-p4: depot-paths = "//depot/solvespace/": change = 1801]
and rotates, auto-constrain translates in active workplane, speed
up remap list search with a hash table, other stuff.
[git-p4: depot-paths = "//depot/solvespace/": change = 1786]
just the mesh, no derived entities (but I suppose that I could turn
all points into circles).
And fix some bugs where equations didn't get unique IDs, and make
it possible to lock on to the group's workplane automatically, if
you press W while free in 3d with no workplane selected.
[git-p4: depot-paths = "//depot/solvespace/": change = 1780]
BSP stuff works. The failures are reported with red stripes and no
depth buffering, and in a message in the text window.
Also improve convergence of point-on-line constraints, and don't
write triangles to export files with limited precision, because
that was making the coplanar tests fail.
[git-p4: depot-paths = "//depot/solvespace/": change = 1774]
metadata. And add point-on-face constraints to go with that. Still
needs some cleanup for the user interface.
[git-p4: depot-paths = "//depot/solvespace/": change = 1766]
csg ops; so the union of a red part and a blue part has both red
and blue faces. And some user interface to pick the color in the
text window.
The metadata also include a face, which will be an entity; I can
use that to constrain against. But none of that is yet implemented.
[git-p4: depot-paths = "//depot/solvespace/": change = 1757]
implement that. Also make solver work only between the first and
last visible group; earlier can just work from previous solve
result, and later don't matter.
There's some issues with the csg code; it will eventually produce
an open mesh, which is very bad. Not sure whether that's a logic
bug, or a numerical issue; still generating absurd triangles pretty
routinely.
[git-p4: depot-paths = "//depot/solvespace/": change = 1741]
polygon, not just triangles. This helps to avoid needless
splitting. Also test if an entire triangle got inserted in multiple
pieces; if yes, back things out, and just insert the triangle.
Also remove the extra partition stuff, since it didn't seem to help
consistently, and this does.
Still could do some better merging, in the case where an inserted
triangle does not get fully inserted, but we can find a better
triangulation than what the BSP naturally gives.
[git-p4: depot-paths = "//depot/solvespace/": change = 1739]
while building it. That may improve performance, by building a more
balanced tree and actually reducing splitting. Not dramatic
improvements, though; half the triangles for some parts, but no
change or slightly worse for others.
[git-p4: depot-paths = "//depot/solvespace/": change = 1737]
set of coplanar faces. The polygon count still gets stupid fast;
I'm thinking I can fix that by adding some extra test planes at the
top of the 3d BSP, to quickly cull out stuff that doesn't intersect
us.
[git-p4: depot-paths = "//depot/solvespace/": change = 1736]
a triangle mesh in a BSP. That works, although it splits too often,
the initial triangulations are not good quality, and coplanar faces
are not yet handled. I'll do the coplanar thing tomorrow.
[git-p4: depot-paths = "//depot/solvespace/": change = 1735]
for that, and storing the triangles instead of rendering them
immediately. Not sure if that's smart; in theory could change from
implementation to implementation, but the results look much better
than I would get myself.
[git-p4: depot-paths = "//depot/solvespace/": change = 1733]
not very well; I'm doing a b-rep, where the boundaries are complex
polygons, and there's too many special cases. I should probably
replace this with a triangle mesh solution.
[git-p4: depot-paths = "//depot/solvespace/": change = 1731]
constraints work mod 180 degrees, so that it snaps to however the
workplane was drawn (more vertical vs. more horizontal).
[git-p4: depot-paths = "//depot/solvespace/": change = 1714]
workplanes. And fix up our polygon normals, so that everything gets
shaded correctly (and so that later we can generate our STL files
with correct normals).
[git-p4: depot-paths = "//depot/solvespace/": change = 1706]
faces of the polyhedron. And shade the faces when I draw them, and
fix up our projection matrix so that the depth testing works
properly.
[git-p4: depot-paths = "//depot/solvespace/": change = 1703]
issues, when the points are not all in the same coordinate system.
All painful, of course. Also add continuous line drawing, and
auto-constraining of line segments as I draw.
[git-p4: depot-paths = "//depot/solvespace/": change = 1683]