-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from fusion-energy/fixing-VV-cutting
added rotate_solid and perform_boolean_operations to the create solid…
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 21 additions & 2 deletions
23
tests/test_parametric_components/test_VacuumVesselInnerLeg.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,40 @@ | ||
|
||
import unittest | ||
|
||
import pytest | ||
import paramak | ||
|
||
|
||
class TestVacuumVessel(unittest.TestCase): | ||
|
||
def setUp(self): | ||
self.cutter = paramak.PortCutterRectangular( | ||
width=100, | ||
height=100, | ||
distance=1100, | ||
azimuth_placement_angle=[ | ||
0, | ||
90, | ||
180, | ||
270]) | ||
self.test_shape = paramak.VacuumVesselInnerLeg( | ||
inner_height=1100, | ||
inner_radius=700, | ||
inner_leg_radius=100, | ||
thickness=0.2 | ||
thickness=100, | ||
) | ||
self.test_shape_cut = paramak.VacuumVesselInnerLeg( | ||
inner_height=1100, | ||
inner_radius=700, | ||
inner_leg_radius=100, | ||
thickness=100, | ||
cut=self.cutter | ||
) | ||
|
||
def test_creation(self): | ||
"""Creates a shape using the VacuumVessel parametric component and | ||
checks that a cadquery solid is created.""" | ||
|
||
assert self.test_shape.solid is not None | ||
|
||
def test_cut(self): | ||
assert self.test_shape.volume != self.test_shape_cut.volume |