theorem; it's evaluated as a surface integral over each triangle.
And don't regenerate the emphasized edges unless we have to;
specifically, don't do it when the only dirty group is the
drawing group.
[git-p4: depot-paths = "//depot/solvespace/": change = 1849]
And fix a bug; wasn't asking the user whether to save before
abandoning file when a new file was opened recent.
[git-p4: depot-paths = "//depot/solvespace/": change = 1830]
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]
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]
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]
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]
an Expr *, since that complicates multiple units and also memory
management. Now it's just a double.
[git-p4: depot-paths = "//depot/solvespace/": change = 1791]
So fix that, and now I can simplify what's exported for an entity.
And add an extra measurement (face-face distance/angle), and some
other little stuff.
[git-p4: depot-paths = "//depot/solvespace/": change = 1789]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
not have much motivation behind them, but they seem to work. And
make sure that we don't solve multiple times without repainting in
between, and tweak the text window a bit more.
[git-p4: depot-paths = "//depot/solvespace/": change = 1696]
foreground and background colours are now specified separately, and
it's possible to insert half-line spaces. So now I have a window
that lets me show/hide groups, and select the active one.
[git-p4: depot-paths = "//depot/solvespace/": change = 1695]
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]