fixed conversion dialog, added second checkbox for text_fills, no real functionality added yet

This commit is contained in:
clemniem 2016-06-23 14:09:39 +02:00
parent fffc0c4ecb
commit 3ffdceb5af
4 changed files with 20 additions and 7 deletions

View file

@ -344,7 +344,7 @@ class SvgToGcodePlugin(octoprint.plugin.SlicerPlugin,
if not machinecode_path:
path, _ = os.path.splitext(model_path)
machinecode_path = path + ".gco"
self._svgtogcode_logger.info("### Slicing %s to %s using profile stored at %s" % (model_path, machinecode_path, profile_path))
## direct call
@ -357,6 +357,8 @@ class SvgToGcodePlugin(octoprint.plugin.SlicerPlugin,
converter_path = '/home/teja/workspace/mrbeam-inkscape-ext'
elif("denkbrett" in hostname):
converter_path = '/home/flo/mrbeam/git/mrbeam-inkscape-ext'
elif ("clems-Air" in hostname):
converter_path = '/Users/clem/Dropbox/mrBeam/mrbeam-inkscape-ext'
import sys
sys.path.append(converter_path)

View file

@ -16,15 +16,16 @@ defaults = dict(
# general settings
svgDPI = 90,
pierce_time = 0,
# vector settings
speed = 300,
intensity = 500,
fill_areas = False,
fill_text = False,
cross_fill = False,
fill_angle = 0,
fill_spacing = 0.25,
# pixel settings
beam_diameter = 0.25,
intensity_white = 0,
@ -251,8 +252,8 @@ class Profile(object):
}
return settings
def convert_to_engine2(self):
settings = {
@ -268,6 +269,7 @@ class Profile(object):
"sharpening": self.get_float("img_sharpening"),
"dithering": self.get_boolean("img_dithering"),
"fill_areas": self.get_boolean("fill_areas"),
"fill_text": self.get_boolean("fill_text"),
"cross_fill": self.get_boolean("cross_fill"),
"fill_angle": self.get_float("fill_angle"),
"fill_spacing": self.get_float("fill_spacing"),

View file

@ -36,13 +36,17 @@ $(function(){
self.maxSpeed = ko.observable(3000);
self.minSpeed = ko.observable(20);
self.fill_areas = ko.observable(false);
self.fill_text = ko.observable(false);
self.show_fill_areas_checkbox = ko.observable(false);
self.show_fill_text_checkbox = ko.observable(false);
// image engraving stuff
// preset values are a good start for wood engraving
self.images_placed = ko.observable(false);
self.show_image_parameters = ko.computed(function(){
return self.images_placed() || (self.fill_areas() && self.show_vector_parameters());
return self.images_placed()
|| (self.fill_areas() && self.show_vector_parameters())
|| self.fill_text();
});
self.imgIntensityWhite = ko.observable(0);
self.imgIntensityBlack = ko.observable(500);
@ -257,6 +261,7 @@ $(function(){
"profile.speed": self.laserSpeed(),
"profile.intensity": self.laserIntensity(),
"profile.fill_areas": self.fill_areas(),
"profile.fill_text": self.fill_text(),
"profile.pierce_time": self.pierceTime(),
"profile.intensity_black" : self.imgIntensityBlack(),
"profile.intensity_white" : self.imgIntensityWhite(),

View file

@ -41,9 +41,13 @@
<label class="control-label">{{ _('Filled areas') }}</label>
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: fill_areas">{{ _('Engrave Infills') }}
</label>
</div>
<div class="controls">
<label class="checkbox">
{#TODO: CLEM make checkbox usable fill_text #}
<input type="checkbox" data-bind="checked: fill_text">{{ _('Engrave Text') }}
<input type="checkbox" data-bind="checked: fill_areas">{{ _('Engrave Infills') }}
</label>
</div>
</div>