-
-
Notifications
You must be signed in to change notification settings - Fork 880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix polygon connector #843
Conversation
Developers, see issue CURA-5705. |
I need to retract some claims. I've done some tests and it turns out the new code is quite a bit slower. Export stage processing time: Total fraction of polygons connected: So the core functionality of the PolygonConnector class is only enhanced marginally, at the cost of quite some computation time. Still the PR solves the problem of random connections which can even introduce infill lines outside of the object. I don't know yet which of my commits fixed that bug, but if you think the accuracy increase of 15% isn't worth the extra processing time of 10% then I can see if I can isolate the bug fix. Project file for testing: (Nobody thinks that boaty-mac-bench-face is a good benchmark, right?) Project files seem to be broken on master?!
|
I am getting the same results in terms of accuracy when I test the lil L project file shared above: master: 65%, PR: 85% |
Okay I decided I need to really fix the implementation, because these fail rates are just too damn high! Now I am satisfied with the fail rates: |
e00a911
to
e5b290b
Compare
Can you fix the branch conflicts? |
e5b290b
to
468bb8a
Compare
The conflicts were auto-resolved. |
Why is Jenkins crying? |
[ 81%] Building CXX object CMakeFiles/ArcusCommunicationTest.dir/tests/arcus/MockSocket.cpp.obj In file included from C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.cpp:4:0: C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:23:10: error: 'void cura::MockSocket::connect(const string&, int)' marked 'override', but does not override
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:24:10: error: 'void cura::MockSocket::listen(const string&, int)' marked 'override', but does not override
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:25:10: error: 'void cura::MockSocket::close()' marked 'override', but does not override
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:26:10: error: 'void cura::MockSocket::reset()' marked 'override', but does not override
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:29:10: error: 'void cura::MockSocket::sendMessage(Arcus::MessagePtr)' marked 'override', but does not override
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:30:23: error: 'Arcus::MessagePtr cura::MockSocket::takeNextMessage()' marked 'override', but does not override
CMakeFiles\ArcusCommunicationTest.dir\build.make:87: recipe for target 'CMakeFiles/ArcusCommunicationTest.dir/tests/arcus/MockSocket.cpp.obj' failed mingw32-make[2]: *** [CMakeFiles/ArcusCommunicationTest.dir/tests/arcus/MockSocket.cpp.obj] Error 1 CMakeFiles\Makefile2:331: recipe for target 'CMakeFiles/ArcusCommunicationTest.dir/all' failed mingw32-make[1]: *** [CMakeFiles/ArcusCommunicationTest.dir/all] Error 2 Makefile:161: recipe for target 'all' failed mingw32-make: *** [all] Error 2 script returned exit code 2 |
That's unrelated to me PR
…On Thu, 27 Sep 2018, 17:31 alekseisasin, ***@***.***> wrote:
[ 81%] Building CXX object
CMakeFiles/ArcusCommunicationTest.dir/tests/arcus/MockSocket.cpp.obj
In file included from
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.cpp:4:0:
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:23:10:
error: 'void cura::MockSocket::connect(const string&, int)' marked
'override', but does not override
void connect(const std::string& address, int port) override;
^
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:24:10:
error: 'void cura::MockSocket::listen(const string&, int)' marked
'override', but does not override
void listen(const std::string& address, int port) override;
^
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:25:10:
error: 'void cura::MockSocket::close()' marked 'override', but does not
override
void close() override;
^
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:26:10:
error: 'void cura::MockSocket::reset()' marked 'override', but does not
override
void reset() override;
^
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:29:10:
error: 'void cura::MockSocket::sendMessage(Arcus::MessagePtr)' marked
'override', but does not override
void sendMessage(Arcus::MessagePtr message) override;
^
C:....\ngine_fix_polygon_connector-3V6HUP43CQSHTUOXHZEOXJ7DNWOI4QXO74SGWJXTH7SMVB3F7WOA\tests\arcus\MockSocket.h:30:23:
error: 'Arcus::MessagePtr cura::MockSocket::takeNextMessage()' marked
'override', but does not override
Arcus::MessagePtr takeNextMessage() override;
^
CMakeFiles\ArcusCommunicationTest.dir\build.make:87: recipe for target
'CMakeFiles/ArcusCommunicationTest.dir/tests/arcus/MockSocket.cpp.obj'
failed
mingw32-make[2]: ***
[CMakeFiles/ArcusCommunicationTest.dir/tests/arcus/MockSocket.cpp.obj]
Error 1
CMakeFiles\Makefile2:331: recipe for target
'CMakeFiles/ArcusCommunicationTest.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/ArcusCommunicationTest.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
script returned exit code 2
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#843 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIe9EZ75i-ewIvypHT8BAkdn978EH8D3ks5ufO9SgaJpZM4WgT-L>
.
|
Right, we need to update the libarcus on the server. |
…re reliably when the polygons involved have complex shapes
… poly_idx of the result any more.
… line pairs if a good candidate has been found It used to first put all candidate connecting pairs of line segments in a set first and then process all items in the set until a good one is found. Now it puts them in the set within the same loop as it processes the items.
…idth, so don't provide that as a parameter
ff6bccd
to
3ef1374
Compare
Contributes to issue CURA-5826.
I don't see a definite improvement in how often the cross infill polygons can be connected. It still seems to fail to connect quite often. This is a screenshot of one of the worst layers: But since that was already the case, I think we'll have to accept that as a limitation of our current algorithm. What does appear to be fixed is the much more pressing issue of polygons connecting across the infill randomly. I am not able to reproduce those any more. Good job. |
I don't understand what connections you were expecting in that specific
case. It looks to me like no connections are possible on that layer.
If you use infill walls then the infill can connect to those. Everything is
then connected to each other via the infill walls.
…On Thu, 25 Oct 2018, 15:19 Ghostkeeper, ***@***.***> wrote:
Merged #843 <#843> into
master.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#843 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIe9EebDWyF4l-SKXoqqytwcH4FDt2gPks5uobpygaJpZM4WgT-L>
.
|
I've fixed some problems with the PolygonConnector and improved performance.
The performance improvement should mostly come from the fact that we now use a sparse grid to efficiently lookup where polygons are close enough to each other to be connected.
I haven't done any performance tests to see whether performance is actually increased, but the tests below certainly show that some bugs are fixed and that the code is improved a lot!
Before:
(line dist 0.76)
random connection: (happened on roughly 2% of the layers)
no connection: (happened on roughly 50% of the layers, now on roughly 5%)
After:
Project:
lil_L_x2__cross_3d.curaproject.3mf.remove_extension.zip