[Plugin] SectionProp
-
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/pluginstore?pln=SectionProp
Now has proper 'require' statements.
TIG.I have additional information and tutorials posted on my website.
Regards,
Osvaldo
-
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:2qqqrl6x]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/01/golden-rules-of-sketchup-plugin-development/[/off:2qqqrl6x]
-
@thomthom said:
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:3jiofz5q]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/01/golden-rules-of-sketchup-plugin-development/[/off:3jiofz5q]
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.
-
Osvaldo,
The "pro" version of this plugin (that --if I am not mistaken-- also calculates the plastic neutral axis and plastic section modulus) is still available anywhere?
Thank you,
Jorge.@osalas said:
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/pluginstore?pln=SectionProp
Now has proper 'require' statements.
TIG.I have additional information and tutorials posted on my website.
Regards,
Osvaldo
Advertisement