View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002382 | FreeCAD | Bug | public | 2015-12-29 14:14 | 2015-12-30 08:56 |
| Reporter | huskier | Assigned To | |||
| Priority | high | Severity | major | Reproducibility | always |
| Status | closed | Resolution | won't fix | ||
| Platform | Windows | OS | Windows XP | OS Version | SP3 |
| Product Version | 0.15 | ||||
| Fixed in Version | 0.16 | ||||
| Summary | 0002382: BoundBox error with complex shape (different from APP(incorrect) and from GUI(correct)) | ||||
| Description | When the attached script file is executed in the FreeCAD's Python console, we obtained the incorrect BoundBox: BoundBox (-0.123577, -0.123577, 0, 28, 15.1236, 100) However, when we show the part in the GUI window with Part.show(myPart), and then use the GUI to get the BoundBox, and it is correct. XLength = 28 YLength = 15 ZLength = 100 | ||||
| Steps To Reproduce | RUN the attached script in the Python console window, then the incorrect BoundBox appears. | ||||
| Tags | No tags attached. | ||||
| FreeCAD Information | |||||
|
|
|
|
|
No, this is not a bug. When a shape is not yet displayed it doesn't have a triangulation and then the cad kernel has to guess the bounding box. Therefore it always creates a bigger bounding box than needed. Usually this way a box is 10% bigger but it also happened that it's almost 100% bigger. Once a shape is displayed it stores the triangulation information and the algorithm uses the mesh to compute a more precise box. In your script myPart.BoundBox => BoundBox (-0.123577, -0.123577, 0, 28, 15.1236, 100) Part.show(myPart) myPart.BoundBox => BoundBox (-1.11022e-016, -1.11022e-016, 0, 28, 15, 100) In case it's relevant to have a precise box but don't want to show it you can call myPart.tessellate(0.01) # accuracy For further information have a look at http://opencascade.blogspot.de/2009/04/all-inclusive-bounding-box.html |
|
|
Thanks wmayer. one more question: Which module is the tessellate interface belonging to? Actually, I want to integrate the interface to the CADQuery library. |
|
|
I've got the answer on myself about the function tessellate. Thanks wmayer for your help. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-12-29 14:14 | huskier | New Issue | |
| 2015-12-29 14:14 | huskier | File Added: BoundBox_test.py | |
| 2015-12-29 17:39 | wmayer | Note Added: 0006653 | |
| 2015-12-29 17:39 | wmayer | Status | new => feedback |
| 2015-12-30 01:10 | huskier | Note Added: 0006654 | |
| 2015-12-30 01:10 | huskier | Status | feedback => new |
| 2015-12-30 05:11 | huskier | Note Added: 0006655 | |
| 2015-12-30 08:56 | wmayer | Status | new => closed |
| 2015-12-30 08:56 | wmayer | Resolution | open => won't fix |
| 2015-12-30 08:56 | wmayer | Fixed in Version | => 0.16 |
FreeCAD