Closed shimwell closed 7 months ago
possible test idea
def test_add_cadquery_object_returned_volumes():
"""Checks that a add_cadquery_object method returns the correct number of volumes"""
sphere1 = cq.Workplane().sphere(20)
sphere2 = cq.Workplane().moveTo(100, 100).sphere(20)
sphere3 = cq.Workplane().moveTo(-100, -100).sphere(20)
c2d = CadToDagmc()
vols = c2d.add_cadquery_object(sphere1)
assert vols == 1
assembly = cq.Assembly()
assembly.add(sphere1)
assembly.add(sphere2)
assembly.add(sphere3)
c2d = CadToDagmc()
vols = c2d.add_cadquery_object(assembly)
assert vols == 3
this just returns the number of volumes in the cad object/stp file when they are added
this provides a way of users finding out how many material tags to add
tests have been added to the CI