V5 Wish List

 From:  Larry Fahnoe (FAHNOE)
10114.468 In reply to 10114.467 
Hi Michael,

> Could you describe what the challenges and limitations would be?

The challenge is primarily complexity of the script as it is trying to knit together an understanding of the model it is working on and only do a limited set of operations. One limitation is if the list of objects fed to the intersect is too broad there may be other intersections that generate points which are unrelated & this would lead toward more complexity to eliminate those points. There may be other issues I’ve not tripped over yet...

So for example, see the attached model. The structure on the right represents a building with ICF (insulated concrete form) walls which are poured. The concrete in the 4 walls is represented as a single solid and I represented the foam insulation layers in the same way. There are also solids representing drywall on the inside and siding on the outside. The goal is to cut and frame a single window on one side. To do that one needs to select only the faces that are to be cut rather than simply selecting all the wall components. The process of manually selecting only the faces associated with one wall with the UI is cumbersome and would ideally be done by the script. My script currently uses the subset boolean difference that you suggested earlier and therefore cuts windows on both sides of the building if the entire wall structure is selected (which is the result that is currently shown).

I believe I can identify the necessary faces per Peer's suggestion of using using BRep’s dropPoint(). https://moi3d.com/forum/index.php?webtag=MOI&msg=10907.5

So, to try this, draw a normal line through the wall where the window is to be cut. Then intersect the line and all the wall components. In my model the only points that result are those where the normal intersects the faces of the solids, other models might have other points. Using the points that result, I think the approach is to use dropPoint() on each BRep and then get the face from the first element of the list that is returned, then process more or less as the script is currently written. I say I think only because I’ve not gotten it working yet, but I think I can.

One of the things that I take away from looking at the scripts you include with MoI is their simplicity and elegance: many are just bits of glue that tie the UI to the various factories. Thus when my script begins to get cumbersome and I’m fumbling around trying to accomplish something, I tend to question my approach. Is there a simpler way? Hence the idea of a “nearest neighbor” GeomObject method.

If such a method existed, I would imagine that it would find and return the lowest (most elemental) objects. In this case I would imagine that it would return the nearest face intersecting the vector & from there I could build up the list of faces via subsequent calls and then do the subset boolean difference. The idea struck me as one that might also be useful for other tasks where UI selection is inconvenient, and therefore a generalized tool that would benefit the script environment.

--Larry
Attachments: