View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004622||FreeCAD||Bug||public||2021-04-07 10:03||2021-04-20 04:50|
|Platform||Linux||OS||Arch Linux||OS Version||5.11.11|
|Summary||0004622: OpenSCAD/OpenSCADTest/app/test_importCSG.py assertion failure|
|Description||I have an OpenSCAD test failing on recent builds from git|
|Steps To Reproduce||- have a recent stable release of occt installed (tested here with 7.5.0)|
- build the latest commit from the master git branch ( a855033f215014d993fc067ea6d6ba89f0a369d5 as of this writing)
- run the built in tests with `FreeCADCmd --console --run-test 0`
|Tags||No tags attached.|
|FreeCAD Information||with commit a855033 from the master branch|
-- Build type: None
-- Compiler: /usr/lib/ccache/bin/c++ (10.2.0)
-- Flags: -Wall -Wextra -Wno-write-strings -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fPIC -w
-- Standard: Requires C++14
-- Python: 3.9.2 [/usr/bin/python] [.cpython-39-x86_64-linux-gnu]
-- PCL: not enabled
-- pybind11: not enabled
-- Boost: 1.75.0 (1.75.0)
-- XercesC: 3.2.3 [/usr/lib/libxerces-c.so] [/usr/include]
-- ZLIB: 1.2.11
-- PyCXX: 6.2.8 [/home/grey/git/freecad-git/src/FreeCAD/src]
-- OCC: 7.5.0 [TKFillet;TKMesh;TKernel;TKG2d;TKG3d;TKMath;TKIGES;TKSTL;TKShHealing;TKXSBase;TKBool;TKBO;TKBRep;TKTopAlgo;TKGeomAlgo;TKGeomBase;TKOffset;TKPrim;TKSTEPBase;TKSTEPAttr;TKSTEP209;TKSTEP;TKHLR;TKFeat] [/usr/lib] [/usr/include/opencascade]
-- SMESH: build internal
-- MEDFile: 4.1.0 [/usr/lib/libmedC.so;/usr/lib/libmed.so] [/usr/include]
-- HDF5: 1.12.0
-- VTK: 8.2.0
-- NETGEN: not enabled
-- SWIG: 4.0.2
-- Eigen3 3.3.9
-- Qt5Core: 5.15.2
-- Qt5Network: 5.15.2
-- Qt5Xml: 5.15.2
-- Qt5XmlPatterns: 5.15.2
-- Qt5Widgets: 5.15.2
-- Qt5PrintSupport: 5.15.2
-- Qt5OpenGL: 5.15.2
-- Qt5Svg: 5.15.2
-- Qt5UiTools: 5.15.2
-- Qt5Concurrent: 5.15.2
-- Qt5WebKitWidgets: 5.212.0
-- Shiboken2: 5.15.2 [/usr/lib64/cmake/Shiboken2-5.15.2] [/usr/include/shiboken2;/usr/include/python3.9]
-- PySide2: 5.15.2 [/usr/include/PySide2]
-- PySide2Tools: [/usr/bin/uic-qt5] [/usr/bin/rcc-qt5]
-- Freetype: 2.10.4
-- OpenGL: /usr/lib/libGL.so
-- OpenGLU: [/usr/lib/libGLU.so][/usr/include]
-- Coin3D: 4.0.1 [Coin] 
-- Pivy: 0.6.5
-- SPNAV: [/usr/lib/libspnav.so] [/usr/include]
-- Matplotlib: 3.4.1
-- Rift: not enabled (BUILD_VR)
-- Doxygen: 1.9.1
-- Language: English
-- Coin3D_DOC: not found
@greyltc I am having a hard time reproducing this -- when you have a minute, could you use the OpenSCAD workbench to insert the following object and then save and attach the resulting FCStd file?
I see the same error, built from commit 33cca2e6c6a6ace4b1203a9ad0f9002a6c841e99.
Attached the requested FCStd file.
Issue-4622.FCStd (5,069 bytes)
||Thanks, @floesche -- the object in your FCStd file has the correct bounding box, so probably the test just needs a recompute() before the check. What kind of system are you on?|
Very similar to @greyltc, just python is at 3.9.3 by now and the kernel at 5.11.15. Do you need any other information?
Not sure if this is helpful, but if I step through the test, I see the following:
I tried to do a recompute on the doc.ActiveObject, with no result:
Let me know if I can test something else.
||In that FCStd file, when you view it from the top, are you seeing a circle, or an oval?|
It's a circle from the top, an oval from front.
In the "Report view" window I am also seeing the following when creating the OpenSCAD element:
…and the attached file is generated directly from the test_import.CSG.py file: I set a breakpoint at line 350 (after doc=self.utility_create_scad…) and the ran
. Just in case this is different from what the GUI does.
test_import_resize_l350.FCStd (3,118 bytes)
||I wonder if the active object isn't what the test expects it to be. If you are seeing a circle from the top, then the bounding box being reported can't correspond to that object, since the reported box has different X and Y components. Can you verify that doc.ActiveObject is in fact giving you that spheroid, and not some other object?|
Sorry, how could I do that?
gives me 'Matrix_Deformation'.
||That's what I expect to see. Can you recompute the entire document and see if the bounds changes?|
Is that how I can recompute a document?
In any case, the XLength doesn't seem to be correct.
||Are you also on Arch, or are using using a different distro? It looks like I'm going to have to find a way of reproducing it locally, there's a disconnect between what you are seeing onscreen (and posting here in your FCStd files) and the reported bounding box, and I can't figure out what that could be.|
Yes, I am also on Arch.
I don't know much about the data structures used in FreeCAD, but I know a bit about coding. So if you have ideas what I can try, I'd be happy to.
||First, thanks for all the help you've provided so far! Second: to be honest I'm at a bit of a loss about what's going on, but my first order of business will be to add some print statements around the matrix deformation to make sure that at least the values going in and out of it are being calculated correctly.|
The bounding box seems to originate from the OpenCASCADE transformation. The test code ultimately calls
in TopoShape.cpp L3234. This is where the dimensions of the boundingbox changes from the expected to the unexpected dimensions.
The most fundamental way I could replicate this, was to do the transformation directly in DRAWEXE:
This creates the first bounding box:
and the second:
These numbers are basically the same as the test generates.
Possibly all this is related to the (non)issue https://tracker.dev.opencascade.org/view.php?id=27042?
|2021-04-07 10:03||greyltc||New Issue|
|2021-04-10 02:48||chennes||Assigned To||=> chennes|
|2021-04-10 02:48||chennes||Status||new => assigned|
|2021-04-12 18:19||chennes||Status||assigned => feedback|
|2021-04-12 18:19||chennes||Note Added: 0015611|
|2021-04-18 00:58||floesche||Note Added: 0015614|
|2021-04-18 00:58||floesche||File Added: Issue-4622.FCStd|
|2021-04-18 22:10||chennes||Note Added: 0015615|
|2021-04-18 22:20||floesche||Note Added: 0015616|
|2021-04-18 22:21||floesche||Note Edited: 0015616||View Revisions|
|2021-04-18 22:30||floesche||Note Edited: 0015616||View Revisions|
|2021-04-19 14:50||floesche||Note Added: 0015617|
|2021-04-19 14:50||floesche||Note Edited: 0015617||View Revisions|
|2021-04-19 14:50||floesche||Note Edited: 0015617||View Revisions|
|2021-04-19 16:07||chennes||Note Added: 0015618|
|2021-04-19 18:41||floesche||Note Added: 0015619|
|2021-04-19 18:58||floesche||Note Added: 0015620|
|2021-04-19 18:58||floesche||File Added: test_import_resize_l350.FCStd|
|2021-04-19 19:22||chennes||Note Added: 0015621|
|2021-04-19 19:37||floesche||Note Added: 0015622|
|2021-04-19 19:42||chennes||Note Added: 0015623|
|2021-04-19 19:54||floesche||Note Added: 0015624|
|2021-04-19 21:45||chennes||Note Added: 0015626|
|2021-04-19 21:49||floesche||Note Added: 0015627|
|2021-04-19 22:02||chennes||Note Added: 0015628|
|2021-04-20 04:50||floesche||Note Added: 0015629|