[Bug] placement of boolean base propagates to secondary body

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
CluelessJunk
Posts: 19
Joined: Tue May 31, 2016 9:23 am

[Bug] placement of boolean base propagates to secondary body

Post by CluelessJunk »

In Part Design Next, when I make a boolean operation between two bodies and then change the placement (angle or position) of the first (base) body, the new placement propagates to the secondary body. However, when I now modify the second body, the original placement of the body is restored and the boolean operation updated.

As far as I understand it, the placement of the first body should not propagate to the secondary body and the behaviour after updating the second body is correct.

I tried to search for this bug, but didn't any fitting. So I hope this hasn't been reported a million times already.

Anyways, thanks for all your amazing work! FC.17 looks nice already.

Code: Select all

OS: "Fedora release 22 (Twenty Two)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.7691 (Git)
Build type: Unknown
Branch: master
Hash: 76548e987d434467e77d24015f7846e8c700a952
Python version: 2.7.10
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.7.1.oce-0.16
Last edited by CluelessJunk on Tue May 31, 2016 11:10 am, edited 1 time in total.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [Bug] placement of boolean base propagates to secondary body

Post by DeepSOIC »

Hi!
I assume you are talking about PartDesign Boolean, not Part Boolean.
At the moment, I cannot make it do anything at all :| All I got so far is a BOP feature in an error state.
CluelessJunk
Posts: 19
Joined: Tue May 31, 2016 9:23 am

Re: [Bug] placement of boolean base propagates to secondary body

Post by CluelessJunk »

To be specific, I'm talking about Part Design Next boolean. I'm sorry if that wasn't clear. It apart from this error, it works for me.
I edited the first post to clarify.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: [Bug] placement of boolean base propagates to secondary body

Post by ickby »

Hello,

I didn't know tha tbug before, so you are the first one to report it. Could you please add a report to the bugtracker, so that it is not forgotten? Thanks!
CluelessJunk
Posts: 19
Joined: Tue May 31, 2016 9:23 am

Re: [Bug] placement of boolean base propagates to secondary body

Post by CluelessJunk »

But you did manage to reproduce the problem?

*edit*
I did a frech checkout and compile of the source on my other computer with Fedora 23 and the bug was reproducible, so I reported it.
CluelessJunk
Posts: 19
Joined: Tue May 31, 2016 9:23 am

Re: [Bug] placement of boolean base propagates to secondary body

Post by CluelessJunk »

In the bug report I also added a crash report based on the same steps. I wonder if I should file a separate bug report.
I appended a small python script to provoke that crash...
Attachments
testcrash.zip
(613 Bytes) Downloaded 109 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Bug] placement of boolean base propagates to secondary body

Post by Kunda1 »

soft bump
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Bug] placement of boolean base propagates to secondary body

Post by Kunda1 »

linking this thread conspiciouslyl to issue #2572.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Bug] placement of boolean base propagates to secondary body

Post by Kunda1 »

CluelessJunk wrote:In the bug report I also added a crash report based on the same steps. I wonder if I should file a separate bug report.
I appended a small python script to provoke that crash...
For exposure I'm showing the python script within the thread:

Code: Select all

#!/usr/bin/python

import FreeCAD as App
import PartDesign

#Create Document
App.newDocument("Unnamed")
App.setActiveDocument("Unnamed")
App.ActiveDocument=App.getDocument("Unnamed")
App.activeDocument().Tip = App.activeDocument().addObject('App::Part','Part')
App.activeDocument().Part.Label = 'Part'

#Create first body & Box
App.activeDocument().addObject('PartDesign::Body','Body')
App.activeDocument().Part.addObject(App.ActiveDocument.Body)
App.ActiveDocument.addObject('PartDesign::AdditiveBox','Box')
App.ActiveDocument.Body.addFeature(App.activeDocument().Box)
App.ActiveDocument.addObject('PartDesign::CoordinateSystem','CoordinateSystem')
App.ActiveDocument.Body.addFeature(App.activeDocument().CoordinateSystem)
App.ActiveDocument.Box.CoordinateSystem=(App.ActiveDocument.CoordinateSystem)
App.ActiveDocument.Box.Length=10.00
App.ActiveDocument.Box.Width=10.00
App.ActiveDocument.Box.Height=10.00

#Create second body & Box
App.activeDocument().addObject('PartDesign::Body','Body001')
App.activeDocument().Part.addObject(App.ActiveDocument.Body001)
App.ActiveDocument.addObject('PartDesign::AdditiveBox','Box001')
App.ActiveDocument.Body001.addFeature(App.activeDocument().Box001)
App.ActiveDocument.addObject('PartDesign::CoordinateSystem','CoordinateSystem001')
App.ActiveDocument.Body001.addFeature(App.activeDocument().CoordinateSystem001)
App.ActiveDocument.Box001.CoordinateSystem=(App.ActiveDocument.CoordinateSystem001)
App.ActiveDocument.Box001.Length=10.00
App.ActiveDocument.Box001.Width=10.00
App.ActiveDocument.Box001.Height=10.00

#Create Boolean
App.activeDocument().addObject('PartDesign::Boolean','Boolean')
App.activeDocument().Boolean.Bodies = [App.activeDocument().Body,]
App.activeDocument().Body001.addFeature(App.activeDocument().Boolean)
App.ActiveDocument.Boolean.Type = 0

#set Thickness
App.activeDocument().addObject("PartDesign::Thickness","Thickness")
App.activeDocument().Thickness.Base = (App.ActiveDocument.Boolean,["Face1"])
App.activeDocument().Body001.addFeature(App.activeDocument().Thickness)

#Crash
App.ActiveDocument.recompute()
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Bug] placement of boolean base propagates to secondary body

Post by Kunda1 »

@CluelessJunk added a backtrace:

Code: Select all

(gdb) run
Starting program: /home/myUserName/dev/FreeCAD/build/bin/FreeCAD 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
FreeCAD 0.17, Libs: 0.17R9564 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2016
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

[New Thread 0x7fffbf477700 (LWP 14159)]
[New Thread 0x7fffbf076700 (LWP 14160)]
[New Thread 0x7fffbec75700 (LWP 14161)]

Thread 1 "FreeCAD" received signal SIGSEGV, Segmentation fault.
Geom2d_Curve::Value (this=0x0, U=U@entry=5) at /usr/src/debug/oce-OCE-0.17.1/src/Geom2d/Geom2d_Curve.cxx:80
80	  D0(U,P);
Missing separate debuginfos, use: dnf debuginfo-install Coin3-3.1.3-18.fc25.x86_64 OpenEXR-libs-2.2.0-5.fc24.x86_64 adwaita-qt4-0.97-1.fc25.x86_64 atlas-3.10.2-14.fc25.x86_64 boost-atomic-1.60.0-10.fc25.x86_64 boost-chrono-1.60.0-10.fc25.x86_64 boost-date-time-1.60.0-10.fc25.x86_64 boost-filesystem-1.60.0-10.fc25.x86_64 boost-program-options-1.60.0-10.fc25.x86_64 boost-regex-1.60.0-10.fc25.x86_64 boost-signals-1.60.0-10.fc25.x86_64 boost-system-1.60.0-10.fc25.x86_64 boost-thread-1.60.0-10.fc25.x86_64 dbus-libs-1.11.8-1.fc25.x86_64 fontconfig-2.12.1-1.fc25.x86_64 gamin-0.1.10-23.fc25.x86_64 glib2-2.50.2-1.fc25.x86_64 gstreamer1-1.10.2-1.fc25.x86_64 gstreamer1-plugins-base-1.10.2-1.fc25.x86_64 ibus-qt-1.3.3-12.fc25.x86_64 ilmbase-2.2.0-5.fc24.x86_64 jasper-libs-1.900.13-1.fc25.x86_64 jbigkit-libs-2.1-5.fc24.x86_64 kde-runtime-libs-16.08.3-4.fc25.x86_64 kdelibs-4.14.26-2.fc25.x86_64 keyutils-libs-1.5.9-8.fc24.x86_64 krb5-libs-1.14.4-4.fc25.x86_64 lcms2-2.8-2.fc25.x86_64 libICE-1.0.9-5.fc25.x86_64 libSM-1.2.2-4.fc24.x86_64 libXcursor-1.1.14-6.fc24.x86_64 libXi-1.7.8-2.fc25.x86_64 libXinerama-1.1.3-6.fc24.x86_64 libXrandr-1.5.1-1.fc25.x86_64 libXrender-0.9.10-1.fc25.x86_64 libblkid-2.28.2-1.fc25.x86_64 libcap-2.25-2.fc25.x86_64 libcom_err-1.43.3-1.fc25.x86_64 libffi-3.1-9.fc24.x86_64 libgcrypt-1.6.6-1.fc25.x86_64 libgpg-error-1.24-1.fc25.x86_64 libicu-57.1-4.fc25.x86_64 libjpeg-turbo-1.5.1-0.fc25.x86_64 libmng-2.0.3-3.fc24.x86_64 libmount-2.28.2-1.fc25.x86_64 libtiff-4.0.7-1.fc25.x86_64 libtxc_dxtn-1.0.1-1.gitef072983.fc24.x86_64 libuuid-2.28.2-1.fc25.x86_64 libwebp-0.5.2-1.fc25.x86_64 libxml2-2.9.3-4.fc25.x86_64 libxslt-1.1.28-13.fc25.x86_64 lz4-1.7.5-1.fc25.x86_64 nettle-3.3-1.fc25.x86_64 openssl-libs-1.0.2j-3.fc25.x86_64 orc-0.4.26-1.fc25.x86_64 proj-4.9.2-2.fc24.x86_64 python-libs-2.7.13-1.fc25.x86_64 python-pyside-1.2.2-6.fc25.x86_64 python2-numpy-1.11.2-1.fc25.x86_64 qt-4.8.7-18.fc25.x86_64 qt-mobility-location-1.2.2-0.23.20140317git169da60c.fc24.x86_64 qt-mobility-sensors-1.2.2-0.23.20140317git169da60c.fc24.x86_64 qt-x11-4.8.7-18.fc25.x86_64 qtwebkit-2.3.4-11.fc24.x86_64 shiboken-libs-1.2.2-2.fc22.x86_64 sqlite-libs-3.14.2-1.fc25.x86_64 systemd-libs-231-12.fc25.x86_64 xerces-c-3.1.4-1.fc25.x86_64 xz-libs-5.2.2-2.fc24.x86_64
(gdb) bt
#0  0x00007fffc385aca8 in Geom2d_Curve::Value(double) const (this=0x0, U=U@entry=5) at /usr/src/debug/oce-OCE-0.17.1/src/Geom2d/Geom2d_Curve.cxx:80
#1  0x00007fffc9339846 in BRepOffset_Tool::OrientSection(TopoDS_Edge const&, TopoDS_Face const&, TopoDS_Face const&, TopAbs_Orientation&, TopAbs_Orientation&) (E=..., F1=..., F2=..., O1=@0x7fffffffa1d0: TopAbs_FORWARD, O2=@0x7fffffffa1f0: TopAbs_FORWARD) at /usr/src/debug/oce-OCE-0.17.1/src/BRepOffset/BRepOffset_Tool.cxx:529
#2  0x00007fffc93097ec in BRepOffset_Inter3d::ContextIntByArc(TopTools_IndexedMapOfShape const&, bool, BRepOffset_Analyse const&, BRepAlgo_Image const&, BRepAlgo_Image&) (this=this@entry=0x7fffffffa520, ContextFaces=..., InSide=false, Analyse=..., InitOffsetFace=..., InitOffsetEdge=...) at /usr/src/debug/oce-OCE-0.17.1/src/BRepOffset/BRepOffset_Inter3d.cxx:783
#3  0x00007fffc931370a in BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d&) (this=this@entry=0x7fffffffa898, Inter=...) at /usr/src/debug/oce-OCE-0.17.1/src/BRepOffset/BRepOffset_MakeOffset.cxx:2216
#4  0x00007fffc931e6f7 in BRepOffset_MakeOffset::MakeOffsetShape() (this=this@entry=0x7fffffffa898) at /usr/src/debug/oce-OCE-0.17.1/src/BRepOffset/BRepOffset_MakeOffset.cxx:709
#5  0x00007fffc931ef21 in BRepOffset_MakeOffset::MakeThickSolid() (this=this@entry=0x7fffffffa898) at /usr/src/debug/oce-OCE-0.17.1/src/BRepOffset/BRepOffset_MakeOffset.cxx:772
#6  0x00007fffc92c9e9c in BRepOffsetAPI_MakeThickSolid::Build() (this=this@entry=0x7fffffffa860) at /usr/src/debug/oce-OCE-0.17.1/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx:65
#7  0x00007fffc92ca0d0 in BRepOffsetAPI_MakeThickSolid::BRepOffsetAPI_MakeThickSolid(TopoDS_Shape const&, TopTools_ListOfShape const&, double, double, BRepOffset_Mode, bool, bool, GeomAbs_JoinType) (this=0x7fffffffa860, S=..., ClosingFaces=..., Offset=1, Tol=9.9999999999999995e-08, Mode=BRepOffset_Skin, Intersection=<optimized out>, SelfInter=<optimized out>, Join=GeomAbs_Arc)
    at /usr/src/debug/oce-OCE-0.17.1/src/BRepOffsetAPI/BRepOffsetAPI_MakeThickSolid.cxx:54
#8  0x00007fffca3dea4a in Part::TopoShape::makeThickSolid(TopTools_ListOfShape const&, double, double, bool, bool, short, short) const () at /home/myUserName/dev/FreeCAD/build/Mod/Part/Part.so
#9  0x00007fffc036916a in PartDesign::Thickness::execute() () at /home/myUserName/dev/FreeCAD/build/Mod/PartDesign/_PartDesign.so
#10 0x00007ffff66a5e77 in App::DocumentObject::recompute() () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADApp.so
#11 0x00007fffca1e8c67 in Part::Feature::recompute() () at /home/myUserName/dev/FreeCAD/build/Mod/Part/Part.so
#12 0x00007ffff66444b2 in App::Document::_recomputeFeature(App::DocumentObject*) () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADApp.so
#13 0x00007ffff664411e in App::Document::recompute() () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADApp.so
#14 0x00007ffff66d8232 in App::DocumentPy::recompute(_object*) () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADApp.so
#15 0x00007ffff66d2c60 in App::DocumentPy::staticCallback_recompute(_object*, _object*) () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADApp.so
#16 0x00007ffff5af1147 in PyEval_EvalFrameEx () at /lib64/libpython2.7.so.1.0
#17 0x00007ffff5af4adc in PyEval_EvalCodeEx () at /lib64/libpython2.7.so.1.0
#18 0x00007ffff5af4bc9 in PyEval_EvalCode () at /lib64/libpython2.7.so.1.0
#19 0x00007ffff5b0e05f in run_mod () at /lib64/libpython2.7.so.1.0
#20 0x00007ffff5b0ef14 in PyRun_StringFlags () at /lib64/libpython2.7.so.1.0
#21 0x00007ffff5f36550 in Base::InterpreterSingleton::runString[abi:cxx11](char const*) () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADBase.so
#22 0x00007ffff7279f08 in Gui::Command::doCommand(Gui::Command::DoCmd_Type, char const*, ...) () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADGui.so
#23 0x00007ffff727a6fd in Gui::Command::updateActive() () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADGui.so
#24 0x00007fffc06ec9c6 in finishFeature(Gui::Command const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, App::DocumentObject*, bool) ()
    at /home/myUserName/dev/FreeCAD/build/Mod/PartDesign/PartDesignGui.so
#25 0x00007fffc06f017a in finishDressupFeature(Gui::Command const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Part::Feature*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) ()
    at /home/myUserName/dev/FreeCAD/build/Mod/PartDesign/PartDesignGui.so
#26 0x00007fffc06f0ed2 in CmdPartDesignThickness::activated(int) () at /home/myUserName/dev/FreeCAD/build/Mod/PartDesign/PartDesignGui.so
#27 0x00007ffff727961a in Gui::Command::invoke(int) () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADGui.so
#28 0x00007ffff726e947 in Gui::Action::onActivated() () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADGui.so
#29 0x00007ffff7273b7e in Gui::Action::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADGui.so
#30 0x00007fffedbce090 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /lib64/libQtCore.so.4
#31 0x00007fffee6aa062 in QAction::triggered(bool) () at /lib64/libQtGui.so.4
#32 0x00007fffee6ab3c3 in QAction::activate(QAction::ActionEvent) () at /lib64/libQtGui.so.4
#33 0x00007fffeea854c3 in QAbstractButtonPrivate::click() () at /lib64/libQtGui.so.4
#34 0x00007fffeea85614 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /lib64/libQtGui.so.4
#35 0x00007fffeeb4ab5a in QToolButton::mouseReleaseEvent(QMouseEvent*) () at /lib64/libQtGui.so.4
#36 0x00007fffee706710 in QWidget::event(QEvent*) () at /lib64/libQtGui.so.4
#37 0x00007fffee6afecc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQtGui.so.4
#38 0x00007fffee6b8547 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQtGui.so.4
#39 0x00007ffff7249e39 in Gui::GUIApplication::notify(QObject*, QEvent*) () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADGui.so
#40 0x00007fffedbb9eed in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /lib64/libQtCore.so.4
#41 0x00007fffee6b656b in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /lib64/libQtGui.so.4
#42 0x00007fffee730fe9 in QETWidget::translateMouseEvent(_XEvent const*) () at /lib64/libQtGui.so.4
#43 0x00007fffee72f99c in QApplication::x11ProcessEvent(_XEvent*) () at /lib64/libQtGui.so.4
#44 0x00007fffee758409 in x11EventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQtGui.so.4
#45 0x00007fffe5051e42 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#46 0x00007fffe50521c0 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#47 0x00007fffe505226c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#48 0x00007fffedbea45e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#49 0x00007fffee7585a6 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtGui.so.4
#50 0x00007fffedbb87bf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#51 0x00007fffedbb8b25 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#52 0x00007fffedbbe779 in QCoreApplication::exec() () at /lib64/libQtCore.so.4
#53 0x00007ffff71e38fa in Gui::Application::runApplication() () at /home/myUserName/dev/FreeCAD/build/lib/libFreeCADGui.so
#54 0x0000000000407e62 in main ()
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply