Commit Graph

57 Commits (master)

Author SHA1 Message Date
Liam Marshall 5e3cd59eeb Switch from getContrastColor to getColor in GLView
* Removed bgcontrast
* Added new `Color4f axescolor` obtained by `ColorMap::getColor(...,
AXES_COLOR)`
* Switched showAxes and showScalemarkers to `axescolor`
2015-05-12 15:09:20 -05:00
Torsten Paul c71e70c0f9 Build fixes to compile on MXE with C++11 enabled. 2015-03-22 14:17:36 +01:00
Marius Kintel 30d2440598 More camera fixes: Better viewall calculation, better switching between perspective and ortho 2015-03-07 19:02:51 -05:00
Marius Kintel 7b8c98cfbd Make 'show scale values' a slave of 'show axes' 2015-02-25 15:03:52 -05:00
Marius Kintel 994872359e Indentation 2015-02-25 14:50:47 -05:00
Marius Kintel 54ad8c2039 #1206 Fix rounding of scale markers, Added 'e' character for large axis values 2015-02-22 03:15:45 -05:00
Marius Kintel 4b4f4386bb Be nice (and C++11 compatible) 2015-02-10 17:31:00 -05:00
Marius Kintel e44c103b72 Fixed merge error 2015-01-07 23:55:38 -05:00
Marius Kintel c8097c411e Merge pull request #1131 from TDeagan/scalemarkers_numbered
Scalemarkers numbered
2015-01-07 23:41:38 -05:00
Marius Kintel 966add80a8 Run fixed bug test cases as part of the normal regression tests 2015-01-05 21:43:17 -05:00
Torsten Paul 3c337449e9 Unify zoom handling for perspective and orthogonal mode. 2015-01-05 18:34:08 +01:00
Torsten Paul 712049795f Use correct eye position in orthogonal projection mode (fixes #1058). 2015-01-04 17:09:27 +01:00
Tim Deagan 7a71e59f2d Fix layout of number 6 character & add comments
The layout of the array that drives the 6 char was wrong.  Additional
commenting added
2014-12-29 21:23:46 -06:00
Tim Deagan 4823f26706 Addition of function to generate scale maker numeric values on large axes.
modified:   src/GLView.cc

The added function takes the length of the axis (l), the currrent position on the axis (i) and the size of the divisions between i and uses a variety of arrays to decode the characters of the position into GL_LINES, GL_LINE_STRIPs, GL_LINE_LOOPs as appropriate.  The various orientations required by the axis are handled by abstracting the line vertex sequences into arrays (set per axis.)
2014-12-29 14:55:15 -06:00
Tim Deagan 1068f61dc6 Add optional menu driven scaling tics to the large axes
Tim Deagan 12/26/2014

While add-on rulers can be extremely useful, there are many times that a quick scaling marker would be handy. This feature generates tics every 10 units, driven off the log10 of the l variable defining axes length.  As you zoom in or out, the tics automatically re-scale themselves.  Every tenth tic is slightly larger.  A menu item is added to the view menu to enable or disable the feature.

I experimented with menu driven scaling (.01, .1, 1, 10, etc.), but using small increments when zoomed out brought the app to it's knees.  Adding a visual indicator of the current scaling might be nice, but I'm nto sure where to put it (possibly below the small axes,) since it changes as zooming and would clutter the console.

 Changes to be committed:
	new file:   images/scalemarkers.png
	modified:   openscad.qrc
	modified:   src/GLView.cc
	modified:   src/GLView.h
	modified:   src/MainWindow.h
	modified:   src/MainWindow.ui
	modified:   src/QGLView.h
	modified:   src/mainwin.cc
2014-12-26 21:44:31 -06:00
Torsten Paul 7ccdb778fc Enable GL_LINE_STIPPLE only for the block where a stipple pattern is used (fixes #1111). 2014-12-26 19:20:11 +01:00
Torsten Paul 6263bfd269 Render crosshair a bit less intrusive. 2014-11-30 03:22:14 +01:00
Torsten Paul fcbd9fc024 Fix crosshair at the center of the display (fixes #1025). 2014-11-30 03:04:15 +01:00
Torsten Paul 3992cc547b Update drawing logic (fixes #1035).
- Draw negative part of the axis with stippled lines
- Calculate contrast color for axis based on background color
- Disable lighting for axis / crosshair
2014-11-30 03:04:01 +01:00
Marius Kintel 574fbf97c5 Force shininess to 64 - this is reported to fix #71 2014-08-22 11:48:34 -04:00
Marius Kintel e70bc04197 Colormap functionality from pull request #816, mostly by Don Bright, includes new colormaps by shaina 2014-08-14 17:16:24 -04:00
Marius Kintel 4bed4902e9 Bugfix: Zoom was broken for orthographic cameras. Fixes #853 2014-06-26 15:34:15 -04:00
Marius Kintel d066648390 Added View->View All menu entry 2014-06-21 16:12:55 -04:00
Marius Kintel 1ed3e4c4ad #840 bugfix: Set the up vector to Y axis in the case where we're looking down the Z axis 2014-06-21 14:53:31 -04:00
Marius Kintel 01e70046fb #810 removed unused code 2014-06-21 14:33:11 -04:00
Marius Kintel de3dc8461c #840 bugfix: Small axes had wrong rotation, adjusted size of the big axes after changing FOV to 45 degrees 2014-06-21 14:14:06 -04:00
Marius Kintel 81d92f2254 Some cleanup of old eigen2 workarounds. Added fix to support cameras looking down the Z axis 2014-06-21 12:44:38 -04:00
Marius Kintel 458d60faa6 Refactored the camera handling a bit, added --viewall cmd-line parameter 2014-06-19 17:47:38 -04:00
Torsten Paul 4fbbc09895 Make editor and console windows dockable and make MDI mode a runtime option. 2014-05-12 22:47:42 +02:00
Marius Kintel 2315524505 Scale axis display on high-DPI displays 2014-02-05 00:54:39 -05:00
Don Bright ea92d9ce19 fix issue #430 2013-09-11 19:52:31 -05:00
Ivo Noorhoff 61e6178d1b In this commit i'll change just the Qt project, c and header files to get OpenSCAD
building and working on Windows 7 compiled with Visual Studio Express 2012.

A couple of things needed changing :
* MSVC 2012 has no trunc or round, i have added those to mathc99 and included mathc99 to the files needed.
The implementations were taken from boost.
* MSVC 2012 stl does now allow accessing out of bounds elements in std:vector as an array, so "chain->objects[i]" will
fail in "OpenCSGRenderer::renderCSGChain". Whatever the platform, it will me a good idea to change this
code to something that does not trigger undefined behavior.
* MSVC 2012 cannot figure out the types involved in "if (file_size ==  80 + 4 + 50*facenum) {", i have added
a cast to force it to "if (file_size ==  static_cast<std::streamoff>(80 + 4 + 50*facenum)) {".

The next round would be regression testing and debugging and possibly more changes to the OpenSCAD main code.

The round after that would be changing the .pro and .pri files to create correct visual studio solutions.
2013-07-28 13:42:35 +02:00
don bright 974abf1304 fix strecthing with --imgsize per bug rept from Marius Kintel 2013-03-05 21:10:10 -06:00
Marius Kintel 72d3cf4659 compile fix: include opencsg.h 2013-03-05 14:16:17 -05:00
don bright 52f0071958 render settings wrong syntax 2013-03-03 20:24:24 -06:00
don bright 94d4acf765 cleanup tab spacing 2013-03-03 20:23:03 -06:00
don bright 689fdad0ac move FAR_FAR_AWAY (gl clipping limit) to rendersettings 2013-03-03 20:08:04 -06:00
don bright 42ca2151b1 cleanups 2013-03-03 19:47:07 -06:00
don bright 58de93af95 add --projection=ortho|perspective option to cmdline 2013-03-03 13:48:23 -06:00
don bright 03de7fce81 try to fix gimbal camera view on Offscreen mode 2013-03-03 12:50:32 -06:00
don bright f190b9605c add imgsize cmdline parameter for png output 2013-03-03 12:20:18 -06:00
don bright bacaa2b1b9 fix bugs in testing 2013-03-03 18:41:37 +01:00
don bright 2b2dc7a078 make Camera into single class, simplify code 2013-03-03 10:52:25 -06:00
don bright bfae32fe99 remove boost::variant stuff. trim code. add 'vector cam' cmdline option 2013-03-03 10:11:56 -06:00
don bright eb1f73de03 add Camera.h per bug rept from Marius Kintel 2013-03-01 18:41:50 -06:00
don bright 13b0fe4b3f rework Camera using boost::variant. first working --gimbalcam version 2013-02-27 00:37:37 -06:00
don bright f60ece7864 fix bugs for test compile 2013-02-26 05:55:07 +01:00
don bright 50489c4287 begin to implement --viewport option, by adding Camera class + children 2013-02-25 22:32:57 -06:00
don bright 9896b6f15e first working version of opencsg png export from gui binary
also guiopencsgtest introduced. passes 100% of 'normal' tests
2013-02-24 21:07:37 -06:00
don bright 8738cdc034 split out axes functions. begin to split out opencsg pre-rendering 2013-02-24 19:04:50 -06:00