3D Surface: 4th-axis Integration and more...

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: 3D Surface: 4th-axis Integration and more...

Post by sliptonic »

jbi wrote: Wed May 15, 2019 4:39 pm I am just following this topic and i am curious how you do the sampling of the mesh. Are you using the shape to STL export?
Read back in this thread a bit.
We've looked at several methods and Russ is now using MeshPart.meshFromShape() which seems to give better results.
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: 3D Surface: 4th-axis Integration and more...

Post by RatonLaveur »

Hello gents,

So my non coding, low poly brain can understand, here a few statements:
1. we all at some point over the last years and last few posts identified that surface machining needed a better mesh to work from than the original underlying mesh coming out of a designed part. True?
2. In the midst of several contributors linking their brains and coding powers together for the greater good, Russ has offered the automatic use of the existing MeshFromShape tool. True?
3. At what point in the process does the meshing occur?

Thanks a bunch this is fascinating.
Russ4262
Posts: 951
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: 3D Surface: 4th-axis Integration and more...

Post by Russ4262 »

Hold everything!
RatonLaveur wrote: Wed May 15, 2019 7:04 pm ..., Russ has offered the automatic use of the existing MeshFromShape tool. True?
NOT TRUE. @Sliptonic began the 3D Surface op with the meshFromShape() method orignally ! He then recently, Generating Meshes for Path Operations did further investigating into options for mesh creation for 3D Surface. HIS results there prompted a tweaking in the current operation - yielding a better mesh as the basis for OCL.

Credit goes to @Sliptonic for the meshFromShape() usage, and improvement of late. He knows what he is doing. :)

Credit where it is due, Gents.

Russell
User avatar
roerich_64
Veteran
Posts: 1465
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: 3D Surface: 4th-axis Integration and more...

Post by roerich_64 »

Russ4262 wrote: Wed May 15, 2019 3:17 pm I'll have to wait until I am back at the house.

Russell
No Problem, Russ.

BTW: my Graphic Cards in one mashine:
Experimental_IV.jpg
Experimental_IV.jpg (74.38 KiB) Viewed 1445 times
Experimental_V.jpg
Experimental_V.jpg (38.15 KiB) Viewed 1445 times
No problem to see anything of FC...

Please do not say 'Sir' to me ... I'll always fold my heels together ... and that always hurts so much ;-)
I am a small man (196cm / 115kg) from the northern pampas of germany. Just tell Walter to me. That fits best ;-)

with respect
Walter
Die Liebe wird siegen, denn sie ist unzerstörbar :) ;)
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: 3D Surface: 4th-axis Integration and more...

Post by sliptonic »

Russ4262 wrote: Wed May 15, 2019 7:38 pm Credit goes to @Sliptonic for the meshFromShape() usage, and improvement of late. He knows what he is doing. :)
Well, even a blind pig can find an acorn once in a while. But in this case, I'm not even the blind pig.

Julian pointed out that meshFromShape() gave a better result way back in October.

https://forum.freecadweb.org/viewtopic. ... 14#p265826

Credit's aside, there are several methods for tessellating a solid to a mesh available in FreeCAD. I wouldn't be surprised if no one single method is always superior. Maybe it is, but maybe not. That's why more experiments and brains are needed.
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: 3D Surface: 4th-axis Integration and more...

Post by RatonLaveur »

Apologies, it's always difficult to give adequate credit, because we want to, and sometimes ideas are mixing so fast that the source of inception is not quite certain. So credit to Y'all.
And Y'all are insane just casting credit willy nily on T'other.

I digress, to go back to my question if you'll indulge my curiosity: when does the re-meshing occur in the process?

And to perhaps throw a pebble in the pond, if we're thinking of best ways to mesh stuff, maybe we meed Bernd and his crowd of the FEA/FEM/CFD world to give some advice...those guys always think of meshing efficiently and accurately.
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: 3D Surface: 4th-axis Integration and more...

Post by sliptonic »

RatonLaveur wrote: Wed May 15, 2019 9:36 pm I digress, to go back to my question if you'll indulge my curiosity: when does the re-meshing occur in the process?

And to perhaps throw a pebble in the pond, if we're thinking of best ways to mesh stuff, maybe we meed Bernd and his crowd of the FEA/FEM/CFD world to give some advice...those guys always think of meshing efficiently and accurately.
I haven't found the mesh call to be expensive so we do it right before we need the mesh as part of calculating the tool path. The mesh doesn't stick around, it's just calculated, used by OCL and thrown away.

Anything Bernd et al can offer is greatly appreciated.
Russ4262
Posts: 951
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: 3D Surface: 4th-axis Integration and more...

Post by Russ4262 »

Evening, Si... Walter ;)
roerich_64 wrote: Wed May 15, 2019 8:16 pm Please do not say 'Sir' to me ... Walter
Okay. Walter it is.

I'd like to help you get your OCL and Experimental Features issues resolved. At risk of asking a lot, I will do so if you have the time. I am on a Windows 10 machine, but it is newer. See attached image. My theory is that settings from other the other FreeCAD installs are affecting the latest FreeCAD_0.19.16699_x64_LP_12.1.2_PY3QT5-WinVS2015 release. So, I have done the following on my machine with that release. It works correctly with OCL and Experimental Features available.
  1. Open a working version of FreeCAD in which you have tools setup in the Tool Manager (Tool Library).
  2. Go to Path workbench.
  3. Open the Tool Manager (Tool Library).
  4. Export to a location of your choice.
  5. Close FreeCAD.
    -
  6. Open Windows File Explorer and paste " %USERPROFILE%\AppData\Roaming\FreeCAD " in the location bar, press enter key.
  7. RENAME the 'system.cfg' and 'user.cfg' files to something like 'system-old.cfg' and 'user-old.cfg'.
    -
  8. Navigate to your FreeCAD_0.19.16699_x64_LP_12.1.2_PY3QT5-WinVS2015.7z compressed release file.
  9. De-compress the release file to a location of your choice.
  10. Navigate to your new FreeCAD_0.19.16699 folder.
  11. Install latest PathSurface.py script: [the 0.19.16699 version has an error]
    • download the newest script manually from: 3D Surface: 4th-axis Integration and more...
    • navigate to 'Mod/Path/PathScripts' folder
    • rename your current PathSurface.py script - to save should you wish to revert
    • paste the downloaded version into the same folder
    • rename the downloaded version to the same as the original, PathSurface.py
    -
  12. Navigate back to your new FreeCAD_0.19.16699 folder.
  13. Navigate to the 'bin' sub-folder.
  14. Run FreeCAD.exe.
  15. Create new document.
  16. Open Part workbench.
  17. Create cube.
  18. Create cylinder.
  19. Make union (fusion) of cube and cylinder
  20. Open Path workbench
  21. Select 'Tools' menu, then 'Edit Parameters'
  22. Select 'Preferences' -> 'Mod' -> 'Path'
  23. Right-click on right side of Parameter Editor window
  24. Select 'New Boolean item'
  25. Enter the name: EnableExperimentalFeatures
  26. Set to 'true'
  27. Click OK to save new item.
  28. Click 'save to disk' button at bottom of Parameter Editor window
  29. Click 'Close'
  30. Save the new 'Unamed: 1' file.
  31. Close FreeCAD.
    -
  32. Re-start same FreeCAD.exe (to allow Experimental Features to load)
  33. Open the new file you just created.
  34. Open Path workbench
  35. Create new Path Job, use 'Fusion' for model
  36. Click OK to create the Path Job.
  37. Locate 3D Surface (with 3D Pocket tool) and click to create operation
  38. Click OK to run operation - no need to change any settings.
  39. A simple 3D Surface path should appear.
No other patches or modifications are necessary for this to work correctly on my Windows machine for the 0.19.16699 release. Deleting (renaming) the the 'system.cfg' and 'user.cfg' files in the " %USERPROFILE%\AppData\Roaming\FreeCAD " folder has solved other issues in the past.

Good luck,
Russell
Attachments
My Windows machine
My Windows machine
russ4262_windows_machine.png (18.38 KiB) Viewed 1390 times
Working 16699 release with OCL and ExperimentalFeatures
Working 16699 release with OCL and ExperimentalFeatures
0.19.16699_3D_Surface-ocl-ExperimentalFeatures.png (147.51 KiB) Viewed 1390 times
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: 3D Surface: 4th-axis Integration and more...

Post by GeneFC »

RatonLaveur wrote: Wed May 15, 2019 7:04 pm So my non coding, low poly brain can understand, here a few statements:
1. we all at some point over the last years and last few posts identified that surface machining needed a better mesh to work from than the original underlying mesh coming out of a designed part. True?
Actually this is not true. The standard designed part in FreeCAD does not have any underlying mesh at all. The model is defined in the so-called "brep" notation, which is a description of the edges of the object.

The meshing occurs when one tries to further process the model, such as in FEM or Path operations.

Not really important for the current discussion, but we should dispel the potential misdirection that somehow the underlying FreeCAD model is inadequate.

Gene
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: 3D Surface: 4th-axis Integration and more...

Post by RatonLaveur »

Dear Gene,

Please don't believe for a second I felt the model to be inadequate! Would I be able to design, techdraw and have my prototypes machined if it was? I don't think so.
I only considered it inadequate for 3D surface tool path generation. Which, let's face it, is a niche in the grand constellation that is FreeCAD.

Thank you so much for the clarification.
Post Reply