# Using a Curved Surface as a Face for a Prism

I'm experimenting with simulating a 3 axis CNC mill. Currently I'm trying to simulate a cylindrical endmill. I was wanting to simulate the cutting edge (after it's plunged and starts to move) by essentially creating a half circle (in the direction of the cut), extruded up along the Z axis for the length of the cutting surface. I could then use this shape to do a boolean subtraction on the "stock" piece to simulate the cut (and simulate the initial plunge with straight cylinders). I'm currently doing this via Python, but I don't think the problem I'm having is unique to the Python wrappers. I'm happy to post this or have it moved to other forums if it makes more sense.

I did a bit of Googling for how to create a face that's basically curved. It sounded like the best approach was using the BRepFill_BRepFilling class to make this happen and define the edges of the face as two arcs connected with straight lines.

This approach mostly works, but this face seems to have a bulge in the center of it. (See photo here: https://db.tt/ra1Ea5QO). Is there a better way to approach this problem?

Should it prove useful, the Python code I'm using is here: http://pastebin.com/hH4hFYy6

Thanks,
Kent

Well I went back to basics to try what I originally had problems with and went with a much simpler solution. I think my problem back then was not understanding the implications of wires vs. edges. I know I read someone claiming that the BRepPrimAPI_MakePrism couldn't handle non-planar faces, but that doesn't appear to be an issue.

The code that worked for me if someone else comes across it is here: http://pastebin.com/iPhAn4KR