示例#1
0
文件: modify.py 项目: sanderboer/AFEM
    def generated(self, shape):
        """
        Return a list of shapes generated from the given shape.

        :param afem.topology.entities.Shape shape: The shape.

        :return: List of generated shapes.
        :rtype: list(afem.topology.entities.Shape)
        """
        return Shape.from_topods_list(self._history.Generated(shape.object))
示例#2
0
    def modified(self, shape):
        """
        Return a list of shapes modified from the given shape.

        :param afem.topology.entities.Shape shape: The shape.

        :return: List of modified shapes.
        :rtype: list(afem.topology.entities.Shape)
        """
        return Shape.from_topods_list(self._bop.Modified(shape.object))
示例#3
0
 def section_edges(self):
     """
     :return: A list of section edges as a result of intersection between
         the shapes.
     :rtype: list(afem.topology.entities.Edge)
     """
     if isinstance(self._bop, (BRepAlgoAPI_Splitter, BOPAlgo_MakerVolume,
                               BRepFeat_MakeCylindricalHole)):
         n = self._bop.__class__.__name__
         msg = ('Getting section edges not available for {}. '
                'Returning an empty list.'.format(n))
         logger.warn(msg)
         return []
     else:
         return Shape.from_topods_list(self._bop.SectionEdges())
示例#4
0
 def tools(self):
     """
     :return: The tools.
     :rtype: list(afem.topology.entities.Shape)
     """
     return Shape.from_topods_list(self._bop.Tools())
示例#5
0
 def arguments(self):
     """
     :return: The arguments.
     :rtype: list(afem.topology.entities.Shape)
     """
     return Shape.from_topods_list(self._bop.Arguments())