Skip to content

Selecting a Face when adding a sketch #505

Answered by gumyr
Hecatron asked this question in Q&A
Discussion options

You must be logged in to vote

Use Locations, GridLocations, etc. (see https://build123d.readthedocs.io/en/latest/key_concepts.html#locations-context) to position objects within Builders as follows:

with BuildPart() as ex1:
    Cylinder(radius=10, height=3)
    with Locations(ex1.faces().sort_by(Axis.Z)[-1]):
        add(sketch1)
    extrude(amount=-2, mode=Mode.SUBTRACT)

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Hecatron
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants