gumyr / build123d

A python CAD programming library
Apache License 2.0
512 stars 86 forks source link

Revolve not working with all faces of a sketch #229

Closed jdegenstein closed 1 year ago

jdegenstein commented 1 year ago

image This code generates the above image:

from build123d import *

with BuildPart() as rev:
    with BuildSketch() as texts:
        with Locations((0,90,0)):
            Text("Some",50,font='Arial',font_style=FontStyle.REGULAR)
        with Locations((0,50,0)):
            Text("Text!",50,font='Arial Black',font_style=FontStyle.BOLD)
    #revolve(texts.sketch.faces(),axis=Axis.X,revolution_arc=45)
    for i in texts.sketch.faces():
        revolve(i,axis=Axis.X,revolution_arc=45)
#show_object(texts.sketch)
show_object(rev.part)

This code only generates one of the revolved shapes:

from build123d import *

with BuildPart() as rev:
    with BuildSketch() as texts:
        with Locations((0,90,0)):
            Text("Some",50,font='Arial',font_style=FontStyle.REGULAR)
        with Locations((0,50,0)):
            Text("Text!",50,font='Arial Black',font_style=FontStyle.BOLD)
    revolve(texts.sketch.faces(),axis=Axis.X,revolution_arc=45)
#show_object(texts.sketch)
show_object(rev.part)

image

gumyr commented 1 year ago

revolve was keeping only the last revolved face - fixed. image