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]
up more. Also change from stupid linear search lists to sorted
binary search lists, remove a stupid bug where I double-generated
entities, and don't do the triple drawing of entities (since
offsets on the Z buffer were doing the same job already).
[git-p4: depot-paths = "//depot/solvespace/": change = 1776]
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]
solid red or yellow. And add user interface to `hide' the faces
(i.e., to make them unselectable), defaulting to hidden in
everything except extrudes or imports.
[git-p4: depot-paths = "//depot/solvespace/": change = 1768]
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]
create a `new' stack-allocated instance of an object; just From,
possibly different versions with different arg types.
[git-p4: depot-paths = "//depot/solvespace/": change = 1763]
more starting work on the selectable faces, and fiddling in an
attempt to remove dependencies when stuff gets deleted.
[git-p4: depot-paths = "//depot/solvespace/": change = 1760]
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]
so e.g. a new extrude starts in free space, which is likely what
you want. And default to an in-workplane group, and tweak the
display of workplanes.
[git-p4: depot-paths = "//depot/solvespace/": change = 1748]
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]
triangle list before adding to the BSP, and check if a point in
plane lies in multiple triangles and choose the one with the
biggest normal magnitude (i.e., area) when testing normal
direction.
[git-p4: depot-paths = "//depot/solvespace/": change = 1745]
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]
zero-area triangles, apparently. And make the number of line
segments used to approximate a triangle depend on its scale on
screen.
[git-p4: depot-paths = "//depot/solvespace/": change = 1738]
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]
that's in a group that solves after the current group. This means
that the constraint/request gets deleted instantly, and stuff like
auto-constraints on the just-created entities blow up. I now check
that the active workplane comes from the active group or one solved
before it.
[git-p4: depot-paths = "//depot/solvespace/": change = 1729]
as a constraint on the direction cosine, rather than driving the
dot product against a rotated vector to zero. The drawing is the
ugly part; to do that for skew lines, I gave up.
Also add a function to clear non-existent items on the selection
after solving, since that could have caused an oops().
[git-p4: depot-paths = "//depot/solvespace/": change = 1727]
the coordinate system (x, y, z normal vectors) in the bottom left
corner of the screen at all times, and hide group-created
workplanes except when that group is active, and activate that
workplane when the group is activated.
[git-p4: depot-paths = "//depot/solvespace/": change = 1726]
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]
everything broke; apparently that driver didn't like me continually
destroying and recreating the HPGL context, and it also didn't like
me drawing zero-area polygons for my edges (which seemed like a
good idea, because it let me use glPolygonOffset instead of doing
that by hand). So it now all seems to work again, and faster.
[git-p4: depot-paths = "//depot/solvespace/": change = 1723]
we need something to force the points into plane, and the workplane
supplies that), but otherwise straightforward. And add diameter and
equal radius constraints for the arc.
[git-p4: depot-paths = "//depot/solvespace/": change = 1718]
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]
translation; or equivalently, rotation about an arbitrary axis).
Those will be important for step and repeats, and for imported
parts.
Also fix a terrible memory corruption bug: I was freeing the remap
list after I loaded it from the file, but the code that put that
into the SS.group list made only a shallow copy.
[git-p4: depot-paths = "//depot/solvespace/": change = 1715]
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]
constraints. And generate the constraint equations for entities
(e.g., that our unit quaternions have magnitude one). Numerical
troubles there, but it sort of works. Also some stuff to draw
projection lines with projected constraints, and to auto-insert
more constraints as you draw.
[git-p4: depot-paths = "//depot/solvespace/": change = 1711]
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]
hadn't previously noticed, because I didn't use to have workplanes
with non-zero offsets. And clean up the interface to normals a bit.
[git-p4: depot-paths = "//depot/solvespace/": change = 1707]
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]
diagonal elements of the matrix summed to -1. Now it's ugly, but I
think that it's correct. And add a command to flip the view to the
other side, which is what started my problems. And tweak display of
H and V and M for constraints: put them in the constraint plane, so
that they're stationary as you rotate around.
[git-p4: depot-paths = "//depot/solvespace/": change = 1704]