[solved] Request for verifying OCCT version differences

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

[solved] Request for verifying OCCT version differences

Post by mlampert »

I have a unit test that runs just fine on my system, using OCCT 7.3, and it fails in Travis. My assumption is that it depends on the OCC version so I was wondering if ppl could run attached script in FC and let me know if one of them reports "NOT OK" and if the also printed Orientation is the key to success here.

Thanks in advance!

Code: Select all

OS: Debian GNU/Linux testing (buster)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14034 (Git)
Build type: Debug
Branch: feature/chamfer
Hash: 52a00c87f796c4a7a1e90322a1f1c5962547fd9b
Python version: 2.7.15
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Canada (en_CA)
Attachments
wire_orientation.py
(854 Bytes) Downloaded 30 times
Last edited by mlampert on Thu Jul 05, 2018 12:40 am, edited 1 time in total.
User avatar
wandererfan
Veteran
Posts: 6324
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Request for verifying OCCT version differences

Post by wandererfan »

Code: Select all

Traceback (most recent call last):
  File "/home/huxster/Documents/CAD/Complaints/mlampert_wire_orientation.py", line 24, in <module>
    if PathGeom.pointsCoincide(-zaxis, ff.Surface.Axis):
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'pointsCoincide'
OS: Linux Mint 18.3 Sylvia
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13522 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 3bb5ff4e70c0c526f2d9dd69b1004155b2f527f2
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/Canada (en_CA)
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Request for verifying OCCT version differences

Post by mlampert »

RIght - the script requires a 0.18 development build, after commit fb0fc49a3026.
In order to run it on FC 0.17 you need to replace the import of PathGeom with:

Code: Select all

from PathScripts.PathGeom import PathGeom
chrisb
Veteran
Posts: 54273
Joined: Tue Mar 17, 2015 9:14 am

Re: Request for verifying OCCT version differences

Post by chrisb »

mlampert wrote: Wed Jul 04, 2018 1:46 am I was wondering if ppl could run attached script in FC and let me know if one of them reports "NOT OK" and if the also printed Orientation is the key to success here.
Just in case you are also interested if it works: Yes it does here with output

Code: Select all

CW wire OK (Forward)
CCW wire OK (Forward)
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13976 (Git)
Build type: Release
Branch: (HEAD detached at fae0de5)
Hash: fae0de58581694157a97d567c151bdce75d387dc
Python version: 2.7.15
Qt version: 5.11.0
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Request for verifying OCCT version differences

Post by mlampert »

chrisb wrote: Wed Jul 04, 2018 5:10 pmJust in case you are also interested if it works: Yes it does here with output
Thanks!
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

Re: Request for verifying OCCT version differences

Post by user1234 »

Code: Select all

CW wire OK (Forward)
CCW wire OK (Forward)
tested with:

Code: Select all

OS: Debian GNU/Linux 9.4 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14001 (Git)
Build type: Release
Branch: master
Hash: 6014fce390390526f3d74672e79e3d8bc994225e
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Greetings
user
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Request for verifying OCCT version differences

Post by GeneFC »

Works OK for Windows.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13999 (Git)
Build type: Release
Branch: master
Hash: ab1520b872821414c6ce4a15fb85d471ac2a2b03
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)

Gene
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Request for verifying OCCT version differences

Post by mlampert »

Thanks guys, that's reassuring.

Did some more tests and the faces created in Travis are the other way around. What's supposed to be up is down and vice versa. If I read the logs correctly Travis uses OCC 6.7.0 ?

Code: Select all

-- Found OCC: /usr/lib/x86_64-linux-gnu/oce-0.15/../../../include/oce (found version "6.7.0") 
-- -- Found OCE/OpenCASCADE version: 6.7.0
-- -- OCE/OpenCASCADE include directory: /usr/lib/x86_64-linux-gnu/oce-0.15/../../../include/oce
-- -- OCE/OpenCASCADE shared libraries directory: 
Can we upgrade that to a reasonable version? Or are we really supporting V6.7 ?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Request for verifying OCCT version differences

Post by DeepSOIC »

AFAIR, there was a change in OCCT regarding wire and face orientation, somewhere around version 7.0, and I think it was about older versions doing something to autocorrect errors, and occt7 is more "dumb" and uses all as is.

There was an example on the wiki that had to be patched up because of this change.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Request for verifying OCCT version differences

Post by mlampert »

DeepSOIC wrote: Wed Jul 04, 2018 11:15 pm AFAIR, there was a change in OCCT regarding wire and face orientation, somewhere around version 7.0, and I think it was about older versions doing something to autocorrect errors, and occt7 is more "dumb" and uses all as is.

There was an example on the wiki that had to be patched up because of this change.
Great, that explains that. I'll implement the area formula from Gauss and restructure the logic accordingly.
Thanks everyone!
Post Reply