Part.__fromPythonOCC__ issue : Segmentation fault

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
User avatar
Posts: 124
Joined: Wed Aug 23, 2017 5:04 pm
Location: Geneva (Switzerland)

Re: Part.__fromPythonOCC__ issue : Segmentation fault

Postby Cyril » Thu Aug 01, 2019 9:57 pm

bernd wrote:
Thu Aug 01, 2019 8:22 pm ...

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")
>>> timeit.timeit("shape_matrix()", number=50000, setup="from __main__ import shape_matrix")
I blog about HVAC / BIM / Energy : If you like you can follow the RSS feed.
User avatar
Posts: 10820
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Part.__fromPythonOCC__ issue : Segmentation fault

Postby bernd » Thu Aug 01, 2019 10:05 pm