Skip to content

adding parametric shape for sphere #817

@shimwell

Description

@shimwell

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,
    ):
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions