ukaea / paramak

Create parametric 3D fusion reactor CAD models
https://paramak.readthedocs.io/en/main/
37 stars 12 forks source link

Adding colour to jupyter cadquery show #798

Closed shimwell closed 3 years ago

shimwell commented 3 years ago

Proposed changes

This PR adds color to the .show property of jupyter cadquery as originally show in https://github.com/bernhard-42/jupyter-cadquery/issues/39 thanks @bernhard-42

Parametric Shapes have all been assigned default colors based on the original color brewer selection https://colorbrewer2.org/#type=qualitative&scheme=Paired&n=12

Additionally seperate shapes can be switched on or of using the eye ball logo on the left hand side

TODO

Before

Screenshot from 2021-04-05 17-12-55

After

Screenshot from 2021-04-07 12-00-52

Types of changes

What types of changes does your code introduce to the Paramak? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

shimwell commented 3 years ago

Also removes from openmc import geometry from Reactor.py which might have caused #800

codecov[bot] commented 3 years ago

Codecov Report

Merging #798 (a6966fc) into develop (3a9a910) will decrease coverage by 0.01%. The diff coverage is 89.47%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #798      +/-   ##
===========================================
- Coverage    95.34%   95.33%   -0.02%     
===========================================
  Files           74       74              
  Lines         5182     5251      +69     
===========================================
+ Hits          4941     5006      +65     
- Misses         241      245       +4     
Impacted Files Coverage Δ
.../parametric_components/poloidal_field_coil_case.py 100.00% <ø> (ø)
...tric_components/toroidal_field_coil_coat_hanger.py 100.00% <ø> (ø)
...metric_components/toroidal_field_coil_rectangle.py 100.00% <ø> (ø)
...etric_components/toroidal_field_coil_triple_arc.py 100.00% <ø> (ø)
paramak/parametric_reactors/ball_reactor.py 100.00% <ø> (ø)
...parametric_reactors/center_column_study_reactor.py 100.00% <ø> (ø)
...aramak/parametric_reactors/eu_demo_2015_reactor.py 100.00% <ø> (ø)
paramak/parametric_reactors/sparc_paper_2020.py 100.00% <ø> (ø)
paramak/parametric_reactors/submersion_reactor.py 99.05% <ø> (ø)
paramak/parametric_shapes/sweep_circle_shape.py 100.00% <ø> (ø)
... and 24 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3a9a910...a6966fc. Read the comment docs.