Tłumienie, przywracanie i usuwanie operacji
Supressing, Unsupressing, and Removing Features
Pokazuje, jak sterować tłumieniem, przywracaniem i usuwaniem operacji oraz szkiców. Można używać w połączeniu z dodawaniem, blokowaniem i odblokowywaniem konfiguracji.
# create a partP = Part('Example Part')
# create a cubeCubeSketch = P.AddSketch('CubeProfile', P.GetPlane('XY-Plane'))CubeSketch.AddRectangle(0, 0, 10, 10, False)CubeFeature = P.AddExtrudeBoss('Cube', CubeSketch, 10, True)
# cut a hole in the cubeHoleSketch = P.AddSketch('HoleProfile', P.GetPlane('XY-Plane'))HoleSketch.AddRectangle(2, 2, 8, 8, False)HoleFeature = P.AddExtrudeCut('Hole', HoleSketch, 10, True)
# suppress the cube using the name of the featureP.SuppressFeature('Cube')# unsuppress the cube using the feature objectP.UnsuppressFeature(CubeFeature)
# remove the hole using the name of the featureP.RemoveFeature('Hole')# remove the hole sketch using the sketch objectP.RemoveSketch(HoleSketch)