Commit 423b35c8 authored by sumpfralle's avatar sumpfralle

fixed calculation of processing bounds (inside/along/outside)


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@456 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 0b01a4a9
......@@ -2037,8 +2037,9 @@ class ProjectGui:
log.error("Assertion failed: invalid boundary_mode (%s)" % str(self.settings.get("boundary_mode")))
border = (offset, offset, 0)
bounds.set_reference(self.model.get_bounds())
processing_bounds = Bounds(Bounds.TYPE_FIXED_MARGIN, border, border,
reference=self.model.get_bounds())
reference=bounds)
# check if the boundary limits are valid
if not processing_bounds.is_valid():
......
......@@ -157,6 +157,9 @@ class Bounds:
else:
return True
def set_reference(self, reference):
self.reference = reference
def set_name(self, name):
self.name = name
......@@ -215,7 +218,7 @@ class Bounds:
+ "requires an a reference object for caluclating " \
+ "absolute limits"
else:
ref_low, ref_high = reference.get_absolute_limits(reference)
ref_low, ref_high = reference.get_absolute_limits()
low = [None] * 3
high = [None] * 3
# calculate the absolute limits
......@@ -266,7 +269,7 @@ class Bounds:
+ "requires an a reference object for caluclating " \
+ "absolute limits"
else:
ref_low, ref_high = reference.get_absolute_limits(reference)
ref_low, ref_high = reference.get_absolute_limits()
# calculate the new settings
if self.bounds_type == Bounds.TYPE_RELATIVE_MARGIN:
for index in range(3):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment