Why conveyor.size.y returns the half of the y size of a conveyor?

Why conveyor.size.y returns the half of the y size of a conveyor?

sebastian_hemmannE3JAU
Collaborator Collaborator
3 Views
2 Replies
Message 1 of 3

Why conveyor.size.y returns the half of the y size of a conveyor?

sebastian_hemmannE3JAU
Collaborator
Collaborator

[ FlexSim 17.0.2 ]

I´ve tryed to figure out why the method .size.y returns the half of the Conveyors width but the full size of all other objects.

Accepted solutions (1)
4 Views
2 Replies
Replies (2)
Message 2 of 3

sam_stubbsYXX86
Community Manager
Community Manager

Interesting. It could be that this is unintended or there may be a reason for it, I'll ask the developers if they are aware of this. I suppose for now, just take the half size into consideration for your model.

0 Likes
Message 3 of 3

philboboADSK
Autodesk
Autodesk
Accepted solution

.size.y returns the value of the spatialsy attribute of the conveyor. Conveyors set that value to half of their width. Their spatialy attribute is set to the center of the conveyor's starting point. This is how the conveyor's spatial values were purposefully designed.

5758-conveyor-spatialsy.png

In 17.1, we added a Conveyor class that has a width property where you can access the conveyor's width directly:

Conveyor conveyor = model().find("Conveyor1");
return conveyor.width;


Phil BoBo
Sr. Manager, Software Development