[Plugin] SectionProp

[Plugin] SectionProp

Postby osalas » Mon May 28, 2012 5:28 am

Hello Everyone,

I have been an avid user of SketchUp these past few years, mostly used in the structural design work I do. There a lot of talented people in this forum who's plugins have had a big influence in pursuing my interest in developing plugins.
This is my first post but I look forward to becoming a contributing member of this forum. Below is a plugin that could be useful to those looking to calculate the centroid and geometric properties of planar faces.

NOTE:
v1.1a moved to SCF PluginsStore http://sketchucation.com/resources/plug ... ectionProp
Now has proper 'require' statements.
TIG.

I have additional information and tutorials posted on my website.

http://www.skpengineering.com

Regards,

Osvaldo
0

osalas 
 

Re: [Plugin] SectionProp

Postby thomthom » Mon May 28, 2012 10:51 am

Hi and welcome to the forum. Very nice looking plugin you got there. I'll have a better look at it later this week when I'm at the office.

Off-Topic:
I usually have a quick look at the code of new developers posting here, just to see if they properly isolate their code into their own namespace. Often will someone new to SketchUp plugins scripting (and scripting in general) not wrap their code in their own namespace. Or, if they are experience with Ruby before entering the SketchUp area they might be tempted to modify the base classes. Both of these can cause problems as the SketchUp Ruby environment is shared among all the plugins running. Since your code was scrambled I could not make an assessment or suggestions - but I did notice the global method in your loading script that gives some indication that things are not properly wrapped in a namespace. Have a look at this article for more detailed explanation: http://www.thomthom.net/thoughts/2012/0 ... velopment/
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] SectionProp

Postby osalas » Mon Jun 04, 2012 12:43 am

thomthom wrote:Hi and welcome to the forum. Very nice looking plugin you got there. I'll have a better look at it later this week when I'm at the office.

Off-Topic:
I usually have a quick look at the code of new developers posting here, just to see if they properly isolate their code into their own namespace. Often will someone new to SketchUp plugins scripting (and scripting in general) not wrap their code in their own namespace. Or, if they are experience with Ruby before entering the SketchUp area they might be tempted to modify the base classes. Both of these can cause problems as the SketchUp Ruby environment is shared among all the plugins running. Since your code was scrambled I could not make an assessment or suggestions - but I did notice the global method in your loading script that gives some indication that things are not properly wrapped in a namespace. Have a look at this article for more detailed explanation: http://www.thomthom.net/thoughts/2012/0 ... velopment/


Thanks for the link to the article. I was careful not to modify any base classes or have any global variables defined in my script, but I will take a closer look at my code to make sure I follow the guidelines outline in the article.
0

osalas 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: conrado_mg, imegane, JClements, mrbill15 and 8 guests

Visit our sponsors: