I have two valid closed meshes, the “stone” — with a .mtl. texture — and the “box” — manually created default mesh box in GUI (picture 1). If I perform within the GUI manually a boolean difference between the “stone” and the “box”, the carved out intersection of the “stone” recieves a (presumably interpolated) texture (picture 2). That is what I want.
If I do now perform the same operation with below Rhinoscript Python
input0 = rs.GetObjects("Select first set of meshes", rs.filter.mesh)
input1 = rs.GetObjects("Select second set of meshes", rs.filter.mesh)
rs.MeshBooleanDifference(input0, input1)
the cutting works (see picture 3), but the “stone” lost its texture.
So, the GUI is doing what I want and maps the old texture to the new mesh after carve-out, while the Python code is not.
How do i tweak my Python code to do exactly as the GUI?
My original “stone” model is actually copy right protected, so I created a very simple .3dm sample on the fly in the rhino GUI to show the effect and I can freely upload:
[1] is a default “cone” mesh with a rhino-out-of-the-box “granite” texture applied as well as a “box” mesh (all valid solid meshes). If I do boolean difference manually in the GUI I get the “desired” effect [2]: the box is is carved out from the cone, and rhino applies an (admittedly oddly) interpolated texture to the carved out section - key point being, there is a texture applied.
Any help appreciated to tune the python code in a way to yield the same effect as within the GUI. Presumbly the GUI applies some default “interpolate texture” process which i would like to utilize as well in my python script.