Sweping issue

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
AvgJoe
Posts: 42
Joined: Wed Oct 01, 2014 2:23 am

Sweping issue

Post by AvgJoe »

Would you help me please?
I wanted to create a tube but the sweep tool says:
'center_line cannot be used as profile and path
What am I doing wrong?
Thank you!
Attachments
6in45degreeElbow.fcstd
(4.64 KiB) Downloaded 76 times
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Sweping issue

Post by quick61 »

Are you selecting the entire line or only selecting part of it? If your picking from the 3D view, you either need to double click center_line so it is all selected or [Ctrl] select the 3 segments one by one. Alternatively you can select the center_line path from the tree view, like you will need to do for the second sweep anyway, or hide the first sweep to access the path.

It is working here just fine.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
jmh
Posts: 97
Joined: Thu Oct 30, 2014 3:04 pm
Location: East Coast USA

Re: Sweping issue

Post by jmh »

I didn't have any problems either.

Is this what you were trying to do? I didn't change the file name so not sure if you want to rename it or not.

I ran two sweeps one ID and one OD after selecting all 3 line segments (use cntl key), make sure you also define the sweeps as solids (or change the property after sweeping). Then a boolean to cut the ID out of the OD.

John
Attachments
6in45degreeElbow.fcstd
(9.96 KiB) Downloaded 38 times
AvgJoe
Posts: 42
Joined: Wed Oct 01, 2014 2:23 am

Re: Sweping issue

Post by AvgJoe »

Thank you for testing the file. It helped me to figure out my mistake. I swept the two circle at once.
Attachments
6in45degreeElbow.fcstd
(10.87 KiB) Downloaded 34 times
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: Sweping issue

Post by bejant »

AvgJoe wrote:I swept the two circle at once.
Hmm ... Reading the dialog says "Select one or more profiles"...

So I selected the I.D sketch, moved it to the right pane, then the same for the O.D. sketch, selected the path in the 3D window by:
quick61 wrote:select the 3 segments one by one.
and FC crashed:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0xa657727c in BRepFill_SectionLaw::Law(int) const ()
   from /usr/lib/i386-linux-gnu/libTKBool.so.9
(gdb) bt
#0  0xa657727c in BRepFill_SectionLaw::Law(int) const ()
   from /usr/lib/i386-linux-gnu/libTKBool.so.9
#1  0xa65e668f in BRepFill_PipeShell::Build() ()
   from /usr/lib/i386-linux-gnu/libTKBool.so.9
#2  0xa537f9e0 in BRepOffsetAPI_MakePipeShell::Build() ()
   from /usr/lib/i386-linux-gnu/libTKOffset.so.9
#3  0xa77dba5c in Part::Sweep::execute() () from /usr/lib/freecad/lib/Part.so
#4  0xb76987f3 in App::DocumentObject::recompute() ()
   from /usr/lib/freecad/lib/libFreeCADApp.so
#5  0xa77e210f in Part::Feature::recompute() ()
   from /usr/lib/freecad/lib/Part.so
#6  0xb76719bd in App::Document::_recomputeFeature(App::DocumentObject*) ()
   from /usr/lib/freecad/lib/libFreeCADApp.so
#7  0xb7676586 in App::Document::recompute() ()
   from /usr/lib/freecad/lib/libFreeCADApp.so
#8  0xa49dd2d6 in PartGui::SweepWidget::accept() ()
   from /usr/lib/freecad/lib/PartGui.so
#9  0xa49de0ee in PartGui::TaskSweep::accept() ()
   from /usr/lib/freecad/lib/PartGui.so
#10 0xb7afa20f in Gui::TaskView::TaskView::accept() ()
   from /usr/lib/freecad/lib/libFreeCADGui.so
#11 0xb7afa354 in ?? () from /usr/lib/freecad/lib/libFreeCADGui.so
#12 0xb654a0f7 in QMetaObject::activate(QObject*, QMetaObject const*, int, void*---Type <return> to continue, or q <return> to quit---
*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#13 0xb6c67915 in QDialogButtonBox::accepted() ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#14 0xb6c67a18 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#15 0xb654a0f7 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#16 0xb6f1d0ad in QAbstractButton::clicked(bool) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#17 0xb6c37ab1 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#18 0xb6c38e37 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#19 0xb6c38f3e in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#20 0xb687a3fa in QWidget::event(QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#21 0xb6c39f42 in QAbstractButton::event(QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#22 0xb6cd4aec in QPushButton::event(QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#23 0xb68207f4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#24 0xb6828ea0 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#25 0xb79262a6 in Gui::GUIApplication::notify(QObject*, QEvent*) ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/freecad/lib/libFreeCADGui.so
#26 0xb6534e4a in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#27 0xb6826b53 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#28 0xb68aa778 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#29 0xb68a9ec5 in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#30 0xb68d5524 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#31 0xb2c911e3 in g_main_context_dispatch ()
   from /lib/i386-linux-gnu/libglib-2.0.so.0
#32 0xb2c91468 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#33 0xb2c91528 in g_main_context_iteration ()
   from /lib/i386-linux-gnu/libglib-2.0.so.0
#34 0xb656493b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#35 0xb68d55de in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#36 0xb6533823 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#37 0xb6533b49 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#38 0xb65398fe in QCoreApplication::exec() ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/i386-linux-gnu/libQtCore.so.4
#39 0xb681ea24 in QApplication::exec() ()
   from /usr/lib/i386-linux-gnu/libQtGui.so.4
#40 0xb791d809 in Gui::Application::runApplication() ()
   from /usr/lib/freecad/lib/libFreeCADGui.so
#41 0x0804b5ff in main ()
(gdb)
This was the second time it crashed; the first time it was before I ran the BT.

OS: Ubuntu 14.04.1 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.15.4203 (Git)
Branch: master
Hash: 6bdf0b4b762115862c9720166c4de365eb6a71bd
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Sweping issue

Post by jmaustpc »

bejant wrote:Hmm ... Reading the dialog says "Select one or more profiles"...
Yes, but it makes no sense if the profiles are co-planar and centred on the same point. The Sweep goes from one profile to the next along the path. co-planar profiles centred on the same point would mean that the first section of the sweep is 0mm long.

If the profiles are co-planar and overlap even with an appropriate path the result would be a self intersecting invalid solid.

Of course FreeCAD should not crash...but the sweep should also not work.

It is possible to have co-planar profiles if the path loops appropriately from one to the other.
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Sweping issue

Post by shoogen »

So, do we need to catch this, or do we request the Feature to check this in OCCT?
Personally I think that a bad usage of modeling functions (with valid imput geometry) should not trigger SIGSEGVs.
those look somewhat similar.
issue #1419 http://tracker.dev.opencascade.org/view.php?id=24909
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Sweping issue

Post by NormandC »

shoogen wrote:Personally I think that a bad usage of modeling functions (with valid imput geometry) should not trigger SIGSEGVs.
+1
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Sweping issue

Post by jmaustpc »

normandc wrote:
shoogen wrote:Personally I think that a bad usage of modeling functions (with valid imput geometry) should not trigger SIGSEGVs.
+1
Yes, definitely.

For anyone wanting to visualise this, here is an example where the profiles of a sweep are on the same plane but the sweep path loops from one back down to the other and is therefore a valid sweep. If the circle and rectangle were to be pushed closer together until they overlay slightly, the sweep would then be self intersecting and thus be invalid.

here is the file
co_planar_valid_sweep_example.fcstd
(31.72 KiB) Downloaded 38 times

and here is a screen shot
co_planar_profilesinsweep.jpeg
co_planar_profilesinsweep.jpeg (10.69 KiB) Viewed 2035 times
Jim
jmh
Posts: 97
Joined: Thu Oct 30, 2014 3:04 pm
Location: East Coast USA

Re: Sweping issue

Post by jmh »

jmaustpc wrote:If the circle and rectangle were to be pushed closer together until they overlay slightly, the sweep would then be self intersecting and thus be invalid.
Maybe I'm missing something here but in the file AvgJoe had the two profiles were coplaner but should not have been self intersecting since the ID profile would always be that difference in radius from the OD profile - unless ofcorse the sweep is defined as solid. Or is there some tolerances at work here in the math

In thinking about what seems to have been the goal -- creating a thin wall tube with a 45 deg bend - the sweep doesn't really produce that with the two profiles I don't think. You'd either have two separate surfaces that are unconnected or you have one solid within the other but both in the same sweep object so booleans could not be applied.

Creating two sweeps allows the boolean operations but what would be a more intuative way might be one sweep with the OD defined and then applying thickness (which does work if you select both end faces and Pipe as the mode -- I left join as arc but it should work with Intersection)
Post Reply