- small changes in the VisPyVisuals that should improve a bit the performance
This commit is contained in:
@@ -7,6 +7,11 @@ CHANGELOG for FlatCAM beta
|
|||||||
|
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
|
30.10.2021
|
||||||
|
|
||||||
|
- small changes in the VisPyVisuals that should improve a bit the performance
|
||||||
|
|
||||||
|
|
||||||
28.10.2021
|
28.10.2021
|
||||||
|
|
||||||
- cleaned the geometry generated by flattening by removing the empty geometry; fixed issue #539 on jpcgt's bitbucket account
|
- cleaned the geometry generated by flattening by removing the empty geometry; fixed issue #539 on jpcgt's bitbucket account
|
||||||
|
|||||||
@@ -292,8 +292,21 @@ class ShapeCollectionVisual(CompoundVisual):
|
|||||||
self.key_lock.release()
|
self.key_lock.release()
|
||||||
|
|
||||||
# Prepare data for translation
|
# Prepare data for translation
|
||||||
self.data[key] = {'geometry': shape, 'color': color, 'alpha': alpha, 'face_color': face_color,
|
self.data[key] = {
|
||||||
'visible': visible, 'layer': layer, 'tolerance': tolerance}
|
'geometry': shape,
|
||||||
|
'color': color,
|
||||||
|
'alpha': alpha,
|
||||||
|
'face_color': face_color,
|
||||||
|
'visible': visible,
|
||||||
|
'layer': layer,
|
||||||
|
'tolerance': tolerance,
|
||||||
|
# the following keys are updated in the _update_shape_buffers() method
|
||||||
|
'mesh_vertices': [], # Vertices for mesh
|
||||||
|
'mesh_tris': [], # Faces for mesh
|
||||||
|
'mesh_colors': [], # Face colors
|
||||||
|
'line_pts': [], # Vertices for line
|
||||||
|
'line_colors': [] # Line colors
|
||||||
|
}
|
||||||
|
|
||||||
if linewidth:
|
if linewidth:
|
||||||
self._line_width = linewidth
|
self._line_width = linewidth
|
||||||
@@ -497,7 +510,7 @@ class ShapeCollectionVisual(CompoundVisual):
|
|||||||
self.update_lock.acquire(True)
|
self.update_lock.acquire(True)
|
||||||
|
|
||||||
# Merge shapes buffers
|
# Merge shapes buffers
|
||||||
for data in list(self.data.values()):
|
for data in self.data.values():
|
||||||
if data['visible'] and 'line_pts' in data:
|
if data['visible'] and 'line_pts' in data:
|
||||||
try:
|
try:
|
||||||
line_pts[data['layer']] += data['line_pts']
|
line_pts[data['layer']] += data['line_pts']
|
||||||
|
|||||||
Reference in New Issue
Block a user