add icon for slic3r_stl_input
This commit is contained in:
parent
c9c1e8b138
commit
ce7f7bee52
@ -91,7 +91,7 @@
|
||||
<page name="tab_about" gui-text="About">
|
||||
<label appearance="header">Slic3r STL Input</label>
|
||||
<label>This extension is highly based on the work of Jürgen Weigert. It projects an STL file on the X-Y plane by cutting the objects into "slices". Each "slice" is a group of polygons, with a label indicating it's z position. The polygons are converted to paths for better editing in inkscape. Use Object -> Rows & Columns to distribute the slices in a grid. Possible input files are STL, Wavefront OBJ, PLY and OFF.</label>
|
||||
<label>2021 / written by Mario Voigt (Stadtfabrikanten e.V. / FabLab Chemnitz)</label>
|
||||
<label>2021 - 2025 / written by Mario Voigt (Stadtfabrikanten e.V. / FabLab Chemnitz)</label>
|
||||
<spacer />
|
||||
<label appearance="header">Online Documentation</label>
|
||||
<label appearance="url">https://y.stadtfabrikanten.org/slic3rstlinput</label>
|
||||
@ -125,6 +125,8 @@
|
||||
<submenu name="Import/Export/Transfer" />
|
||||
</submenu>
|
||||
</effects-menu>
|
||||
<menu-tip>STL Sliced Import (by Slic3r). Supports OBJ/OFF/PLY/STL as input file formats.</menu-tip>
|
||||
<icon>icon.svg</icon>
|
||||
</effect>
|
||||
<script>
|
||||
<command location="inx" interpreter="python">slic3r_stl_input.py</command>
|
||||
|
@ -227,7 +227,8 @@ class SlicerSTLInput(inkex.EffectExtension):
|
||||
# e.attrib['{http://www.inkscape.org/namespaces/inkscape}document-units'] = "mm"
|
||||
|
||||
totalPolygoncount = 0
|
||||
for e in doc.iterfind('//{*}polygon'):
|
||||
|
||||
for e in doc.iterfind('.//{*}polygon'):
|
||||
totalPolygoncount += 1
|
||||
|
||||
polygoncount = 0
|
||||
@ -237,7 +238,7 @@ class SlicerSTLInput(inkex.EffectExtension):
|
||||
else:
|
||||
fill = args.fill_color
|
||||
|
||||
for e in doc.iterfind('//{*}polygon'):
|
||||
for e in doc.iterfind('.//{*}polygon'):
|
||||
polygoncount += 1
|
||||
if args.diffuse_fill_opacity == "front_to_back":
|
||||
fill_opacity = (args.max_fill_opacity - (polygoncount / totalPolygoncount) * (args.max_fill_opacity - args.min_fill_opacity)) + args.min_fill_opacity
|
||||
@ -302,7 +303,7 @@ class SlicerSTLInput(inkex.EffectExtension):
|
||||
del e.attrib['{http://slic3r.org/namespaces/slic3r}type']
|
||||
|
||||
layercount = 0
|
||||
for e in doc.iterfind('//{*}g'):
|
||||
for e in doc.iterfind('.//{*}g'):
|
||||
if e.attrib['{http://slic3r.org/namespaces/slic3r}z'] and e.attrib['id']:
|
||||
layercount+=1
|
||||
e.attrib['{http://www.inkscape.org/namespaces/inkscape}label'] = \
|
||||
|
Loading…
x
Reference in New Issue
Block a user