Contour by Face and Contour by Edges fails

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!
herbk
Veteran
Posts: 2661
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Contour by Face and Contour by Edges fails

Post by herbk »

Hi Memfis,

for only creating a milling path you may be right.

But usualy we make the whole construction with FC, including Fem simulations and output for presentations.
Gruß Herbert
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Contour by Face and Contour by Edges fails

Post by freman »

If you turn on debug and trackModule for PathUtils
could you explain how to do that? There are some handy output tools like Base:Console().Message which are accessible in /Mod/Path/App but do not work in /Mod/Path/libarea.

There seem to be some switches which can be set run-time via python but does this require full rebuild? ( 3h here ).
Russ4262
Posts: 953
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Contour by Face and Contour by Edges fails

Post by Russ4262 »

Evening Freman,
freman wrote: Wed Jan 22, 2020 6:02 pm
If you turn on debug and trackModule for PathUtils
could you explain how to do that? There are some handy output tools like Base:Console().Message which are accessible in /Mod/Path/App but do not work in /Mod/Path/libarea.

There seem to be some switches which can be set run-time via python but does this require full rebuild? ( 3h here ).
Open the PathWB module of your choice in the PathScripts directory.
Look for a line similar to the one below - usually one or two lines after the initial import modules section at the beginning/top of the file.

Code: Select all

PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())
Change the capital INFO to DEBUG (all caps).
Reload the module or restart FreeCAD.

If your computer starts lighting up, buzzing, and shaking, step away from the terminal, lest you be sucked down a worm hole to another PathWB dimension.

… Or, you can just close the lid on your laptop. You know, whatever works.

Cheers mate,
Russ
chrisb
Veteran
Posts: 54303
Joined: Tue Mar 17, 2015 9:14 am

Re: Contour by Face and Contour by Edges fails

Post by chrisb »

If you open the parameter editor (Menu->Tools->Parameters) the very first folder is "LogLevels". It has a parameter "Path.Area". Can this be used to get debug output out of libarea calls?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: Contour by Face and Contour by Edges fails

Post by freman »

thanks to both of you for the replies. Swapping WB is a nice trick, I'd been wasting time closing FC and restarting.

That covers the question as posed in relation to the python code here, I have a similar problem getting output from some parts of the c++ code but I'll start a separate thread about that to avoid distracting this one.

https://forum.freecadweb.org/viewtopic.php?f=15&t=42682
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Contour by Face and Contour by Edges fails

Post by realthunder »

PR submitted here.

It is most likely an OCC bug in the discretization method I choose for B-spline, with OCC class GCPnts_QuasiUniformDeflection. Change it to GCPnts_UniformDeflection works. There are other discretization methods available. You can check the Python doc string of TopoShapeWire.discretize() for more info. If it is necessary in the future, I can expose these methods as additional parameter in Path.Area.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Contour by Face and Contour by Edges fails

Post by uwestoehr »

realthunder wrote: Fri Jan 24, 2020 12:07 am PR submitted here.
This PR went in, but now I cannot compile:

Code: Select all

2>D:\FreeCADGit\src\Mod\Path\App\Area.cpp(367): error C2065: 'GCPnts_UniformDeflection': undeclared identifier
To fix this, I must add the line

Code: Select all

# include <GCPnts_UniformDeflection.hxx>
outside the #ifndef _PreComp_ block.

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19373 (Git)
Build type: Release
Branch: master
Hash: 1f89710979b6a4f9b33c6add986fbcc7102a12df
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Contour by Face and Contour by Edges fails

Post by mlampert »

Interesting, I built it and didn't have that problem. Is this Windows build specific?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Contour by Face and Contour by Edges fails

Post by uwestoehr »

mlampert wrote: Sun Jan 26, 2020 2:49 am Is this Windows build specific?
I don't know since I only have Windows and MSVC 2017 and I compile according to Compile on Windows.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Contour by Face and Contour by Edges fails

Post by realthunder »

uwestoehr wrote: Sun Jan 26, 2020 2:15 am This PR went in, but now I cannot compile:
Fixed here. There is a missing header in Windows precompiled header.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
Post Reply