mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
De-emphasizing Workplanes
This commit is contained in:
parent
caa72c7430
commit
af52e032be
19 changed files with 131 additions and 122 deletions
|
|
@ -43,24 +43,24 @@ with BuildPart() as handle:
|
|||
|
||||
# Create the cross sections - added to pending_faces
|
||||
for i in range(segment_count + 1):
|
||||
with Workplanes(
|
||||
with BuildSketch(
|
||||
Plane(
|
||||
origin=handle_path @ (i / segment_count),
|
||||
z_dir=handle_path % (i / segment_count),
|
||||
)
|
||||
):
|
||||
with BuildSketch() as section:
|
||||
if i % segment_count == 0:
|
||||
Circle(1)
|
||||
else:
|
||||
Rectangle(1.25, 3)
|
||||
Fillet(*section.vertices(), radius=0.2)
|
||||
) as section:
|
||||
if i % segment_count == 0:
|
||||
Circle(1)
|
||||
else:
|
||||
Rectangle(1.25, 3)
|
||||
Fillet(*section.vertices(), radius=0.2)
|
||||
# Record the sections for display
|
||||
sections = handle.pending_faces
|
||||
|
||||
# Create the handle by sweeping along the path
|
||||
Sweep(multisection=True)
|
||||
|
||||
assert abs(handle.part.volume - 94.77361455046953) < 1e-5
|
||||
|
||||
if "show_object" in locals():
|
||||
show_object(handle_path.wrapped, name="handle_path")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue