Print at Dec 15, 2025, 7:15:45 PM

Posted by buzzz at May 27, 2023, 5:49:03 PM
Re: Debug & sweethome3D.min.js
Ok, I see.

I have some difficulties in understanding how writeHomeEdits.jsp is called and how data are transfered. From what I saw, each time I modify the home in the browser, this script is called in JS to save the updates on server/disk :

request.send("home=" + encodeURIComponent(home.name)
+ "&editionId=" + home.editionId
+ "&version=" + this.application.getVersion()
+ "&edits=" + encodeURIComponent(JSON.stringify(update.edits)));


It seems that only updates are sent. But the saved sh3D file on disk contains all data. I do not see how data in the file are updated.
Option 1 : by adding updates at the end of the sh3D ?
Option 2 : by loading the old sh3D in the JSP + applying new updates from the jsp + saving the new sh3D ?