pythonocc-demos icon indicating copy to clipboard operation
pythonocc-demos copied to clipboard

TDocStd.py | TypeError: in method 'new_TDocStd_Document', argument 1 of type 'TCollection_ExtendedString const &'

Open im44pos opened this issue 2 years ago • 2 comments

Want to export a shape or solid to a .glb file. Example code from pythonocc-demos/examples/core_export_gltf_single_shape.py results in TypeError on "create document" line 37 '''doc = TDocStd_Document("pythonocc-doc")''' '''TypeError: in method 'new_TDocStd_Document', argument 1 of type 'TCollection_ExtendedString const &'''' ..\lib\site-packages\OCC\Core\TDocStd.py:1120

im44pos avatar Sep 08 '23 10:09 im44pos

Same issue would love a solution

amoghsundararaman avatar Feb 02 '24 18:02 amoghsundararaman

Try:

doc = TDocStd_Document(TCollection_ExtendedString("pythonocc-doc"))

tpaviot avatar Feb 03 '24 06:02 tpaviot