Re: Find balance point?
- From: vojo <vojo@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Mar 2008 13:13:01 -0700
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" <clockworksaint@xxxxxxxxx> wrote in message
news:e21abbad-65b3-46f7-999f-10a59ef80f4d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 22, 7:41 pm, "zulu" <noth...@xxxxxxxxxxxx> 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 shape*** 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 shape*** and copied my shape a few times.
10) I opened up the "Drawing Explorer" window and found my shapes.
They were called "***.1", "***.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 shape***.
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.
- References:
- Find balance point?
- From: zulu
- Re: Find balance point?
- From: Weeble
- Re: Find balance point?
- From: zulu
- Find balance point?
- Prev by Date: Re: Find balance point?
- Next by Date: Re: Visio printing lines I don't want
- Previous by thread: Re: Find balance point?
- Next by thread: Re: Version of UML in visio 2003
- Index(es):
Loading