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: 3
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 1501 times and has 2 replies Next Thread
bernard_s
Newbie



UK
Joined: Feb 9, 2022
Post Count: 5
Status: Offline
Reply to this Post  Reply with Quote 
SweetHome3DJS model not saved in sh3d file

Hi
I have a problem where the online version does not store models chosen correctly. If I add a desk from the furniture list to the plan, when I download and examine the unzipped sh3d file, the object file is not present. In addition, in Home.xml, the model attribute points to a url which contains the domain name of the server. eg

model=jar:http://18.135.111.130:8080/SweetHome3DJS-7.0....s/desk.zip!/desk.obj'

No ContentDigests file with SHA-1 key exists either. The problem is this sh3d file is no longer portable. If I try to open it in the desktop version, the desk cannot be referenced and shows as a red box instead.

I compiled (successfully) and deployed v7.0.2 on tomcat. I note that if I use the hosted version on https://www.sweethome3d.com/SweetHome3DOnlineManager.jsp I can add the desk, download the sh3d file and see the link is correct and a ContentDigests file with SHA-1 key correctly created.

Using Debian 10, and OpenJDK 11. I believe the same applies
to 6.6.4 which I was using and where I found this issue.

Any help gratefull received.
[Oct 29, 2022, 11:43:08 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9180
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS model not saved in sh3d file

I have a problem where the online version does not store models chosen correctly.
The Online version stores models and textures differently and the sh3d file that it handles can be opened with the desktop version if your server 18.135.111.130:8080 can be reached.
If you want to include in the sh3d file all the models it uses, just override createHomeOutputStream in a subclass of HomeServerRecorder to return a DefaultHomeOutputStream instance which will write also models and textures, for example:
new DefaultHomeOutputStream(new BufferedOutputStream(new FileOutputStream(homeFile)),
compressionLevel, ContentRecording.INCLUDE_ALL_CONTENT, false, new HomeXMLExporter());
Then instantiate this new class in writeHomeEdits.jsp instead of HomeServerRecorder class.

But keep in mind that this will create more traffic between the server and JS client, and the sh3d files stored on the server will take much more room. I would rather recommend to create an export function that will read a sh3d file stored on the server and return the content of a full sh3d file.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Oct 31, 2022, 3:36:14 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
bernard_s
Newbie



UK
Joined: Feb 9, 2022
Post Count: 5
Status: Offline
Reply to this Post  Reply with Quote 
Re: SweetHome3DJS model not saved in sh3d file

Thanks for the info. That makes sense, as does the extra server load issues it would create.
[Nov 1, 2022, 9:11:41 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