def test_subtract(self): v1 = _system.cubitWrapper.brick(1, 1, 1) v2 = _system.cubitWrapper.brick(0.5, 0.5, 0.5) try: _boolean.subtract(v2, v1) except _system.AdvCubitException: self.assertTrue(False, 'Subtraction failed')
def ring(height, innerRadius, outerRadius): """ Create a annular ring :param height: height of ring :param innerRadius: radius of inner surface :param outerRadius: radius of outer surface :return: created volume """ inner = cylinder(height, innerRadius) outer = cylinder(height, outerRadius) return _boolean.subtract([inner], [outer])[0]