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

adding parametric shape for sphere #817

Open
shimwell opened this issue Apr 23, 2021 · 0 comments
Open

adding parametric shape for sphere #817

shimwell opened this issue Apr 23, 2021 · 0 comments

Comments

@shimwell
Copy link
Collaborator

User request for spheres, these could also be useful for plotting the source particles.

my_model = NeutronicsModel().export_stp() could export source points

This is how cadquery makes spheres

import cadquery as cq
import paramak

sphere_small = cq.Workplane("XY").sphere(10)
sphere_big = cq.Workplane("XY").sphere(20)

hollow_sphere = sphere_big.cut(sphere_small)

my_shape = paramak.Shape()
my_shape.solid = hollow_sphere

my_shape.export_stp('thanks_for_the_idea_steve.stp')
my_shape.show()

So we could make a new paramaic shape like this ...

def Sphere(Shape):
    
    def __init__(
        position,
        radius,
    ):
...
@shimwell shimwell changed the title adding parametric shape for sphers adding parametric shape for sphere Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant