Example #1
0
    def operate(self,design):
        import popupcad_manufacturing_plugins.algorithms.toolclearance as toolclearance
        ls1 = design.op_from_ref(self.operation_link1).output[self.getoutputref()].csg

        if self.keepout_type == self.keepout_types.laser_keepout:
            toolclearance = toolclearance.laserclearance(ls1)
        elif self.keepout_type == self.keepout_types.mill_keepout:
            toolclearance = toolclearance.millclearance(ls1)
        elif self.keepout_type == self.keepout_types.mill_flip_keepout:
            toolclearance = toolclearance.millflipclearance(ls1)
        else:
            raise(Exception('keepout type'))
            
        return toolclearance
Example #2
0
    def operate(self, design):
        import popupcad_manufacturing_plugins.algorithms.toolclearance as toolclearance
        operation_ref, output_index = self.operation_links['parent'][0]

        ls1 = design.op_from_ref(operation_ref).output[output_index].csg

        if self.keepout_type == self.keepout_types.laser_keepout:
            toolclearance = toolclearance.laserclearance(ls1)
        elif self.keepout_type == self.keepout_types.mill_keepout:
            toolclearance = toolclearance.millclearance(ls1)
        elif self.keepout_type == self.keepout_types.mill_flip_keepout:
            toolclearance = toolclearance.millflipclearance(ls1)
        else:
            raise Exception

        return toolclearance