first of all, I’m a total newbie in both 3D and Python. so I’m sorry if my inquiry seems obvious to you.
I would need to create a script that will automatically WireCut several curves from one single Polysurface. I’m really trying to make holes in Polysurface. that’s pretty much it. but I got a ton of files to generate and scripting this step would help me a lot!
all my curves have their own names, so I guess I’ll have to do a script that selects my base Polysurface and WireCut using A curve, then B curve and so on. as I suppose it’s not possible to select all my curves and wirecut them all from the base Poly?
Do you really need Wirecut? Are you simply projecting the curves to cut all the way through the object? In that case it may be better to script an extrusion of each curve, then use BooleanDifference…
There is no native Wirecut method in rhinoscriptsyntax/python, but you could script it with rs.Command(). Perhaps you could post a small example of what you want to do.
I do use the curves to cut all the way through the object.
but I assume it would be faster to WireCut rather than extrusion + Boolean, no ? as it’s not possible to Boolean several several objects at the same time, or am I wrong? (I would not be surprised if I were wrong haha)
I’d love to see an example if you have time to write a fast one, so I can try to play around with it.
well, yeah it’s about creating holes on an object, using already set and names curves.
so I was thinking of doing a script where I could select each curve and the polysurface then run wirecut, and repeat for all the curves instances I have.
For this type of operation, one important thing will be determining the direction of projection - no matter if it’s Wirecut, Extrusion or something else. If the cutting curves are planar, it could be the curve plane normal direction; otherwise it could also be the direction normal to the active viewport’s CPlane. Once the direction is established, the rest is not too hard.
If you have multiple closed curves to cut through one single polysurface, you might just try the MakeHole command (allows cutting with multiple curves)…