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: 2
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2224 times and has 1 reply Next Thread
jenderek
Newbie



Germany
Joined: Mar 15, 2018
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Sweet Home 3D files format specifications like extension sh3d versus zip , jar format

Hello,

some days ago i must create a floor plan. So i used interior design
application "Sweet Home 3D" version 5.7 to do this work. My created
plans are stored as files with name extension ".sh3d".

When i use TrID software (found at http://mark0.net/soft-trid-e.html) to identify SH3D files, i got "ZIP compressed archive" as file type description.

So i know foobar.sh3d is just a ZIP archive. But some examples like
SweetHome3DExample2.sh3d found in Gallery section with URL
http://www.sweethome3d.com/gallery.jsp are identified by standard Unix
file identifying command as "Java archive data (JAR)". Furthermore i got for such examples as mime type "application/java-archive" instead of standard "application/zip" for ZIP files.

After looking inside sh3d files i would describe such files as:

SH3D files are ZIP archive with first member "Home". It also seems to
contain a file "Home.xml". But i do not know if this always true.

So i wanted to know if there exist an "official" file format
specification (offset magic bytes, mime type, etc.) describing how to
distinguish from other ZIP files.

Furthermore installer for Windows version 5.7 add for eTeks Sweet Home
3D Textures Library (*.sh3t) neither description nor icon inside Windows registry. Because SH3D files are just ZIP archive, in registry
PerceivedType key should be "compressed" instead empty/missing.

thanks for hints about Sweet Home 3D files formats.
[Mar 15, 2018 10:52:47 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 6723
Status: Offline
Reply to this Post  Reply with Quote 
Re: Sweet Home 3D files format specifications like extension sh3d versus zip , jar format

SH3D and JAR files are just ZIP files, compressed or not.

The main entry of a SH3D file is named Home and contains a Java serialization of the Home class instance that describes the designed home. In old versions, this entry had to be the first one in a SH3D file.
From version 5.3, there’s also a copy of the designed home in a new entry named Home.xml which respects SweetHome3D.dtd. This XML entry was added to be able to read and save SH3D files in JavaScript and other environments. This entry is read in priority when a SH3D file is opened and the Home is stilll saved for compatibility with previous versions of Sweet Home 3D.

During a few more versions, I foresee to save Home and Home.xml in a SH3D file even if they contain similar data. This is to ensure a smooth transition with future files where Home entry won’t be saved anymore. The extension of these future files will be .sh3x which is already associated with Sweet Home 3D application since version 5.3 too. Future versions will also be able to read SH3D files without a Home.xml entry as long as Java deserialization will be possible with Home entry.

The other entries of a SH3D file are the optional entry named ContentDigests (added in version 4.4) which contains digests of home data to help repair a corrupted SH3D file, and numbered entries that contain images and 3D models used by a home.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Mar 16, 2018 1:57:15 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [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-2019 eTeks - All rights reserved