View Issue Details

IDProjectCategoryView StatusLast Update
0002299SketcherBugpublic2018-09-22 16:30
Reporterwmayer Assigned Towmayer  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionwon't fix 
Target Version0.18 
Summary0002299: Ground face of sketch for padding can be invalid
Descriptionhttp://forum.freecadweb.org/viewtopic.php?f=13&t=12813
TagsNo tags attached.
FreeCAD Information

Activities

abdullah

2017-12-12 14:45

manager   ~0010585

Not sketch specific:
https://forum.freecadweb.org/viewtopic.php?f=13&t=12813#p102562

@wmayer
I have tried to reproduce this today. I see a good face when changing from 18,5 to 19 mm.

OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12772 (Git)
Build type: None
Branch: master
Hash: c8c9b76f43d2c78c4afb65b756f3f07d626aac85
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0


I

wmayer

2017-12-12 20:02

administrator   ~0010592

Last edited: 2017-12-12 20:02

With occ 7.0 I can still confirm the issue. I don't know if you got all the details of the discussion in German. So, here are some details:

When we have a sketch with several wires we have to determine what is an outer wire and what is an inner wire. A fast method is to use the diagonal of the bounding box and the wire with the longest diagonal is our outer wire.

Now it's known that the bounding box occ delivers can be much bigger is it should be. This mainly happens if a shape hasn't been tessellated yet. Roman Lygin explained this behaviour in his blog.

Now when changing the radius to 19mm then exactly the above situation occurs: the bounding box of the inner circle is bigger than the rounded rectangle and thus the face creation returns an invalid shape.

abdullah

2017-12-13 13:29

manager   ~0010599

@wmayer

I understood the part of the bounding box. However, I have not tried to check my bounding box. I can do it if you are interested. Just tell me what to type.

I have opened the sketch and changed 18.5 mm to 19 mm. I attach a picture after the change showing it is 19 mm and a face that is just preselected without the color blending you get in broken faces.

Let me know if I can be further of assistance.
luefterMount.png (73,729 bytes)   
luefterMount.png (73,729 bytes)   

wmayer

2017-12-13 18:06

administrator   ~0010601

Here is a modified version of the Python macro to determine the diagonal of the bounding boxes.

sketch=App.ActiveDocument.Sketch.Shape
for i in sketch.Wires:
   print ("%s: len=%f: %d edges" % (repr(i.BoundBox), i.BoundBox.DiagonalLength, len(i.Edges)))
which returns this output:


BoundBox (-20.3296, -20.3296, 0, 20.3296, 20.3296, 0): len=57.500704: 8 edges
BoundBox (-17.5153, -17.5153, 0, -14.4847, -14.4847, 0): len=4.286054: 1 edges
BoundBox (14.4847, -17.5153, 0, 17.5153, -14.4847, 0): len=4.286054: 1 edges
BoundBox (-17.5153, 14.4847, 0, -14.4847, 17.5153, 0): len=4.286054: 1 edges
BoundBox (14.4847, 14.4847, 0, 17.5153, 17.5153, 0): len=4.286054: 1 edges
BoundBox (-20.5655, -20.5655, 0, 20.5655, 20.5655, 0): len=58.167882: 1 edges

Python
As you can see the circle has a bigger bounding box (58.167882) than the rounded rectangle (57.500704)

If you have a minute then post the result of the macro after changing the radius to 19 mm and refreshing the document.

abdullah

2017-12-13 18:22

manager   ~0010602

Not in my version:


BoundBox (-20, -20, 0, 20, 20, 0): len=56.568542: 8 edges
BoundBox (-17.3593, -17.3898, 0, -14.6, -14.6102, 0): len=3.916622: 1 edges
BoundBox (14.6407, -17.3898, 0, 17.4, -14.6102, 0): len=3.916622: 1 edges
BoundBox (-17.3593, 14.6102, 0, -14.6, 17.3898, 0): len=3.916622: 1 edges
BoundBox (14.6407, 14.6102, 0, 17.4, 17.3898, 0): len=3.916622: 1 edges
BoundBox (-18.8715, -18.9679, 0, 19, 18.9679, 0): len=53.603831: 1 edges

Kunda1

2018-01-25 17:01

administrator   ~0010852

@wmayer abdullah's results differ than yours.

wmayer

2018-01-26 10:45

administrator   ~0010860

The different numbers can have two reasons:
1. Computing the bounding boxes has been improved in occ 7.1
2. He uses a different deviation value in the preferences. The lower this value, the more line segments are created and thus the more accurate the bounding box will be. I have used the default value of 0.5%

abdullah

2018-01-27 17:10

manager   ~0010879

Result:
BoundBox (-20, -20, 0, 20, 20, 0): len=56.568542: 8 edges
BoundBox (-17.3593, -17.3898, 0, -14.6, -14.6102, 0): len=3.916622: 1 edges
BoundBox (14.6407, -17.3898, 0, 17.4, -14.6102, 0): len=3.916622: 1 edges
BoundBox (-17.3593, 14.6102, 0, -14.6, 17.3898, 0): len=3.916622: 1 edges
BoundBox (14.6407, 14.6102, 0, 17.4, 17.3898, 0): len=3.916622: 1 edges
BoundBox (-18.3749, -18.4687, 0, 18.5, 18.4687, 0): len=52.193205: 1 edges

OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13086 (Git)
Build type: None
Branch: master
Hash: f64760b8a3dabf9d218418f6a3980d900b39d703
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

Deviation: 0,0100 %

If I set your deviation (0,5%), close the project, reopen the file, I get the same result:
BoundBox (-20, -20, 0, 20, 20, 0): len=56.568542: 8 edges
BoundBox (-17.3593, -17.3898, 0, -14.6, -14.6102, 0): len=3.916622: 1 edges
BoundBox (14.6407, -17.3898, 0, 17.4, -14.6102, 0): len=3.916622: 1 edges
BoundBox (-17.3593, 14.6102, 0, -14.6, 17.3898, 0): len=3.916622: 1 edges
BoundBox (14.6407, 14.6102, 0, 17.4, 17.3898, 0): len=3.916622: 1 edges
BoundBox (-18.3749, -18.4687, 0, 18.5, 18.4687, 0): len=52.193205: 1 edges

If you need any other information, just let me know :)

normandc

2018-09-02 20:33

manager   ~0011688

I am not able to reproduce the original issue with FC 0.17/0.18 based on OCCT 7.3.0.

Besides, there are multiple redundant constraints in the sketch relating to overuse of symmetric constraints. The Sketcher in v0.18 now detects these conflicts thanks to abdullah's improvements of the solver.

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14498 (Git)
Build type: Release
Branch: master
Hash: e381e6b739a6b83b5f476546b64569cfa03a4e3a
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Canada (fr_CA)

Kunda1

2018-09-13 14:17

administrator   ~0011728

@wmayer Normand can't reproduce the issue on FC 0.17/0.18 based on OCCT 7.3.0
Can you confirm?

wmayer

2018-09-22 16:30

administrator   ~0011817

With OCCT 7.0 I have tested this with several tessellation tolerances and it shows the same erroneous behaviour in all cases. But since newer OCCT versions don't suffer from this issue it must be some 7.0 related. So, after all it looks like an OCCT issue which is fixed now and this means that from FreeCAD side we don't have to search for an alternative way to distinguish between outer and inner wires.

Issue History

Date Modified Username Field Change
2015-10-14 20:15 wmayer New Issue
2015-10-14 20:16 wmayer Project FreeCAD => Sketcher
2017-02-18 21:43 Kunda1 Target Version => 0.17
2017-10-16 09:07 wmayer Target Version 0.17 =>
2017-12-12 14:45 abdullah Note Added: 0010585
2017-12-12 20:02 wmayer Note Added: 0010592
2017-12-12 20:02 wmayer Note Edited: 0010592
2017-12-13 13:29 abdullah File Added: luefterMount.png
2017-12-13 13:29 abdullah Note Added: 0010599
2017-12-13 17:56 Kunda1 Status new => feedback
2017-12-13 18:06 wmayer Note Added: 0010601
2017-12-13 18:06 wmayer Status feedback => new
2017-12-13 18:22 abdullah Note Added: 0010602
2018-01-25 17:01 Kunda1 Note Added: 0010852
2018-01-26 10:45 wmayer Note Added: 0010860
2018-01-27 17:10 abdullah Note Added: 0010879
2018-08-26 00:30 Kunda1 Target Version => 0.18
2018-09-02 20:33 normandc Note Added: 0011688
2018-09-13 14:17 Kunda1 Note Added: 0011728
2018-09-13 14:17 Kunda1 Status new => feedback
2018-09-22 16:30 wmayer Assigned To => wmayer
2018-09-22 16:30 wmayer Status feedback => closed
2018-09-22 16:30 wmayer Resolution open => won't fix
2018-09-22 16:30 wmayer Note Added: 0011817