aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Boxer.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Boxer.py b/Boxer.py
index 95e4704..b465746 100644
--- a/Boxer.py
+++ b/Boxer.py
@@ -442,22 +442,22 @@ def make(doc, cfg):
pos = Vector(0, 0, 0)
r = Rotation(Vector(0, 0, 1), 0)
# print('pos: ' + str(pos.x))
+ previous = None
for sideType in SideType:
try:
view = views[sideType]
-# print('view.Shape.BoundBox: ' + str(view.Shape.BoundBox) + ', .XLength: ' + str(view.Shape.BoundBox.XLength) + ', .Center: ' + str(view.Shape.BoundBox.Center))
+ if previous:
+ pos.x += previous.Shape.BoundBox.XLength/2
-# if pos.x == 0:
-# pos.x += -view.Shape.BoundBox.XMin
-# print('first: pos: ' + str(pos.x))
+ pos.x += view.Shape.BoundBox.XLength/2
+ pos.x += 10 # spacing between each side
+ view.Placement = Placement(Vector(pos), r)
- view.Placement = Placement(pos, r)
-# print('Placement: ' + str(view.Placement.Base) + ', BoundBox: ' + str(view.Shape.BoundBox))
- pos.x += view.Shape.BoundBox.XLength
- pos.x += 10 # 10mm spacing between each side
+ #print('Placement: ', view.Placement.Base)
viewsGroup.addObject(view)
- except KeyError:
- pass
+ previous = view
+ except KeyError, e:
+ print('error finding view', e)
viewsGroup.ViewObject.Visibility = False