0.20 bug/regression Array Pattern issue #6641
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: 0.20 bug/regression Array Pattern
PR: https://github.com/FreeCAD/FreeCAD/pull/6661.
Only partially fixes the issue, but only remaining step is to convert a compound to a compsolid or a solid.
Only partially fixes the issue, but only remaining step is to convert a compound to a compsolid or a solid.
My latest (or last) project: B-spline Construction Project.
Re: 0.20 bug/regression Array Pattern
I tested a little bit this PR. The original testfile works (fillets are in sketcher). But here a little more edited file.
Here is transformation before the regression. Here you can see, that also the transformation of the fillets works. Just said, it takes much longer, because the transformation optimizations are not included. Also a small note: a geometry check with transformed sweep and the first fillet is OK. But the geometry check with the second fillet said not OK. But i think this is not important, also i think that have nothing to do with case now (also when one sweep with all two fillet the geometry check is OK).
(Or maybe it is a precision issue, since it makes many facets. Also i noticed rarely, that transformations are sometimes not precise enough, to make a valid drawing with that. When i transform it per hand, then it works. But it is pure guess. When have this issue the next time, i can share a file, but in an other thread).
Here a transformation after with your commit. Here the transformation of the fillets do not work. The log when i klick to add the fillet:
Code: Select all
05:27:25 431.384 Tree.cpp(811): delay update status
05:27:25 ViewProvider update time: 0.156000 s
05:27:25 Shape tria info: Faces:124 Edges:377 Nodes:4664 Triangles:5616 IdxVec:2189
05:27:25 431.541 Tree.cpp(811): delay update status
05:27:25 431.543 Tree.cpp(811): delay update status
05:27:25 ViewProvider update time: 0.119000 s
05:27:25 Shape tria info: Faces:124 Edges:377 Nodes:4664 Triangles:5616 IdxVec:2189
05:27:25 431.663 Tree.cpp(811): delay update status
05:27:25 431.663 Selection.cpp(1603): Clear selection
05:27:25 431.673 MainWindow.cpp(1316): update actions
05:27:25 431.758 Tree.cpp(2511): begin update status
05:27:25 431.758 Tree.cpp(2572): update item status
05:27:25 431.759 Tree.cpp(2666): done update status
05:27:32 432.745 Tree.cpp(4282): Subname correction Kappe50_jeno_edit#Fillet001. -> Kappe50_jeno_edit#Body.Fillet001.
05:27:32 432.746 Selection.cpp(1102): Add Selection Kappe50_jeno_edit#Body.Fillet001. (0, 0, 0)
05:27:32 432.747 Tree.cpp(811): delay update status
05:27:32 432.748 <App> Document.cpp(3508): Recompute pass 0
05:27:32 432.748 <App> Document.cpp(3771): Recomputing Kappe50_jeno_edit#PolarPattern
05:27:32 432.752 Tree.cpp(811): delay update status
05:27:32 Transformed: Non-Overlapping feature mode (compound of tool shapes)
05:27:32 437.553 <App> Document.cpp(3818): Failed to recompute Kappe50_jeno_edit#PolarPattern: TopoDS_Builder::Add
05:27:32 437.553 <App> Document.cpp(3565): Recompute time: 4.80513s
05:27:32 437.554 Tree.cpp(811): delay update status
05:27:32 437.554 Tree.cpp(811): delay update status
05:27:32 437.554 <App> Document.cpp(3576): Recompute total time: 4.80585s
05:27:32 Recompute failed! Please check report view.
05:27:32 437.555 Tree.cpp(811): delay update status
05:27:32 ViewProvider update time: 0.120000 s
05:27:32 Shape tria info: Faces:124 Edges:377 Nodes:4664 Triangles:5616 IdxVec:2189
05:27:32 437.676 Tree.cpp(811): delay update status
05:27:32 437.677 Tree.cpp(811): delay update status
05:27:32 ViewProvider update time: 0.117000 s
05:27:32 Shape tria info: Faces:124 Edges:377 Nodes:4664 Triangles:5616 IdxVec:2189
05:27:32 437.794 Tree.cpp(811): delay update status
05:27:32 437.796 Tree.cpp(811): delay update status
05:27:32 ViewProvider update time: 0.124000 s
05:27:32 Shape tria info: Faces:124 Edges:377 Nodes:4664 Triangles:5616 IdxVec:2189
05:27:32 437.92 Tree.cpp(811): delay update status
05:27:32 437.939 MainWindow.cpp(1316): update actions
05:27:32 438.025 Tree.cpp(2511): begin update status
05:27:32 438.025 Tree.cpp(2572): update item status
05:27:32 438.026 Tree.cpp(2666): done update status
Code: Select all
05:27:32 Transformed: Non-Overlapping feature mode (compound of tool shapes)
.....
05:27:32 Recompute failed! Please check report view.
Many thanks for working on it! I (and i think also many others) really appreciate it!
Greetings
user1234
Re: 0.20 bug/regression Array Pattern
I have a question: what exactly does "overlap mode" do?adrianinsaval wrote: ↑Tue Mar 15, 2022 6:45 pm Interestingly, if you change the Overlap property to Overlap mode the second instance works but the third (and following if set to a higher number) doesn't. My example is based on the minimal one posted by chrisb but the same happens with the other
For example, with the example from the bug report, unless "Occurrences" is set to 60, there is no intersection between the occurrences. With "Overlap Mode", this makes a multi-solid compound out of the transformed "tool shapes". OCC's fuse algorithm doesn't seem to like fusing (at least solids) with compounds. Comp-solids behave correctly, but the fuse somehow always creates a compound.
Right now there are a couple options:
1. Run through each of the solids of the compound: can make everything slow as the last one.
2. Make the fuzzy fuse/cut on the original object itself, but this sounds like doing things exactly as with "Overlap" property set to "No overlap mode" without making a compound. As such the fuzzy operations can be done in parallel, as opposed to serially adding individual transformed tools to compound (though it can be parallelized as well in some way).
Sorry if I'm getting too technical here. Please point out where I'm being too opaque.
Also tagging Uwe and user1234 for the discussion.
My latest (or last) project: B-spline Construction Project.
Re: 0.20 bug/regression Array Pattern
As far as i remember, it have something to do how the transformation elements (tool shapes?) are handled before the last boolean operation is done. For example when they intersecting each other, fuse before. I think the reason is to prevent cutting always over the same faces (also for example on plane cuts, the edges and faces gets more, which leads to plane contact cuts, which is also not good). But i noticed now, that it does not refine tool shapes before the last boolean operation. The refine is done after the last boolean operation
Here a log entry from a debug build when i change a PartDesign pattern the testfile in this thread:
https://forum.freecadweb.org/viewtopic. ... 6&#p582640
Code: Select all
Transformed: Non-Overlapping feature mode (compound of tool shapes)
Transformed: Overlapping feature mode (fusing tool shapes)
I am also interested, how this "FreeCAD" works.
Greetings
user1234
Re: 0.20 bug/regression Array Pattern
So presumably this was working right before git commit 03da9d3501?user1234 wrote: ↑Fri Mar 25, 2022 5:01 am Here is transformation before the regression.before_regression.pngHere you can see, that also the transformation of the fillets works. Just said, it takes much longer, because the transformation optimizations are not included. Also a small note: a geometry check with transformed sweep and the first fillet is OK. But the geometry check with the second fillet said not OK. But i think this is not important, also i think that have nothing to do with case now (also when one sweep with all two fillet the geometry check is OK).
Did it also make those many edges when it worked? Curious what's happening there.user1234 wrote: ↑Fri Mar 25, 2022 5:01 am (Or maybe it is a precision issue, since it makes many facets.facets.pngAlso i noticed rarely, that transformations are sometimes not precise enough, to make a valid drawing with that. When i transform it per hand, then it works. But it is pure guess. When have this issue the next time, i can share a file, but in an other thread).
My latest (or last) project: B-spline Construction Project.
Re: 0.20 bug/regression Array Pattern
Yes, exactly. I checked out one commit before.
git commit 89b8e81d5c3b11572a0288720d0b4145d2ec2a7e
The transformation itself works. I only have extra facets and the geometry check claims many self intersections. But also i compiled this branch with OCCT7.4.0, because it does not work with OCCT7.6.1, since some newer OCCT adapt commits are not in this branch. Maybe with a newer OCCT it works.
Here the check with pattern fillet, note the extra vertexes on the other 3 rips.
Here the check when i make the fillet with 2 fillet features.
Greetings
user1234
- adrianinsaval
- Veteran
- Posts: 5551
- Joined: Thu Apr 05, 2018 5:15 pm
Re: 0.20 bug/regression Array Pattern
You have 3 options there:
-detect: makes the first transformation then checks if it intersects the original, if it does I think it fuses the transformed shapes before fusing/cuting from the base shape.
-overlap: ignores the overlap detection and treats it as if it was overlapping (fuses)
-non overlap: same but treats it as if it didn't overlap
IIRC the choice is there because non overlap mode is more efficient but may fail for some cases were they overlap, so you can try if it works and leave it in that mode. I'm not sure. Better to read the original thread were this was discussed.
Re: 0.20 bug/regression Array Pattern
Thanks for the input, @adrianinsaval.
Do you happen to know where this is?adrianinsaval wrote: ↑Fri Mar 25, 2022 12:37 pm Better to read the original thread were this was discussed.
My latest (or last) project: B-spline Construction Project.
Re: 0.20 bug/regression Array Pattern
I think, this is the correct thread, https://forum.freecad.org/viewtopic.php?t=55860.
Greetings
user1234
- adrianinsaval
- Veteran
- Posts: 5551
- Joined: Thu Apr 05, 2018 5:15 pm
Re: 0.20 bug/regression Array Pattern
https://github.com/FreeCAD/FreeCAD/pull/4504
https://forum.freecadweb.org/viewtopic.php?f=19&t=55860
specific post introducing the overlap mode property: https://forum.freecadweb.org/viewtopic. ... ap#p481121
would be nice if you could run a benchmark to know if we lose (or gain, who knows) any performance using the compsolid.
also related is this PR were it seems the same method was used for PD holes: https://github.com/FreeCAD/FreeCAD/pull/4381 perhaps it's worth using a compsolid there too, or are only additive operations failing?