Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add a "spring" example #759

Open
KilowattSynthesis opened this issue Nov 5, 2024 · 1 comment
Open

Docs: Add a "spring" example #759

KilowattSynthesis opened this issue Nov 5, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@KilowattSynthesis
Copy link

Would be awesome if you could add an example that shows how to make a spring part (a circle swept on a helix)

@KilowattSynthesis
Copy link
Author

Update: The following example works:

def spring_demo() -> bd.Part:
    """Construct a "spring" using a helix sweep of a circle."""
    p = bd.Part()
    helix = bd.Helix(radius=2, pitch=1, height=10, cone_angle=0)
    p += bd.sweep(
        path=helix,
        sections=((helix ^ 0) * bd.Circle(radius=0.3)),
    )
    return p

show(spring_demo())

image

@gumyr gumyr added the documentation Improvements or additions to documentation label Nov 5, 2024
@gumyr gumyr added this to the Not Gating Release 1.0.0 milestone Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants