Skip to main content

Generalized cylindrical shell library for Python.

Project description

Explore the Docs Report a Bug Request a Feature Read the Paper

gcs is a Python library for creating generalized cylindrical shells (GCS).

GCS examples

GCS are parameterized by 11 values:

Syntax Description
c4_base The parameter controlling the size and shape of the base $4$-lobe feature.
c8_base The parameter controlling the size and shape of the base $8$-lobe feature.
c4_top The parameter controlling the size and shape of the top $4$-lobe feature.
c8_top The parameter controlling the size and shape of the top $8$-lobe feature.
twist_linear The rotation (rad) of the top. This creates a linear twist between the base and top.
twist_amplitude The amplitude (rad) of the oscillating twist between the base and top.
twist_cycles The number of cycles of the oscillating twist between the base and top.
perimeter_ratio The ratio between the top and base perimeters.
height The height (mm).
mass The mass (g).
thickness The wall thickness (mm).

c4 and c8 Relationship

c4 & c8 relationship

twist_linear, twist_amplitude, and twist_cycles Relationship

twist relationship

Download

gcs requires Python version 3.8 (or higher). To install, run the command:

pip install gcs-shape

Requirements

Supported Operating Systems

gcs is operating system independent. The package has been tested on the following operating systems:

  • MacOS Ventura 13.4.1
  • Ubuntu 22.04
  • Windows 10

Quickstart

import gcs

# Create a generalized cylindrical shell
shape = gcs.GCS(c4_base=0.3,
                c8_base=-0.2,
                c4_top=0.4,
                c8_top=-0.3,
                twist_linear=2,
                twist_amplitude=0.05,
                twist_cycles=3,
                perimeter_ratio=1.5,
                height=20,
                mass=2.1,
                thickness=0.48)

# Assert the shape is valid
print(shape.valid)

# Save shape to STL file
gcs.io.save_mesh(file='shape.stl', shape=shape)

Contributing

The contribution guidelines can be found in CONTRIBUTING.md.

Maintainers

Citation

@article{Snapp:2024:SuperlativeMechanicalEnergy,
author={Snapp, Kelsey L. and Verdier, Benjamin and Gongora, Aldair E. and Silverman, Samuel and Adesiji, Adedire D. and Morgan, Elise F. and Lawton, Timothy J. and Whiting, Emily and Brown, Keith A.},
title={Superlative mechanical energy absorbing efficiency discovered through self-driving lab-human partnership},
journal={Nature Communications},
year={2024},
month={May},
day={21},
volume={15},
number={1},
pages={4290},
issn={2041-1723},
doi={10.1038/s41467-024-48534-4},
url={https://doi.org/10.1038/s41467-024-48534-4}
}

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

gcs_shape-1.3.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

gcs_shape-1.3.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file gcs_shape-1.3.0.tar.gz.

File metadata

  • Download URL: gcs_shape-1.3.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.12

File hashes

Hashes for gcs_shape-1.3.0.tar.gz
Algorithm Hash digest
SHA256 68bc3d4d3f12e19e9f2a962458a88b3cb7524b828c40cdf7e10c50359e075ddf
MD5 bf93b7d25d4b44364a2bff7b20fb12cc
BLAKE2b-256 4a6676a8a7d53bcc9a48742e47bf4f98c6208b0417cfa9e9d72be7d18f9425c2

See more details on using hashes here.

File details

Details for the file gcs_shape-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: gcs_shape-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.12

File hashes

Hashes for gcs_shape-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c014a02ff797276c2c8f2009789e5ea23bef8feec1f6ce645a7b67ef05f8355
MD5 1c2c74ff92a339e47a7190f6d7d80118
BLAKE2b-256 f297c8b831900a181364dca3cf927660e01fe0faaf0503d21fc4571deb2e62e0

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