auto center object on first load time

26 views
Skip to first unread message

Jorge Pinto

unread,
Apr 13, 2012, 5:32:16 AM4/13/12
to R2C2 dev list
Hello.

Rui, I saw your code in MainWindow.java:

if (getPreviewPanel().getModel() != null) {
// Center and place object on Platform upon load
getPreviewPanel().getModel().center();
getPreviewPanel().getModel().layFlat();
getPreviewPanel().getModel().putOnPlatform();
}

That means it will always center the object everytimes the user load
the object?? The idea would be that auto center the object would run
just at the first time and not always, right?

--
Cumprimentos,

Jorge Pinto
jpi...@bitbox.pt
Tel: 00 351 927145983

Rui Ribeiro

unread,
Apr 13, 2012, 6:26:35 AM4/13/12
to r2c2-repr...@googlegroups.com

How can you know that the object is already centered?
 
This works fine for me... whatever I load, it just centers on the bed...
 
Rui
2012/4/13 Jorge Pinto <jpi...@bitbox.pt>

Jorge Pinto

unread,
Apr 14, 2012, 11:20:01 AM4/14/12
to r2c2-repr...@googlegroups.com
On Fri, Apr 13, 2012 at 11:26 AM, Rui Ribeiro <racri...@gmail.com> wrote:
>
> How can you know that the object is already centered?
>
> This works fine for me... whatever I load, it just centers on the bed...

I had times were I wanted to print starting at 0,0 and not at the
center, because I was printing a small part and the bed were only flat
near 0,0.

I like the idea of load the object at the center automatically however
I think there should be an option for user avoid that.

I will try this code and I think I will commit to edge.

Thank you Rui :-)

Jorge Pinto

unread,
Apr 19, 2012, 7:57:29 AM4/19/12
to r2c2-repr...@googlegroups.com
On Sat, Apr 14, 2012 at 4:20 PM, Jorge Pinto <jpi...@bitbox.pt> wrote:
> On Fri, Apr 13, 2012 at 11:26 AM, Rui Ribeiro <racri...@gmail.com> wrote:
>>
>> How can you know that the object is already centered?
>>
>> This works fine for me... whatever I load, it just centers on the bed...
>
> I had times were I wanted to print starting at 0,0 and not at the
> center, because I was printing a small part and the bed were only flat
> near 0,0.
>
> I like the idea of load the object at the center automatically however
> I think there should be an option for user avoid that.
>
> I will try this code and I think I will commit to edge.

Rui, I would like that auto-center is an option on preferences.

Right now I tested and committed the code for show axes and bed color.
Thank you.
I am sending a screenshot of this changes.

ReplicatorG_R2C2.png

Nik Levy

unread,
Dec 25, 2012, 3:29:42 PM12/25/12
to r2c2-repr...@googlegroups.com
Hi,
For some reason, my ReplicatorG screen only shows the left half of the platform, the right side is covered by the
preview butons. How do I correct this?
Nik

Rui Ribeiro

unread,
Dec 25, 2012, 4:29:21 PM12/25/12
to r2c2-repr...@googlegroups.com
Zoom out the view...

Select "view" on the tool buttons on the right side and then use you mouse wheel to zoom out...

If you want to hack the code... Probably change the default location of the 3D view camera would be a nice place to start. 

Rui
Reply all
Reply to author
Forward
0 new messages