Poor man's (single width) slotting

Here's the place for discussion related to CAM/CNC and the development of the Path module.
mlampert
Posts: 1458
Joined: Fri Sep 16, 2016 9:28 pm

Poor man's (single width) slotting

Postby mlampert » Tue Oct 30, 2018 1:30 am

I thought it might be worthwhile to share an example of how one can do single pass slots - today. It has come up a few times and I'm not sure my verbal explanations make that much sense, so here is a screenshot and the file to play with.
Capture.PNG
Capture.PNG (10.17 KiB) Viewed 906 times
For simplicity reasons I just used the default tool. Note that the depth (Z - level) of the two edges does not have to match, you can adjust through the operation parameters.

Also, if you have simple slot (no overhangs) you can use multi passes by using a more sensible "step down" value ;)
Attachments
slot.fcstd
(28.19 KiB) Downloaded 57 times
User avatar
sliptonic
Posts: 1633
Joined: Tue Oct 25, 2011 10:46 pm

Re: Poor man's (single width) slotting

Postby sliptonic » Tue Oct 30, 2018 2:31 am

Excellent explanation!

If you don't mind, I might make this the subject of a video.
mlampert
Posts: 1458
Joined: Fri Sep 16, 2016 9:28 pm

Re: Poor man's (single width) slotting

Postby mlampert » Tue Oct 30, 2018 3:02 am

sliptonic wrote:
Tue Oct 30, 2018 2:31 am
If you don't mind, I might make this the subject of a video.
That would be really great - I always learn something from your videos :D
chrisb
Posts: 21407
Joined: Tue Mar 17, 2015 9:14 am

Re: Poor man's (single width) slotting

Postby chrisb » Tue Oct 30, 2018 6:39 am

Great example. I always thought that engraving worked only on ShapeStrings; good to see it works on sketches too. Is it possible to extend it so that it can operate on arbitrary edges too? That would make FromShape obsolete. The latter would probably need much more love to get integrated in the Job concept.

Back to the example: As soon as I select an edge of the sketch I get an error message in report view:

Code: Select all

PathCommands.ERROR: Failed to create face from wire
Traceback (most recent call last):
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathCommands.py", line 73, in IsActive
    self.active = self.formsPartOfALoop(sel.Object, sel.SubObjects[0], sel.SubElementNames)
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathCommands.py", line 114, in formsPartOfALoop
    if len(names) == 1 and horizontalEdgeLoop(obj, sub):
  File "/Users/cb/Desktop/FreeCAD.app/Contents/Mod/Path/PathScripts/PathUtils.py", line 241, in horizontalEdgeLoop
    loops = [w for w in wires if all(PathGeom.isHorizontal(e) for e in w.Edges) and PathGeom.isHorizontal(Part.Face(w))]
OCCError: Failed to create face from wire
After that everything works as expected.

My version is a bit outdated due to Mac compile issues.
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14976 (Git)
Build type: Release
Branch: (HEAD detached at e79a19828)
Hash: e79a19828e2e92269ff96110dfeadaa245ad17c2
Python version: 2.7.15
Qt version: 5.11.2
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
chrisb
Posts: 21407
Joined: Tue Mar 17, 2015 9:14 am

Re: Poor man's (single width) slotting

Postby chrisb » Tue Oct 30, 2018 7:03 am

No issues in current Ubuntu:

OS: Ubuntu 16.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15099 (Git)
Build type: Release
Branch: master
Hash: 1538a14eca0879be3d223930f7e5f78d4a24691c
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
mlampert
Posts: 1458
Joined: Fri Sep 16, 2016 9:28 pm

Re: Poor man's (single width) slotting

Postby mlampert » Tue Oct 30, 2018 3:48 pm

chrisb wrote:
Tue Oct 30, 2018 6:39 am
Is it possible to extend it so that it can operate on arbitrary edges too?
it does - or should, as long as we're talking about edges on a base model.

I'll have a look at the error tonight.
chrisb
Posts: 21407
Joined: Tue Mar 17, 2015 9:14 am

Re: Poor man's (single width) slotting

Postby chrisb » Tue Oct 30, 2018 6:19 pm

mlampert wrote:
Tue Oct 30, 2018 3:48 pm
I'll have a look at the error tonight.
Don't spend your time on that. There is no current MacOS version and the error does not occur in a current (Ubuntu) version.
User avatar
jmr
Posts: 31
Joined: Fri Feb 09, 2018 3:32 pm

Re: Poor man's (single width) slotting

Postby jmr » Mon Nov 26, 2018 6:38 pm

wohooo!
I got v0.18 working, and now this example just works. This makes life now much easier with more than one object as a base for Job.
Thanks!
leonardshelby
Posts: 50
Joined: Sat Feb 24, 2018 6:09 pm

Re: Poor man's (single width) slotting

Postby leonardshelby » Wed Dec 12, 2018 11:44 am

@mlampert: How did you get your sketch to show up as 2d feature when creating a new path job? It works fine on your sample file here, but on my own files it only shows solids to select.

My Version Info:
OS: macOS 10.14
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15363 (Git)
Build type: Release
Branch: master
Hash: 9be3e633328335f1172456f5857219b7a08c70a5
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Attachments
Screenshot 2018-12-12 at 12.37.17.png
Screenshot 2018-12-12 at 12.37.17.png (254.98 KiB) Viewed 574 times
mlampert
Posts: 1458
Joined: Fri Sep 16, 2016 9:28 pm

Re: Poor man's (single width) slotting

Postby mlampert » Wed Dec 12, 2018 6:35 pm

leonardshelby wrote:
Wed Dec 12, 2018 11:44 am
@mlampert: How did you get your sketch to show up as 2d feature when creating a new path job? It works fine on your sample file here, but on my own files it only shows solids to select.
Just create a Sketch as a root object in the tree. If you post your file I can have a look.