Skip to main content

Open-source parametric vessel design and validation library

Project description

shipshape

Open-source parametric vessel design and validation library.

Shipshape provides boat-design-independent tools for naval engineering analysis. It is used by Solar Proa but can be applied to any parametric vessel design.

Modules

Module Description Requires FreeCAD
parameter Merge base parameters and compute derived values via a project-supplied plugin No
mass Compute component masses from a FreeCAD design and material properties Yes
buoyancy Find equilibrium pose (sinkage, pitch, roll) using Newton-Raphson iteration Yes
gz Compute the GZ righting-arm curve over a range of heel angles Yes
physics Center-of-gravity and center-of-buoyancy calculations Yes

Installation

pip install shipshape

For modules that require FreeCAD geometry (mass, buoyancy, gz, physics), install FreeCAD via conda-forge:

conda install -c conda-forge freecad

CLI Usage

Each module can be run as a CLI tool via python -m shipshape.<module>.

parameter

Merges boat and configuration JSON files, then calls a project-supplied compute_derived() function to calculate derived values.

PYTHONPATH=. python -m shipshape.parameter \
    --compute myproject.parameter.compute \
    --boat constants/boats/boat.json \
    --configuration constants/configurations/config.json \
    --output artifact/parameters.json

The --compute argument is a dotted module path. The module must export a compute_derived(data: dict) -> dict function.

mass

python -m shipshape.mass \
    --design artifact/boat.design.FCStd \
    --materials constants/material/materials.json \
    --output artifact/boat.mass.json

buoyancy

python -m shipshape.buoyancy \
    --design artifact/boat.design.FCStd \
    --materials constants/material/materials.json \
    --output artifact/boat.buoyancy.json

gz

python -m shipshape.gz \
    --design artifact/boat.design.FCStd \
    --buoyancy artifact/boat.buoyancy.json \
    --output artifact/boat.gz.json \
    --output-png artifact/boat.gz.png

Releasing a new version

  1. Edit pyproject.toml — bump the version field
  2. git add pyproject.toml
  3. git commit -m "Bump version to X.Y.Z"
  4. git push origin main
  5. git tag vX.Y.Z
  6. git push origin vX.Y.Z

Push the commit before the tag so CI has the code when the tag event triggers the PyPI release.

License

Apache 2.0

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

shipshape-0.10.0.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

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

shipshape-0.10.0-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file shipshape-0.10.0.tar.gz.

File metadata

  • Download URL: shipshape-0.10.0.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shipshape-0.10.0.tar.gz
Algorithm Hash digest
SHA256 bb479703a2167eb642dab880a078f72fc2077ee1cb0c7b7d61f93e3873be80ed
MD5 77cb2ba983fb9570be376ad7279f2f79
BLAKE2b-256 d9e1bd85630d9871966abd7d39f94940d53c7861f8a88a11e432c44006034f5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for shipshape-0.10.0.tar.gz:

Publisher: publish.yml on shipshape-marine/shipshape

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shipshape-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: shipshape-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shipshape-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96d13cb05e5a41c338bac12c0eb74a7c8fc7a3c804205889ec63dfbdf068fd9c
MD5 4a4adf26cefadbb1df50a46a7fa173a4
BLAKE2b-256 6e6adadf7641b5a8dfef50ad1937197858a65e6a36a2fa65bc836034fe283b55

See more details on using hashes here.

Provenance

The following attestation bundles were made for shipshape-0.10.0-py3-none-any.whl:

Publisher: publish.yml on shipshape-marine/shipshape

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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