Trang chủ  | Những luồng mới  | Tập tin đính kèm  | Tìm kiếm
 Xin chào Guest  |  Đăng ký  |  Đăng nhập
Định danh  Mật khẩu
 

Sweet Home 3D Forum



Không có thành viên nào đang xem luồng
Trạng thái luồng: Bình thường
Tổng số bài viết trong luồng này: 13
Số bài viết: 13   Số trang: 2   [ 1 2 | Trang kế tiếp ]
[ Chuyển đến bài viết cuối ]
Tạo luồng mới
Tác giả
Luồng trước đó Luồng này đã được xem 29112 lần và có 12 bài trả lời Luồng kế tiếp
dlarroumets
Newbie




Tham gia: 3 thg 11, 2009
Tổng số bài đã viết: 11
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Add picture on 2D panel only

Hi,

Is it possible to add little pictures in 2D panel only ?
Like a furniture from a library by drag and drop ?

Thanks
[15:54:12, 8 thg 9, 2011] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
Puybaret
Expert
Hình đại diện của thành viên

France
Tham gia: 7 thg 11, 2005
Tổng số bài đã viết: 9433
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Re: Add picture on 2D panel only

If you want to add pictures in the 2D plan only, you should create a separated .sh3f furniture file that will contain these pictures, an invisible OBJ file and a PluginFurnitureCatalog.properties file that will describe the fake catalog furniture you want to describe.

As the Furniture Library Editor is not designed to manage invisible models with a visible icon, you won't be able to use (or you'll have to edit the generated file afterwards).
To show you how to proceed, I attached the Symbols.sh3f demo file that describes an information symbol and a phone symbol. Each symbol is described with some properties listed in DefaultFurnitureCatalog class followed by # and a order counter.
name, category, icon, model, width, depth, height, movable and doorOrWindow are mandatory, whereas the other properties are optional. In your case, even if height isn't used, you shouldn't set it to 0.
id is useful to avoid duplicates in case the same model appears more than once in different .sh3f files.
deformable is interesting if you don't want to let the user change proportions.
You should also define the planIcon property to ensure you use the correct icon, when furniture icons in plan should be rendered with top view icons and not catalog icons.

# PluginFurnitureCatalog.properties
# Copyright (c) 2007-2011 Emmanuel PUYBARET / eTeks <[email protected]>.

description=Symbols catalog
version=1.0
license=Free Art License 1.3
provider=www.sweethome3d.com

id#1=Symbol#Phone
name#1=Phone
category#1=Symbols
icon#1=/phone.png
planIcon#1=/phone.png
model#1=/invisibleCube.obj
width#1=10.0
depth#1=10.0
height#1=10.0
movable#1=true
doorOrWindow#1=false
creator#1=eTeks

id#2=Symbol#Information
name#2=Information
category#2=Symbols
icon#2=/information.png
planIcon#2=/information.png
model#2=/invisibleCube.obj
width#2=8.0
depth#2=8.0
height#2=8.0
movable#2=true
deformable#2=false
doorOrWindow#2=false
creator#2=eTeks


If you need, you can translate the name and category properties in files suffixed with country code, like in the following PluginFurnitureCatalog_fr.properties French file (encoded with ISO_8859_1):

# PluginFurnitureCatalog_fr.properties
# Copyright (c) 2007-2011 Emmanuel PUYBARET / eTeks <[email protected]>.

description=Catalogue de symboles

name#1=Téléphone
category#1=Symboles

name#2=Information
category#2=Symboles


I hope you can handle this workaround. Of course it isn't perfect since some attributes in furniture dialog become completely useless in that case. I may add a new property in properties files to handle this case in a future version.
----------------------------------------
Tập tin đính kèm Symbols.sh3f (13016 bytes) (Số lần tải về: 327633) (A furniture file that contains images only displayable in the 2D plan)

----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[16:55:11, 8 thg 9, 2011] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
dlarroumets
Newbie




Tham gia: 3 thg 11, 2009
Tổng số bài đã viết: 11
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Re: Add picture on 2D panel only

I tested your files, and it looks perfect for me.

Note for newbie : use the menu "Import library furniture" and not right click import on treeview...


Thanks a lot Emmanuel
[17:51:20, 8 thg 9, 2011] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
dlarroumets
Newbie




Tham gia: 3 thg 11, 2009
Tổng số bài đã viết: 11
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Re: Add picture on 2D panel only

Note 2 : sh3f is a zip file.
[17:55:06, 8 thg 9, 2011] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
Puybaret
Expert
Hình đại diện của thành viên

France
Tham gia: 7 thg 11, 2005
Tổng số bài đã viết: 9433
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Re: Add picture on 2D panel only

Great you like it! smile
sh3f is a zip file
Thank you for mentioning this important detail.
An other important thing: I published in public domain the invisibleCube.obj OBJ file contained in the attached .sh3f file to let anyone use it with no limitation.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[20:06:51, 8 thg 9, 2011] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
skliarie
Newbie



Israel
Tham gia: 22 thg 1, 2014
Tổng số bài đã viết: 5
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Re: Add picture on 2D panel only

I took the symbols library, added more symbols (electric socket, high-powered socket, lamp and reserved) and published it over here: http://arnest.catchmedia.com/tmp/electrical.sh3f

My only concern is that the electric socket symbol should be rotateable (the protruding stick should look in the opposite side from the wall). What should I add to the properties files for that?
[11:55:09, 22 thg 1, 2014] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
skliarie
Newbie



Israel
Tham gia: 22 thg 1, 2014
Tổng số bài đã viết: 5
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Re: Add picture on 2D panel only

I added to the symbols library more elements (two poles switch, with and without lamp, looking in different directions) - on the same URL (see above).

Is there a way to remove black border around the elements? It seems to be automatically added by sweethome3D.

Any idea about automatically rotating the icons depending on the base? Currently I am forced to provide 4 different icons for each direction..
[09:53:37, 31 thg 1, 2014] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
Puybaret
Expert
Hình đại diện của thành viên

France
Tham gia: 7 thg 11, 2005
Tổng số bài đã viết: 9433
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Re: Add picture on 2D panel only

Is there a way to remove black border around the elements? It seems to be automatically added by sweethome3D.
No, and there won't. This rectangle is used to show the user in which zone he can click to select an object, but it's not printed or exported to PDF / SVG.

Any idea about automatically rotating the icons depending on the base?
I don't understand what you want. Why don't you use the rotate indicator available on each object?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[11:39:37, 31 thg 1, 2014] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
skliarie
Newbie



Israel
Tham gia: 22 thg 1, 2014
Tổng số bài đã viết: 5
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Re: Add picture on 2D panel only

The black border *is* exported in SVG export mode. Just import my furniture library, put couple of symbols and export to SVG.

If I use rotate indicator - the pictogram remains in its original form and not rotated. I guess this also explains why autorotation (when the symbol "sticks" to the wall near it) does not work. I think the problem is in the way the symbols are described in PluginFurnitureCatalog.properties.
[21:23:52, 1 thg 2, 2014] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
Puybaret
Expert
Hình đại diện của thành viên

France
Tham gia: 7 thg 11, 2005
Tổng số bài đã viết: 9433
Trạng thái: Ngoại tuyến
Trả lời bài viết  Trả lời với trích dẫn 
Re: Add picture on 2D panel only

Selecting Top view option for Furniture icons in plan in preferences will fix your two issues.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[00:23:48, 2 thg 2, 2014] Xem bản để in của bài viết    Xem thông tin cá nhân của thành viên    Gửi thông điệp cá nhân [Liên kết của bài] Thông báo bài gửi có nội dung xấu: mời bạn đăng nhập trước  Chuyển về đầu trang 
Số bài viết: 13   Số trang: 2   [ 1 2 | Trang kế tiếp ]
[ Chuyển đến bài viết cuối ]
Xem bản để in  Tạo luồng mới

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved