Surface WB

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
user1234
Veteran
Posts: 3510
Joined: Mon Jul 11, 2016 5:08 pm

Surface WB

Post by user1234 »

I don't know, if it is under "Open discussion" right, but i have seen, that the surface WB is merged.
commit.png
commit.png (10.32 KiB) Viewed 1928 times
Thanks for the really hard work on it! The hard work you have done is really huge (also in all the other WBs, FreeCAD final 0.17.xxxxx will be the hammer).

I have tested a little and i have seen, that the option "Curved" don't work. Is with "Curved" meant tangential to the other boundarys? I think so but i am not sure.
surface_test.png
surface_test.png (82.34 KiB) Viewed 1928 times
Tested with:

Code: Select all

OS: Debian GNU/Linux 8.7 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10879 (Git)
Build type: Unknown
Branch: master
Hash: b2c2e3ffdab35b69159a01919148580a6689f7c9
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
surface_test.fcstd
(3.86 KiB) Downloaded 35 times
Sorry for bad english.

Greetings user1234
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Surface WB

Post by wmayer »

I have tested a little and i have seen, that the option "Curved" don't work. Is with "Curved" meant tangential to the other boundarys? I think so but i am not sure.
It works but has higher requirements than the other two options to create an output. However, I don't know what the exact requirements are, I just found some comments in the code.

Attached is a simple example that creates a "curved" surface.

EDIT: The original project file was too big in order to upload it. Thus, I have removed the BRep file for the surface. To get it back must must change a parameter of the Surface object and recompute the document.
Attachments
curved_surface.FCStd
(11.63 KiB) Downloaded 48 times
user1234
Veteran
Posts: 3510
Joined: Mon Jul 11, 2016 5:08 pm

Re: Surface WB

Post by user1234 »

Thanks for the fast reply.

I have on this example also when i checked "Curved" the error message:

Code: Select all

GeomFill_BSplineCurves: Courbes non jointives
But only sometimes when i click around. At the moment i have no way to reproduce that.

But i found an other error. When i try to make a surface on a closed wire (like the file you attached before) and try to add the last edge, FreeCAD crashes.

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
#0  /lib/x86_64-linux-gnu/libc.so.6(+0x350e0) [0x7f46370dc0e0]
#1  0x7f4608335710 in Geom_BSplineCurve::Degree() const from /usr/local/lib/libTKG3d.so.7+0
#2  0x7f4605355127 in GeomFill_BSplineCurves::Init(opencascade::handle<Geom_BSplineCurve> const&, opencascade::handle<Geom_BSplineCurve> const&, opencascade::handle<Geom_BSplineCurve> const&, opencascade::handle<Geom_BSplineCurve> const&, GeomFill_FillingStyle) from /usr/local/lib/libTKGeomAlgo.so.7+0xb7
#3  0x7f45fd973d01 in Surface::GeomFillSurface::createBSplineSurface(TopoDS_Wire&) from /home/laptop/Programme/FreeCAD/Mod/Surface/Surface.so+0x6b9
#4  0x7f45fd972889 in Surface::GeomFillSurface::execute() from /home/laptop/Programme/FreeCAD/Mod/Surface/Surface.so+0x69
#5  0x7f4640757853 in App::DocumentObject::recompute() from /home/laptop/Programme/FreeCAD/lib/libFreeCADApp.so+0x3b
#6  0x7f460957fef5 in Part::Feature::recompute() from /home/laptop/Programme/FreeCAD/Mod/Part/Part.so+0x1b
#7  0x7f46406f7a37 in App::Document::_recomputeFeature(App::DocumentObject*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADApp.so+0x111
#8  0x7f46406f7ef3 in App::Document::recomputeFeature(App::DocumentObject*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADApp.so+0xc1
#9  0x7f4640757994 in App::DocumentObject::recomputeFeature() from /home/laptop/Programme/FreeCAD/lib/libFreeCADApp.so+0x36
#10  0x7f45fd71f585 in SurfaceGui::SurfaceFilling::onSelectionChanged(Gui::SelectionChanges const&) from /home/laptop/Programme/FreeCAD/Mod/Surface/SurfaceGui.so+0xb37
#11  0x7f46416e1d1a in boost::_mfi::mf1<void, Gui::SelectionObserver, Gui::SelectionChanges const&>::operator()(Gui::SelectionObserver*, Gui::SelectionChanges const&) const from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x70
#12  0x7f46416e14f4 in void boost::_bi::list2<boost::_bi::value<Gui::SelectionObserver*>, boost::arg<1> >::operator()<boost::_mfi::mf1<void, Gui::SelectionObserver, Gui::SelectionChanges const&>, boost::_bi::list1<Gui::SelectionChanges const&> >(boost::_bi::type<void>, boost::_mfi::mf1<void, Gui::SelectionObserver, Gui::SelectionChanges const&>&, boost::_bi::list1<Gui::SelectionChanges const&>&, int) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x68
#13  0x7f46416e0b8a in void boost::_bi::bind_t<void, boost::_mfi::mf1<void, Gui::SelectionObserver, Gui::SelectionChanges const&>, boost::_bi::list2<boost::_bi::value<Gui::SelectionObserver*>, boost::arg<1> > >::operator()<Gui::SelectionChanges>(Gui::SelectionChanges const&) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x46
#14  0x7f46416dfdfa in boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, Gui::SelectionObserver, Gui::SelectionChanges const&>, boost::_bi::list2<boost::_bi::value<Gui::SelectionObserver*>, boost::arg<1> > >, void, Gui::SelectionChanges const&>::invoke(boost::detail::function::function_buffer&, Gui::SelectionChanges const&) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x2b
#15  0x7f46416e23b1 in boost::function1<void, Gui::SelectionChanges const&>::operator()(Gui::SelectionChanges const&) const from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x5d
#16  0x7f46416e1f6a in boost::signals::detail::unusable boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >::operator()<boost::signals::detail::connection_slot_pair>(boost::signals::detail::connection_slot_pair const&) const from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x3e
#17  0x7f46416e187d in boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator>::dereference() const from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x45
#18  0x7f46416e1124 in boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator>::reference boost::iterator_core_access::dereference<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator> >(boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator> const&) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x18
#19  0x7f46416e0490 in boost::iterator_facade<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, long>::operator*() const from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x20
#20  0x7f46416df73a in boost::detail::postfix_increment_proxy<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator> >::postfix_increment_proxy(boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator> const&) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x1c
#21  0x7f46416de50f in boost::detail::postfix_increment_result<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::signals::detail::unusable const&, boost::single_pass_traversal_tag>::type boost::operator++<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, long>(boost::iterator_facade<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, boost::signals::detail::unusable const&, long>&, int) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x23
#22  0x7f46416dc431 in void boost::last_value<void>::operator()<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator> >(boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1<void>::caller<Gui::SelectionChanges const&, boost::function<void (Gui::SelectionChanges const&)> >, boost::signals::detail::named_slot_map_iterator>) const from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x27
#23  0x7f46416daa09 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 /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x183
#24  0x7f46416d5ac4 in Gui::SelectionSingleton::addSelection(char const*, char const*, char const*, float, float, float) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x4ba
#25  0x7f4641511c29 in Gui::SoFCUnifiedSelection::handleEvent(SoHandleEventAction*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0xfb7
#26  0x7f463e4f572c in SoNode::handleEventS(SoAction*, SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x4c
#27  0x7f463e2bb704 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x54
#28  0x7f463e40adc4 in SoChildList::traverse(SoAction*, int, int) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x174
#29  0x7f463e4eb18f in SoGroup::doAction(SoAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x3f
#30  0x7f463e5081f7 in SoSeparator::doAction(SoAction*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x27
#31  0x7f463e4f572c in SoNode::handleEventS(SoAction*, SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x4c
#32  0x7f463e2bb704 in SoAction::traverse(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x54
#33  0x7f463e2c5caa in SoHandleEventAction::beginTraversal(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x7a
#34  0x7f463e2bc2d2 in SoAction::apply(SoNode*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0xd2
#35  0x7f463e428bc9 in SoEventManager::actuallyProcessEvent(SoEvent const*) from /usr/lib/x86_64-linux-gnu/libCoin.so.80+0x69
#36  0x7f46415a047c in SIM::Coin3D::Quarter::QuarterWidget::processSoEvent(SoEvent const*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x56
#37  0x7f464159958e in SIM::Coin3D::Quarter::SoQTQuarterAdaptor::processSoEvent(SoEvent const*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x186
#38  0x7f46415d6a17 in Gui::View3DInventorViewer::processSoEventBase(SoEvent const*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x23
#39  0x7f46415b1e11 in Gui::NavigationStyle::processSoEvent(SoEvent const*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x27
#40  0x7f46415b8138 in Gui::CADNavigationStyle::processSoEvent(SoEvent const*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x10b8
#41  0x7f46415b1d62 in Gui::NavigationStyle::processEvent(SoEvent const*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x1f0
#42  0x7f46415d69e7 in Gui::View3DInventorViewer::processSoEvent(SoEvent const*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x119
#43  0x7f464159ad87 in SIM::Coin3D::Quarter::EventFilter::eventFilter(QObject*, QEvent*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x151
#44  0x7f4638798886 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x86
#45  0x7f463926046c in QApplicationPrivate::notify_helper(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x6c
#46  0x7f463926710f in QApplication::notify(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x41f
#47  0x7f464131cdf5 in Gui::GUIApplication::notify(QObject*, QEvent*) from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0xff
#48  0x7f463879871d in QCoreApplication::notifyInternal(QObject*, QEvent*) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x8d
#49  0x7f463926676f in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x15f
#50  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x244432) [0x7f46392dd432]
#51  0x7f46392dbe2c in QApplication::x11ProcessEvent(_XEvent*) from /usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x60c
#52  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26bed2) [0x7f4639304ed2]
#53  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x24d) [0x7f46329c6c5d]
#54  /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x49f48) [0x7f46329c6f48]
#55  /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f46329c6ffc]
#56  0x7f46387c7d1d in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x5d
#57  /usr/lib/x86_64-linux-gnu/libQtGui.so.4(+0x26bf96) [0x7f4639304f96]
#58  0x7f4638797271 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x41
#59  0x7f46387975d5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x1a5
#60  0x7f463879d059 in QCoreApplication::exec() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x99
#61  0x7f46412b4249 in Gui::Application::runApplication() from /home/laptop/Programme/FreeCAD/lib/libFreeCADGui.so+0x1e31
#62  /home/laptop/Programme/FreeCAD/bin/FreeCAD(main+0x866) [0x4077a2]
#63  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f46370c8b45]
#64  /home/laptop/Programme/FreeCAD/bin/FreeCAD() [0x406df9]
I have not coded for years and that was not really good. But is the error in the "SurfaceFilling.cpp" file on the point of "SurfaceFilling::onSelectionChanged( ..... )"?

Tested with:

Code: Select all

OS: Debian GNU/Linux 8.7 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10885 (Git)
Build type: Debug
Branch: master
Hash: ad112ca8ab7fa0b9524dfa682f6b82048345c0ef
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
(a bit newer as before)

Sorry for bad english.
Greetings
user1234
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Surface WB

Post by wmayer »

I have on this example also when i checked "Curved" the error message:
Of course. But the point was to give you one example that works which proves that the "Curved" option practically works.
I have not coded for years and that was not really good. But is the error in the "SurfaceFilling.cpp" file on the point of "SurfaceFilling::onSelectionChanged( ..... )"?
According to the stack trace it crashes inside Geom_BSplineCurve::Degree() and the question is if Geom_BSplineCurve is invalid or if it's a bug in OCC. But I can confirm the crash.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Surface WB

Post by triplus »

Surfaces.png
Surfaces.png (40.35 KiB) Viewed 1795 times
Nice!
user1234
Veteran
Posts: 3510
Joined: Mon Jul 11, 2016 5:08 pm

Re: Surface WB

Post by user1234 »

Sorry for late reply.
wmayer wrote:Of course. But the point was to give you one example that works which proves that the "Curved" option practically works.
Ok, get the point. Thanks.
Post Reply