Question about the args type "irr::io::path const &" in pychrono

99 views
Skip to first unread message

Zaftrox

unread,
Aug 18, 2025, 9:04:14 AMAug 18
to ProjectChrono
When i try importing a font with getFont(filename) it doesn't work, throw the following error :
  TypeError: in method 'IGUIEnvironment_getFont', argument 2 of type 'irr::io::path const &'

the same happened with GetSceneManager().addArrowMesh(), the first arg needs to be an  'irr::io::path const &' which throw an error when passing a string.

Dan Negrut

unread,
Aug 19, 2025, 1:12:26 PMAug 19
to ProjectChrono
Can you drop your cpp here? A small version that still shows the problem.
Can you run some demos or other small models? I wonder if this is an installation issue.
Thanks.
Dan

Zaftrox

unread,
Aug 19, 2025, 4:26:59 PMAug 19
to ProjectChrono
i didn't use C++ to code it, i am using pychrono in python.
As i said, i encountered this issue when i tried to use a custom font for a statictext (Irrlicht rendering).
I prepared the font xml file and png using BMFont and when i called : pychrono.irrlicht..ChVisualSystemIrrlicht().GetDevice().getGUIEnvironment().getFont(filename), it throws the error  TypeError: in method 'IGUIEnvironment_getFont', argument 2 of type 'irr::io::path const &' where the filename is the path "/Physics engine/chrono project/font/fontToUse.xml".

The same goes for addArrowMesh function that i used to setup an origin for the coords system. However, when i pass the name argument (something like "X-axis" ...) it throws the same error.

Bocheng Zou

unread,
Aug 19, 2025, 5:37:37 PMAug 19
to projec...@googlegroups.com

Hi Zaftrox,

Thank you for raising the issue. Which PyChrono distribution are you using? Are you building from source or using the conda version?

Best,

Bocheng Zou

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/projectchrono/e9e94987-9caf-4c83-9689-d23e9244a762n%40googlegroups.com.

Zaftrox

unread,
Aug 19, 2025, 5:47:29 PMAug 19
to ProjectChrono
I am using the conda precompiled version.

Bocheng Zou

unread,
Aug 19, 2025, 5:48:34 PMAug 19
to projec...@googlegroups.com

Hi Zaftrox,

Which version are you using? Are you using the 9.0.1 regular release, older version or the 9.0.1 FSI special version?

Best,

Bocheng Zou

Zaftrox

unread,
Aug 19, 2025, 5:50:02 PMAug 19
to ProjectChrono
version 9.0.0

Bocheng Zou

unread,
Aug 19, 2025, 6:04:19 PMAug 19
to projec...@googlegroups.com

Hi Zaftrox,

Thank you for getting back. This is a known issue and will be fixed shortly. I will keep you posted once a fix is in-place.

Best,

Bocheng Zou

Radu Serban

unread,
Aug 25, 2025, 9:08:43 PMAug 25
to ProjectChrono

We did not wrap all C++ functionality for use in PyChrono, especially not stuff that provides this level of control for third-party libraries (such as Irrlicht).  It is also unlikely that we will want to do that since that just complicates maintainability.

 

Having said that, it seems to me that you are interested in more cosmetic things. Are you interested in providing some form of GUI for your application?  If that is the case and if you can wait a little bit, we hope to expose in PyChrono the newer and more capable Chrono::VSG run-time visualization system.  Until then, could you please provide a few more details on what it is you are trying to do?

 

--Radu

--

You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages