Search found 13 matches

by bandara
Thu Jul 14, 2011 10:38 am
Forum: Developers
Topic: how to get area of room
Replies: 12
Views: 7437

Re: how to get area of room

Sir, I got selected Room area too, use getSelectedItems.

How can i get width of furniture which selected (as in same way we can get selected furniture width) but which is inside that selected room.
When i get those values separately, it gives answer. But as together, there's no answer.
can u tell ...
by bandara
Thu Jul 14, 2011 9:44 am
Forum: Developers
Topic: how to get area of room
Replies: 12
Views: 7437

Re: how to get area of room

Sir, i got the area by this code
float area=0.0f;
for (Room piece : getHome().getRooms()) {
area=piece.getArea();
}
Tx for your support,i need more :)

Sir, this returns the area of last drawn room.
Can u tell me, how could i get area of any selected Room in drawing.
by bandara
Wed Jul 13, 2011 6:41 pm
Forum: Developers
Topic: how to get area of room
Replies: 12
Views: 7437

Re: how to get area of room

dear Puybaret Sir,

Please sir, i even don't know about "factory reference class".
But you know how to request the area of displayed Room.
Please sir, tell me how i should do it.
Please sir, i cant continue my project without this Room area value.
by bandara
Tue Jul 12, 2011 4:08 pm
Forum: Developers
Topic: how to get area of room
Replies: 12
Views: 7437

Re: how to get area of room

Sir, can you tell me factory reference class for
getArea() -> to get the area of the room

Because my supervisor told me that, there should be a class which reference the value for Room class.

Thanx.
by bandara
Mon Jul 11, 2011 2:44 pm
Forum: Developers
Topic: how to get area of room
Replies: 12
Views: 7437

Re: how to get area of room

Sir, do i have to use any actionListners to do it, or is there any other class/object that i have to create, before calling getArea.
I'm confusing, how that real values, come to method when calling it.
I "sout" getPoints using "for" loop, but it returned values which i call when create object of ...
by bandara
Mon Jul 11, 2011 3:21 am
Forum: Developers
Topic: how to get area of room
Replies: 12
Views: 7437

Re: how to get area of room

yep, tx on that sir,

But this not return the area of room that i draw in sweethome 3D, it return 16 always. Check this image link
http://www.image-share.com/ijpg-768-257.html

Although i draw 127.16 sized room, this return 16 only. I think when creating a object of room, the value we parse through ...
by bandara
Sun Jul 10, 2011 7:20 pm
Forum: Developers
Topic: how to get area of room
Replies: 12
Views: 7437

Re: how to get area of room

float s1[][] = { { 0, 0 }, { 0, 4 }, { 4, 0 }, { 4, 4 } };
Room newRoom = new Room(s1);
float s2[][] = newRoom.getPoints();
Room r1=new Room(s2);
area=r1.getArea();
JOptionPane.showMessageDialog(null, area);

//this result 8.0 always, for all shapes of rooms (this 8 mean half area calculated from ...
by bandara
Sun Jul 10, 2011 5:04 pm
Forum: Developers
Topic: how to get area of room
Replies: 12
Views: 7437

Re: how to get area of room

I got ur point, to get a area we need more than 3 points.

But i need to get the area of room which i draw in sweethome3D.
I still couldnt get that area.
Can you please give a code to get the area of room. Please sir, with out that room area i can't continue my project.
by bandara
Thu Jun 23, 2011 2:24 pm
Forum: Developers
Topic: how to get area of room
Replies: 12
Views: 7437

how to get area of room

Hi I saw this topic in earlier too, but our experts answer was get a tape and measure :)

But i really need to get the area of room to call in my plugin.
I know there is a method getArea() in Room class, but it got constructor of float [][].
i.e. Room(float[][] points)

I dont know what value ...
by bandara
Tue Jun 21, 2011 7:40 pm
Forum: Developers
Topic: how to get selected drawing to another swing interface
Replies: 5
Views: 4171

Re: how to get selected drawing to another swing interface

getArea() returns a float, not float array.
So, how can i get it?