Skip to content

Path: Prefer Shape.tessellate() over MeshPart.meshFromShape() to tess…

Jonathan Wiedemann requested to merge github/fork/lava/master into master

Created by: lava

…elate surfaces.

Thank you for creating a pull request to contribute to FreeCAD! To ease integration, please confirm the following:

  • Branch rebased on latest master git pull --rebase upstream master
  • Unit tests confirmed to pass by running ./bin/FreeCAD --run-test 0
  • Commit message is well-written
  • Commit message includes issue #<id> or fixes #<id> where <id> is the associated MantisBT issue id if one exists

And please remember to update the Wiki with the features added or changed once this PR is merged.
Note: If you don't have wiki access, then please mention your contribution on the 0.19 Changelog Forum Thread.


Hey,

this is a bit of a mixture between a bug report and a patch, so apologies if I'm screwing up the process a bit.

I have a fairly simple workpiece: Screenshot from 2019-04-17 22-34-42

And wanted to create milling toolpaths using the experimental 3d surface feature. However, the result was pretty terrible: (the grey shape shows the mesh returned by meshFromShape(), the black area is a hole with z = 0) Screenshot from 2019-04-17 22-31-19

A better result can be obtained by changing the Deviation parameter, although I had to do that by editing the source since I did not find a GUI element to change that parameter. However, even doing that the result still looked inferior to the mesh returned by shape.tessellate(0.5). Here's the result after applying this PR:

Screenshot from 2019-04-17 22-28-52

Of course, I don't really have any other test pieces for this code change, so if this screws up meshing for some other shapes it might be better to instead expose the Deviation parameter(s) so that they can be adjusted by the user.

Merge request reports