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
c1_base The base $4$-lobe parameter.
c2_base The base $8$-lobe parameter.
c1_top The top $4$-lobe parameter.
c2_top The top $8$-lobe parameter.
twist_linear The linear twist.
twist_amplitude The oscillating twist amplitude.
twist_period The oscillating twist period.
perimeter_ratio The ratio between the top and base perimeters.
height The height (mm).
mass The mass (g).
thickness The wall thickness (mm).

c1 and c2 Relationship

c1 & c2 relationship

twist_linear, twist_amplitude, and twist_period 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(c1_base=0.3,
                c2_base=-0.2,
                c1_top=0.4,
                c2_top=-0.3,
                twist_linear=2,
                twist_amplitude=0.05,
                twist_period=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

@misc{Snapp2023,
      title = {Autonomous Discovery of Tough Structures}, 
      author = {Kelsey L. Snapp and Benjamin Verdier and
               Aldair Gongora and Samuel Silverman and
               Adedire D. Adesiji and Elise F. Morgan and
               Timothy J. Lawton and Emily Whiting and
               Keith A. Brown},
      year={2023},
      eprint={2308.02315},
      archivePrefix={arXiv},
}

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.1.0.tar.gz (14.9 kB view hashes)

Uploaded Source

Built Distribution

gcs_shape-1.1.0-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

Supported by

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