Exemplo n.º 1
0
    def intersect(self,other):
        """intersect( obj ).

        Function to take the intersection of the
        mesh object obj with the present object.
        """
        new_obj = []                                 # create new object
        for other_obj in other.obj:
            for obj in self.obj:
                new_obj.append(ocaml.body_intersection([obj,other_obj]))

        self.obj = new_obj                           # update current object
Exemplo n.º 2
0
    def intersect(self,obj):
        """intersect( obj ).
        
        Function to take the intersection of the
        mesh object obj with the present object.
        Only one object can be intersected with
        the present object.
        """

        try:
            if type(obj.obj) == type(self.obj):
                other_obj = obj
        except:
            raise TypeError("Type mismatch for object intersection")

        self.obj = ocaml.body_intersection([self.obj,other_obj.obj])