CadQuery / cadquery

A python parametric CAD scripting framework based on OCCT
https://cadquery.readthedocs.io
Other
2.93k stars 276 forks source link

Closes #786 Asymmetric Chamfer Error #1579

Open kolod opened 1 month ago

kolod commented 1 month ago

Closes #786 Asymmetric Chamfer Error

cadquery uses random edge face when call into chamfer_builder.Add()

Fix uses face on which edge selected in chamfer_builder.Add() call

Example:

Workplane().box(10, 10, 10).faces("<X").chamfer(1, 2)

image

If both faces of the edge are selected chamfer now uses length2 for length to prevent unexpected behavior.

Example:

Workplane().box(10, 10, 10).faces("<Y or <X").edges("|Z").chamfer(1, 2)

image

adam-urbanczyk commented 1 month ago

Thanks for the PR, but looks like you still fail on mypy (annotations) and call show from the test which causes an error on azure. We'll probably need to discuss the proposed semantics too.