Part.__fromPythonOCC__ issue : Segmentation fault

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Cyril
Posts: 133
Joined: Wed Aug 23, 2017 5:04 pm
Location: Geneva (Switzerland)
Contact:

Re: Part.__fromPythonOCC__ issue : Segmentation fault

Post by Cyril »

bernd wrote: Thu Aug 01, 2019 8:22 pm https://github.com/FreeCAD/FreeCAD/blob ... FC.py#L551

Code: Select all

shape.scale(1000.0) # IfcOpenShell always outputs in meters, we convert to mm, the freecad internal unit
might be simpler than the matrix one ...
Yes, it looks like result is the same. Thanks !

I struggle with documentation but I suppose scale use this method which use this OCCT method.

And it is more than 10 times faster :lol: :

Code: Select all

>>> timeit.timeit("shape_scale()", number=50000, setup="from __main__ import shape_scale")
6.068135397999868
>>> timeit.timeit("shape_matrix()", number=50000, setup="from __main__ import shape_matrix")
89.69596179099972
I blog about HVAC / BIM / Energy : pythoncvc.net. If you like you can follow the RSS feed.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Part.__fromPythonOCC__ issue : Segmentation fault

Post by bernd »

:D
Post Reply