Пример #1
0
    def wire(self):
        """The CadQuery wire of the 3d object. Returns a CadQuery workplane
        or CadQuery Compound"""

        ignored_keys = ["_wire", "_solid", "_hash_value"]
        if get_hash(self, ignored_keys) != self.hash_value:
            self.create_solid()
            self.hash_value = get_hash(self, ignored_keys)

        return self._wire
Пример #2
0
 def shapes_and_components(self):
     """Adds a list of parametric shape(s) and or parametric component(s)
     to the Reactor object. This allows collective operations to be
     performed on all the shapes in the reactor. When adding a shape or
     component the stp_filename of the shape or component should be unique"""
     if hasattr(self, "create_solids"):
         ignored_keys = ["reactor_hash_value"]
         if get_hash(self, ignored_keys) != self.reactor_hash_value:
             self.create_solids()
             self.reactor_hash_value = get_hash(self, ignored_keys)
     return self._shapes_and_components
Пример #3
0
    def points(self):
        """Sets the Shape.point attributes.

        Args:
            points (a list of lists or tuples): list of points that create the
                shape

        Raises:
            incorrect type: only list of lists or tuples are accepted
        """
        ignored_keys = ["_points", "_points_hash_value"]
        if hasattr(self, 'find_points') and \
                self.points_hash_value != get_hash(self, ignored_keys):
            self.find_points()
            self.points_hash_value = get_hash(self, ignored_keys)

        return self._points