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]
version of the code from SketchFlat, with all arbitrary limits
removed.
The TTF text is its own entity, and that entity includes the
font file basename and the text. That's an extra 128 bytes in the
entity, which is around a 50% increase, kind of a shame. It was
simple, though.
[git-p4: depot-paths = "//depot/solvespace/": change = 1814]
that to try to find them if we can't find them by absolute path.
This is intended to make everything still work if you copy an
entire directory tree of files that import each other.
Also add a mechanism to not paint the scene if we're not sure it's
consistent; otherwise got some crashes on startup. And disable both
text and graphic window when displaying a modal dialog, wasn't
doing that always.
[git-p4: depot-paths = "//depot/solvespace/": change = 1808]
liked, but my more parametric attempts were very difficult to use.
The pitch (both axial and radial) gets specified by typing a
distance in a textbox.
[git-p4: depot-paths = "//depot/solvespace/": change = 1804]
that perspective in the gl matrices, and also everywhere that I
check mouse pointer positions against the model, and for the zoom
to fit.
[git-p4: depot-paths = "//depot/solvespace/": change = 1796]
and requests to a separate list. It's messy, because I have to make
a deep copy (e.g. of the remap list for the groups, or Expr *
stuff) of some things. Others (e.g. the polygon or mesh) will be
regenerated, so they should be discarded, but they must not get
double-freed.
In any case, works superficially. And fix a few memory leaks
unrelated to this, and remove some dead code.
[git-p4: depot-paths = "//depot/solvespace/": change = 1775]
to save our registry stuff (because we were calling exit() instead
of doing a PostQuitMessage()), and a misclassification of triangles
coplanar with the test surface, when the test surface contained
zero-area triangles.
[git-p4: depot-paths = "//depot/solvespace/": change = 1773]
using the initial numerical guess of whichever vector is already
known to choose our projection planes.
And add a mechanism to defer showing the text window or
regenerating, in order to simplify dependencies on valid actives.
Also yes/no/cancel when about to abandon an unsaved file, and a
bugfix when rotating a rot/trans point.
[git-p4: depot-paths = "//depot/solvespace/": change = 1772]
becomes dirty when the user makes a change, and only the dirty
groups get solved. That's a huge effective speedup.
Also add delete function for groups. That has an interesting issue;
it actually ends up recursing on GenerateAll(), since GenerateAll()
calls ClearSuper(), ClearSuper() might need to recreate a group (if
all the groups were deleted), and that would activate the group,
which calls GenerateAll. The right solution is probably a deferred
execution mechanism, where you can schedule something to happen
before we go idle, but not do it right now.
[git-p4: depot-paths = "//depot/solvespace/": change = 1771]
in one place. And remove the ability to disable the solver, since
that's unlikely to be anything but confusing (and in any case, was
badly implemented). This is in preparation for selective solving,
of only the dirty groups.
[git-p4: depot-paths = "//depot/solvespace/": change = 1769]
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]
case where you bolt a triangle onto a convex poly, and both
remaining edges of the tri are coincident with the neighbours from
the poly. That was a big source of zero-area triangles.
And tweak some colors a bit.
[git-p4: depot-paths = "//depot/solvespace/": change = 1758]
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]
part, including all of its entities and the triangle mesh. These
are transformed by a rotation and translation, and appear in the
sketch; the transformation may be set with constraints.
[git-p4: depot-paths = "//depot/solvespace/": change = 1756]
recently opened files, that is saved in the registry and displayed
in a separate popup menu.
[git-p4: depot-paths = "//depot/solvespace/": change = 1752]
nicely. And to do that, I've added the user interface to show an
edit control in the text window.
[git-p4: depot-paths = "//depot/solvespace/": change = 1749]
and in the case of a singular Jacobian, report which constraints
can be removed to fix it. Also a mechanism to hover and select
entities and constraints from the text window.
[git-p4: depot-paths = "//depot/solvespace/": change = 1746]
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]
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]
sketch (e.g., a line whose length is constrained gets deleted, but
the constraint is left behind; or the point that's the origin for a
drawing group in plane gets deleted), then deleted the dependencies
too.
[git-p4: depot-paths = "//depot/solvespace/": change = 1725]
lets me reweight the parameters, e.g. to encourage the solver to
make changes to the point being dragged.
[git-p4: depot-paths = "//depot/solvespace/": change = 1719]
solve the Newton's method iterations in a least squares sense. This
is much less likely to result in numerical disaster; a parameter
will never make a very large change, unless that really is the only
way to satisfy the constraints.
[git-p4: depot-paths = "//depot/solvespace/": change = 1717]
list, and then adding a new entity to that list, and then looking
at that pointer again. Not okay; the add operation might have
forced a realloc. I have to watch for that.
And add a "distance ratio" constraint, plus a new kind of group
that comes with its own workplane. The workplane is not solved for;
it's generated explicitly in terms of elements that are already
solved.
[git-p4: depot-paths = "//depot/solvespace/": change = 1716]
remap when I copy circle entities, in order to make the radius
numerical somehow (analogy with the POINT_ and NORMAL_XFRMD) thing.
[git-p4: depot-paths = "//depot/solvespace/": change = 1710]
segments), add the toggle construction command, and color the lines
differently depending on what group you're in.
Also change dynamic memory stuff to use a Win32 heap for everything
(no malloc), and validate that often. I think I've seen it crash,
though I can't reproduce it.
[git-p4: depot-paths = "//depot/solvespace/": change = 1708]
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]
vectors", represented by unit quaternions. This permits me to add
circles, where the normal defines the plane of the circle.
Still many things painful. The interface for editing normals is not
so intuitive, and it's not yet clear how I would e.g. export a
circle entity and recreate it properly, since that entity has a
param not associated with a normal or point.
And the transformed points/normals do not yet support rotations.
That will be necessary soon.
[git-p4: depot-paths = "//depot/solvespace/": change = 1705]
the point that's being dragged first, to guarantee that that one
gets the max possible degrees of freedom. The sort code (sort a
list of integers, then apply the permutations by swaps) was more
painful than it should have been.
[git-p4: depot-paths = "//depot/solvespace/": change = 1700]
turned out straightforward, in great part because the planes are
workplanes (6 DOF, represented by a unit quaternion and a point),
and therefore make it easy to get a vector in the plane, as well as
a normal.
And on that subject, replace the previous hack for parallel vector
constraints with a better hack: pivot on the initial numerical
guess, to choose which components of the cross product to drive to
zero. Ugly, but I think that will be as robust as I can get.
[git-p4: depot-paths = "//depot/solvespace/": change = 1699]
assign the new ids) in the saved file, and split the file load from
table stuff into its own function.
[git-p4: depot-paths = "//depot/solvespace/": change = 1694]
other entities. This requires a new point type, for a point that's
defined as a transformation of some other point. All works nicely,
I think. There's ugliness because entities are no longer guaranteed
to have a parent request.
Also speed up display of the text window, by caching brushes
instead of recreating for each character (!), and add a bit more
user interface in the text window.
[git-p4: depot-paths = "//depot/solvespace/": change = 1692]
workplane: a free constraint works in three-space (e.g. true
distance), and a constraint in a workplane works in that plane
(e.g. projected distance). And make the solver go automatically,
though solver itself has lots of pieces missing.
[git-p4: depot-paths = "//depot/solvespace/": change = 1691]
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]