Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 4
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 11363 times and has 3 replies Next Thread
alberich
Newbie




Joined: Jan 21, 2017
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
script to create a furniture library with 2D Symbols (electrical)

Hello,

I am using SH3D quite a while now for communicating with the architect and workmen in charge of our house.

Now I ran into the issue that I have floor plans including furniture in SH3D but I couldn't find a suitable library for quickly indicating the location the electrical installation.

Therefore, I wrote a script CreateSymbols.sh (it will probably only run under linux) which creates the required symbols almost automatically.
http://www.mediafire.com/file/c2yjgiob58ssl0d/ElectricalSymbols.zip

To use it, unzip the file in the link above which creates a directory called ElectricalSymbols.
1. Put the desired symbol(s) in the png-format therein.
2. Rename the file(s) to SymbolName.Information.png (watch the dots).
3. Run the script CreateSymbols.sh (also contained in the directory).

At the next start-up of SH3D, the symbols should be available in the furniture library under "Electrical".

For additional Information, open CreateSymbols.sh and read the part following "Attention". The most essential info is that you should have installed:
1. ImageMagick which crops and resizes the images to 256x256, but keeping the aspect ratio. If it isn't installed, there will be some error messages. The script will, however, finish successfully but the *png will just be used as they are.
2. zip (required)

To speed up creating the symbols, I used "Inkscape" to draw them (the file is also contained in the directory as Symbols.svg). Then I made screen shots of each single symbol using "shutter" (the handy thing with shutter is, that it directly saves the screenshots in your ~/images directory as a *.png (no extra saving needed).
Then, I moved all symbols at once to the ElectricalSymbols directory and ran the script.

I'm sorry that the names I provided, are in German. However, there is no point for me, to use English when communicating with the electrician in Germany ...
I'll do the multilingual support when I have some more time ;)

I hope, it proves useful for some you.

al
[Jan 21, 2017, 3:42:34 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
dorin
Advanced Member
Member's Avatar

Romania
Joined: Apr 24, 2014
Post Count: 548
Status: Offline
Reply to this Post  Reply with Quote 
Re: script to create a furniture library with 2D Symbols (electrical)

I've test it. It work! Good job!
But, because is a "but", it need some improvement:
-the catalog icon (usually a square) NOT be the same as PlanIcon which have different proportions. Explore my 2DSymbols furniture.
-the invisible object must have the individual dimensions of PlanIcon.
This script (with improvement) will help me in next version of 2DSymbols library.
Thanks!!!
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law)
When all else fails, read the instructions.Murphy's Law
[Mar 3, 2017, 7:44:30 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
dorin
Advanced Member
Member's Avatar

Romania
Joined: Apr 24, 2014
Post Count: 548
Status: Offline
Reply to this Post  Reply with Quote 
cool Re: script to create a furniture library with 2D Symbols (electrical)

I modify You'r script and generate the new version of 2DSymbols library.
Could be found here .
Thanks You open my eyes cool
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law (Greer's Third Law)
When all else fails, read the instructions.Murphy's Law
[Mar 20, 2017, 9:36:07 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
shanec
Newbie




Joined: Aug 25, 2023
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: script to create a furniture library with 2D Symbols (electrical)

Thank you alberich for putting this script together. I can confirm that it works as intended on MacOS 12.6.6 with SweetHome3D 7.1.1.

For others wanting to use it, you can rename the furniture library that it will create by editing CreateSymbols.sh before running.

The only files you need in the directory are (1) your PNGs named "[name].[information].png", (2) CreateSymbols.sh, and (3) invisibleCube.obj.

You will find that SweetHome 3D won't start if you forget the invisible cube. This can be fixed by manually deleting the imported furniture library. On MacOS it can be found at:

/Users/[username]/Library/Containers/com.eteks.sweethome3d.SweetHome3D/Data/Library/Application Support/eTeks/Sweet Home 3D/furniture
[Aug 25, 2023, 6:36:02 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

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