- added a new feature for Geometry export-as-SVG, the ability to export only the paths (outlines); the new feature is controlled from a new parameter in Preferences -> Geometry -> Export
This commit is contained in:
@@ -7,6 +7,10 @@ CHANGELOG for FlatCAM Evo beta
|
||||
|
||||
=================================================
|
||||
|
||||
1.09.2022
|
||||
|
||||
- added a new feature for Geometry export-as-SVG, the ability to export only the paths (outlines); the new feature is controlled from a new parameter in Preferences -> Geometry -> Export
|
||||
|
||||
1.08.2022
|
||||
|
||||
- fixed some bugs in Geometry Editor in regards of Buffer Tool
|
||||
|
||||
@@ -267,6 +267,7 @@ class PreferencesUIManager(QtCore.QObject):
|
||||
|
||||
# Geometry Export
|
||||
"geometry_dxf_format": self.ui.geo_pref_form.geometry_exp_group.dxf_format_combo,
|
||||
"geometry_paths_only": self.ui.geo_pref_form.geometry_exp_group.svg_paths_only_cb,
|
||||
|
||||
# Geometry Editor
|
||||
"geometry_editor_sel_limit": self.ui.geo_pref_form.geometry_editor_group.sel_limit_entry,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
from PyQt6 import QtWidgets, QtCore
|
||||
|
||||
from appGUI.GUIElements import FCLabel, FCComboBox, GLay, FCFrame
|
||||
from appGUI.GUIElements import FCLabel, FCComboBox, GLay, FCFrame, FCCheckBox
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
import gettext
|
||||
import appTranslation as fcTranslate
|
||||
@@ -36,7 +37,7 @@ class GeometryExpPrefGroupUI(OptionsGroupUI):
|
||||
export_grid = GLay(v_spacing=5, h_spacing=3)
|
||||
export_frame.setLayout(export_grid)
|
||||
|
||||
# Excellon non-decimal format
|
||||
# DXF format
|
||||
self.dxf_format_label = FCLabel("%s:" % _("Format"))
|
||||
self.dxf_format_label.setToolTip(
|
||||
_("Autodesk DXF Format used when exporting Geometry as DXF.")
|
||||
@@ -48,4 +49,11 @@ class GeometryExpPrefGroupUI(OptionsGroupUI):
|
||||
export_grid.addWidget(self.dxf_format_label, 0, 0)
|
||||
export_grid.addWidget(self.dxf_format_combo, 0, 1)
|
||||
|
||||
# SVG format
|
||||
self.svg_paths_only_cb = FCCheckBox(_("SVG Paths-Only"))
|
||||
self.svg_paths_only_cb.setToolTip(
|
||||
_("SVG Format. When checked it will export only paths.")
|
||||
)
|
||||
export_grid.addWidget(self.svg_paths_only_cb, 2, 0, 1, 2)
|
||||
|
||||
self.layout.addStretch()
|
||||
|
||||
@@ -2326,12 +2326,13 @@ class Geometry(object):
|
||||
flat_geo = []
|
||||
if self.multigeo:
|
||||
for tool in self.tools:
|
||||
flat_geo += self.flatten(self.tools[tool]['solid_geometry'])
|
||||
flat_geo += self.flatten(self.tools[tool]['solid_geometry'],
|
||||
pathonly=self.app.options["geometry_paths_only"])
|
||||
geom_svg = unary_union(flat_geo)
|
||||
else:
|
||||
geom_svg = unary_union(self.flatten())
|
||||
geom_svg = unary_union(self.flatten(pathonly=self.app.options["geometry_paths_only"]))
|
||||
else:
|
||||
geom_svg = unary_union(self.flatten())
|
||||
geom_svg = unary_union(self.flatten(pathonly=self.app.options["geometry_paths_only"]))
|
||||
|
||||
xmin, ymin, xmax, ymax = geom_svg.bounds
|
||||
|
||||
|
||||
@@ -322,6 +322,7 @@ class AppDefaults:
|
||||
|
||||
# Geometry Export
|
||||
"geometry_dxf_format": 'R2010',
|
||||
"geometry_paths_only": True,
|
||||
|
||||
# Geometry Editor
|
||||
"geometry_editor_sel_limit": 30,
|
||||
|
||||
Reference in New Issue
Block a user