Skip to content

Commit 521fb05

Browse files
authored
Merge pull request FreeCAD#467 from howetuft/hotfix
Rendermesh: make deep copy of points before applying scale
2 parents 6dabe49 + 40efdb3 commit 521fb05

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Render/rendermesh_mixins.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import operator
3636
import functools
3737
from math import radians, cos
38+
import copy
3839

3940
try:
4041
import numpy as np
@@ -944,6 +945,9 @@ def _scale_points(self, ratio):
944945
945946
Numpy version.
946947
"""
948+
# Make a private copy of points (otherwise, in copied structures
949+
# like array, points are shared and scale is applied N times)
950+
self._points = copy.deepcopy(self._points)
947951
self._points *= ratio
948952

949953
def compute_tspaces(self):

0 commit comments

Comments
 (0)