DraftAngle can be used to apply an angle to specific faces of a shape. Specify the
faces to perform the draft angle on. It will use the
direction to define the neutral plane. If more control is needed, an
operations list can be provided with a face, direction, angle, and neutral plane for each face.
Like Fillet and Chamfer, the
disabled flag can be used to disable the operation for debugging.
# Created in DeclaraCAD from math import radians from declaracad.occ.api import * from declaracad.parts.display import Axis enamldef Assembly(Part): Axis: pass DraftAngle: transparency = 0.5 angle = radians(15) position = (0, 0, box.dz) faces = [self.children.topology.faces] Fillet: radius = 1 operations = [ e for i, e in enumerate(box.topology.edges) if i in (4, 6) ] Box: box: dx = 10 dy = 12 dz = 10
Note: The algorithm will select adjacent faces automatically when fillets are present.
Another example demonstrating how to easily add an angled pitch to walls using draft angle which may be of use for making molds or castings.
# Created in DeclaraCAD from math import radians from declaracad.occ.api import * from declaracad.parts.display import Axis enamldef Assembly(Part): Axis: pass DraftAngle: angle = radians(-10) faces = self.children.topology.faces[0:4] ThickSolid: offset = -1 faces = [box.topology.faces] Box: box: position = (-dx/2, -dy/2) dx = 10 dy = 20 dz = 5