-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Step files cannot be visualized, demo_CAS_stepfile #451
Comments
Of course, with that function commented out you will not get any visualization. |
Thank you for your prompt reply Yes, I use opencascade-7.7.0. I will try to recompile and link to the OCC 7.4.0 and hope the problem will be solved. Thanks again and have a nice day |
Hi again, I have redone the installation with OCC 7.4.0 but am still unable to visualize the loaded step files, nor ChBodyEasySphere or ChBodyEasyBox when their add function is called from a GUI button's event function. I can visualize them only when called in the Main function before ....and the other settings Please note that when I do "sys->Clear();" from the button's event function the objects disappear, meaning the reference to the sys is working well. Do I miss anything to show the added objects? What do you advise in this case? |
When you add a physics item (such as a body) to the system after the associated visual system was initialized, you must explicitly inform the visual system of the new assets (the item's visual model). You do this by explicitly invoking the function |
Great, thanks However, now the added elements just float. How can I add the physical attributes to them? |
This is likely some bug in your code. Not sure what you mean by "adding the physical attributes". Are you sure you do not set them as "fixed"? |
Thanks for your prompt reply Yes, I am sure they are not fixed. They fall when they are called from the main function.... Should you need any further details, please do not hesitate to ask. Thank you in advance. |
Hi again @rserban Please, let me clarify the issue: I am calling the function "AddFallingItems(sys)" that exists in the demo: "demo_MBS_collisionNSC.cpp" from a button. Now the items are visible and everything is OK (after installing the right OCC 7.4.0 and binding the elements.) However, when I call the function from the main, the items fall as they do in the demo but when I call it from the button, they do not fall unless they touch the falling items loaded from the main. When the items loaded from the main are no longer falling, i.e. they touch the bottom of the container "AddContainer", the newly added items stay at their positions and do not fall (this also applies to the items loaded using the LoadStepModel(....)) I tried to update the ChSystemNSC sys (sys.Update()) but it seems it has no effect! Have I missed anything? Thank you in advance |
There must be a mistake somewhere in your code. A very simple modification of demo_MBS_collisionNSC where the falling objects are created at some later point in the simulation, using something like:
postponing the generation of falling objects and with an appropriately modified |
Thank you so much indeed for your time and effort You are right, the problem was in my code as I sat "sys.SetUseSleeping(true);" to test something and forgot to reset it back to false, or delete it! In case someone faced the final issue I mention here, just turn this feature off! Thanks again and have a great day :) |
In the demo_CAS_stepfile.cpp, I am unable to visualize the step files I load, yet it is visible among the object list: "sys.Get_bodylist();"
i.e. the file is loaded but cannot show in the GUI.
Can you help, please? Thank you in advance
One note: while doing the compilation, I got two errors in the ChCascadeIrrMeshTools.h library:
class "Poly_Triangulation" has no member "Nodes"
class "Poly_Triangulation" has no member "Normals"
I commented out the "static void fillIrrlichtMeshFromCascadeFace" function (the function that calls the two objects) declaration and its call. could that be the problem? if so, what do you advise?
Looking forward to hearing from you
Sincerely
The text was updated successfully, but these errors were encountered: