示例#1
0
 def scale(self, scale):
     """scale(
     scale:float list  - scaling factors along the axes of the object
     ).
     
     Function that scales the object along the axes
     with the factors given by the scale vector
     """
     if sc: 
         self.obj = ocaml.body_scaled(self.obj,scale)
示例#2
0
    def scale(self, scale = []):
        """scale(scale:float list, sc:bool).

        Function that scales the object with a factor
        given by the entry of the scale list on the
        corresponding axis. Bounding box is NOT updated.
        """
        if scale == []:                              # default scale 
            for i in range(len(self.bbox[0])):
                scale.append(1.0)
                
        new_obj = []                                 # create new object
        for obj in  self.obj:
            new_obj.append(ocaml.body_scaled(obj,scale))

        self.obj = new_obj                           # update current object