Notifications
Clear all

[Closed] Just need help with layermanagers

I need to figure out how to create an 2 arrays inside layermanager which is the position count inside of a layer. An example of this would be that if I have a mesh or point in a layer and its the first item than it will be 1 or if its the second item then it will be 2 and so on and so fourth BUT I need to figure this out based upon a split array and have it conform to what mesh or point is loaded first in the brackets below “where prints are”. As a plot twist that if there is only 1 item whether it be a point or mesh then it wont be 1 but -1 instead.
Another example say I have in order in 3 theoretical layers

Layer 1
1=MESH
2=MESH
3=POINT
4=MESH

Layer 2
1=POINT
2=POINT

Layer 3
1=MESH

then I would need this array
MESHARRAY==(1,2,4,-1)
POINTARRAY==(3,1,2)

Here is a sample of what I have so far “Like I said before the array arrangement might be different based upon what prints first”.

for i = 1 to LayerManager.count-1 do(
	(LayerManager.getlayer i).nodes &nodes
	for n in nodes do(
		if superclassof n == geometryclass do(
			print n
		)
		if classof n == point do(
			print n
		)
	)
)
1 Reply

Sorry guys never mind. I figured it out.