Przeglądaj źródła

- grouped all parsers files in flatcamParsers folder

Marius Stanciu 6 lat temu
rodzic
commit
5a4d61ee8f

+ 1 - 1
FlatCAMEditor.py

@@ -26,7 +26,7 @@ from numpy import arctan2, Inf, array, sqrt, sign, dot
 from rtree import index as rtindex
 from flatcamGUI.GUIElements import OptionalInputSection, FCCheckBox, FCEntry, FCComboBox, FCTextAreaRich, \
     FCTable, FCDoubleSpinner, FCButton, EvalEntry2, FCInputDialog
-from ParseFont import *
+from flatcamParsers.ParseFont import *
 
 import gettext
 import FlatCAMTranslation as fcTranslate

+ 1 - 0
README.md

@@ -16,6 +16,7 @@ CAD program, and create G-Code for Isolation routing.
 - in Properties tool now the Gerber apertures show the number of polygons in 'solid_geometry' instead of listing the objects
 - added a visual cue in Menu -> Edit about the entries to enter the Editor and to Save & Exit Editor. When one is enabled the other is disabled.
 - grouped all the UI files in flatcamGUI folder
+- grouped all parsers files in flatcamParsers folder
 
 10.03.2019
 

+ 3 - 18
camlib.py

@@ -12,18 +12,13 @@ from io import StringIO
 from numpy import arctan2, Inf, array, sqrt, pi, ceil, sin, cos, dot, float32, \
     transpose
 from numpy.linalg import solve, norm
-import re
-import sys
 import traceback
 from decimal import Decimal
 
-import collections
-
 from rtree import index as rtindex
 
 # See: http://toblerity.org/shapely/manual.html
-from shapely.geometry import Polygon, LineString, Point, LinearRing, MultiLineString
-from shapely.geometry import MultiPoint, MultiPolygon
+from shapely.geometry import Polygon
 from shapely.geometry import box as shply_box
 from shapely.ops import cascaded_union, unary_union
 import shapely.affinity as affinity
@@ -31,32 +26,22 @@ from shapely.wkt import loads as sloads
 from shapely.wkt import dumps as sdumps
 from shapely.geometry.base import BaseGeometry
 from shapely.geometry import shape
-from shapely import speedups
 
 from collections import Iterable
 
-import numpy as np
 import rasterio
 from rasterio.features import shapes
 
-from copy import deepcopy
-
 # TODO: Commented for FlatCAM packaging with cx_freeze
 
-from xml.dom.minidom import parseString as parse_xml_string
-
 # from scipy.spatial import KDTree, Delaunay
 
-from ParseSVG import *
-from ParseDXF import *
+from flatcamParsers.ParseSVG import *
+from flatcamParsers.ParseDXF import *
 
 import logging
-import os
 # import pprint
 import platform
-import FlatCAMApp
-
-import math
 
 if platform.architecture()[0] == '64bit':
     from ortools.constraint_solver import pywrapcp

+ 3 - 11
ParseDXF.py → flatcamParsers/ParseDXF.py

@@ -6,21 +6,13 @@
 # MIT Licence                                              #
 ############################################################
 
-import re
-import itertools
-import math
-import ezdxf
-
-from shapely.geometry import LinearRing, LineString, Point, Polygon
-from shapely.affinity import translate, rotate, scale, skew, affine_transform
-import numpy
+from shapely.geometry import LineString
 import logging
 
 log = logging.getLogger('base2')
-import FlatCAMApp
 
-from ParseFont import *
-from ParseDXF_Spline import *
+from flatcamParsers.ParseFont import *
+from flatcamParsers.ParseDXF_Spline import *
 
 
 def distance(pt1, pt2):

+ 0 - 0
ParseDXF_Spline.py → flatcamParsers/ParseDXF_Spline.py


+ 0 - 0
ParseFont.py → flatcamParsers/ParseFont.py


+ 4 - 8
ParseSVG.py → flatcamParsers/ParseSVG.py

@@ -20,17 +20,13 @@
 ############################################################
 
 # import xml.etree.ElementTree as ET
-from lxml import etree as ET
-import re
-import itertools
-from svg.path import Path, Line, Arc, CubicBezier, QuadraticBezier, parse_path
+from svg.path import Line, Arc, CubicBezier, QuadraticBezier, parse_path
 from svg.path.path import Move
-from shapely.geometry import LinearRing, LineString, Point, Polygon
-from shapely.affinity import translate, rotate, scale, skew, affine_transform
+from shapely.geometry import LineString
+from shapely.affinity import skew, affine_transform
 import numpy as np
-import logging
 
-from ParseFont import *
+from flatcamParsers.ParseFont import *
 
 log = logging.getLogger('base2')
 

+ 0 - 0
flatcamParsers/__init__.py