face area - DC or ruby ?

face area - DC or ruby ?

Postby vanderlm » Sat Jun 04, 2011 4:38 am

Hello all,
Thanks for all the great resources they have been very helpful as I start to learn the world of ruby and dynamic components. I was wondering how to best approach a problem - whether through dynamic components or rubyscript...I have seen several examples of face area calculators but have yet to see one that digs into components. End goal: generate a report that summarizes face area according to material in each component (sensitive to scaling). Can this be done in DC? I noticed that the facearea function does not adjust if the component is scaled. Or am I better off trying to loop through components expanding on one of the ruby script snippets posted on this forum? any help would be much appreciated!
mv
0

vanderlm 
 

Re: face area - DC or ruby ?

Postby Jim » Sat Jun 04, 2011 1:57 pm

Hi Mike,

Start with plain Ruby. Then you can re-use the code in a custom DC function, if desired.

Just in case your search did not turn up Adam's solution for finding face area in nested components, while accounting for scale, see this post.
0
Hi

Jim 
Global Moderator
 

Re: face area - DC or ruby ?

Postby fredo6 » Sun Jun 05, 2011 1:46 am

Vanderlm

I think there exist some plugins that do area computation (among other things).

Just in case, here is a ruby for computing areas recursively in the selection, by component and by material, with choice of units and CSV generation.
ReportArea.rb


If this is to embed within a plugin of yours, feel free to take inspiration from the code.

Fredo
0
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: face area - DC or ruby ?

Postby vanderlm » Sun Jun 05, 2011 8:40 pm

Fredo and Jim -Thanks - very useful info and links! - I will explore and feedback
mike
0

vanderlm 
 

Re: face area - DC or ruby ?

Postby vanderlm » Sun Jun 05, 2011 9:32 pm

wow - just tried out the rb and it was exactly what I was looking for! I will follow up with any extensions I can incorporate from the suggested post - hugely helpful starting points!
0

vanderlm 
 

Re: face area - DC or ruby ?

Postby fredo6 » Sun Jun 05, 2011 10:46 pm

vanderlm wrote:wow - just tried out the rb and it was exactly what I was looking for! I will follow up with any extensions I can incorporate from the suggested post - hugely helpful starting points!

It is also possible to generate a HTML report, via a Web dialog or in a file.

Fredo
0
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: Avinash97, Demilade36, nateVoid, THE BEAST and 14 guests

Visit our sponsors: