[req] fixed area plugin

[req] fixed area plugin

Postby rc5 » Thu Sep 01, 2011 10:11 am

often working on rectangles with fixed area, we squeeze them. is there a plugin that automatically increases the lengths when the breadth is increased and vice versa such that the area of the rectangle remains the same?
0

rc5 
 

Re: [req] fixed area plugin

Postby Didier Bur » Thu Sep 01, 2011 10:43 am

Hi,
No, but this is doable, since I have developped something almost similar for a corporate plugin a year ago.
I'll see what I can do.
Regards,
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: [req] fixed area plugin

Postby mitcorb » Thu Sep 01, 2011 1:39 pm

This would be a great tool for planning and design based on prescribed areas for offices, etc. User could find the appropriate proportions of the space for best fit and usability. A long time ago, I stumbled upon something in a book relating to this which the author called the Doctrine of Fluctions??(not fluctuation) It had to do with analysis of fixed areas with variable proportions. I cannot seem to find anything on Google about it, however.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [req] fixed area plugin

Postby wyatt » Thu Sep 01, 2011 2:31 pm

There is similar function in autocad dealing with parametric constraints. Constraints can be applied to edges to keep them, for example, always perpendicular or parallel when an object is stretched, or to keep a one object a set distance from a radius point or edge of a second object when the overall component is scaled. These functions may be more robust than what you're requesting, but they are very useful for mechanical designs and other things where relationship of elements is very important. Maybe something similar could be created in ruby, though I haven't the foggiest idea how. Perhaps someone will find the parallel to these existing CAD tools useful.
0

wyatt 
 

Re: [req] fixed area plugin

Postby mitcorb » Fri Sep 02, 2011 3:33 am

Ok, I'm back, but not with the solution. I think Monsieur Bur is eminently more qualified, if he sees fit. I was just going to say that changing the spelling of the word to "fluxion" did I find that Sir Isaac Newton coined this term in his independent and almost simultaneous development of calculus. Liebniz was the other guy and he got the credit. Newton only devised calculus as a tool to develop his Laws of Thermodynamics. Sorry, this is way off topic, rc5.
0
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb 
Top SketchUcator
 

Re: [req] fixed area plugin

Postby Didier Bur » Tue Sep 06, 2011 3:52 pm

Hi,
I haven't got much time to do it but here is what I achieved so far. A tool that let you click on a side of a square, rectangle or parallelogram and that let you click another point to define the scale value (or enter it in the VCB) and preserves the area of the selected face.
Still some bugs to fix but could be released in a week or so.
Regards,

fixedarearect.avi
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: [req] fixed area plugin

Postby sdmitch » Tue Sep 06, 2011 11:11 pm

Since I have a lot more free time than Didier, here is my solution to the problem. The face must be a four sided figure with opposite sides of equal length. Run plugin, select face, select edge to be moved. Point to new location or keyin dimension desired. Left click to finish.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [req] fixed area plugin

Postby Didier Bur » Wed Sep 07, 2011 1:13 pm

Hi,
Good job sdmitch. Since our scripts are almost the same, I'll stop mine.
Sometimes the bug you can see on the image below appears. It's related to the order of the vertices of the face I suppose, because I was facing it too. Apparently face vertices in SketchUp are not always stored clockwise ?
fixedareabug.jpg
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
User avatar
Didier Bur 
 

Re: [req] fixed area plugin

Postby thomthom » Wed Sep 07, 2011 2:00 pm

Didier Bur wrote:Apparently face vertices in SketchUp are not always stored clockwise ?

Are you using face.outer_loop.vertices? Vertices from Loop objects should always be in order.
Also, if you get position from edges, check if the edge is reversed in the face ( edge.reversed_in?( face ) ) to check if the vertices in the edge runs in the direction of the face's loop.
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: [req] fixed area plugin

Postby sdmitch » Wed Sep 07, 2011 2:58 pm

Apparently face vertices in SketchUp are not always stored clockwise ?


Didier, No they are not. It seems to depend on how the rectangle is defined. That's why, as thomthom suggests, I used the
edge.reversed_in?
to check for that.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [req] fixed area plugin

Postby thomthom » Wed Sep 07, 2011 3:24 pm

And you still get such bug?
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: [req] fixed area plugin

Postby sdmitch » Wed Sep 07, 2011 8:19 pm

thomthom wrote:And you still get such bug?


No not anymore.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
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: Biscola, Google Bot, nachopr, victoriahoan and 11 guests

Visit our sponsors: