Recent Several Sketcher improvements

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Recent Several Sketcher improvements

Post by abdullah »

chrisb wrote: Sat Jun 09, 2018 9:23 pm I now can sort of confirm the issue, however here it is slightly different, marked in blue.

- open sketch or create new one with some geometry
- box select all or part of the sketch
- Sketch->Sketcher tools->Delete All Geometry. Note: FreeCAD is still alive
- close Sketcher: now FreeCAD crashes.
I will try to look into it tomorrow. Thanks! :D
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Recent Several Sketcher improvements

Post by abdullah »

chrisb wrote: Sat Jun 09, 2018 9:23 pm I now can sort of confirm the issue, however here it is slightly different, marked in blue.

- open sketch or create new one with some geometry
- box select all or part of the sketch
- Sketch->Sketcher tools->Delete All Geometry. Note: FreeCAD is still alive
- close Sketcher: now FreeCAD crashes.
I can reproduce it. It is really weird, the debugger stops at different places on different executions... tomorrow with more time...
User avatar
pablogil
Posts: 881
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Recent Several Sketcher improvements

Post by pablogil »

Thanks!
I really like the improvements :D
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Recent Several Sketcher improvements

Post by triplus »

Thanks for a full basket of delicious features. ;)
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Recent Several Sketcher improvements

Post by abdullah »

Welcome!

I had forgotten the "move" functionality. It may be useful in some circumstances.
Move.gif
Move.gif (232.87 KiB) Viewed 2123 times
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Recent Several Sketcher improvements

Post by abdullah »

hammax wrote: Sat Jun 09, 2018 4:28 pm Short and instant notice:

FC_0.18.13935 on Win10_32

FC crashes / fades away, when using "Delete all Geometry" in Sketcher-menue
Thanks.

https://github.com/FreeCAD/FreeCAD/pull/1509
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Recent Several Sketcher improvements

Post by wmayer »

abdullah wrote: Sat Jun 09, 2018 11:12 pm
chrisb wrote: Sat Jun 09, 2018 9:23 pm I now can sort of confirm the issue, however here it is slightly different, marked in blue.

- open sketch or create new one with some geometry
- box select all or part of the sketch
- Sketch->Sketcher tools->Delete All Geometry. Note: FreeCAD is still alive
- close Sketcher: now FreeCAD crashes.
I can reproduce it. It is really weird, the debugger stops at different places on different executions... tomorrow with more time...
With the second attempt I got this callstack and this looks as it's the real reason:
1 RtlFreeHeap ntdll 0x777ea1c5
2 HeapFree kernel32 0x775c1a0a
3 free_base MSVCR120D 0x7fefa11b13f
4 free_dbg MSVCR120D 0x7fefa13086d
5 free_dbg MSVCR120D 0x7fefa130196
6 operator delete MSVCR120D 0x7fefa12d1e5
7 operator delete[] MSVCR120D 0x7fefa11b0d3
8 SoCache::~SoCache SoCache.cpp 175 0x18013ba19
9 SoGLRenderCache::~SoGLRenderCache SoGLRenderCache.cpp 86 0x18013e83f
10 SoGLRenderCache::`vector deleting destructor' coin4d 0x18013e0fd
11 SoCache::unref SoCache.cpp 204 0x18013b54d
12 SoGLCacheList::invalidateAll SoGLCacheList.cpp 636 0x18013ddcc
13 SoSeparatorP::invalidate_gl_cache SoSeparator.cpp 334 0x180527065
14 storage_hash_apply storage.cpp 182 0x180640b47
15 cc_dict_apply dict.cpp 307 0x1800c9121
16 cc_storage_apply_to_all storage.cpp 199 0x1806409b4
17 SbStorage::applyToAll SbStorage.h 51 0x180526f4f
18 SoSeparatorP::invalidateGLCaches SoSeparator.cpp 342 0x180527016
19 SoSeparator::notify SoSeparator.cpp 955 0x180525eae
20 SoBase::startNotify SoBase.cpp 791 0x1803274b4
21 SoNode::startNotify SoNode.cpp 444 0x18050a818
22 SoChildList::truncate SoChildList.cpp 190 0x180330058
23 SoGroup::removeAllChildren SoGroup.cpp 810 0x1804fd5c8
24 PartGui::ViewProvider2DObject::onChanged ViewProvider2DObject.cpp 257 0x7fed8ee6e6c
25 SketcherGui::ViewProviderSketch::onChanged ViewProviderSketch.cpp 5271 0x7fed8864ba3
26 App::Property::hasSetValue Property.cpp 126 0x7fee6b3bdea
27 App::PropertyBool::setValue PropertyStandard.cpp 2080 0x7fee6b7ded3
28 SketcherGui::ViewProviderSketch::unsetEdit ViewProviderSketch.cpp 5744 0x7fed8862c4f
29 Gui::ViewProvider::finishEditing ViewProvider.cpp 126 0x7fee77ab3bc
30 Gui::Document::resetEdit Document.cpp 274 0x7fee718369a
31 Gui::DocumentPy::resetEdit DocumentPyImp.cpp 159 0x7fee71db66f
32 Gui::DocumentPy::staticCallback_resetEdit DocumentPy.cpp 633 0x7fee71db552
33 PyCFunction_Call methodobject.c 81 0x58fca5f8
34 call_function ceval.c 4357 0x59095185
35 PyEval_EvalFrameEx ceval.c 2996 0x59090c9c
36 PyEval_EvalCodeEx ceval.c 3589 0x5908b4fd
37 PyEval_EvalCode ceval.c 675 0x5908abb9
38 run_mod pythonrun.c 1376 0x5910bc39
39 PyRun_StringFlags pythonrun.c 1339 0x5910894d
40 Base::InterpreterSingleton::runString Interpreter.cpp 232 0x7feeea67145
41 Gui::Command::doCommand Command.cpp 475 0x7fee7253740
42 SketcherGui::TaskDlgEditSketch::reject TaskDlgEditSketch.cpp 133 0x7fed88d8469
43 Gui::TaskView::TaskView::reject TaskView.cpp 724 0x7fee7687d9e
44 Gui::TaskView::TaskView::qt_static_metacall moc_TaskView.cpp 362 0x7fee7686f85
45 QMetaObject::activate qobject.cpp 3732 0x5868b352
46 QMetaObject::activate qobject.cpp 3596 0x5868aac8
47 QDialogButtonBox::rejected moc_qdialogbuttonbox.cpp 296 0x57989284
48 QDialogButtonBoxPrivate::_q_handleButtonClicked qdialogbuttonbox.cpp 875 0x5798a61b
49 QDialogButtonBox::qt_static_metacall moc_qdialogbuttonbox.cpp 156 0x57987fc8
50 QMetaObject::activate qobject.cpp 3732 0x5868b352
51 QMetaObject::activate qobject.cpp 3596 0x5868aac8
52 QAbstractButton::clicked moc_qabstractbutton.cpp 311 0x57df50ed
53 QAbstractButtonPrivate::emitClicked qabstractbutton.cpp 535 0x57933a84
54 QAbstractButtonPrivate::click qabstractbutton.cpp 527 0x57932bad
55 QAbstractButton::mouseReleaseEvent qabstractbutton.cpp 1132 0x57931ba7
56 QWidget::event qwidget.cpp 8744 0x577cf08d
57 QAbstractButton::event qabstractbutton.cpp 1089 0x5793161b
58 QPushButton::event qpushbutton.cpp 674 0x57a465c1
59 QApplicationPrivate::notify_helper qapplication.cpp 3714 0x57764c6e
60 QApplication::notify qapplication.cpp 3272 0x57760264
61 Gui::GUIApplication::notify GuiApplication.cpp 91 0x7fee71f9902
62 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1015 0x58638c46
63 QCoreApplication::sendSpontaneousEvent qcoreapplication.h 230 0x587a62bb
64 QApplicationPrivate::sendMouseEvent qapplication.cpp 2767 0x577671d9
65 QWidgetWindow::handleMouseEvent qwidgetwindow.cpp 555 0x5781898a
66 QWidgetWindow::event qwidgetwindow.cpp 211 0x578173fe
67 QApplicationPrivate::notify_helper qapplication.cpp 3714 0x57764c6e
68 QApplication::notify qapplication.cpp 3157 0x5775f933
69 Gui::GUIApplication::notify GuiApplication.cpp 91 0x7fee71f9902
70 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1015 0x58638c46
71 QCoreApplication::sendSpontaneousEvent qcoreapplication.h 230 0x587a62bb
72 QGuiApplicationPrivate::processMouseEvent qguiapplication.cpp 1869 0x7fee5955207
73 QGuiApplicationPrivate::processWindowSystemEvent qguiapplication.cpp 1653 0x7fee5957d03
74 QWindowSystemInterface::sendWindowSystemEvents qwindowsysteminterface.cpp 651 0x7fee5918795
75 QWindowsGuiEventDispatcher::sendPostedEvents qwindowsguieventdispatcher.cpp 77 0x7fee89d2212
76 qt_internal_proc qeventdispatcher_win.cpp 431 0x586ed3d8
77 TranslateMessageEx USER32 0x776d9bbd
78 TranslateMessage USER32 0x776d98c2
79 QEventDispatcherWin32::processEvents qeventdispatcher_win.cpp 829 0x586eddea
80 QWindowsGuiEventDispatcher::processEvents qwindowsguieventdispatcher.cpp 68 0x7fee89d21c4
81 QEventLoop::processEvents qeventloop.cpp 129 0x586338d8
82 QEventLoop::exec qeventloop.cpp 204 0x58633b1e
83 QCoreApplication::exec qcoreapplication.cpp 1285 0x586369b1
84 QGuiApplication::exec qguiapplication.cpp 1599 0x7fee5953308
85 QApplication::exec qapplication.cpp 2974 0x5775f43a
86 Gui::Application::runApplication Application.cpp 1918 0x7fee70b67de
87 main MainGui.cpp 292 0x13f5f3879
88 WinMain qtmain_win.cpp 113 0x13f60414d
89 __tmainCRTStartup crtexe.c 618 0x13f602271
90 WinMainCRTStartup crtexe.c 466 0x13f601fee
91 BaseThreadInitThunk kernel32 0x775b59cd
92 RtlUserThreadStart ntdll 0x7781383d
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Recent Several Sketcher improvements

Post by easyw-fc »

abdullah wrote: Sun Jun 10, 2018 4:39 pm Welcome!

I had forgotten the "move" functionality. It may be useful in some circumstances.
Thx a lot again!
:D
shadybob
Posts: 18
Joined: Wed Jun 06, 2018 5:50 pm

Re: Recent Several Sketcher improvements

Post by shadybob »

Wondering what would be involved in adding new commands to the Sketcher mod? I'm looking to add several "helper" objects to it, similar to sketching tools in autodesk inventor. My first goal would be a new rectangle object that behaves similar to the ellipse by center command, but instead using 2 clicks (center, one corner). With the construction lines included. Next would be an aligned rectangle where you start with a line to define the orientation (angle) of the rectangle. Then there are several different methods of defining slots, etc.

Is it possible to do all this using only python? Where would I start?
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Recent Several Sketcher improvements

Post by triplus »

shadybob wrote: Wed Jan 29, 2020 1:43 pm Is it possible to do all this using only python?
Sketcher module is more or less coded in C++ and AFAIK it currently lacks a Python API, for being able to extend it in such way easily. But then again i don't remember anybody trying and maybe it's possible.
Where would I start?
https://github.com/FreeCAD/FreeCAD/tree ... d/Sketcher
Post Reply