Is there any command to put a part on a specific place on the path other than with position matrix?
The idea is to copy part multiple times and set them on the calculated distances along the path at the beginning of simulation.
A little off topic (or maybe not): Can anybody explain what “, 0” in part.transfer(path**, 0**) means?
If you’re talking about generating multiple components at the start of a simulation and wanting them to follow your path, it seems basically unlikely to me that you can say you won’t use the position matrix.
Regarding your other question, part.transfer(path, 0), there’s a clear reference in the help file to the left and right of his two parameters, the former being your transport path and the latter being its output port setting, which often comes up in relation to distributed transport belts.
OK, thank you for the answer on second matter.
For the first challenge, the reason, why I’m searching for alternative way is because the path is somehow complex (multiple radius, also radius can/are changing …) and with position matrix approach everything become “messier” (if I can express my self like that).
Something like when you attach sensor on the path and changing it’s position via ComponentPathSensor.
I got the solution which suits for my case with usage of Feeder Point (from VisualComponents eCatalog).
On start I stop the path, move Feeder Point on the exact spots, create part, and “path.grab” it. When all path is populated, leave feeder point at last spot, and start path.
I share the most important part of code for all who’ll need it:
*inside def OnStart():
.
.
.
path.Enabled = False
for j in range(carrNmb+2):
feedPos.Value = (pathInfo+2000)-j*carrDistance
part = refpart.clone(1)
part.transfer(cont,0)
path.grab(part)
path.Enabled = True
for i in range( limit.Value ):
part = refpart.clone(1)
if part:
part.transfer(cont,0)
delay(0)
path.grab(part)
delay(interval.Value)
P.S.: - PathInfo is length of selected path (.pathLength)
- carrDistance is distance between parts
- carrNmb is number of parts needed