Skip to content

Draft: Implement fillet & chamfer support for cylinders

Thomas Wiebe requested to merge twiebe/muscad:cylindrical_volume into master

This is still a work in progress.

It implements a new complex model CylindricalVolume, which is a cylinder that supports fillet, chamfer, reverse fillet and reverse chamfer operations. (and some minor bug fixes, that we could also extract into their own MR)

Implementation of fillet and chamfer functionality is based on OpenSCAD's rotate_extrude(). This failed with the existing Fillet and Chamfer classes. (for Fillet due to crossing axis-boundaries, for Chamfer I couldn't tell exactly.)

There were two approaches available:

  1. create new fillet and chamfer classes, just for the CylindricalVolume use-case
  2. modify the existing to work in both scenarios.

In this draft I went with the latter, for the sake of consistency.

The modified versions do, however, cause slightly different results, which can be compared by rendering just them. Also,Chamfer itself won't extrude anymore, so that it can either be extruded in linear or rotate.

I'm not completely certain that this implementation is necessarily better/more correct. Perhaps we can find out. There is, of course, also the argument of whether to break existing code. In any way, I did modify existing uses of Fillet and Chamfer to accommodate for the changes.

I'd love some input.

Edited by Thomas Wiebe

Merge request reports