- PEP8 changes and PyCharm suggestions
This commit is contained in:
committed by
Marius Stanciu
parent
9abe11ff42
commit
dea7ce3028
@@ -5,7 +5,7 @@
|
||||
# MIT Licence #
|
||||
# ##########################################################
|
||||
|
||||
from shapely.geometry import LineString
|
||||
from shapely.geometry import LineString, Point
|
||||
from shapely.affinity import rotate
|
||||
from ezdxf.math.vector import Vector as ezdxf_vector
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ from copy import deepcopy
|
||||
from shapely.ops import unary_union, linemerge
|
||||
import shapely.affinity as affinity
|
||||
from shapely.geometry import box as shply_box
|
||||
from shapely.geometry import Point
|
||||
|
||||
from lxml import etree as ET
|
||||
import ezdxf
|
||||
|
||||
@@ -500,11 +500,12 @@ def getsvggeo(node, object_type, root=None, units='MM', res=64, factor=1.0):
|
||||
return geo
|
||||
|
||||
|
||||
def getsvgtext(node, object_type, units='MM'):
|
||||
def getsvgtext(node, object_type, app, units='MM'):
|
||||
"""
|
||||
Extracts and flattens all geometry from an SVG node
|
||||
into a list of Shapely geometry.
|
||||
|
||||
:param app: Main App
|
||||
:param node: xml.etree.ElementTree.Element
|
||||
:param object_type:
|
||||
:param units: FlatCAM units
|
||||
@@ -517,7 +518,7 @@ def getsvgtext(node, object_type, units='MM'):
|
||||
# Recurse
|
||||
if len(node) > 0:
|
||||
for child in node:
|
||||
subgeo = getsvgtext(child, object_type, units=units)
|
||||
subgeo = getsvgtext(child, object_type, app=app, units=units)
|
||||
if subgeo is not None:
|
||||
geo += subgeo
|
||||
|
||||
@@ -538,7 +539,7 @@ def getsvgtext(node, object_type, units='MM'):
|
||||
pos_y = float(current_attrib['y'])
|
||||
|
||||
# should have used the instance from FlatCAMApp.App but how? without reworking everything ...
|
||||
pf = ParseFont()
|
||||
pf = ParseFont(app=app)
|
||||
pf.get_fonts_by_types()
|
||||
font_name = style_dict['font-family'].replace("'", '')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user