Crash with Sweep

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
jnxd
Posts: 162
Joined: Mon Mar 30, 2015 2:30 pm

Re: Crash with Sweep

Postby jnxd » Wed Feb 01, 2017 4:43 am

NormandC wrote:@jnxd

...what you are asking the program is impossible: you can't get a valid sweep either with Part Sweep, because the swept profile intersects itself in the corners.

The only way to get a valid sweep is to
  • Move the rectangle sketch so the Sketch001 is not in a corner
  • Move the circle sketch outside of the path so it won't intersect itself.
It shouldn't really make any difference, IMHO, since the rectangle and the circle are both different sketches, and their being on the vicinity of each other should only be considered a coincidence by the software. As far as sweeps along 2 edges is concerned, that does not seem to be much of an issue anywhere else, until the fourth edge is added, regardless of what order the edges are added. So why be an issue when the fourth edge is added!
NormandC wrote: Note that I just tested my recommendation and ended up with a crash nonetheless :D
Do you mean the assert change? Indeed it doesn't solve everything, just a small issue that no edge can be added or removed once "Edge1" is added. The real issue requires people with more knowledge than me (perhaps me in the future :D ).
NormandC wrote:
jnxd wrote:PS: Remind me, why do we have Part and PartDesign with all the duplicated efforts again?
Was that a rhetorical question? :D
Not exactly rhetorical, though slightly nonsensical. I asked you to "remind me" despite the fact that I'm new to everything here and have never known the reason behind Part and PartDesign being separate. I don't even have a feel of what really is new in PDN: how parts and bodies interact and all that. Perhaps I should have written it with slightly less annoyance.

However, I must say the separation of Part and PartDesign creates an additional barrier for anyone wanting to enter FC and perhaps through it the world of FOSS. Nobody likes to RTFM for every new tool before getting their hands dirty. Any rationale behind this separation must offset this barrier.
NormandC wrote: Ask jriegel if you're lucky enough to get a hold of him. But did you know that he originally didn't want Sweep/Loft in the Part workbench, not even in the PartDesign workbench? He considered these were advanced modelling tools that should only go in a SurfaceDesign workbench. Lucky for us he allowed the tools to be added in Part back in the day, or we would still be waiting.

BTW one fundamental difference between Part and PD is that the former can create any type of shape from vertex to solid, while the latter can only create solids.
Well, I don't see any SurfaceDesign WB anywhere and sweep/loft is an important feature. So it must go somewhere.
User avatar
NormandC
Posts: 17791
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Crash with Sweep

Postby NormandC » Wed Feb 01, 2017 5:09 am

jnxd wrote:I asked you to "remind me" despite the fact that I'm new to everything here and have never known the reason behind Part and PartDesign being separate.
Part predates PartDesign by many years. And a distinction must be done between the Part module and the Part workbench. As far as I can understand it as an end user with no programming knowledge, the workbench is the GUI side of the module but does not actually reveals every function that is in the Part module. That module is the interface to the OCC kernel which is used for all geometric modelling functions. All the other modules and workbenches in FreeCAD are based on the Part module.

As for the Part workbench I've always understood its purpose as "temporary" while waiting for specialized workbenches to be born and mature. Because once you have a fully functional PartDesign workbench and a full-featured SurfaceDesign workbench, there is not much more usefulness for the Part workbench IMO. But other users would furiously debate that point ;) . It's a divide between general-purpose (Part) and specialized (PartDesign, Arch, Sheet Metal eventually).

It all amounts to FreeCAD actually being multiple specialty-CAD programs rolled into one. AFAIK there is no commercial CAD software out there that can do mechanical design, architecture design, boat design all in the same program. (Maybe CATIA?)
jnxd
Posts: 162
Joined: Mon Mar 30, 2015 2:30 pm

Re: Crash with Sweep

Postby jnxd » Wed Feb 01, 2017 5:26 am

NormandC wrote: It all amounts to FreeCAD actually being multiple specialty-CAD programs rolled into one. AFAIK there is no commercial CAD software out there that can do mechanical design, architecture design, boat design all in the same program. (Maybe CATIA?)
Indeed look close enough and FreeCAD is but a shell to its dependencies like OCC, Coin3D and all, and that is what makes it so suitable for any purpose one sees fit. But perhaps, if the Part workbench is such a general purpose thing, one should indicate this to new users and direct them to the appropriate workbenches as necessary? Also, maybe lose the duplicated efforts for tools like sweep?
User avatar
NormandC
Posts: 17791
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Crash with Sweep

Postby NormandC » Wed Feb 01, 2017 5:36 am

But as I said, Part can generate any type of OCC element, from the vertex to a complete solid.

What if a user wants to sweep a surface, not a solid? If you remove Part Sweep in favour of PartDesign AdditivePipe, then you remove an option.

If you remove the new Pipe tools, you impede the PartDesign work flow.

It may be hard to accept for you, but I don't think it will be possible to make such a drastic decision anytime soon.
jnxd wrote:But perhaps, if the Part workbench is such a general purpose thing, one should indicate this to new users and direct them to the appropriate workbenches as necessary?
And what if your definition of appropriate is not the same as mine?

As I said some prominent users dislike the rigidity of PartDesign and prefer the openness of Part. Why should you assume they are wrong? The first principle of FOSS I believe is to offer choice. Even if it makes things more complicated for everyone. ;)
jnxd
Posts: 162
Joined: Mon Mar 30, 2015 2:30 pm

Re: Crash with Sweep

Postby jnxd » Wed Feb 01, 2017 8:01 am

NormandC wrote: And what if your definition of appropriate is not the same as mine?
Indeed, and that is why I said appropriate rather than PD, since people might want to go for arch or ship design. What annoyed me was the fact that Part WB had all these buttons for basic shapes, but no sketch support. If there were some way you tell people, "hey, if you want so and so, please go here", rather than leaving them searching it by themselves, I guess...
vectro
Posts: 32
Joined: Fri Jun 30, 2017 1:55 am

Re: Crash with Sweep

Postby vectro » Sat Jul 08, 2017 3:13 pm

I have a deterministic crash in partdesign 0.17 sweep, should I report it here or send straight to Mantis?

The issue occurs when attempting to sweep to a non-planar profile BTW.
chrisb
Posts: 13305
Joined: Tue Mar 17, 2015 9:14 am

Re: Crash with Sweep

Postby chrisb » Sat Jul 08, 2017 3:16 pm

vectro wrote:
Sat Jul 08, 2017 3:13 pm
I have a deterministic crash in partdesign 0.17 sweep, should I report it here or send straight to Mantis?
Please discuss it here first. The usual information helps: How to reproduce, attached file.
vectro
Posts: 32
Joined: Fri Jun 30, 2017 1:55 am

Re: Crash with Sweep

Postby vectro » Sat Jul 08, 2017 3:35 pm

File is attached.

How to reproduce:
  1. Make body Clamp active.
  2. Select bottom face of ShapeBinder (Face8, the one facing the Clamp body).
  3. Choose PartDesign Sweep
  4. Choose Sketch004 as the sweep object
  5. Set Transform mode to Multisection
  6. Add section Mirrored.Face11 (this is the face closet to Pad002)
  7. Sometimes freecad crashes here, sometimes you have to hit OK before it crashes.
I assume the problem is that Mirrored.Face11 is non-planar.

Stacktrace:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7ff2283f94b0]
#1  0x7ff1be4bf534 in PartDesign::Pipe::execute() from /usr/lib/freecad-daily/lib/_PartDesign.so+0x13e4
#2  0x7ff22a930465 in App::DocumentObject::recompute() from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0x15
#3  0x7ff1a9f31d9f in Part::Feature::recompute() from /usr/lib/freecad-daily/lib/Part.so+0x1f
#4  0x7ff22a8fc03c in App::Document::_recomputeFeature(App::DocumentObject*) from /usr/lib/freecad-daily/lib/libFreeCADApp.so+0xac
#5  0x7ff1a747b0c3 in PartDesignGui::TaskPipeScaling::onSelectionChanged(Gui::SelectionChanges const&) from /usr/lib/freecad-daily/lib/PartDesignGui.so+0x83
#6  0x7ff22b31f75c in boost::signal1<void, Gui::SelectionChanges const&, boost::last_value<void>, int, std::less<int>, boost::function<void (Gui::SelectionChanges const&)> >::operator()(Gui::SelectionChanges const&) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x3cc
#7  0x7ff22b31bc6c in Gui::SelectionSingleton::addSelection(char const*, char const*, char const*, float, float, float) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x3fc
#8  0x7ff22b19c26f in Gui::SoFCUnifiedSelection::handleEvent(SoHandleEventAction*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0xd5f
#9  0x7ff227d381b0 in SoNode::handleEventS(SoAction*, SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x90
#10  0x7ff227adbca4 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x64
#11  0x7ff227c4267e in SoChildList::traverse(SoAction*, int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x26e
#12  0x7ff227d2c7d6 in SoGroup::doAction(SoAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x56
#13  0x7ff227d4be57 in SoSeparator::doAction(SoAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x27
#14  0x7ff227d381b0 in SoNode::handleEventS(SoAction*, SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x90
#15  0x7ff227adbca4 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x64
#16  0x7ff227ae721a in SoHandleEventAction::beginTraversal(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x7a
#17  0x7ff227add4f2 in SoAction::apply(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x472
#18  0x7ff227c61fa9 in SoEventManager::actuallyProcessEvent(SoEvent const*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x89
#19  0x7ff22b20d62e in SIM::Coin3D::Quarter::QuarterWidget::processSoEvent(SoEvent const*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x1e
#20  0x7ff22b21a293 in SIM::Coin3D::Quarter::SoQTQuarterAdaptor::processSoEvent(SoEvent const*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x53
#21  0x7ff22b242859 in Gui::View3DInventorViewer::processSoEventBase(SoEvent const*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x9
#22  0x7ff22b229df6 in Gui::TouchpadNavigationStyle::processSoEvent(SoEvent const*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x2b6
#23  0x7ff22b2230d2 in Gui::NavigationStyle::processEvent(SoEvent const*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x72
#24  0x7ff22b242917 in Gui::View3DInventorViewer::processSoEvent(SoEvent const*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0xa7
#25  0x7ff22b21529d in SIM::Coin3D::Quarter::EventFilter::eventFilter(QObject*, QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x18d
#26  0x7ff228eb0a76 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x86
#27  0x7ff2293ddfbc in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x6c
#28  0x7ff2293e50d6 in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x476
#29  0x7ff22b015c64 in Gui::GUIApplication::notify(QObject*, QEvent*) from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x54
#30  0x7ff228eb090d in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x8d
#31  0x7ff2293e46dd in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x14d
#32  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x2493f2) [0x7ff2294623f2]
#33  0x7ff229461c83 in QApplication::x11ProcessEvent(_XEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x16b3
#34  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x272542) [0x7ff22948b542]
#35  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2a7) [0x7ff221b18197]
#36  /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a3f0) [0x7ff221b183f0]
#37  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7ff221b1849c]
#38  0x7ff228ee12ae in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x7e
#39  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x272616) [0x7ff22948b616]
#40  0x7ff228eaf18f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x3f
#41  0x7ff228eaf4f5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x1b5
#42  0x7ff228eb54b9 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x99
#43  0x7ff22afcf1d0 in Gui::Application::runApplication() from /usr/lib/freecad-daily/lib/libFreeCADGui.so+0x15b0
#44  freecad-daily(main+0x6d0) [0x403410]
#45  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7ff2283e4830]
#46  freecad-daily(_start+0x29) [0x404669]
Version information:

Code: Select all

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11509 (Git)
Build type: None
Branch: master
Hash: fdedf8fb4d36043145e8498244177aae16c806a5
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Attachments
pipe-crash.fcstd
(61.74 KiB) Downloaded 29 times
vectro
Posts: 32
Joined: Fri Jun 30, 2017 1:55 am

Re: Crash with Sweep

Postby vectro » Mon Jul 24, 2017 1:53 am

I still see this crash in the latest daily build. Should I file a bug report?

Code: Select all

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11624 (Git)
Build type: None
Branch: master
Hash: b25eb4854add0b63902a67806270e6a960bb279b
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
User avatar
NormandC
Posts: 17791
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Crash with Sweep

Postby NormandC » Mon Jul 24, 2017 2:53 am

I did get the crash too, but we're using the same exact OS and FC version.

It would have been better to confirm with other OSes, but I'd say yes, report it on Mantis.