Rename furniture

This topic has been viewed 16142 times and has 17 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
User avatar
hansmex
Posts: 4027
Joined: Sat Sep 26, 2009 11:36 am
Country: Netherlands

Re: Rename furniture

Post by hansmex »

Thanks, Enko, works perfectly!
Hans

new website - under constuction
hansdirkse.info
User avatar
bdfd
Posts: 2614
Joined: Sat Mar 29, 2014 7:17 am
Country: LILLE, Les Hauts de France, Western Europa

Re: Rename furniture

Post by bdfd »

Version 1.4
Improved treatment.
Excellent into a house but just a remark :

Why does the tool include objects outside buildings ?

Garden, trees, sidewalks,...
It's not necessary. [:D]
.
Evil progresses when good people do nothing!
---
SH3D 7.1 and nothing else - W11 64b in 4K
User avatar
bdfd
Posts: 2614
Joined: Sat Mar 29, 2014 7:17 am
Country: LILLE, Les Hauts de France, Western Europa

Re: Rename furniture

Post by bdfd »

Update : it was only on exterior Walls (gutters, windows, doors,...). [:D]

.
Evil progresses when good people do nothing!
---
SH3D 7.1 and nothing else - W11 64b in 4K
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Re: Rename furniture

Post by enkonyito »

@bdfd
Why does the tool include objects outside buildings ?
Garden, trees, sidewalks,...

Update : it was only on exterior Walls (gutters, windows, doors,...).
The plug-in adds to the name of a piece of furniture only the name of a room in which the center of the furniture is located and one of its corners with a margin of 1cm.
This therefore depends on the position of the furniture in relation to a room, regardless of its type of environment (indoor or outdoor).
EnkoNyito
User avatar
bdfd
Posts: 2614
Joined: Sat Mar 29, 2014 7:17 am
Country: LILLE, Les Hauts de France, Western Europa

Re: Rename furniture

Post by bdfd »

@bdfd
Why does the tool include objects outside buildings ?
Garden, trees, sidewalks,...

Update : it was only on exterior Walls (gutters, windows, doors,...).
The plug-in adds to the name of a piece of furniture only the name of a room in which the center of the furniture is located and one of its corners with a margin of 1cm.
This therefore depends on the position of the furniture in relation to a room, regardless of its type of environment (indoor or outdoor).
Ok for these explanations. [:)]

But I didn't understand for these... [:-/]

Image

I used plugin v1.4

Case 1
The room has a name : 'Master bathroom'
But the window has no name and NO named group ???
=> all furniture below in the list are in same case…

Case 2
The room has a name : 'Bedroom 2'
But the window has no name and without named group ???

Case 3
The next room, nearest of previous anomaly has a name : 'Bedroom 3'
It equipped of the same window.
The window has a name like the room ! [;)]

Can you explain us which is different ?

Regards,
bdfd.

[:-/]
Evil progresses when good people do nothing!
---
SH3D 7.1 and nothing else - W11 64b in 4K
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Re: Rename furniture

Post by enkonyito »

Illustration with the Studio demo file.

before
Image

after
Image

As you can see, the 4 doors or windows in bold do not have their centers inside a room so they have not been renamed.
EnkoNyito
enkonyito
Posts: 607
Joined: Thu May 28, 2015 4:52 pm

Re: Rename furniture

Post by enkonyito »

As shown in the user's guide , a selected piece of furniture has a rectangular outline (1 center and 4 corners).

Which translates into coding:

Code: Select all

[b]getX[/b]
public float getX()
// Returns the abscissa of the center of this piece of furniture.

[b]getY[/b]
public float getY()
// Returns the ordinate of the center of this piece of furniture.

[b]getPoints[/b]
public float[][] getPoints()
// Returns the points of each corner of a piece.
So just change the outline of the room to take into account the renaming of the piece of furniture (in bold).
Image
EnkoNyito
User avatar
bdfd
Posts: 2614
Joined: Sat Mar 29, 2014 7:17 am
Country: LILLE, Les Hauts de France, Western Europa

Re: Rename furniture

Post by bdfd »

...So just change the outline of the room to take into account the renaming of the piece of furniture (in bold).
Image
Yes, good tip !
.
Evil progresses when good people do nothing!
---
SH3D 7.1 and nothing else - W11 64b in 4K
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest