Commit Graph

31 Commits (7a2941d2eaff100aae78fe5b846ff3e0ce345a59)

Author SHA1 Message Date
Jonathan Westhues 7bd871ad28 Assign default name of import group based on name of imported file.
[git-p4: depot-paths = "//depot/solvespace/": change = 2133]
2010-05-02 21:38:25 -08:00
Jonathan Westhues a11010c593 Fix a gross memory leak: when switching to a new file, either after
File -> New or File -> Open, I freed the Group structures
themselves, but none of their children.

[git-p4: depot-paths = "//depot/solvespace/": change = 2120]
2010-02-28 11:23:01 -08:00
Jonathan Westhues 7337b23f0f Edit Message() and Error() strings to use just \n, not \r\n, since
my own dialog boxes don't require the carriage returns.

[git-p4: depot-paths = "//depot/solvespace/": change = 2109]
2010-01-16 10:15:40 -08:00
Jonathan Westhues b974a4adeb A big nasty change, originally just to add paste transformed. So it
does that, and adds a scale factor to that transformation (instead
of just mirroring, as before), but also:

    * Replace the "import mirrored" mechanism with a scale factor,
      which if negative corresponds to a reflection as well.

    * Fix self-intersection checker to report a meaningful point
      when edges are collinear.

    * Don't blow an assertion on some types of invalid file;
      instead provide a nice error message to the user.

    * Clear the naked edges before each regen.

    * Don't create zero-length line segments by snapping a line
      segment's end to its beginning.

[git-p4: depot-paths = "//depot/solvespace/": change = 2086]
2009-12-15 04:26:22 -08:00
Jonathan Westhues 2f115ec950 A monster change to add support for filled paths. This requires us
to assemble Beziers into outer and inner loops, and find those
loops made up of entities with filled styles. The open paths are
maintained in a separate list, and we assemble as many closed paths
as possible even when open paths exist.

This changes many things. The coplanar check is now performed on
the Beziers, not the resulting polygon. The way that the polygon is
used to determine loop directions is also modified.

Also fix the mouse behavior when dragging a point: drop it when the
mouse is released, even if it is released outside the window, but
don't drop it if the pointer is dragged out of and then back into
our window.

Also special-case SSurface::ClosestPointTo() for planes, for speed.

[git-p4: depot-paths = "//depot/solvespace/": change = 2058]
2009-10-28 23:16:28 -08:00
Jonathan Westhues 0914a27ff4 Put information about which requests generate which entities, and
how many points are associated with each, into a single table.

[git-p4: depot-paths = "//depot/solvespace/": change = 2056]
2009-10-22 06:02:08 -08:00
Jonathan Westhues 2ca5334bdf Add interpolating splines: both periodic splines (that form a
loop), and open-ended splines, with their tangents specified at
their endpoints.

Also change constraint solver matrix size to 1024, on the theory
that a power of two will generate better array indexing, and
replace fabs() with my own function that for some reason is
faster.

[git-p4: depot-paths = "//depot/solvespace/": change = 2055]
2009-10-20 20:46:01 -08:00
Jonathan Westhues c153e23f49 Add option to mirror imported geometry, including the shell, mesh,
and parametric entities. Also consolidate the text screen functions
to change group options into a single function for everything.

[git-p4: depot-paths = "//depot/solvespace/": change = 2051]
2009-10-09 04:57:10 -08:00
Jonathan Westhues 9416faca88 Add a context menu, with a grab bag of options. That will need some
refinement later, but it does not affect file formats so it's not
very critical.

[git-p4: depot-paths = "//depot/solvespace/": change = 2032]
2009-09-23 02:59:59 -08:00
Jonathan Westhues 9b8f32dad7 Now actually export the line styles, for PDF, EPS, and SVG file
formats, with the proper color and width. This may need a bit of
cleanup for stuff like the hidden line removal, which currently
loses the style.

Also fix a bug in the test for arcs of a circle. A second-order
Bezier with collinear control points really is an arc, but it's an
arc with infinite radius so stuff tends to blow up. So return false
for that one.

[git-p4: depot-paths = "//depot/solvespace/": change = 2030]
2009-09-21 21:46:30 -08:00
Jonathan Westhues 606af2ff39 Add support for the 3dconnexion six degree of freedom input devices
(in my case, a SpaceNavigator). I can transform the view of the
part, or transform a part in an assembly.

Also fix up mouse wheel input, so that it works even if it comes in
chunks of less than 120 units.

[git-p4: depot-paths = "//depot/solvespace/": change = 2019]
2009-07-20 11:05:33 -08:00
Jonathan Westhues 7eefb79127 Show a progress message when regenerating is slow. And update the
version number to 1.4, don't include force-hidden entities when
building the loops, and don't show force-hidden entities when that
entity gets copied.

[git-p4: depot-paths = "//depot/solvespace/": change = 1983]
2009-06-13 20:36:38 -08:00
Jonathan Westhues 3b3b7fe680 Add STEP file export for 2d curves too, and disable extrusion not
normal to the sketch.

[git-p4: depot-paths = "//depot/solvespace/": change = 1981]
2009-06-10 21:57:23 -08:00
Jonathan Westhues 1ac083a9a2 Change the licensing so that we run unrestricted for ninety days
after first execution, but limit the number of constraints to 30
after 90 days.

[git-p4: depot-paths = "//depot/solvespace/": change = 1977]
2009-06-09 22:57:27 -08:00
Jonathan Westhues b4dfb1aded Add code to assemble two shells into one, without checking for any
intersections or otherwise trying to make the result not
self-intersecting.

[git-p4: depot-paths = "//depot/solvespace/": change = 1955]
2009-05-19 19:04:36 -08:00
Jonathan Westhues a4dc518a89 A monster change; move the parameter, entity, group, and constraint
tables from SolveSpace to their own class. This is intended to
simplify use of the constraint solver in a library.

[git-p4: depot-paths = "//depot/solvespace/": change = 1942]
2009-04-18 21:53:16 -08:00
Jonathan Westhues 0c10efdab6 Add a simple license key: I take the CRC of the license info, plus
some magic numbers. This would be trivial to break, but still more
difficult than patching the binary to skip the check...

[git-p4: depot-paths = "//depot/solvespace/": change = 1853]
2008-02-09 05:52:01 -08:00
Jonathan Westhues bc2a9c11b3 Better error messages when creating groups, too.
[git-p4: depot-paths = "//depot/solvespace/": change = 1840]
2008-07-13 21:20:55 -08:00
Jonathan Westhues 36870360cb Little stuff: show polygon assembly errors only for draw-in-plane
groups, rename "drawing" groups to "sketch" groups, and keep
assembling even after finding an open curve.

[git-p4: depot-paths = "//depot/solvespace/": change = 1835]
2008-07-13 01:57:46 -08:00
Jonathan Westhues dd23aa11a2 Make rotations default to 360/n degrees (uniform about a circle)
if no constraints set the rotation.

[git-p4: depot-paths = "//depot/solvespace/": change = 1827]
2008-07-08 22:13:49 -08:00
Jonathan Westhues 273339d5c4 Add TrueType font support to SolveSpace. This uses a modified
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]
2008-06-30 01:09:17 -08:00
Jonathan Westhues 3ddd1703b1 Add helical sweeps. These aren't as parametric as I would have
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]
2008-06-23 00:25:17 -08:00
Jonathan Westhues a5189f7f1a Make step and repeats step the mesh, as well as the entities. This
requires new entitiy types for the faces, by translation or by
axis-angle rotation.

[git-p4: depot-paths = "//depot/solvespace/": change = 1802]
2008-06-21 14:49:57 -08:00
Jonathan Westhues 5a22982e05 Add sweeps. The user specifies a trajectory and a section, in two
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]
2008-06-21 02:18:20 -08:00
Jonathan Westhues 28e3f0abab Don't keep a dimension or group's user-entered numerical value as
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]
2008-06-14 00:43:38 -08:00
Jonathan Westhues 1674443ab2 Fix stupidity in the rotate ops; first of all it was saving the
axis of rotation numerically, so that the associative thing breaks,
and then it also wasn't saving the point on the axis in the file,
so that snapped back to (0, 0, 0) on reload. Now it goes off the
hEntity for a point on the axis and a vector in its direction.

[git-p4: depot-paths = "//depot/solvespace/": change = 1790]
2008-06-12 21:32:55 -08:00
Jonathan Westhues b284baffce Treatment of numerical faces was screwy, exporting stuff in numXXX.
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]
2008-06-12 20:41:27 -08:00
Jonathan Westhues 8969687904 Bits and pieces; option to not include original in step translates
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]
2008-06-11 20:36:33 -08:00
Jonathan Westhues f2645029b8 Add a second light, and some little fixes, and remove dead code.
[git-p4: depot-paths = "//depot/solvespace/": change = 1782]
2008-06-09 01:03:21 -08:00
Jonathan Westhues 8498a99588 Add preliminary lathe (solid of revolution) support. I'm generating
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]
2008-06-06 03:35:28 -08:00
Jonathan Westhues 8a0809e6a0 Split some large files.
[git-p4: depot-paths = "//depot/solvespace/": change = 1777]
2008-06-06 00:14:37 -08:00