projectchrono/chrono

PyChrono ChFunction example is out of date

T-Lind opened this issue · 1 comments

Hi all,

I noticed that the following example:
https://github.com/projectchrono/chrono/blob/main/src/demos/python/core/demo_CH_functions.py
is outdated and runs with an error in its current state (the error stating that ChFunction_Repeat doesn't take any arguments.

Instead of passing f_seq into the constructor, it should be set as the following:

f_rep_seq = chrono.ChFunction_Repeat()
f_rep_seq.Set_fa(f_seq)

Hi T-Lind,
thanks for pointing it out: ChFunctions are indeed one of the oldest part of the code and they have been one of the first to have been reviewed in our current (ongoing) refactoring of the code (see branch overhaul).
We will take care of review the entire ChFunction page quite soon!

Dario