Assembly boundary - Assembly area/volume

If I understand, you want to get the footprint of the assembly? Following @awilliams example:

  1. Get assembly members and its bounding box.

  2. Create cuboids out of them and combine them.

  3. Getting its bounding box and its min and max points.

  4. Create the corner points playing with min and max points coordinates.

    maxPt = bBox.MaxPoint;
    minPt = bBox.MinPoint;
    corner1 = minPt;
    corner2 = Autodesk.Point.ByCoordinates(minPt.X, maxPt.Y, minPt.Z);
    corner3 = Autodesk.Point.ByCoordinates(maxPt.X, maxPt.Y, minPt.Z);
    corner4 = Autodesk.Point.ByCoordinates(maxPt.X, minPt.Y, minPt.Z);
    {corner1, corner2,corner3,corner4};

  5. Create rectangle by corners.

The only flaw of this process is that if assemblies are not parallel to X and Y axis, the bounding box is not exact and then the surface is wrong. I believe this was sorted on other topics on the forum, cannot remember where now.

2 Likes