Script to cut windows and doors into walls

 From:  pressure (PEER)
10907.5 In reply to 10907.1 
Hi Larry,

Here’s how I’d try to attack the problems of determining wall thickness and selecting the wall components for boolean:

1. Generate line along normal that’s longer than wall is thick
2. Run intersection factory on line and all wall components. See http://moi3d.com/forum/index.php?webtag=MOI&msg=10807.1
3. Use distance function on all pairs of points generated by intersection. Largest value is wall thickness
4. For each point and each wall component do dropPoint and then find distance between original point and dropped point. The pair that is separated by approx 0 distance is associated with the wall component that the original point is on
5. Get face object from dropPoint output
6. Add parent BRep of face object to list of stuff that needs to get booleaned

This might not work for the 2 surfaces case unless the surfaces are joined. It won’t work for the solids cases unless they are separated by a little empty space.

Another route might be the labeling technique that Michael used in selectIntersected http://moi3d.com/forum/index.php?webtag=MOI&msg=8088.5

- Peer