Gear maker Posted January 22, 2015 Share Posted January 22, 2015 I made a drawing with 4 triangles each rotated 30 degrees from the neighbor. The bounding box for each triangle is just the size of the triangle. When I select all 4 triangles the bounding box is just big enough to hold the 4 triangles. But when I select a group of the 4 triangles (containing nothing else) the bounding box is considerably larger than the 4 triangles and offset to one side. This causes any rotation to be around a point not in the center of the triangles. Why is the bounding box larger and offset from than the objects in it when it's for a group? See attached. I don't know if this is a bug or if there is a reason it's supposed to do this. Beta 1.0.21861. Also when I do an addition or subtraction of these 4 triangles the result is not correct. Could this be related? I could have created a 12 pointed star but that wouldn't have worked for my needs. Quote iMac (27-inch, Late 2009) with macOS Sierra Link to comment Share on other sites More sharing options...
Staff MEB Posted January 22, 2015 Staff Share Posted January 22, 2015 Thanks for raising this @Gear maker. Both issues are already known and are logged. The group bounding box results from the sum of the area of all rotated triangles individually. In the image below (on the left) i selected just one of the triangles and you can see it being responsible for the upper limit of the groupt area on the right. If you select all the other ones individually you can see how they set the boundaries for the whole group. Quote A Guide to Learning Affinity Software Link to comment Share on other sites More sharing options...
MaxClass Posted January 24, 2015 Share Posted January 24, 2015 Unless I am mistaken on this the “bounding box” is the smallest possible rectangle that will enclose all the data points in a drawing. If you happen to have a bezier handle that sticks out beyond the top, left, bottom or right side of a path that handle point will make the bounding box appear larger than the actual path itself. This effect can also happen, as MEB said, if an object or group of object get rotated as he pointed out. Also any stray point of object that accidentally got pasted or moved outside of the drawing area will also show up as an unusually large bounding box. Max Quote OS X Sonoma 14.6.1, Mac Studio M1 Max, 27" Apple Studio Display, 32 GB SSD. Affinity Universal License for 2.0. Mac User & Programmer since 1985 to date. Author of “SignPost” for vinyl sign cutting. Link to comment Share on other sites More sharing options...
Gear maker Posted January 25, 2015 Author Share Posted January 25, 2015 Max, good points, the problem I had was that if all layers were selected the bounding box was significantly smaller but centered on the paths. But became larger and off center for the group of those same layers. That was throwing me off because I try to keep associated parts in groups. And the image of the group rotated off center after I did some housekeeping that shouldn't have affected that. FYI I did a test and the bezier handle didn't increase the bounding box. The handle just sticks out of the box's area. The bounding box is just big enough to have the path. Even the stroke didn't increase it. Interesting to learn what affects what. Quote iMac (27-inch, Late 2009) with macOS Sierra Link to comment Share on other sites More sharing options...
Staff Ben Posted January 26, 2015 Staff Share Posted January 26, 2015 The reason for this is the logic we apply when deciding what the box is that is used by the Move tool. When you select more than one object we use the transformed geometry (the path objects) for all the shapes and union them together. The result is a tight box as the calculation is made in spread position. When you have a group object, things are a little more complicated. We use the original boxes of the contained objects, and transform them into spread space. For any object that is rotated or skewed, this pushes the boxes outwards in size. We then union these boxes together, and the result is as you see - an oversized box. There is another issue which you have not observed. A group is treated as a single object by the Move tool. It has an additional transform on it (in addition to transforms on its child objects). if you were to rotate or skew the group, you will see the box becomes rotated or skewed - it does not remain axis aligned. This works in the same way as if you transform a single shape object, and it allows you to see the affect on the group object of its transform. Quote SerifLabs team - Affinity Developer Software engineer - Photographer - Guitarist - Philosopher iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395 MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300 iPad Pro 10.5", 256GB Link to comment Share on other sites More sharing options...
Gear maker Posted January 27, 2015 Author Share Posted January 27, 2015 Thanks for the explanation Ben. I'll have to play with the transform of a group to see what you were describing. I understand I just need to learn how it works so I remember it when I need it. We are going to have to be careful when grouping things seeing as they rotate differently. Quote iMac (27-inch, Late 2009) with macOS Sierra Link to comment Share on other sites More sharing options...
Matthias Posted March 21, 2015 Share Posted March 21, 2015 I suggest (here) to zero out the rotational info after ungrouping an element within a group. When grouping the whole thing again the bounding box then would actually show the boundaries of the group. As convenient as it is to have the original rotation values handy there are cases in which is would be better to get rid of them. Gouping/ungrouping could be a shortcut to this. But maybe there is yet another way to solve the growing bounding box problem: With a group, the bounding box might consider the actual boundaries of the group instead of the sum of its rotated elements. Quote Link to comment Share on other sites More sharing options...
Matthias Posted October 27, 2015 Share Posted October 27, 2015 Just realized that this issue is solved. Great – thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.