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.2.1.tar.gz (3.9 MB 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.2.1-py3-none-any.whl (3.9 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sh3d_py-0.2.1.tar.gz
  • Upload date:
  • Size: 3.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for sh3d_py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d095181b6660385acc4b7d925d00f654aa05987704fa40d9167f02e147c620d8
MD5 b482fbe67fb125c21297cd0d6a416ba8
BLAKE2b-256 cdea35db92d7fb956e871667d25a11a0367db2a027ed93980e765685c6ac5ef2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sh3d_py-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for sh3d_py-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82c81eaa2eb42c5d749670ee4ca491cba5b114c7852afaa657a27732cf994c30
MD5 274f6c6bbcbe437b6e5391fe4ce7c2ee
BLAKE2b-256 08a84c6b8c37fc160b1ceb4e01e4226edef7f5367bfaf3b552917c7bb3de4c4c

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