Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Scalemarkers numbered #1131
This pull request represents a set of changes to add numbered scale markers as discussed at #1116
The scale marking is user select-able using a menu item in the View menu.
The markers change proportionally based on the length of the axes using a log function to provide units in powers of ten at all zoom levels.
The markers currently in code provide a single arm to one side of the axis, additional arms are present but commented in the code.
The numbers are generated by GL_LINES, GL_LINE_STRIPs or GL_LINE_LOOPs as appropriate. Their sizing remains consistent regardless of scale.
Here are some downsides (though not necessarily issues, just artifacts):
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
merging the upstream/master branch into my working branch prior to syncing with my fork 12/26/2014 22:07 CST tim deagan
…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.)
modified: src/GLView.h modified: src/MainWindow.h modified: src/QGLView.h modified: src/mainwin.cc QtCreator ignores the prefs and will only put in spaces instead of tabs. These are manual fixes in Notepad++ to try and keep the indents in the standard mode.
Frak! I thought sure I tested that. I must have gotten complacent thinking I was mimicking the GLView::showAxes setup. Basing my scaling entirely on
Sigh, there goes my fantasy of faking an understanding of how the camera stuff programmatically works. Sorry about that!!! I'l dig in and get a sufficient understanding.