Created
October 14, 2025 10:35
-
-
Save stephensmitchell/abb95c5a90cedd5e62a8901a571b2fac to your computer and use it in GitHub Desktop.
Supressing Unsupressing and Removing Features
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #https://help.alibre.com/articles/#!alibre-help-v28/supressing-unsupressing-and-removing-features | |
| # create a part | |
| P = Part('Example Part') | |
| # create a cube | |
| CubeSketch = 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 cube | |
| HoleSketch = 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 feature | |
| P.SuppressFeature('Cube') | |
| # unsuppress the cube using the feature object | |
| P.UnsuppressFeature(CubeFeature) | |
| # remove the hole using the name of the feature | |
| P.RemoveFeature('Hole') | |
| # remove the hole sketch using the sketch object | |
| P.RemoveSketch(HoleSketch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment