 # Create floor under selected elements

Hello,

I am trying to create concrete pads under selected elements. I am able to select multiple elements and get a pad for each instance. I would prefer that it create a single pad under multiple elements selected along with the ability to specify an offset to the boundary. Is this possible?

Any help would be greatly appreciated.

Assuming your shapes are rectangular:

1. Get the geometry of the elements.
2. Find the curves which make up the base.
3. Find the direction of an edge line in both elements.
4. Get the angle from the X axis to that line.
5. Round both values to 4 digits or another acceptable degree of precision.
6. Find the average of the two values.
7. Rotate the base geometry from step 1 about the origin by the inverse of this distance.
8. Draw a bounding box around both geometries.
9. Get the width and length of the bounding box.
10. Get the average of all points from the rotated base curves.
11. Create a rectangle about that point using the width and length from the bounding box.
12. Offset the rectangle by the desired offset.
13. Rotate the rectangle about the origin by the angle from step 6.
14. Explode the rotated offset rectangle to get the outline curves.
15. Generate a Pad as a floor element (I think that is what you wanted).