(solved) OCCT7.7.1 create view bug with links and PartContainer (master)

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: OCCT7.7.1 create view bug with links and PartContainer (master)

Post by Syres »

Call it a workaround or a hack but if I change the XSource from:

FailOCC771.png
FailOCC771.png (11.2 KiB) Viewed 1417 times
to:

CorrectOCC771.png
CorrectOCC771.png (9.28 KiB) Viewed 1417 times

the view shows correctly and error free. Also I can open the file saved in the build below with an old version of OCC such as 7.3.0 and it's also error free and updates the View when I change the sizes of the Box.

Code: Select all

OS: Linux Mint 20.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33068 (Git)
Build type: Release
Branch: master
Hash: b626caffdc53614a0f71bb578a987e9712608bac
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.1
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * Silk 1.0.0
  * A2plus
  * Defeaturing 1.2.0
  * CurvedShapes 1.0.4
  * MakerWorkbench 1.0.1
  * freecad.gears 1.0.0
  * Curves 0.6.8
  * toSketch 1.0.1
  * Plot 2022.4.17
  * AirPlaneDesign 0.4.0
  * fasteners 0.4.56
  * sheetmetal 0.2.63
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: OCCT7.7.1 create view bug with links and PartContainer (master)

Post by wandererfan »

AFAICT, TechDraw does not use gp_GTrsf directly as it only works on gp_XYZ, not shapes. We use gp_Trsf for shapes.

XGetProperties looks like it applies to OCAF documents, which we don't use.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: OCCT7.7.1 create view bug with links and PartContainer (master)

Post by wandererfan »

Having trouble finding 7.7.1. Closest I can get is 7.7.0. Does anybody have a link?
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: OCCT7.7.1 create view bug with links and PartContainer (master)

Post by Syres »

Here's the link to the tags: https://git.dev.opencascade.org/gitweb/ ... ;a=summary

I compiled mine by:

Code: Select all

git clone https://git.dev.opencascade.org/repos/occt.git occt771-source
cd occt771-source
git checkout OCCT-771
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: OCCT7.7.1 create view bug with links and PartContainer (master)

Post by wandererfan »

There has been a couple of recent changes to how the shapes from linked objects are handled (git commit 176cdd45fe and git commit 0146d070e2). I don't see why they would generate "<Exception> gp_GTrsf::Trsf() - non-orthogonal GTrsf", but stranger things have happened.

In any case, I don't get an error with this version:

Code: Select all

OS: Linux Mint 20.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33113 (Git)
Build type: Debug
Branch: invOCC771Issue
Hash: 970fd867052385028111e056891716317dc2b834
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk , OCC 7.7.1
Locale: English/Canada (en_CA)
Installed mods: 
  * dodo 1.0.0
  * BOLTSFC 2022.11.5
  * sheetmetal 0.2.63
  * FreeCAD_Electric
  * freecad.gears 1.0.0
  * Assembly4 0.12.7
  * A2plus 0.4.60k
Can somebody else try with recent master and occ7.7.1?
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: OCCT7.7.1 create view bug with links and PartContainer (master)

Post by Syres »

wandererfan wrote: Sun May 07, 2023 11:43 pm Can somebody else try with recent master and occ7.7.1?
No error using:

Code: Select all

OS: Linux Mint 20.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33118 (Git)
Build type: Release
Branch: master
Hash: 6f8e3f374f7dead4a373e1114ab4cc30785d8daa
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.1
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * Silk 1.0.0
  * A2plus
  * Defeaturing 1.2.0
  * CurvedShapes 1.0.4
  * MakerWorkbench 1.0.1
  * freecad.gears 1.0.0
  * Curves 0.6.8
  * toSketch 1.0.1
  * Plot 2022.4.17
  * AirPlaneDesign 0.4.0
  * fasteners 0.4.56
  * sheetmetal 0.2.63
User avatar
mfro
Posts: 663
Joined: Sat Sep 23, 2017 8:15 am

Re: OCCT7.7.1 create view bug with links and PartContainer (master)

Post by mfro »

No error using:

Code: Select all

OS: Ubuntu 22.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33118 (Git)
Build type: Release
Branch: master
Hash: 6f8e3f374f7dead4a373e1114ab4cc30785d8daa
Python 3.10.6, Qt 5.15.3, Coin 4.0.0, Vtk 7.1.1, OCC 7.8.0.dev
Locale: German/Germany (de_DE)
Installed mods: 
  * lattice2 1.0.0
  * Assembly4 0.50.2
  * Curves 0.6.8
  * Silk 0.1.3
  * Behave-Dark-Colors 0.1.1
Cheers,
Markus
user1234
Veteran
Posts: 3332
Joined: Mon Jul 11, 2016 5:08 pm

Re: OCCT7.7.1 create view bug with links and PartContainer (master)

Post by user1234 »

@wandererfan has fixed it with git commit 176cdd45fe54d15c563c8cca9a26e1a97e6af537.

Many thanks!


Greetings
user1234
User avatar
Jolbas
Posts: 327
Joined: Sat Mar 26, 2022 7:48 am
Location: Sweden

Re: (solved) OCCT7.7.1 create view bug with links and PartContainer (master)

Post by Jolbas »

Shape.transformGeometry() seems to use the same function. Here is a code snippet that gives the error:

Code: Select all

obj = App.ActiveDocument.addObject("Part::Box","Box")
obj.recompute()
obj.Shape.transformGeometry(App.Matrix())

Code: Select all

OS: macOS 12.6
Word size of FreeCAD: 64-bit
Version: 0.21.0.33181 +1 (Git)
Build type: Release
Branch: matrix_decomposing
Hash: 6a61cf5b48758f76dcd6cd8d3cb8d7b30cb4df04
Python 3.10.11, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.6, OCC 7.7.0
Locale: English/United States (en_US)
Installed mods: 
  * kugghjul.py
  * dxf-library
  * fcgear 1.0.0
  * __pycache__
  * sheetmetal 0.2.61
  * tida.py
  * Curves 0.6.8
  * Assembly4 0.12.7
The code snippet works in FreeCAD 0.20.2
User avatar
Jolbas
Posts: 327
Joined: Sat Mar 26, 2022 7:48 am
Location: Sweden

Re: (solved) OCCT7.7.1 create view bug with links and PartContainer (master)

Post by Jolbas »

Same error in Draft->Scale
viewtopic.php?p=682210#p682210
Post Reply