I have changed 'Outline=True' behavior. It does proper projection now, so that you can throw in any type of faces (non-workplane-parallel, non-planar, etc) and still get correct result. makeSections() now uses the same code to get projection. The 'project' parameter in makeSections, or 'Project' parameter in Path.Area, is independent with 'Outline' parameter in Path.Area. More specifically, 'project' or 'Project' controls whether you get sliced section, or projected outline sections, and is only effective when you have solid and trying to make section. 'Outline' will have effect if you are not making sections. So by simply setting 'Outline' to True, you'll get a single outline face at the work plane.sliptonic wrote:Huh. That's weird. It's not in the model which is just made from stacked and cut cylinders. The gap occurs with the selected faces compounded together. Must be an OCC/tolerance/rounding thing.
I've also somewhat fixed the artifacts problem. The actual cause of this problem is that, previously, projection is done separately on each shape faces. So two faces are projected separately, and then unioned together, causing rounding error. I've fixed that. Now, as long as the two faces are in the same shape/compound, it will be projected together. Faces not in the same compound are still projected separately, because you may add shapes for different operations, like cut, intersect, etc.
In summary, this will give you the correct result without artifacts
Code: Select all
shape = Path.Area(Outline=True).add(Part.makeCompound([face1,face2,face3])).getShape()
Part.show(shape)
I've also fixed a work plane direction problem. For some shapes, like the Cut shape in your file, all faces have reversed OCC orientation for some reason. This causes the auto selected work plane having the wrong normal (0,0,-1), and in turn, causes section error (i.e. wrong section direction, which means setting SectionCount=-1 will give you only one section). I've now forced the normal to point toward the positive axis direction if the selected plane aligns with X, Y or Z plane. This direction problem may also cause projection failure if your manually set a work plane with (0,0,1) direction. It has also been fixed. Please try it out.