Skip to main content

Sweet home 3D file format implementation in python

Project description

sh3d.py

Python library for reading Sweet Home 3D file format (*.sh3d). Internally sh3d is just another zip archive with JavaObject dump (as Home) and XML dump (as Home.xml) and attached files, this library supports reading them all and provides corresponding python objects representing sh3d data.

Install

pip install sh3d.py

Usage

Loading full data from Home JavaObject dump

from sh3d.FileLoader import FileLoader, HomeSource


# Default is parsion of JavaObject Home
with FileLoader('myHome.sh3d') as file_loader:
    
    # Dump home, ~all models are dataclasses so you will actually see full readable dump
    print(file_loader.home)

# Load home from Home.xml instead
with FileLoader('myHome.sh3d', home_source=HomeSource.XML) as file_loader:
    
    # Dump home, ~all models are dataclasses so you will actually see full readable dump
    print(file_loader.home)  # Home object

Home object structure

class Home:
    name: str 
    version: int
    wall_height: float
    levels: List[Level]  # Implemented, represents list of Home plan levels
    furniture: List[HomePieceOfFurniture]  # Implemented, represents list of furniture including doors and windows as HomeDoorOrWindow object that is child of HomePieceOfFurniture
    rooms: List[Room]  # Implemented, represents list of rooms
    walls: List[Wall]  # Implemented, represents list of walls
    dimension_lines: List[DimensionLine]  # Implemented, represents list of dimension lines (measurements)
    labels: List[Label] # Implemented, represents list of labels (texts)
    polylines: List[Polyline]  # Implemented, represents list of polylines 
    background_image: BackgroundImage # Implemented, represents background image
    environment: HomeEnvironment  # Implemented, represents home environment / config
    compass: Compass  # Implemented
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sh3d_py-0.1.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sh3d_py-0.1.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file sh3d_py-0.1.1.tar.gz.

File metadata

  • Download URL: sh3d_py-0.1.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for sh3d_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 84612f3e41dcc317abfcaa434eec00ef0db6c2e85eb21df19dcfb09f0809dc6d
MD5 c15bbb87fda7ebc275b33798b46c9feb
BLAKE2b-256 992f140cb82b349dd77d30bce7752a533adf871edf137d179b68be2c7ec77cbc

See more details on using hashes here.

File details

Details for the file sh3d_py-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sh3d_py-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for sh3d_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c87f4516f9582bd7c2a9a587f45b396dd2483a19ec02b40cae6f9ef714e9f8ca
MD5 089b8dddc1514b0a9f370d09f68c40f2
BLAKE2b-256 3db263d3f726868b647673f25038c4ea0133e891235f028df7c9bb0767cb39f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page