If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Find balance point?
Wow!!
Thank you _very_ much for all the effort you obviously put into your reply. I've printed it out so that I can follow it step by step. A lot of it is beyond my experiance, but believe ne I'll have a crack at it.g Treating the objects as points won't present a problm as I can work out where in each object that point will be beforehand. You are a star! -- ¦zulu¦ Excuse any typos - I'm visually impaired :-( "Weeble" wrote in message ... On Mar 22, 7:41 pm, "zulu" wrote: I have a Visio page with several randomly placed different shapes, all of different (in the real world) weights. How can I move them around to make a certain point on the drawing the balance point (the centre of gravity) As I understand from this post and others, what you would like is to have the application calculate the centre of gravity of a number of masses, and mark it. The mark should move as the shapes are re- arranged. I'm not sure if there's any way to solve the problem generally, such that you can easily add as many masses as you want, at least without using scripting. But if you're patient and don't have too many masses to deal with, you should be able to set this up in Visio. I did it for four masses in a fairly short space of time. Try this: 1) Create an object to use as a mass. I just drew a circle with the ellipse tool. 2) Give it a custom property, with label "Mass" and name "Mass", which must be a number. 3) For convenience, I then edited the text of the object and used "Insert-Field...". Under "Custom Properties" I found my property "Mass" listed, and selected it. I also edited the shape's protection and checked the box for text, so that I couldn't accidentally change the text. The shape now displays its mass as a number. 4) Next, I edited the shapesheet for my shape. I could see an entry for "Prop.Mass" under "Custom Properties". 5) I right-clicked and chose "Insert Section...", and selected "User- defined cells". A new section appeared with an entry called "User.Row_1" 6) I renamed the entry to "WeightedX" and gave it a formula of "=PinX*Prop.Mass" 7) I right-clicked on that entry and chose "Insert Row". 8) I renamed the new entry to "WeightedY" and gave it a formulat of "=PinY*Prop.Mass" 9) Next I closed the shapesheet and copied my shape a few times. 10) I opened up the "Drawing Explorer" window and found my shapes. They were called "Sheet.1", "Sheet.2", etc. I renamed them to "Body. 1", "Body.2", etc. so that I could tell them apart from other things I created. 11) I created a new object, another circle. I made it a different colour and renamed it "Centre". 12) I turned on protection for the shape's position. 13) I opened up the new shape's shapesheet. 14) I gave it this formula for PinX: =(Body.1!User.WeightedX+ Body.2!User.WeightedX+ Body.3!User.WeightedX+ Body.4!User.WeightedX)/ (Body.1!Prop.Mass+ Body.2!Prop.Mass+ Body.3!Prop.Mass+ Body.4!Prop.Mass) and this formula for PinY: =(Body.1!User.WeightedY+ Body.2!User.WeightedY+ Body.3!User.WeightedY+ Body.4!User.WeightedY)/ (Body.1!Prop.Mass+ Body.2!Prop.Mass+ Body.3!Prop.Mass+ Body.4!Prop.Mass) If I had made more shapes, I'd have needed to expand the formulae to include them all. Now you can drag the weights around and the centre of gravity follows them. You can edit a shape's properties and change its mass, and its effect on the centre of gravity changes. If you make a mistake and the centre of gravity ends up disappearing off your page, you can still select it in the Drawing Explorer. I hope it's close enough to what you need to help! I've made a lot of assumptions (e.g. that you're happy to treat the objects as point-masses), so it's possible it's not quite what you wanted. |
#12
|
|||
|
|||
Find balance point?
On Mon, 24 Mar 2008 12:59:03 -0000, "zulu"
wrote: "Paul Herber" wrote in message well.net... On Mon, 24 Mar 2008 11:51:57 -0000, "zulu" wrote: Sorry, see my 2nd post. The weights are not all the sane. Yes, I realise that, it's the units of mass that are the same. for what you want to do it matters not whther the units are ounces, grams, or galactic masses. Sorry. I misunderstood. I was hoping to be able to drag them (individually) in desired x or y axis until balance point of the combined mass coincided with where I want it. I'll have a look at something to do this later... I've got to go out. I see Weeble has already produced a solution, but you can have a look at mine as well if you like, it's somewhet similar (but only for 2 shapes, adding more is simple). The masses of the two squares can be changed via the shape custom properties, when the squares are moved then the cross in the middle will move to show the centre of mass. -- Regards, Paul Herber, Sandrila Ltd. Electronics for Visio http://www.electronics.sandrila.co.uk/ |
#13
|
|||
|
|||
Find balance point?
sigh, in my impatience ... http://www.sandrila.co.uk/balance.zip -- Regards, Paul Herber, Sandrila Ltd. Electronics for Visio http://www.electronics.sandrila.co.uk/ |
#14
|
|||
|
|||
Find balance point?
"Paul Herber" wrote in message ell.net... On Mon, 24 Mar 2008 12:59:03 -0000, "zulu" wrote: "Paul Herber" wrote in message dwell.net... On Mon, 24 Mar 2008 11:51:57 -0000, "zulu" wrote: Sorry, see my 2nd post. The weights are not all the sane. Yes, I realise that, it's the units of mass that are the same. for what you want to do it matters not whther the units are ounces, grams, or galactic masses. Sorry. I misunderstood. I was hoping to be able to drag them (individually) in desired x or y axis until balance point of the combined mass coincided with where I want it. I'll have a look at something to do this later... I've got to go out. I see Weeble has already produced a solution, but you can have a look at mine as well if you like, it's somewhet similar (but only for 2 shapes, adding more is simple). The masses of the two squares can be changed via the shape custom properties, when the squares are moved then the cross in the middle will move to show the centre of mass. Wiil do Paul, and thanks :-) Once I can get the principle into my ageing brain I will be OK. g -- ¦zulu¦ Excuse any typos - I'm visually impaired :-( |
#15
|
|||
|
|||
Find balance point?
oh...so you just wanted to find the center point of a bunch of shapes...not
keep the center point in a specific position and move shapes around to hold that center point (ie maintain equalibrium) note for every new shape, you want to update the center shape to include (aka body.5!weightedx, body.5!prop.mas, etc etc etc) "zulu" wrote: Wow!! Thank you _very_ much for all the effort you obviously put into your reply. I've printed it out so that I can follow it step by step. A lot of it is beyond my experiance, but believe ne I'll have a crack at it.g Treating the objects as points won't present a problm as I can work out where in each object that point will be beforehand. You are a star! -- ¦zulu¦ Excuse any typos - I'm visually impaired :-( "Weeble" wrote in message ... On Mar 22, 7:41 pm, "zulu" wrote: I have a Visio page with several randomly placed different shapes, all of different (in the real world) weights. How can I move them around to make a certain point on the drawing the balance point (the centre of gravity) As I understand from this post and others, what you would like is to have the application calculate the centre of gravity of a number of masses, and mark it. The mark should move as the shapes are re- arranged. I'm not sure if there's any way to solve the problem generally, such that you can easily add as many masses as you want, at least without using scripting. But if you're patient and don't have too many masses to deal with, you should be able to set this up in Visio. I did it for four masses in a fairly short space of time. Try this: 1) Create an object to use as a mass. I just drew a circle with the ellipse tool. 2) Give it a custom property, with label "Mass" and name "Mass", which must be a number. 3) For convenience, I then edited the text of the object and used "Insert-Field...". Under "Custom Properties" I found my property "Mass" listed, and selected it. I also edited the shape's protection and checked the box for text, so that I couldn't accidentally change the text. The shape now displays its mass as a number. 4) Next, I edited the shapesheet for my shape. I could see an entry for "Prop.Mass" under "Custom Properties". 5) I right-clicked and chose "Insert Section...", and selected "User- defined cells". A new section appeared with an entry called "User.Row_1" 6) I renamed the entry to "WeightedX" and gave it a formula of "=PinX*Prop.Mass" 7) I right-clicked on that entry and chose "Insert Row". 8) I renamed the new entry to "WeightedY" and gave it a formulat of "=PinY*Prop.Mass" 9) Next I closed the shapesheet and copied my shape a few times. 10) I opened up the "Drawing Explorer" window and found my shapes. They were called "Sheet.1", "Sheet.2", etc. I renamed them to "Body. 1", "Body.2", etc. so that I could tell them apart from other things I created. 11) I created a new object, another circle. I made it a different colour and renamed it "Centre". 12) I turned on protection for the shape's position. 13) I opened up the new shape's shapesheet. 14) I gave it this formula for PinX: =(Body.1!User.WeightedX+ Body.2!User.WeightedX+ Body.3!User.WeightedX+ Body.4!User.WeightedX)/ (Body.1!Prop.Mass+ Body.2!Prop.Mass+ Body.3!Prop.Mass+ Body.4!Prop.Mass) and this formula for PinY: =(Body.1!User.WeightedY+ Body.2!User.WeightedY+ Body.3!User.WeightedY+ Body.4!User.WeightedY)/ (Body.1!Prop.Mass+ Body.2!Prop.Mass+ Body.3!Prop.Mass+ Body.4!Prop.Mass) If I had made more shapes, I'd have needed to expand the formulae to include them all. Now you can drag the weights around and the centre of gravity follows them. You can edit a shape's properties and change its mass, and its effect on the centre of gravity changes. If you make a mistake and the centre of gravity ends up disappearing off your page, you can still select it in the Drawing Explorer. I hope it's close enough to what you need to help! I've made a lot of assumptions (e.g. that you're happy to treat the objects as point-masses), so it's possible it's not quite what you wanted. |
|
Thread Tools | |
Display Modes | |
|
|