skeinforge_tools.analyze_plugins.behold ($Date: 2008/21/04 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/analyze_plugins/behold.py |
Behold is an analysis script to display a gcode file in an isometric view.
The behold manual page is at:
http://www.bitsfrombytes.com/wiki/index.php?title=Skeinforge_Behold
Operation
Settings
Animation
Animation Line Quickening
Animation Slide Show Rate
Axis Rulings
Banding
Band Height
Bottom Band Brightness
Bottom Layer Brightness
Bright Band Start
From the Bottom
From the Top
Draw Arrows
Export Menu
Go Around Extruder Off Travel
Layers
Layer
Layer Extra Span
Line
Mouse Mode
Display Line
Viewpoint Move
Viewpoint Rotate
Number of Fill Bottom Layers
Number of Fill Top Layers
Scale
Screen Inset
Screen Horizontal Inset
Screen Vertical Inset
Viewpoint Latitude
Viewpoint Longitude
Width
Width of Axis Negative Side
Width of Axis Positive Side
Width of Infill Thread
Width of Fill Bottom Thread
Width of Fill Top Thread
Width of Loop Thread
Width of Perimeter Inside Thread
Width of Perimeter Outside Thread
Width of Raft Thread
Width of Selection Thread
Width of Travel Thread
Icons
Gcodes
Examples
Operation
The default 'Activate Behold' checkbox is on. When it is on, the functions described below will work when called from the skeinforge toolchain, when it is off, the functions will not be called from the toolchain. The functions will still be called, whether or not the 'Activate Behold' checkbox is on, when behold is run directly. Behold can not separate the layers when it reads gcode without comments.
The viewer is simple, the viewpoint can only be moved in a sphere around the center of the model by changing the viewpoint latitude and longitude. Different regions of the model can be hidden by setting the width of the thread to zero. The alternating bands act as contour bands and their brightness and width can be changed. The layers will be displayed starting at the "Layers From" index up until the "Layers To" index. All of the settings can be set in the initial "Behold Settings" window and some can be changed after the viewer is running in the "Behold Dynamic Settings" window. In the viewer, dragging the mouse will change the viewpoint.
Settings
Animation
Animation Line Quickening
Default is one.
The quickness of the tool animation over the quickness of the actual tool.
Animation Slide Show Rate
Default is two layers per second.
The rate, in layers per second, at which the layer changes when the soar or dive button is pressed..
Axis Rulings
Default is on.
When selected, rulings will be drawn on the axis lines.
Banding
Band Height
Default is five layers.
Defines the height of the band in layers, a pair of bands is twice that height.
Bottom Band Brightness
Default is 0.7.
Defines the ratio of the brightness of the bottom band over the brightness of the top band. The higher it is the brighter the bottom band will be.
Bottom Layer Brightness
Default is one.
Defines the ratio of the brightness of the bottom layer over the brightness of the top layer. With a low bottom layer brightness ratio the bottom of the model will be darker than the top of the model, as if it was being illuminated by a light just above the top.
Bright Band Start
Default choice is 'From the Top'.
The button group that determines where the bright band starts from.
From the Bottom
When selected, the bright bands will start from the bottom.
From the Top
When selected, the bright bands will start from the top.
Draw Arrows
Default is on.
When selected, arrows will be drawn at the end of each line segment.
Export Menu
When the submenu in the export menu item in the file menu is clicked, an export canvas dialog will be displayed, which can export the canvas to a file.
Go Around Extruder Off Travel
Default is off.
When selected, the display will include the travel when the extruder is off, which means it will include the nozzle wipe path if any.
Layers
Layer
Default is zero.
On the display window, the Up button increases the 'Layer' by one, and the Down button decreases the layer by one. When the layer displayed in the layer spin box is changed then <Return> is hit, the layer shown will be set to the spin box, to a mimimum of zero and to a maximum of the highest index layer.The Soar button increases the layer at the 'Animation Slide Show Rate', and the Dive (double left arrow button beside the layer field) button decreases the layer at the slide show rate.
Layer Extra Span
Default is a huge number.
The viewer will draw the layers in the range including the 'Layer' index and the 'Layer' index plus the 'Layer Extra Span'. If the 'Layer Extra Span' is negative, the layers viewed will start at the 'Layer' index, plus the 'Layer Extra Span', and go up to and include the 'Layer' index. If the 'Layer Extra Span' is zero, only the 'Layer' index layer will be displayed. If the 'Layer Extra Span' is positive, the layers viewed will start at the 'Layer' index, and go up to and include the 'Layer' index plus the 'Layer Extra Span'.
Line
Default is zero.
The index of the selected line on the layer that is highlighted when the 'Display Line' mouse tool is chosen. The line spin box up button increases the 'Line' by one. If the line index of the layer goes over the index of the last line, the layer index will be increased by one and the new line index will be zero. The down button decreases the line index by one. If the line index goes below the index of the first line, the layer index will be decreased by one and the new line index will be at the last line. When the line displayed in the line field is changed then <Return> is hit, the line shown will be set to the line field, to a mimimum of zero and to a maximum of the highest index line. The Soar button increases the line at the speed at which the extruder would move, times the 'Animation Line Quickening' ratio, and the Dive (double left arrow button beside the line field) button decreases the line at the animation line quickening ratio.
Mouse Mode
Default is 'Display Line'.
The mouse tool can be changed from the 'Mouse Mode' menu button or picture button. The mouse tools listen to the arrow keys when the canvas has the focus. Clicking in the canvas gives the canvas the focus, and when the canvas has the focus a thick black border is drawn around the canvas.
Display Line
The 'Display Line' tool will display the highlight the selected line, and display the file line count, counting from one, and the gcode line itself. When the 'Display Line' tool is active, clicking the canvas will select the nearest line to the mouse click.
Viewpoint Move
The 'Viewpoint Move' tool will move the viewpoint in the xy plane when the mouse is clicked and dragged on the canvas.
Viewpoint Rotate
The 'Viewpoint Rotate' tool will rotate the viewpoint around the origin, when the mouse is clicked and dragged on the canvas, or the arrow keys have been used and <Return> is pressed. The viewpoint can also be moved by dragging the mouse. The viewpoint latitude will be increased when the mouse is dragged from the center towards the edge. The viewpoint longitude will be changed by the amount around the center the mouse is dragged. This is not very intuitive, but I don't know how to do this the intuitive way and I have other stuff to develop. If the shift key is pressed; if the latitude is changed more than the longitude, only the latitude will be changed, if the longitude is changed more only the longitude will be changed.
Number of Fill Bottom Layers
Default is one.
The "Number of Fill Bottom Layers" is the number of layers at the bottom which will be colored olive.
Number of Fill Top Layers
Default is one.
The "Number of Fill Top Layers" is the number of layers at the top which will be colored blue.
Scale
Default is ten.
The scale setting is the scale of the image in pixels per millimeter, the higher the number, the greater the size of the display.
The zoom in mouse tool will zoom in the display at the point where the mouse was clicked, increasing the scale by a factor of two. The zoom out tool will zoom out the display at the point where the mouse was clicked, decreasing the scale by a factor of two.
Screen Inset
Screen Horizontal Inset
Default is one hundred.
The "Screen Horizontal Inset" determines how much the canvas will be inset in the horizontal direction from the edge of screen, the higher the number the more it will be inset and the smaller it will be.
Screen Vertical Inset
Default is two hundred.
The "Screen Vertical Inset" determines how much the canvas will be inset in the vertical direction from the edge of screen, the higher the number the more it will be inset and the smaller it will be..
Viewpoint Latitude
Default is fifteen degrees.
The "Viewpoint Latitude" is the latitude of the viewpoint, a latitude of zero is the top pole giving a top view, a latitude of ninety gives a side view and a latitude of 180 gives a bottom view.
Viewpoint Longitude
Default is 210 degrees.
The "Viewpoint Longitude" is the longitude of the viewpoint.
Width
The width of each type of thread and of each axis can be changed. If the width is set to zero, the thread will not be visible.
Width of Axis Negative Side
Default is two.
Defines the width of the negative side of the axis.
Width of Axis Positive Side
Default is six.
Defines the width of the positive side of the axis.
Width of Infill Thread
Default is one.
The "Width of Infill Thread" sets the width of the green extrusion threads, those threads which are not loops and not part of the raft.
Width of Fill Bottom Thread
Default is three.
The "Width of Fill Bottom Thread" sets the width of the olive extrusion threads at the bottom of the model.
Width of Fill Top Thread
Default is three.
The "Width of Fill Top Thread" sets the width of the blue extrusion threads at the top of the model.
Width of Loop Thread
Default is three.
The "Width of Loop Thread" sets the width of the yellow loop threads, which are not perimeters.
Width of Perimeter Inside Thread
Default is eight.
The "Width of Perimeter Inside Thread" sets the width of the orange inside perimeter threads.
Width of Perimeter Outside Thread
Default is eight.
The "Width of Perimeter Outside Thread" sets the width of the red outside perimeter threads.
Width of Raft Thread
Default is one.
The "Width of Raft Thread" sets the width of the brown raft threads.
Width of Selection Thread
Default is six.
The "Width of Selection Thread" sets the width of the selected line.
Width of Travel Thread
Default is zero.
The "Width of Travel Thread" sets the width of the grey extruder off travel threads.
Icons
The dive, soar and zoom icons are from Mark James' soarSilk icon set 1.3 at:
http://www.famfamfam.com/lab/icons/silk/
Gcodes
An explanation of the gcodes is at:
http://reprap.org/bin/view/Main/Arduino_GCode_Interpreter
and at:
http://reprap.org/bin/view/Main/MCodeReference
A gode example is at:
http://forums.reprap.org/file.php?12,file=565
Examples
Below are examples of behold being used. These examples are run in a terminal in the folder which contains Screw Holder_penultimate.gcode and behold.py.
> python behold.py
This brings up the behold dialog.
> python behold.py Screw Holder_penultimate.gcode
This brings up the behold viewer to view the gcode file.
> python
Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import behold
>>> behold.main()
This brings up the behold dialog.
>>> behold.analyzeFile( 'Screw Holder_penultimate.gcode' )
This brings up the behold viewer to view the gcode file.
Classes | ||||||||||||||||||||||||||||||||||||||
|
Functions | ||
|
Data | ||
__author__ = 'Enrique Perez (perez_enrique@yahoo.com)' __date__ = '$Date: 2008/21/04 $' __license__ = 'GPL 3.0' absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384) |
Author | ||
Enrique Perez (perez_enrique@yahoo.com) |