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
[Problem] Shape.transformGeometry(matrix) fails on OCC 7.7.x #9651
Comments
where in our code are we calling this? perhaps there's new parameters that we need to pass or we need to move to a different occt function. |
maybe we need to call mat.setForm() before making the transformation? |
it doesn't help. It is changed back to non-orthogonal later in OCC. Also it has been and should be able to handle non-orthogonal matrices too. |
The line to throw an error if it was it also looks to me like |
If I run the following c++ code I don't get the error and the
So ther seem to be something in |
there's a couple of differences, we don't pass an identity matrix we use FreeCAD/src/Mod/Part/App/TopoShape.cpp Lines 3055 to 3067 in 60d99ca
then we directly do FreeCAD/src/Mod/Part/App/TopoShape.cpp Lines 3070 to 3071 in 60d99ca
we don't use |
is equivalent to
I don't get the error for this code directly after `mat.SetValue(2,4,rclTrf[1][3]);
With this shape the execution never reaches the function where the error is thrown. It returns before because the triangulation is null. I don't understand what that means. |
And the error is still thrown if I remove every |
maybe it's related to tessellation? I'm gonna assume when doing the transformation on the mesh it's doing something different. It was most likely introduced by that commit I mentioned then, since it introduced all this triangulation related stuff. |
yeah it looks like it's about tessellation https://dev.opencascade.org/doc/refman/html/class_poly___triangulation.html#details in your example probably |
In this python code the first call to
|
The recompute isn't necessary. The assignment is enough
|
This means we may work around this by cleaning the shape before transforming!
|
We could add a workaround for occt >=7.7 for the moment, we might need to submit a bug report upstream and if possible a patch to fix it |
A fix for OCCT may be to replace the linked lines with a simple
But I'm not sure at all that won't have side effects |
Fix FreeCAD#9651 by making a fresh copy of shape before transforming
@bgbsww this is another occt 7.7 bug |
Looks to be fixed in 7.8.0 @adrianinsaval
|
Awesome, then once the 7.8 PR is merged is probably a good idea to skip 7.7 and move our distributions to that |
potentially fixed by Open-Cascade-SAS/OCCT@bcfc5f0 which was backported to 7.7.2: Open-Cascade-SAS/OCCT@c60e501 |
Is there an existing issue for this?
Version
0.21 (Development)
Full version info
Subproject(s) affected?
None
Problem description
Running this python code:
Gives this error in python console but nothing in report view:
<class 'Part.OCCError'>: gp_GTrsf::Trsf() - non-orthogonal GTrsf
The error originates from https://github.com/Open-Cascade-SAS/OCCT/blob/5d8b1a4076398556095c71c093ca517cde77d4d8/src/gp/gp_GTrsf.hxx#L446 in OCCT, which is called from https://github.com/Open-Cascade-SAS/OCCT/blob/5d8b1a4076398556095c71c093ca517cde77d4d8/src/BRepTools/BRepTools_GTrsfModification.cxx#L314
It seems like an OCCT problem but I'm not sure how to proceed. From other posts in forum here it seems to only affect OCCT 7.7
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: