def create_solid(self): solid = super().create_solid() segments_cutters = self.segments_cutters if segments_cutters is not None: solid = cut_solid(solid, segments_cutters) self.solid = solid return solid
def create_solid(self): solid = super().create_solid() self.leg_shape.points = self.leg_points self.leg_shape.distance = self.distance self.leg_shape.azimuth_placement_angle = \ self.azimuth_placement_angle solid = union_solid(solid, self.leg_shape) solid = cut_solid(solid, self.magnet) self.solid = solid return solid
def perform_boolean_operations(self, solid: cq.Workplane, **kwargs): """Performs boolean cut, intersect and union operations if shapes are provided""" # If a cut solid is provided then perform a boolean cut if self.cut is not None: solid = cut_solid(solid, self.cut) # If a wedge cut is provided then perform a boolean cut # Performed independantly to avoid use of self.cut # Prevents repetition of 'outdated' wedge cuts if 'wedge_cut' in kwargs: if kwargs['wedge_cut'] is not None: solid = cut_solid(solid, kwargs['wedge_cut']) # If an intersect is provided then perform a boolean intersect if self.intersect is not None: solid = intersect_solid(solid, self.intersect) # If an intersect is provided then perform a boolean intersect if self.union is not None: solid = union_solid(solid, self.union) return solid
def perform_boolean_operations(self, solid): """Performs boolean cut, intersect and union operations if shapes are provided""" # If a cut solid is provided then perform a boolean cut if self.cut is not None: solid = cut_solid(solid, self.cut) # If an intersect is provided then perform a boolean intersect if self.intersect is not None: solid = intersect_solid(solid, self.intersect) # If an intersect is provided then perform a boolean intersect if self.union is not None: solid = union_solid(solid, self.union) self.solid = solid self.hash_value = self.get_hash() return solid
def create_solid(self): solid = super().create_solid() solid = cut_solid(solid, self.main_cutting_shape) self.solid = solid return solid