Features

Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Help  | 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: 5
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3863 times and has 4 replies Next Thread
Ferraro
Newbie




Joined: Apr 16, 2014
Post Count: 18
Status: Offline
Reply to this Post  Reply with Quote 
Text name only in 2D view

Is there a way to display the catalog name only in the plan view? I have run into a situation where the top down view is undesirable, and just the catalog name of the object is more appropriate. I thought about using a plan icon image, but this does not produce the desired vector text output I need in the SVG. Any ideas?
[Feb 16, 2015 8:00:29 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Ferraro
Newbie




Joined: Apr 16, 2014
Post Count: 18
Status: Offline
Reply to this Post  Reply with Quote 
Re: Text name only in 2D view

If anyone is interested, I tried using an SVG file as the planIcon, but it does not work. I get that little red X. I guess there is no quick fix inside SH :(
[Feb 19, 2015 10:23:16 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
clanmills
Member
Member's Avatar

England
Joined: May 16, 2014
Post Count: 33
Status: Offline
Reply to this Post  Reply with Quote 
Re: Text name only in 2D view

I don't know the answer, however here are a couple of ideas:

Changing SH3D code
The method paintIcon() in PlanComponent.java appears to generate an image which is used as a "proxy" for an item of furniture. Perhaps you could rewrite that method to create a little text label which displays the name of the item

PostProcessing the SVG
I've exported an SVG file and it consists of vector graphics and <image .../> tags which I believe are "proxy" images. I removed the images with this:

$ cat SGx.svg | xmllint --format --recover - | sed 's#<image.*/>##g' > SGy.svg

I suspect the <image ../> tag is identical for every instance of the same item of furniture. A script could be devised to identify every <image ../> and replace it with a graphical/SVG text label unique for that <image ../>
[Feb 20, 2015 8:11:26 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://clanmills.com [Link] Report threatening or abusive post: please login first  Go to top 
clanmills
Member
Member's Avatar

England
Joined: May 16, 2014
Post Count: 33
Status: Offline
Reply to this Post  Reply with Quote 
biggrin Re: Text name only in 2D view

I've solved this! I've been updating the model of my home and noticed in the "Modify Furniture" Dialog that there's a check box "Display name in Plan". You should enable that on every item of furniture, the use my xmllint magic to remove the furniture "proxy". Et voila!

It would be easy to create a plugin to automate this and set/reset the state of "Display name in Plan". Windows can install xmllint from https://code.google.com/p/xmllint/downloads/d...lint.exe&can=2&q=
[Feb 22, 2015 10:24:08 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://clanmills.com [Link] Report threatening or abusive post: please login first  Go to top 
Ferraro
Newbie




Joined: Apr 16, 2014
Post Count: 18
Status: Offline
Reply to this Post  Reply with Quote 
Re: Text name only in 2D view

Thanks for your suggestions clanmills, you gave me some good ideas. I am thinking "Display name in plan" should be enabled from the furniture library properties file. Going to see how hard that is to rework. Then I can just load a transparent png for the planIcon.
[Feb 24, 2015 10:24:35 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-2017 eTeks - All rights reserved