class CylinderByAxis(object): """ Create a cylinder. :param float radius: The radius. :param float height: The height. :param axis2: Not yet implemented. Solid will be constructed in xy-plane. :raise NotImplementedError: If an axis is provided. """ def __init__(self, radius, height, axis2=None): if axis2 is None: self._builder = BRepPrimAPI_MakeCylinder(radius, height) else: raise NotImplementedError('Providing Axis2 not yet implemented.') @property def face(self): """ :return: The lateral face of the cylinder :rtype: afem.topology.entities.Face """ return Face(self._builder.Face()) @property def shell(self): """ :return: The cylinder as a shell. :rtype: afem.topology.entities.Shell """ return Shell(self._builder.Shell()) @property def solid(self): """ :return: The cylinder as a solid. :rtype: afem.topology.entities.Solid """ return Solid(self._builder.Solid())
class CylinderByAxis(object): """ Create a cylinder. :param float radius: The radius. :param float height: The height. :param axis2: The axis. """ def __init__(self, radius, height, axis2=None): if axis2 is None: self._builder = BRepPrimAPI_MakeCylinder(radius, height) else: self._builder = BRepPrimAPI_MakeCylinder(axis2, radius, height) @property def face(self): """ :return: The lateral face of the cylinder :rtype: afem.topology.entities.Face """ return Face(self._builder.Face()) @property def shell(self): """ :return: The cylinder as a shell. :rtype: afem.topology.entities.Shell """ return Shell(self._builder.Shell()) @property def solid(self): """ :return: The cylinder as a solid. :rtype: afem.topology.entities.Solid """ return Solid(self._builder.Solid())