Question: keeping origin when scaling?

Question: keeping origin when scaling?

Postby toddbg » Sat May 31, 2014 10:47 pm

Hi!

Thanks for all the advice in my other posts.
I think I am very close to having this fence taken care of, I just need to figure one issue.

When I scale the Fence component, each of the sub components seems to move differently rather than scale correctly in relation to one another.

I only want the fence to be able to scale in the LenX direction.

I've attached the file so you guys can take a look.

Can someone help me out/point me in the right direction?

Thanks!
0

toddbg 
 

Re: Question: keeping origin when scaling?

Postby toddbg » Sun Jun 01, 2014 6:00 pm

Update:
I'm much closer now.

I think I have the origin issue taken care of, and most everything scales as expected.

However the sub-component Lattice now scales a bit bigger than it should.

Try this new model and let me know what you think.

Thanks again!
0

toddbg 
 

Re: Question: keeping origin when scaling?

Postby Jim » Sun Jun 01, 2014 8:33 pm

I don't know if this is the best way, but here's one way I found worked.

I added a reference Group in the DC. It can be hidden when ready. The purpose of the reference Group is to control the scaling. For that to work, all other components must be kept within the bounds of the reference (in this case, only the X axis matters.)

The Reference also lets us snap the scaling to convenient intervals.

2014-06_62.png


make sure the Post stays within the Reference!LenX

2014-06_63.png


Then the LenX of the bottomFrame can be tied to the position of the Post.

LenX: =fencePost!X - Fence!postWidth/2

The topFrame LenX is set equal to the bottomFrame LenX

Finally, the lattice LenX can be set to the top or bottom Frame LenX.

I also reset all the scaling attributes of the sub-components. Only the top-level component can be scaled anyway. Although I'm not positive, but I think that cleared up a weird behavior.
1
Hi

Jim 
Global Moderator
 

Re: Question: keeping origin when scaling?

Postby toddbg » Sun Jun 01, 2014 10:42 pm

Jim wrote:
Then the LenX of the bottomFrame can be tied to the position of the Post.

LenX: =fencePost!X - Fence!postWidth/2

The topFrame LenX is set equal to the bottomFrame LenX



Hey Jim - That works awesomely!

One more question for you.

I realized that I made one mistake in the file.
The lattice needs to be moved over 0.75" so that it touches the face of the Fence post.
Then the topFrame and bottomFrame would need to decrease in width by 0.75".

I'm reading through the component attributes but it is a little confusing on how to make this simple change.

Can you fill me in?

Thanks!
0

toddbg 
 

Re: Question: keeping origin when scaling?

Postby Jim » Sun Jun 01, 2014 11:49 pm

All you would need to do is move the fencepost X position a further -3/4". The dimensions of the other components are based on the position of the fencepost and so will adjust accordingly.
0
Hi

Jim 
Global Moderator
 

Re: Question: keeping origin when scaling?

Postby Jim » Mon Jun 02, 2014 12:48 am

I found some situations where the Fence broke, so here's what I hope is a more stable version.

Just a note - this DC could be simplified by better positioning of the axis. The current axes are making things slightly more complicated than necessary.
0
Hi

Jim 
Global Moderator
 

Re: Question: keeping origin when scaling?

Postby toddbg » Mon Jun 02, 2014 1:19 am

Jim wrote:Just a note - this DC could be simplified by better positioning of the axis. The current axes are making things slightly more complicated than necessary.


Thanks Jim -
In what way could the axes be better positioned.
I'm mor than happy to clean this up so that it becomes a useful model.
0

toddbg 
 

Re: Question: keeping origin when scaling?

Postby Jim » Mon Jun 02, 2014 10:02 pm

toddbg wrote:
Thanks Jim -
In what way could the axes be better positioned.
I'm mor than happy to clean this up so that it becomes a useful model.


Actually, it looks good. Not sure what I meant at the time... and thanks to you I learned some new tricks playing with this DC.
0
Hi

Jim 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Dynamic Components

Who is online

Users browsing this forum: No registered users and 0 guests

Visit our sponsors: