Thank you, Radu. I realised the difference soon after I posted this and I removed the post :p
I managed a few things by learning from the tutorial codes. I am now onto contact modelling, let's see how it goes :) Thanks again. On Friday, 19 August 2022 at 20:16:30 UTC+5:30 Radu Serban wrote: > Glad to hear you have it up and running! > > > > Indeed, only the C++ API is documented, for a very simple reason: that’s > the only one that can be parsed by doxygen; PyChrono is nothing but a set > of wrappers automatically created by SWIG. > > > > As such, the names of member variables and methods in PyChrono are * > *identical** to those in C++. The only few differences are related to > Python not having the concept of nested classes the way it is in C++. So > you will see references to some enum classes is done differently in Python > code. > > > > In your particular example, you conflate the radius that is a member > variable of ChBodyEasySphere (named ‘radius’) and the radius that is a > member of ChSphereShape (named ‘rad’). > > > > Finally, ChCylinderShape does not have any member variable to set the > cylinder height. Instead, you provide the coordinates of the two end > points (in the visual shape reference frame) which implicitly defines a > cylinder height. By the way, for consistency, I plan on changing this way > of defining visualization cylinder shapes. > > > > I hope this clarifies things, > --Radu > > > > > > *From:* [email protected] <[email protected]> *On > Behalf Of *dummifiedme > *Sent:* Friday, August 19, 2022 5:39 AM > *To:* ProjectChrono <[email protected]> > *Subject:* [chrono] Is there a documentation for PyChrono? > > > > Hello everyone, > > > > After successfully installing (thanks to Radu), I have looked around at > the demo files and I noticed that some of the variables are named > differently in cpp and python versions while the documentation is only > available for Cpp version. > > Eg. in Demo, Cables.py, the sphere is defined as > > msphere = chrono.ChSphereShape() > > msphere.GetSphereGeometry().rad = 0.02 > > constraint_hinge.AddVisualShape(msphere) > > > > here, the radius is specified with rad while in cpp, documentation it is > referred > > > > Similarly, when I tried to create a cylinder, I couldn't find the variable > for height. > > > > I tried "h", "height". Similarly, for radius, "radius" doesn't work, and > only "rad" works. > > > > So can someone tell me if there is a documentation for Python Chrono? How > to know which variable to use? > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/projectchrono/7cd798cc-1eaa-4c10-972c-945684bfc24cn%40googlegroups.com > > <https://groups.google.com/d/msgid/projectchrono/7cd798cc-1eaa-4c10-972c-945684bfc24cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/3c2c4d1c-56c6-4d28-9489-ad12364bbac1n%40googlegroups.com.
