gumyr / build123d

A python CAD programming library
Apache License 2.0
382 stars 72 forks source link

project not working in algebra mode #602

Open MatthiasJ1 opened 3 months ago

MatthiasJ1 commented 3 months ago

Note from discord with workaround

project needs some work in Algebra mode. Here is how it can be done with project_to_shape though:

quarter_ring = extrude(
(Circle(0.25) - Circle(0.24)) & Rectangle(1, 1, align=Align.MIN, rotation=45), 0.125
)
to_project: Face = (
Plane.XZ * Trapezoid(0.23, 0.085, 85, align=(Align.CENTER, Align.MIN)).face()
)
projection = to_project.project_to_shape(quarter_ring, direction=(0, 1, 0))[0]
quarter_ring -= thicken(projection, -0.01)