preferably in python
x as your brep:
b = x.DuplicateBrep() b.Scale(3)
So you can’t directly do that. Disappointing.
what’s not direct about that?
two lines instead of one, like:
scaled_brep = Rhino.Geometry.Brep.Scale(b,float)
if it bothers you enough, write your own ScaleCopyOfBrep(b, scale) method!
In C# you could even define an extension method:
static Brep ScaleAsCopy(this Brep b, double scale)
and then call it as b.ScaleAsCopy(5.0)
lol the hostility?!
I thank you for the suggestion my comment is not targeting you it’s RhinoCommon api.
Don’t take it personally
No hostility! But I’m of the opinion that the RhinoCommon API is quite well designed and so I like to defend it against critique
lol, let McNeel fight their own battles. They have strong warriors that kick my butt every now and then.
I believe my criticism is productive most of the time. Without people like me the pace of the improvement will be much slower.
Is that even possible???
I think you are confusing RhinoCommon with a higher-level system. Rhino has several levels:
There are the main Rhino commands via the normal interface, these are the highest level, they have a lot of options, bells and whistles built-in…
Then there is Rhinoscript/rhinoscriptsyntax which is another level down, it is more granular, the methods generally only do one thing, but it is still easily readable for beginners/intermediate level people and it generally accesses objects directly in the file via their IDs and writes new ones that way as well. To perform the equivalent of a Rhino native command you generally need to write more lines of code using Rhinoscript.
RhinoCommon is another level down, it is even more granular, that is to say the building blocks are smaller and more complex, you need more of them to build your structure, but you can put them together in many different ways. Here the geometry becomes “virtual” and can exist without it actually being written in the Rhino file.
Below that would be the C++ that Rhino is actually programmed in, which RhinoCommon accesses…
The further down you go, the more power you have to control what is happening, but the more knowledge and experience you need to master it.
Like Andrew, I think RhinoCommon is pretty well designed (there’s always room for improvement) system for managing an extremely detailed and complex set of objects, properties and methods.
No, I’m not confusing anything.