Very slow to _open_ complex fillet
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Very slow to _open_ complex fillet
I'm working on some multi-faceted parts and am finding that it's taking a very long time to open the fillet object to edit it (to find out why it doesn't fillet!) when large numbers of edges are selected.
The parts have upwards of 500 edges. The attached shows the problem.
With the array of cubes set to 5 x 5, the resulting cut has 312 edges and you can the fillet opens for editing in around 5 seconds.
Increasing the array to 7 x 7 results in 600 edges and the fillet now takes over 60 seconds to open.
I tried at 10 x 10 but gave up after a couple of minutes.
Note that I am not talking about the time taken to create a new fillet. For the 7x7 example, that is a very reasonable 20 seconds on my machine. I can't see that FreeCAD is doing anything during this delay. The listview already shows all of the edges checked but effectively the programme hangs for a long time.
Anyone else seen this or can anyone else confirm this behaviour?
OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.3398 (Git)
Branch: master
Hash: 95bda087643493a7e31e9cf507f1041fd446c4c7
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.5.4
The parts have upwards of 500 edges. The attached shows the problem.
With the array of cubes set to 5 x 5, the resulting cut has 312 edges and you can the fillet opens for editing in around 5 seconds.
Increasing the array to 7 x 7 results in 600 edges and the fillet now takes over 60 seconds to open.
I tried at 10 x 10 but gave up after a couple of minutes.
Note that I am not talking about the time taken to create a new fillet. For the 7x7 example, that is a very reasonable 20 seconds on my machine. I can't see that FreeCAD is doing anything during this delay. The listview already shows all of the edges checked but effectively the programme hangs for a long time.
Anyone else seen this or can anyone else confirm this behaviour?
OS: Ubuntu 13.10
Platform: 64-bit
Version: 0.14.3398 (Git)
Branch: master
Hash: 95bda087643493a7e31e9cf507f1041fd446c4c7
Python version: 2.7.5+
Qt version: 4.8.4
Coin version: 4.0.0a
SoQt version: 1.5.0
OCC version: 6.5.4
- Attachments
-
- slow_fillet.fcstd
- (184.16 KiB) Downloaded 60 times
Re: Very slow to _open_ complex fillet
I had to double check but yes you actually selected all the edges. Well i will say the obvious and that is you are hitting current software/hardware limit but one of the devs or somebody else could give better explanation.
About modelling technique used i would say there is room for improvement. It is really hard to change anything in this model. Adding/removing few of the rows will probably give unexpected results with existing fillets (topological naming) and you would always have to redo the new ones (time consuming). I will show you alternative solution that will enable you to do changes easily and it just so happens it is faster (but you will sooner or later hit the software/hardware limit with this method when adding rows).
Delete everything but Cube and Cube001. Add sketch on top face of Cube001 and Pad it. Add Fillet:
Here is where you will do all future Radius Fillet changes! Open Draft Workbench and create Array:
Here is where you will do all future Draft Array changes! Set number of vertical/horizontal rows and spacing. Open Part Workbench and make a Cut between Cube and Array:
What you have now is a bit different compared to your original model. First thing you will notice it is a bit faster and most importantly you can change Fillet Radius and number of vertical/horizontal rows with just setting some properties for features in tree view. Just like you would expect from parametric CAD software package. You will notice there is no (topological name) braking involved. You could set this 3 properties in spreadsheet for easy changing.
Changed number of rows and Fillet Radius.
About modelling technique used i would say there is room for improvement. It is really hard to change anything in this model. Adding/removing few of the rows will probably give unexpected results with existing fillets (topological naming) and you would always have to redo the new ones (time consuming). I will show you alternative solution that will enable you to do changes easily and it just so happens it is faster (but you will sooner or later hit the software/hardware limit with this method when adding rows).
Delete everything but Cube and Cube001. Add sketch on top face of Cube001 and Pad it. Add Fillet:
Here is where you will do all future Radius Fillet changes! Open Draft Workbench and create Array:
Here is where you will do all future Draft Array changes! Set number of vertical/horizontal rows and spacing. Open Part Workbench and make a Cut between Cube and Array:
What you have now is a bit different compared to your original model. First thing you will notice it is a bit faster and most importantly you can change Fillet Radius and number of vertical/horizontal rows with just setting some properties for features in tree view. Just like you would expect from parametric CAD software package. You will notice there is no (topological name) braking involved. You could set this 3 properties in spreadsheet for easy changing.
Changed number of rows and Fillet Radius.
Re: Very slow to _open_ complex fillet
Well ... this may not be better, just different. I think it's because chrisf is using a development version which has more error checking than the production releases?triplus wrote:or somebody else could give better explanation.
For example, I opened the 10x10 array with 0.13.1828 (which I just reinstalled) in a matter of seconds.
Opening "Fillet" from the tree view was pretty quick too.
Selecting all 1212 edges took about a minute.
Filleting all to 1.0 mm was about 2 minutes.
It could have been a little quicker; when the CPU fan slowed down I tabbed back to FC and it was done.
OS: Windows XP
Platform: 32-bit
Version: 0.13.1828
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.3.0
Re: Very slow to _open_ complex fillet
You may be right but I'm not sure. As I say, I don't see that FreeCAD has to actually do anything in this phase except load up a QListView (or some such). This really shouldn't take very long. The source will tell.triplus wrote:I had to double check but yes you actually selected all the edges. Well i will say the obvious and that is you are hitting current software/hardware limit but one of the devs or somebody else could give better explanation.
Thanks for the input. You make some interesting points. Certainly filleting then creating an array would be a better approach for the example that I posted but that file was not the model I'm working on, it was just an example. Here's a screen shot of one of the parts that is causing trouble.triplus wrote:About modelling technique used i would say there is room for improvement ...
Re: Very slow to _open_ complex fillet
Interesting. I'll see what 0.13 does with my file. Thanks for looking into it.bejant wrote:Well ... this may not be better, just different. I think it's because chrisf is using a development version which has more error checking than the production releases?triplus wrote:or somebody else could give better explanation.
For example, I opened the 10x10 array with 0.13.1828 (which I just reinstalled) in a matter of seconds.
Opening "Fillet" from the tree view was pretty quick too.
Selecting all 1212 edges took about a minute.
Filleting all to 1.0 mm was about 2 minutes.
It could have been a little quicker; when the CPU fan slowed down I tabbed back to FC and it was done.
Chris
Re: Very slow to _open_ complex fillet
The problem isn't there in 0.13.1830. I'm just going to make sure I don't have debug build enabled on 0.14.chrisf wrote:Interesting. I'll see what 0.13 does with my file. Thanks for looking into it.
Chris
Re: Very slow to _open_ complex fillet
just a guess: often when you open a freecad task view the shape is calculated for "life-view" of the task input.The real feature is just calculated when you hit the ok button. That could be the reason for the delay on opening the feature. But I did not check if this is the case for this special command.
Re: Very slow to _open_ complex fillet
The 'live view' doesn't require any calculation for fillet edge/face selection. It's just the base part with selected edges highlighted.ickby wrote:just a guess: often when you open a freecad task view the shape is calculated for "life-view" of the task input.The real feature is just calculated when you hit the ok button. That could be the reason for the delay on opening the feature. But I did not check if this is the case for this special command.
I've just rebuilt with:
Code: Select all
cmake -DCOIN3D_INCLUDE_DIR=/usr/include/coin/ -DOCC_INCLUDE_DIR=/usr/include/oce/ -DFREECAD_USE_EXTERNAL_PIVY=true ../free-cad-code
make clean
make
I'd appreciate any pointers as to which area of the code might be causing this.
- tanderson69
- Veteran
- Posts: 1626
- Joined: Thu Feb 18, 2010 1:07 am
Re: Very slow to _open_ complex fillet
It appears to me that it is: src/Mod/Part/Gui/SoBrepEdgeSet.cpp:197 createIndexArraychrisf wrote:I'd appreciate any pointers as to which area of the code might be causing this.
I couldn't sample the whole run, but most of the samples I took look like the following:
Re: Very slow to _open_ complex fillet
Very useful.Thanks. Which profiler do you use to generate that picture btw?tanderson69 wrote:It appears to me that it is: src/Mod/Part/Gui/SoBrepEdgeSet.cpp:197 createIndexArraychrisf wrote:I'd appreciate any pointers as to which area of the code might be causing this.
The code for createIndexArray isn't super efficient but that's not the problem.
The problem is that it's being called ... 268,000 times to open my 518 edge fillet. 518 x 519 = 268,842. I need to look at what's calling doAction (presumably to add an edge to the highlight) Nx(N+1) times for N edges.
Code: Select all
doAction called: 268838
createIndexArray: numsegm 514, numcindices 1898, v.size() 1880
doAction called: 268839
createIndexArray: numsegm 515, numcindices 1898, v.size() 1883
doAction called: 268840
createIndexArray: numsegm 516, numcindices 1898, v.size() 1886
doAction called: 268841
createIndexArray: numsegm 517, numcindices 1898, v.size() 1889
doAction called: 268842
createIndexArray: numsegm 518, numcindices 1898, v.size() 1892