|
poziția meniului |
---|
Part → Chamfer |
Workbenches |
Part, Complete |
scurtătură |
nici unul |
A se vedea, de asemenea, |
Chamfers the selected edge(s) of an object. A dialog allows you to choose which edge(s) to work on as well as modify various chamfer parameters.
Base
The Chamfer tool can by used in macros and from the python console by adding a Chamfer object to the document.
Example Script:
import Part cube = FreeCAD.ActiveDocument.addObject("Part::Feature", "myCube") cube.Shape = Part.makeBox(5, 5, 5) chmfr = FreeCAD.ActiveDocument.addObject("Part::Chamfer", "myChamfer") chmfr.Base = FreeCAD.ActiveDocument.myCube myEdges = [] myEdges.append((1, 1.5, 1.25)) # (edge number, chamfer start length, chamfer end length) myEdges.append((2, 1.5, 1.25)) myEdges.append((3, 1.5, 1.25)) myEdges.append((4, 1.5, 1.25)) myEdges.append((5, 1.5, 1.25)) myEdges.append((6, 1.5, 1.25)) myEdges.append((7, 1.5, 1.25)) myEdges.append((8, 1.5, 1.25)) myEdges.append((9, 1.5, 1.25)) myEdges.append((10, 1.5, 1.25)) myEdges.append((11, 1.5, 1.25)) myEdges.append((12, 1.5, 1.25)) chmfr.Edges = myEdges FreeCADGui.ActiveDocument.myCube.Visibility = False
Example Script Explanation:
import Part cube = FreeCAD.ActiveDocument.addObject("Part::Feature", "myCube") cube.Shape = Part.makeBox(5, 5, 5)
chmfr = FreeCAD.ActiveDocument.addObject("Part::Chamfer", "myChamfer")
chmfr.Base = FreeCAD.ActiveDocument.myCube
myEdges = [] myEdges.append((1, 1.5, 1.25)) # (edge number, chamfer start length, chamfer end length) myEdges.append((2, 1.5, 1.25)) myEdges.append((3, 1.5, 1.25)) myEdges.append((4, 1.5, 1.25)) myEdges.append((5, 1.5, 1.25)) myEdges.append((6, 1.5, 1.25)) myEdges.append((7, 1.5, 1.25)) myEdges.append((8, 1.5, 1.25)) myEdges.append((9, 1.5, 1.25)) myEdges.append((10, 1.5, 1.25)) myEdges.append((11, 1.5, 1.25)) myEdges.append((12, 1.5, 1.25))
chmfr.Edges = myEdges
FreeCADGui.ActiveDocument.myCube.Visibility = False