- in Geometry Editor made sure that the MultiPolygon shapes (like those made by the Text Tool) will update the coordinates in the UI
This commit is contained in:
@@ -13,6 +13,7 @@ CHANGELOG for FlatCAM Evo beta
|
|||||||
- in Geometry Editor - update (some reformatting and adding shape data)
|
- in Geometry Editor - update (some reformatting and adding shape data)
|
||||||
- in Geometry Editor - fixed the Explode tool to work on the result of adding Text geometry
|
- in Geometry Editor - fixed the Explode tool to work on the result of adding Text geometry
|
||||||
- all the Geometry Editor plugins are moved inside another folder and the UI's are moved into their own class
|
- all the Geometry Editor plugins are moved inside another folder and the UI's are moved into their own class
|
||||||
|
- in Geometry Editor made sure that the MultiPolygon shapes (like those made by the Text Tool) will update the coordinates in the UI
|
||||||
|
|
||||||
7.04.2022
|
7.04.2022
|
||||||
|
|
||||||
|
|||||||
@@ -2376,12 +2376,25 @@ class AppGeoEditor(QtCore.QObject):
|
|||||||
|
|
||||||
coords = ''
|
coords = ''
|
||||||
vertex_nr = 0
|
vertex_nr = 0
|
||||||
for idx, line in enumerate(last_sel_geo):
|
for idx, line in enumerate(last_sel_geo.geoms):
|
||||||
line_coords = list(line.coords)
|
line_coords = list(line.coords)
|
||||||
vertex_nr += len(line_coords)
|
vertex_nr += len(line_coords)
|
||||||
coords += 'Line %s\n' % str(idx)
|
coords += 'Line %s\n' % str(idx)
|
||||||
coords += str(line_coords) + '\n'
|
coords += str(line_coords) + '\n'
|
||||||
|
elif last_sel_geo.geom_type == 'MultiPolygon':
|
||||||
|
length = 0.0
|
||||||
|
self.is_simple_entry.set_value('None')
|
||||||
|
self.is_ring_entry.set_value('None')
|
||||||
|
self.is_ccw_entry.set_value('None')
|
||||||
|
|
||||||
|
coords = ''
|
||||||
|
vertex_nr = 0
|
||||||
|
for idx, poly in enumerate(last_sel_geo.geoms):
|
||||||
|
poly_coords = list(poly.exterior.coords) + [list(i.coords) for i in poly.interiors]
|
||||||
|
vertex_nr += len(poly_coords)
|
||||||
|
|
||||||
|
coords += 'Polygon %s\n' % str(idx)
|
||||||
|
coords += str(poly_coords) + '\n'
|
||||||
elif last_sel_geo.geom_type in ['LinearRing', 'LineString']:
|
elif last_sel_geo.geom_type in ['LinearRing', 'LineString']:
|
||||||
length = last_sel_geo.length
|
length = last_sel_geo.length
|
||||||
coords = list(last_sel_geo.coords)
|
coords = list(last_sel_geo.coords)
|
||||||
|
|||||||
Reference in New Issue
Block a user