How to hide a dummy and cuboid grouped with it

Typically: "How do I... ", "How can I... " questions
Post Reply
Posts: 7
Joined: 10 Sep 2021, 13:29

How to hide a dummy and cuboid grouped with it

Post by coder212 »

I want to get cuboids continuously on a conveyor belt. To do this, I added a cuboid and a dummy. Then grouped that dummy under the cuboid (box). Then in the child script for the conveyor belt, I added a code to copy-paste boxes onto the conveyor belt.

Code: Select all

box = sim.getObjectHandle("Cuboid")
boxDummy = sim.getObjectHandle("BoxDummy")
Copy-pasting objects

Code: Select all

insertedObjects = sim.copyPasteObjects({box,boxDummy},0)
My task is done, the script does exactly what I want it to do but, the initial box I created is there on the floor. Is there a way to hide it or make it invisible?

Site Admin
Posts: 8974
Joined: 14 Dec 2012, 00:25

Re: How to hide a dummy and cuboid grouped with it

Post by coppelia »


why do you use a dummy and a cuboid instead of a cuboid alone?

To make a shape invisible to the rest of the simulation, you need to do following:
Then, once you have copied the object, appropriately adjust its properties, e.g.

Code: Select all

-- make it visible:
-- make it collidable, measurable and detectable:
-- make it respondable and dynamic:
If you tag your cuboid as model base, then you can enable/disable above properties in the model dialog. Then, programmatically, you can simply do:

Code: Select all

i.e. you would simply remove all model override properties.


Post Reply