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 mixed edge test shape #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

adding mixed edge test shape #18

wants to merge 2 commits into from

Conversation

shimwell
Copy link
Contributor

Hi all

This PR is the first in a series of PR that aim to add new test shapes as discussed #17

This particular PR adds a shape that has multiple different types of edges (spline, circle, straight)

Screenshot from 2020-10-22 11-23-29

This shape was made with the following code

import paramak

cube = paramak.ExtrudeStraightShape(points=[(10, -10), (300, -10), (300, 110), (10,110)],
                                    distance=120,
                                    material_tag='cub_mat')

extruded_mixed = paramak.ExtrudeMixedShape(
    points=[
        (100, 0, "straight"),
        (200, 0, "circle"),
        (250, 50, "circle"),
        (200, 100, "straight"),
        (150, 100, "spline"),
        (140, 75, "spline"),
        (110, 45, "spline"),
    ],
    distance=100,
    material_tag='extruded_mixed_mat'
)
cube.solid = cube.solid.cut(extruded_mixed.solid)
cube.export_stp('cube.stp')
extruded_mixed.export_stp('extruded_mixed.stp')

Then the PPP was used to make the brep

@makeclean
Copy link
Owner

I presume there are two solids there? Its hard to tell from the vis?

@shimwell
Copy link
Contributor Author

shimwell commented Oct 22, 2020

Yep I think there are two solids in there. The brep shows it as one in freecad, but I think this is just how breps from the ppp arrive. But I can change it a bit to make it clearer

Screenshot from 2020-10-22 11-39-32

Screenshot from 2020-10-22 11-39-08

@shimwell
Copy link
Contributor Author

Rotated the shape and made it a little more complex

import paramak

cube = paramak.ExtrudeStraightShape(points=[(10, 10), (300, 10), (300, 110), (10,110)],
                                    distance=120,
                                    extrude_both=False,
                                    material_tag='cub_mat',
                                   azimuth_placement_angle=10)

extruded_mixed = paramak.ExtrudeMixedShape(
    points=[
        (100, 0, "straight"),
        (200, 0, "circle"),
        (250, 50, "circle"),
        (200, 100, "straight"),
        (150, 100, "spline"),
        (140, 75, "spline"),
        (110, 45, "spline"),
    ],
    distance=100,
    material_tag='extruded_mixed_mat'
)

cube.solid = cube.solid.cut(extruded_mixed.solid)

my_reactor = paramak.Reactor(shapes_and_components=[cube,extruded_mixed])
my_reactor.export_stp()
my_reactor.export_neutronics_description('manifest.json', include_graveyard=False)

Screenshot from 2020-10-22 12-45-08
Screenshot from 2020-10-22 12-45-34

Happy to make changes but just wanted to commit it before I forget or lost it somehow

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

Successfully merging this pull request may close these issues.

2 participants