Commit Graph

1202 Commits (90e9fc76e460c664e3f49680a24050bacf466f38)

Author SHA1 Message Date
Daniel Richard G df6125efee Fix "jump to label 'foo' crosses initialization of 'bar'" errors
Newer C++ compilers do not allow goto-ing over an initialized variable
declaration, as this violates C++98. We address this by (in most cases)
separating the initialization from the declaration, or moving the goto to
an equivalent location.

Refer to the following discussions for more background:

http://stackoverflow.com/questions/11306799/why-does-c-enforce-such-behavior-in-crosses-initialization
http://stackoverflow.com/questions/12992108/crosses-initialization-of-variable-only-when-initialization-combined-with-decl
2013-08-26 15:24:50 -04:00
Daniel Richard G 02776ea535 Added const qualifiers
String literals in C++ are implicitly typed as 'const char *', and with
this change, their const-ness is maintained when assigning them to
variables or passing them as arguments. This significantly cuts down the
number of warnings generated by the compiler.
2013-08-26 14:58:35 -04:00
Jonathan Westhues affbeafc6c Make a copy of "freeze" library for storing stuff in registry, to
make //depot/solvespace/... entirely self-contained.

[git-p4: depot-paths = "//depot/solvespace/": change = 2216]
2013-08-20 21:54:54 -08:00
Jonathan Westhues defeb6411a Clean up SolveSpace makefile, and add forgotten copyright notice.
[git-p4: depot-paths = "//depot/solvespace/": change = 2213]
2013-07-28 14:53:30 -08:00
Jonathan Westhues bc426a2a7f Delete obsolete text in solvespace/doc/..., superseded by the
stuff on the website.

[git-p4: depot-paths = "//depot/solvespace/": change = 2212]
2013-07-28 14:40:37 -08:00
Jonathan Westhues 0ee8ba1457 Changes in preparation for the release of SolveSpace under the GPL,
to add that license, and change all copyright notices to me, not
Useful Subset, LLC.

[git-p4: depot-paths = "//depot/solvespace/": change = 2211]
2013-07-28 14:08:34 -08:00
Jonathan Westhues 1abd87954c Oops, fix gross memory leak in SolveSpace library due to failure
to destroy temporary heap.

[git-p4: depot-paths = "//depot/solvespace/": change = 2210]
2013-03-15 08:43:35 -08:00
Jonathan Westhues 7919e7171d Make SolveSpace work unrestricted without a license file, and
increase its version number to 1.9.

[git-p4: depot-paths = "//depot/solvespace/": change = 2198]
2012-01-21 12:12:00 -08:00
Jonathan Westhues e11347f613 Oops, update copyright date to 2011 for SolveSpace.
[git-p4: depot-paths = "//depot/solvespace/": change = 2195]
2011-07-04 11:25:17 -08:00
Jonathan Westhues c98a0b381f Increment SolveSpace's version number to 1.8.
[git-p4: depot-paths = "//depot/solvespace/": change = 2194]
2011-07-04 11:10:00 -08:00
Jonathan Westhues fc3dc68f83 Check in the VB.NET example for the SolveSpace library, and update
the documentation accordingly. Also rename the C example for
consistency, and update copyright dates.

[git-p4: depot-paths = "//depot/solvespace/": change = 2190]
2011-03-13 00:04:09 -08:00
Jonathan Westhues b3bdadfeb8 Fix that typo elsewhere in the slvs.dll examples, and note that
VB.NET example in the documentation.

[git-p4: depot-paths = "//depot/solvespace/": change = 2188]
2011-03-05 14:33:05 -08:00
Jonathan Westhues 3dc21ec8dd Make oops() calls exit instead of entering debugger by default,
since the latter looks worse if it happens to someone else.

[git-p4: depot-paths = "//depot/solvespace/": change = 2187]
2011-03-05 12:52:57 -08:00
Jonathan Westhues dcfae0f341 Typo in SolveSpace library example, embarrassing.
[git-p4: depot-paths = "//depot/solvespace/": change = 2186]
2011-03-05 12:22:59 -08:00
Jonathan Westhues 3dea64af47 Make default text in dimension box the exact (up to ten digits
after decimal) current value of the dimension, not the value
truncated to the same number of digits that are usually displayed.

And make the paste transformed screen accept expressions, not
just integers, for the count, angle, and scale.

[git-p4: depot-paths = "//depot/solvespace/": change = 2181]
2010-10-11 19:13:41 -08:00
Jonathan Westhues cc3b17f60e Make the number of digits after the decimal point (for dimensions,
as they are displayed on the drawing, and for many other places) a
user-configurable parameter.

Also reshuffle some options in the configuration screen, to put all
the stuff relating to exports together.

[git-p4: depot-paths = "//depot/solvespace/": change = 2179]
2010-09-23 18:58:34 -08:00
Jonathan Westhues e672706770 Due to questionable decision to use copy-number values of 1000
and up for special things, the number of times that a group may
be stepped is limited to 999. So avoid a crash by not letting
the user specify more than that.

[git-p4: depot-paths = "//depot/solvespace/": change = 2178]
2010-09-17 18:20:08 -08:00
Jonathan Westhues 307965d53f Update selection of extrusion/lathe solid model color to use new
color picker.

And apply same rule to rewrite nearly-white colors (when exporting
with a file format typically viewed on a white background) for fill
color as for stroke color.

[git-p4: depot-paths = "//depot/solvespace/": change = 2176]
2010-08-14 11:00:25 -08:00
Jonathan Westhues 439e4d3124 Add a color picker, with a fancy HSV (actually, a modified version
of that, where you can pick the hue and blackness, and then the
whiteness) color picker and some swatches.

This is used in three places now: the special colors in the config
screen, the background color, and the style colors.

[git-p4: depot-paths = "//depot/solvespace/": change = 2174]
2010-07-20 21:04:03 -08:00
Jonathan Westhues 98897af77b Fix typo in SolveSpace library documentation.
[git-p4: depot-paths = "//depot/solvespace/": change = 2173]
2010-07-15 02:07:54 -08:00
Jonathan Westhues cedb360af2 Note in documentation for SolveSpace library that the constraint to
place a point on a circle also works for arcs.

[git-p4: depot-paths = "//depot/solvespace/": change = 2172]
2010-07-14 06:55:54 -08:00
Jonathan Westhues 824cc00915 Put wrappers around the functions to show and hide the edit control
in the text window. This means that I can move the conversion from
half-row and column to (x, y) into the platform-independent code,
and that I'll be ready to add my color picker.

[git-p4: depot-paths = "//depot/solvespace/": change = 2171]
2010-07-11 23:51:12 -08:00
Jonathan Westhues 319ba16541 When curves to be split intersect at multiple points, don't just
choose arbitrarily. Instead, split at the point closest to the
mouse pointer.

[git-p4: depot-paths = "//depot/solvespace/": change = 2170]
2010-07-11 22:47:14 -08:00
Jonathan Westhues 9ae29aa0e9 Build the demo version of the solver library as a DLL, not a static
library. If I understand correctly, that will avoid all the
compiler version issues with different required versions of libc.

[git-p4: depot-paths = "//depot/solvespace/": change = 2167]
2010-07-10 10:53:30 -08:00
Jonathan Westhues 46a7d0f719 Disable buffer overrun protection in the library that we build,
since that makes it more difficult to interoperate with the MSVC6
compiler.

[git-p4: depot-paths = "//depot/solvespace/": change = 2165]
2010-07-06 21:01:17 -08:00
Jonathan Westhues d8b84a9bf0 The box when additional things get deleted (because they depend on
whatever just got deleted explicitly) should be a message, not an
error.

[git-p4: depot-paths = "//depot/solvespace/": change = 2162]
2010-06-13 20:42:47 -08:00
Jonathan Westhues 9a0591cfc4 Indicate diameter symbol on diameter dimensions, instead of just a
bare number.

[git-p4: depot-paths = "//depot/solvespace/": change = 2157]
2010-05-22 22:21:42 -08:00
Jonathan Westhues 5ba5371ae8 Put a link the rounding screen to return home, just in case the one
at the top left isn't obvious enough.

[git-p4: depot-paths = "//depot/solvespace/": change = 2155]
2010-05-16 17:54:19 -08:00
Jonathan Westhues e4312cc79a Fix tooltip; arc and tangent arc are separate operations now.
[git-p4: depot-paths = "//depot/solvespace/": change = 2150]
2010-05-16 11:29:05 -08:00
Jonathan Westhues 2cd6ca882f Oops, camera tangent was defaulting to 300, not 0.3, very bad.
[git-p4: depot-paths = "//depot/solvespace/": change = 2149]
2010-05-16 10:46:10 -08:00
Jonathan Westhues 00231a6799 Add two more icons to the toolbar, for text in a TrueType font and
for the tangent arc thing.

And update the version number to 1.7, in preparation for the next
release.

[git-p4: depot-paths = "//depot/solvespace/": change = 2147]
2010-05-16 09:04:56 -08:00
Jonathan Westhues fe2ea5d5e1 Improve the non-parametric rounding. It now works on both lines and
circles, using a numerical method. And the user can specify a
radius, instead of letting us choose automatically, and specify
whether the original lines should be kept and made construction, or
deleted.

[git-p4: depot-paths = "//depot/solvespace/": change = 2146]
2010-05-16 08:36:23 -08:00
Jonathan Westhues a05cc4dda8 Add a checkbox to group screens to toggle visibility; seemed silly
to have that available from the list of groups, but not there.

[git-p4: depot-paths = "//depot/solvespace/": change = 2143]
2010-05-11 20:57:41 -08:00
Jonathan Westhues a95054890f Fix some cases where the green line (that indicates the center of
an in-plane rotation of the view, or of a set of entities) would
remain on screen after the action was over.

[git-p4: depot-paths = "//depot/solvespace/": change = 2142]
2010-05-11 20:47:58 -08:00
Jonathan Westhues 949df4d139 Add a constraint for tangency between any combination of arcs
and cubics. Also add that to the library interface.

It might have been better to use a single constraint for that,
plus all the line-curve or line-line cases, but it would break
backwards compatibility if I did that now, and perhaps be
confusing with the 'other' member (which is meaningless for
lines) anyways.

[git-p4: depot-paths = "//depot/solvespace/": change = 2141]
2010-05-09 20:14:06 -08:00
Jonathan Westhues 9f7ff34b98 Add option to treat all dimensions as reference dimensions. This is
useful because it makes it possible to add cosmetic dimensions to
an existing model, without REF appended.

[git-p4: depot-paths = "//depot/solvespace/": change = 2140]
2010-05-09 17:06:09 -08:00
Jonathan Westhues 8481c54012 Major UI changes, to use the checkboxes and radio buttons wherever
possible. This replaces all of the color-coded links, that I liked
but that were nonstandard.

Also rip out the old sweep and helical sweep UI; that was disabled,
but the code was still present.

And fix dependencies in makefile, since textwin.cpp depends on the
icons now.

[git-p4: depot-paths = "//depot/solvespace/": change = 2139]
2010-05-09 10:25:23 -08:00
Jonathan Westhues 2dbb21aecd Add special characters to font, to represent checkboxes and radio
buttons. This requires some tools to convert .png images to that,
and that I put the characters in a two-dimensional grid in the
texture (since one-dimensional strip gets wider than the hardware
supports).

[git-p4: depot-paths = "//depot/solvespace/": change = 2138]
2010-05-08 17:20:02 -08:00
Jonathan Westhues 7a2941d2ea Add locked-where-dragged constraint to library interface, and
update some copyright dates and bad grammar in comments.

[git-p4: depot-paths = "//depot/solvespace/": change = 2137]
2010-05-06 18:13:57 -08:00
Jonathan Westhues f27b567f5c Note when an entity is construction, when we describe it in the
text window.

[git-p4: depot-paths = "//depot/solvespace/": change = 2136]
2010-05-03 21:13:35 -08:00
Jonathan Westhues 4628048d45 Add "lock point where dragged" constraint, in either 2d or 3d.
And call the cubic things splines, not segments, since that's what
they are now.

[git-p4: depot-paths = "//depot/solvespace/": change = 2135]
2010-05-03 21:11:52 -08:00
Jonathan Westhues ef7f6c6057 Oops, clear hovered icon in the text window when the mouse leaves
that window; otherwise it remains highlighted, and may even get
tooltipped.

[git-p4: depot-paths = "//depot/solvespace/": change = 2134]
2010-05-02 21:43:42 -08:00
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 01ecb986f4 Instead of a "force parallel projection" menu item that's on by
default, let's do a "use perspective projection" item that's off by
default. Same meaning, but less confusion.

[git-p4: depot-paths = "//depot/solvespace/": change = 2132]
2010-05-02 21:15:28 -08:00
Jonathan Westhues 0246add3e9 Replace ugly text links to hide/show things with icons. So add code
to draw those, and hit test with the mouse, and display tool tips
when the user hovers with the mouse. Also, underline links only
when they're hovered, and not otherwise.

And add a separate menu option to align the view to the active
workplane, vs. activating the active group's workplane, and
remap the bottom two graphics window toolbar icons to that and
"nearest iso view" instead of draw in 2d/3d, since people tended
to click on those without understanding and cause trouble.

And by default, we force a parallel projection; so the factory
default camera tangent is now 0.3, not 0.

[git-p4: depot-paths = "//depot/solvespace/": change = 2131]
2010-05-02 21:04:42 -08:00
Jonathan Westhues c4b442f92f Initial work to move text window guts into platform-independent
code. This is now drawn using gl, and the bitmap font (both there
and in the graphics window) is drawn from a texture from a static
table, not from the Win32 functions, since that's ~1000x faster.

So this adds a tool to generate that table. With luck that will
also fix my font issues under WINE, which won't have to render the
TTF itself.

Still needs some cleanup, and to make all the cosmetic improvements
that I want.

[git-p4: depot-paths = "//depot/solvespace/": change = 2130]
2010-04-25 23:52:49 -08:00
Jonathan Westhues 6750995ef0 Split stuff to describe selected entity into a separate file, in
preparation for rework of text window.

[git-p4: depot-paths = "//depot/solvespace/": change = 2129]
2010-04-11 17:25:19 -08:00
Jonathan Westhues c81cbd9ee9 Add ability to measure the area of a plane sketch, since that's
easy and useful. Also make the volume measurement use Message(),
and not a separate text window screen.

And make Edit -> Unselect All (Esc) clear the marks drawn to
indicate free parameters, since it clears all the other temporary
stuff drawn in the graphics window.

[git-p4: depot-paths = "//depot/solvespace/": change = 2121]
2010-03-01 09:23:57 -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 7b10381b80 Fix bug where on-screen display of view parameters wasn't updated
after View -> Nearest Ortho/Iso.

[git-p4: depot-paths = "//depot/solvespace/": change = 2119]
2010-02-28 10:55:49 -08:00