generative modeling for Rhino
David et al
can you see if it possible to ask some one to implment a more basic compute method for the areamassproperties class? I only want to return the area of a brep. Its taking almost 15 seconds to calcualte the area mass properties for just 12000 breps. An option where you could have a flag to define that only certain properties are to be cauclated would hopefully really speed this emthod up,
you can also see the difference in speed if you go to rhino and select the surfaces and go to
The options are spit up in to Area/Area Centroid/Area Moments
Selecting area will be massivly quicker to calculate than Area Centroid and Area Moments.
Same applies to Volume/Volume Centroid/Volume Moments
I think this would be part of a much bigger project, namely the ability to disable certain output parameters for a load of components and then not even bothering to compute the data for those disabled outputs. I think a lot of components could benefit performance (and memory) wise from such a feature. Definitely post 0.9 though.
Ah, it's a RhinoCommon wish. I didn't get that. I'll see about adding either more options to AreaMassProperties.Compute or maybe an Area/Volume method to Brep/Mesh etc.
These values are all calculated at the same time so there really won't be any improvement in speed by breaking things into separate functions. You may want to consider something like a parallel for loop to compute that many areas at once.
Ok Ill try that.
But, there is definitely a difference in speed in the Rhino 5 environment depending on if you calculate area, centroid or moment. (Analyze > Mass Properties). Typically calculating Area Centroids and Area Moments is much more intensive than just calculating the area. To calculate area centroids and area moments you need to cacualte the area first, hence why i had hoped that there could be an option for just calcualting this. I dont need area moments and centroids.
The Rhino core area/volume solver allows you to limit which properties you want to calculate. The AreaMassProperties.Compute method calculates all of them. I just added two methods to Brep (GetArea and GetVolume) that do not solve first, second and product moments. Also, the function does not return error information. However it is quite a bit faster.
Top VB uses AreaMassProperties.Compute and the bottom one uses Brep.GetArea. They both solve areas for 1000 spheres of radius 1.
awesome, that is exactl what i was experiencing in that areas were taking a long time to compute. Looks like your new method is x10 quicker.
which name space is the Rhino core area/volume solver in? I cannot find that anywhere in the SDK on-line help
Maybe David means the Rhino C++ SDK?
There is also the c++ SDK. The core of Rhino is written in c++, and I have heard other developers refer to the 'internal c++' core which is an area we can probably not touch.