The SH3D file failed to load on the web using Sweet Home 3D Viewer

This topic has been viewed 9205 times and has 19 replies
Thread status: Active
Questions about Sweet Home 3D installation [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
yizhou
Posts: 13
Joined: Sat Apr 16, 2011 4:23 pm

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by yizhou »

Great!!!The SweetHome3DApplet.html is working now.Thanks for your very useful response~
But Only problem is I have no furniture in the applet.I just edited the SweetHome3DApplet.html like this:

Code: Select all

[i]var parameters = {java_arguments:"-Xmx512m -Dcom.eteks.sweethome3d.deploymentInformation=Online",
showMemoryStatus:"true", 
userLanguage:"en",
furnitureCatalogURLs:"3dr/furnitureCatalog.zip 3dr/additionalFurnitureCatalog.zip", 
texturesCatalogURLs:"3dr/texturesCatalog.zip",

listHomesURL:"",
readHomeURL:"",
writeHomeURL:""

};[/i]
I downloaded the files furnitureCatalog.zip, additionalFurnitureCatalog.zip and texturesCatalog.zip.
Then uncompressed these zip files and placed the png/modle into it from sweethome3d.eu and then again zipped in the same way.
But while testing the SweetHome3DApplet.html if they work on or not, there is no 3D model and icon files in the applet still.
What can I do?

thanks
yizhou
Posts: 13
Joined: Sat Apr 16, 2011 4:23 pm

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by yizhou »

Hi Puybaret,there is no 3D model and icon files in the applet,but I have changed their extension from zip to sh3f, and checked that the models listed in them appear in Sweet Home 3D catalog. Also can access the url "E:/SweetHome3D/deploy/3dr/texturesCatalog.zip".
So could you give me some advice? Thanks a lot.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by Puybaret »

I downloaded the files furnitureCatalog.zip, additionalFurnitureCatalog.zip and texturesCatalog.zip.
Did you change these files?
Then uncompressed these zip files and placed the png/modle into it from sweethome3d.eu and then again zipped in the same way.
Could you give an example of a piece of furniture you defined once modified.
Did you also try the furnitureResourcesURLBase and texturesResourcesURLBase parameters available in SweetHome3D applet? See how they are configured in Sweet Home 3D Online for a real world example.

By the way, I recall that you mustn't reference 3D model and icon files hosted on sweethome3d.com server, to avoid consuming too much bandwidth. You must host them elsewhere.
Emmanuel Puybaret, Sweet Home 3D creator
yizhou
Posts: 13
Joined: Sat Apr 16, 2011 4:23 pm

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by yizhou »

Hi Emmanuel,thank you for the quick response.
I just did following:
1.I just Added the following parameters in SweetHome3DApplet.html

Code: Select all

var parameters = {java_arguments:"-Xmx512m -Dcom.eteks.sweethome3d.deploymentInformation=Online",
showMemoryStatus:"true", 
userLanguage:"en",
furnitureCatalogURLs:"E:/SweetHome3D-3.0-src/deploy/online/furnitureCatalog.zip",
furnitureResourcesURLBase:"E:/SweetHome3D-3.0-src/deploy/models/",
texturesCatalogURLs:"E:/SweetHome3D-3.0-src/deploy/online/texturesCatalog.zip",
texturesResourcesURLBase:"E:/SweetHome3D-3.0-src/deploy/textures/",

listHomesURL:"",
readHomeURL:"",
writeHomeURL:""

};
2. I downloaded the files furnitureCatalog.zip, additionalFurnitureCatalog.zip and texturesCatalog.zip.
3. Chanaged the files like this:
furnitureCatalog.zip!\PluginFurnitureCatalog.properties

Code: Select all

name#1=Bed 140x190
category#1=Bedroom
icon#1=E:/SweetHome3D-3.0-src/deploy/models/bed140x190.png
model#1=jar:E:/SweetHome3D-3.0-src/deploy/models/bed140x190.zip!/bed140x190.obj
width#1=158
depth#1=208
height#1=70
movable#1=true
doorOrWindow#1=false
texturesCatalog.zip!\PluginTexturesCatalog.properties

Code: Select all

name#1=Wooden floor
category#1=Floor
image#1=E:/SweetHome3D-3.0-src/deploy/textures/woodenFloor.jpg
width#1=42.5
height#1=42.5
4. Ran the Sweethome3dApplet.html and no 3d models and icons there.

Ps: I downloaded one or two models from the sweethome3d.eu and placed them to the path like E:/SweetHome3D-3.0-src/deploy/models/.
And placed one or more the jpg to E:/SweetHome3D-3.0-src/deploy/textures/.

I also changed their extension from zip to sh3f, and checked that the models listed in them appear in Sweet Home 3D catalog. And also can access the url "E:/SweetHome3D/deploy/3dr/texturesCatalog.zip".

thanks
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by Puybaret »

If you use furnitureResourcesURLBase and texturesResourcesURLBase parameters and keep the same models and textures folders, you won't have to modify icon#, model# and image# values.
From the examples you gave, it can't work because something starting with "E:/SweetHome3D-3.0-src" can't be an URL. You should add "file:///" in front of it.
Emmanuel Puybaret, Sweet Home 3D creator
yizhou
Posts: 13
Joined: Sat Apr 16, 2011 4:23 pm

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by yizhou »

Yes. By adding "file:///" in front of "E:/SweetHome3D-3.0-src",I saw the models and icons on the applet finally,haha
~ I'm so excited for this. A big thank to Emmanuel.

yizhou
yizhou
Posts: 13
Joined: Sat Apr 16, 2011 4:23 pm

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by yizhou »

New problem is I can't do some options such as "new/edit/save/" on the applet, coz there are no such menu/toolbar.So when will you distribute a compiled version Sweet Home 3D applet?

Best regards
yizhou
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by Puybaret »

I don't think there's a need to distribute a compiled version of the applet, but there's surely a need for a step by step documentation about applet deployment. In fact, I didn't expect that some people would want to deploy Sweet Home 3D applet on their own server, and once a few ones started to ask some support about this, I expected one of them would start that doc themselves. Maybe it will be you??? [;)]
Anyway, if your applet doesn't display new/open/save buttons, it's again because you didn't read the existing doc. I know that SweetHome3DApplet javadoc isn't as much fun to read as a good novel, but come on, it's not so long!!!

By the way, describing to the community why you intend to deploy Sweet Home 3D applet would be much appreciated...
Emmanuel Puybaret, Sweet Home 3D creator
yizhou
Posts: 13
Joined: Sat Apr 16, 2011 4:23 pm

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by yizhou »

Hi Emmanuel,I'd like to tell you that I'm a college student, and my major is software engineering.Recently, I was learning Java applet.So I just deployed Sweet 3D applet on my localhost.Thanks again for your patient response and it is so kind of you~

Sincerly
yizhou
yizhou
Posts: 13
Joined: Sat Apr 16, 2011 4:23 pm

Re: The SH3D file failed to load on the web using Sweet Home 3D Viewer

Post by yizhou »

Hi Emmanuel,here ,I just did like this:import furniture->find modles->ok ,but no response.And you? thanks.
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest