Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #81 from bgamari/fixes

GetBox2: Revert previous mistake in refactor of Intersect2
  • Loading branch information...
commit 3df20b277f03488ba1cb1a4f9245d03f38dae0ab 2 parents c0d7b41 + 8a4eacd
@colah authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 Graphics/Implicit/ObjectUtil/GetBox2.hs
View
12 Graphics/Implicit/ObjectUtil/GetBox2.hs
@@ -57,7 +57,17 @@ getBox2 (DifferenceR2 r symbObjs) =
firstBox
getBox2 (IntersectR2 r symbObjs) =
- outsetBox r $ unionBoxes (map getBox2 symbObjs)
+ let
+ boxes = map getBox2 symbObjs
+ (leftbot, topright) = unzip boxes
+ (lefts, bots) = unzip leftbot
+ (rights, tops) = unzip topright
+ left = maximum lefts
+ bot = maximum bots
+ right = minimum rights
+ top = minimum tops
+ in
+ ((left-r,bot-r),(right+r,top+r))
-- Simple transforms
getBox2 (Translate2 v symbObj) =
Please sign in to comment.
Something went wrong with that request. Please try again.