Path module merged in master!

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
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Path module merged in master!

Post by yorik »

Great! Thanks for notifying, there were thousands of new posts during the week :) Werner's suggested fixes are in too.
tenphase
Posts: 6
Joined: Sun Jun 07, 2015 1:48 pm

Re: Path module merged in master!

Post by tenphase »

Hi all,

I finally got the master branch to compile with the CAM/Path module on Mac.
(using external KDL 1.3.0, compiling libarea,...)
I plan to put a step by step description of what I had to do once it all will work.
(If it is of any use/interest for others)

Now, when I try to go to the Path workbench, FreeCAD crashes with the following message in the console:
Coin warning in cc_glglue_instance(): Error when setting up the GL context. This can happen if there is no current context, or if the context has been set up incorrectly.
*** Abort *** an exception was raised, but no catch was found.
... The exception is:SIGSEGV 'segmentation violation' detected. Address 0
BTW, I've seen (from the first time I tried to compile FreeCAD) that cmake outputs:
-- Looking for GL/gl.h
-- Looking for GL/gl.h - not found
I'm not sure if that has a relation to this behavior,
but it seems that Apple does not put the headers at the same location.
I've seen on Stakoverflow that it is a common prctice to do the following:
#if defined(__APPLE__)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
Any clue?
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Path module merged in master!

Post by wmayer »

If Werner agrees
Why should I disagree? :roll: Just go ahead!
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Path module merged in master!

Post by wmayer »

Now, when I try to go to the Path workbench, FreeCAD crashes with the following message in the console:
Run FreeCAD in the debugger and let it crash. Afterwards read out the stack trace. This may give us a clue what happens. IMO, it's very unlikely that it's related to Coin or OpenGL.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Path module merged in master!

Post by quick61 »

About how soon can we be expecting the first tutorials and such for Path?

I have been playing around with it senses before it was merged and I have yet to get anything more than the path Profile to do anything close to what I would expect? Selecting a face for a Pocket, the path goes all the way through to the bottom. Profile from edges gives me some very strange flat 2D path on the bottom, even though the edges picked were at some elevation. After creating a tool table with several tools in it, not one of them can be applied to any path, (tool number grayed out in the entry field).

I know things are all still a work in progress, but at this point, I am thinking that I am doing something very wrong as that nothing is working as I would expect it to. Perhaps I am expecting to much at this stage, but at best I can't seem to get anything more than simple 2D paths from it, with no tool definitions.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
danielfalck
Posts: 395
Joined: Fri Oct 07, 2011 8:58 pm
Location: Beaverton,Oregon, USA
Contact:

Re: Path module merged in master!

Post by danielfalck »

Hi Mark,

Sorry for the lack of a tutorial so far. I've been super busy with work and side work lately. A lot of things have been pretty experimental (to say the least) so far.
Here is a little bit of info on how I have been doing things:

1. Create the project- define the file to output gcode to in that project properties
2. Select the Machine object under the project object- pick one of the few post processors that we have created so far. I use the Centroid one because that's the control I have on my mill. The two posts are in the Path/Pathscripts directory- you can copy them anywhere you want and then browse for them through the Machine object post processor dialog.
3. I either create a tool table or import one that I've already created. That is done from the icon that looks like 3 drills- next to the Project icon. Create some tools that have a diameter. Don't worry too much about the other properties- we haven't done anything with them yet.
4. Click on the tool object icon to create a tool that will be used for your first operation. Make sure to give it the right tool number- the next operation - which I will recommend be a Path Profile op (because Pocket doesn't have some logic for picking up tool numbers yet) will automatically populate with the tool you just activated.
5. Select some edges on an object and then select the operation that you want to try out- please try a Path Profile. If you use the first icon, you can select two edges in the direction that you want the path to go and the path will follow all the way around the edge of a solid. If you select the second icon, you need to preselect all edges on an object that you want to cut. Selection is buggy- I know it. Once you have either of these worked out you can post some code.
6. Post some code- select the Project in the object tree and then click on the icon that looks like a little arrow pointing at a piece of paper ("Post Process the selected Object"). That should make a little gcode editor pop up. If the code looks like you expected (it probably won't for now) click 'Ok' in the little pop up editor and the file will be saved.

whew.....

There are a ton of things unfinished. We have so far concentrated on infrastructure and hope to inspire other folks to contribute and help out. You have probably noticed a slant towards CNC milling machines with this workbench so far. That is because those are the machines I have in my personal shop. If I buy a laser engraver or plastic extrusion type machine- you might see me get interested in code for those :)
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Path module merged in master!

Post by quick61 »

Edit - Output for LinuxCNC and the path ran as expected in OpenSCAM simulation. Woo-Ho!

Thank you ever so much for your reply Dan! I was missing a couple of key operations there. Keeping the focus on the mill is just fine with me. There is no want for a good slicer out there for 3D printing, though being able to generate code from a solid, bypassing the meshing, might be a nice feature on down the line. As for laser, I think the only thing missing now to make it work with FreeCAD would be a post processor, but there is a good plugin for Inkscape that will cover that for now.

Please keep the focus on the mill operations. One thing that I see is currently missing (or maybe I'm not getting it) is Z profile, like being able to mill the top of this piece -
Zheight.png
Zheight.png (7.82 KiB) Viewed 2478 times
Keep up the good work and let us all hope that once this gets going, others will take a much more active interest in it in the near future.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
tenphase
Posts: 6
Joined: Sun Jun 07, 2015 1:48 pm

Re: Path module merged in master!

Post by tenphase »

Hello Werner,

It seems to be related to Qt.
But because I do not known Qt,
I put here all the information I gathered in hope it will help you spot where the trouble comes from... ;)

Here is where FreeCAD crashes in lldb:
* thread #1: tid = 0x132e53, 0x00000001043b2136 QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 102, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
frame #0: 0x00000001043b2136 QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 102
QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 102:
-> 0x1043b2136: movl 0x60(%rax,%rcx,4), %ecx
0x1043b213a: btl %ebx, %ecx
0x1043b213d: jb 0x1043b215b ; QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 139
0x1043b213f: leaq 0x131242(%rip), %rcx ; qt_signal_spy_callback_set
Here are the 4 parameters passed to QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**):
(in the correct order)
(lldb) register read rdi rsi rdx rcx rax
rdi = 0x000000011e6023c0
rsi = 0x00000001044d8de0 QtCore`QVariantAnimation::staticMetaObject
rdx = 0x0000000000000000
rcx = 0x0000000000000000
And here is the back trace:
* thread #1: tid = 0x132e53, 0x00000001043b2136 QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 102, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
* frame #0: 0x00000001043b2136 QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 102
frame #1: 0x0000000104276e9a QtCore`QVariantAnimationPrivate::setCurrentValueForProgress(double) + 298
frame #2: 0x0000000104276c4d QtCore`QVariantAnimationPrivate::recalculateCurrentInterval(bool) + 685
frame #3: 0x0000000104279c2b QtCore`QPropertyAnimation::updateState(QAbstractAnimation::State, QAbstractAnimation::State) + 555
frame #4: 0x0000000104274d8f QtCore`QAbstractAnimationPrivate::setState(QAbstractAnimation::State) + 367
frame #5: 0x0000000103a4ba9d QtGui`QWidgetAnimator::animate(QWidget*, QRect const&, bool) + 637
frame #6: 0x0000000103a4fcd4 QtGui`QToolBarAreaLayout::apply(bool) + 804
frame #7: 0x00000001039d5060 QtGui`QMainWindowLayout::applyState(QMainWindowLayoutState&, bool) + 1008
frame #8: 0x00000001039d4c54 QtGui`QMainWindowLayout::setGeometry(QRect const&) + 324
frame #9: 0x0000000103638509 QtGui`QLayoutPrivate::doResize(QSize const&) + 217
frame #10: 0x0000000103638bad QtGui`QLayout::activate() + 957
frame #11: 0x000000010365d206 QtGui`QWidget::setVisible(bool) + 678
frame #12: 0x00000001002cc3ed libFreeCADGui.dylib`Gui::ToolBarManager::setup(Gui::ToolBarItem*) + 1293
frame #13: 0x00000001002cfbe5 libFreeCADGui.dylib`Gui::Workbench::activate() + 53
frame #14: 0x00000001002d8c8e libFreeCADGui.dylib`Gui::WorkbenchManager::activate(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 30
frame #15: 0x000000010001e4f1 libFreeCADGui.dylib`Gui::Application::activateWorkbench(char const*) + 1793
frame #16: 0x000000010002f29d libFreeCADGui.dylib`Gui::Application::sActivateWorkbenchHandler(_object*, _object*, _object*) + 93
frame #17: 0x0000000100cbd356 Python`PyEval_EvalFrameEx + 20486
frame #18: 0x0000000100cb80dd Python`PyEval_EvalCodeEx + 1725
frame #19: 0x0000000100cb7a16 Python`PyEval_EvalCode + 54
frame #20: 0x0000000100ce192f Python`PyRun_StringFlags + 127
frame #21: 0x0000000100adb3a9 libFreeCADBase.dylib`Base::InterpreterSingleton::runString(char const*) + 89
frame #22: 0x000000010007389b libFreeCADGui.dylib`Gui::Command::doCommand(Gui::Command::DoCmd_Type, char const*, ...) + 267
frame #23: 0x0000000100086199 libFreeCADGui.dylib`StdCmdWorkbench::activated(int) + 489
frame #24: 0x000000010007327d libFreeCADGui.dylib`Gui::Command::invoke(int) + 77
frame #25: 0x000000010006ab36 libFreeCADGui.dylib`Gui::ActionGroup::onActivated(QAction*) + 598
frame #26: 0x00000001043b276d QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 1693
frame #27: 0x000000010360636b QtGui`QActionGroup::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 619
frame #28: 0x00000001043b276d QtCore`QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 1693
frame #29: 0x0000000103603fa9 QtGui`QAction::activate(QAction::ActionEvent) + 233
frame #30: 0x00000001043ae2f9 QtCore`QObject::event(QEvent*) + 841
frame #31: 0x000000010360cf9c QtGui`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 252
frame #32: 0x000000010360e6e0 QtGui`QApplication::notify(QObject*, QEvent*) + 864
frame #33: 0x000000010002db2c libFreeCADGui.dylib`Gui::GUIApplication::notify(QObject*, QEvent*) + 124
frame #34: 0x000000010439a886 QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 118
frame #35: 0x000000010439b442 QtCore`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 770
frame #36: 0x00007fff8d2195b1 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #37: 0x00007fff8d20ac62 CoreFoundation`__CFRunLoopDoSources0 + 242
frame #38: 0x00007fff8d20a3ef CoreFoundation`__CFRunLoopRun + 831
frame #39: 0x00007fff8d209e75 CoreFoundation`CFRunLoopRunSpecific + 309
frame #40: 0x00007fff8e559a0d HIToolbox`RunCurrentEventLoopInMode + 226
frame #41: 0x00007fff8e559685 HIToolbox`ReceiveNextEventCommon + 173
frame #42: 0x00007fff8e5595bc HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 65
frame #43: 0x00007fff9641e24e AppKit`_DPSNextEvent + 1434
frame #44: 0x00007fff9641d89b AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
frame #45: 0x00007fff9641199c AppKit`-[NSApplication run] + 553
frame #46: 0x00000001035bfd3a QtGui`QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 554
frame #47: 0x0000000104397c1d QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 477
frame #48: 0x000000010439ae37 QtCore`QCoreApplication::exec() + 199
frame #49: 0x0000000100023e37 libFreeCADGui.dylib`Gui::Application::runApplication() + 6567
frame #50: 0x0000000100008ec9 FreeCAD`main + 1385
frame #51: 0x00007fff943865fd libdyld.dylib`start + 1
frame #52: 0x00007fff943865fd libdyld.dylib`start + 1
I hope this is clearer for you than it is for me...
And if you need more info, let me known ;)
nahshon
Posts: 225
Joined: Wed Jul 24, 2013 8:06 pm

Re: Path module merged in master!

Post by nahshon »

profile.png
profile.png (2.51 KiB) Viewed 2443 times
Why are there two different GUI operations for "Profile"? Would it be possible to decide which action based on actual selected item(s)?

Also, are these
Also, When selecting multiple faces for a profile, only the one face is processed. I expect to have all the faces processed.
Also, Holes in faced are not processed! In most cases I would like to see holes processed before the outline.

-- Itai

OS: "Fedora release 20 (Heisenbug)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5225 (Git)
Build type: Release
Branch: master
Hash: 5273c47c1bee1bed733cfc9ef8d5c8ef2bd023b8
Python version: 2.7.5
Qt version: 4.8.6
Coin version: 3.1.3
OCC version: 6.7.1
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Path module merged in master!

Post by wmayer »

I hope this is clearer for you than it is for me...
I can't see anything obviously wrong. But this sounds convincing: http://stackoverflow.com/questions/2313 ... pplication

So, have a look if you have two Qt installations which interfere somehow.
Post Reply