mbweller
Geotechnical
- May 30, 2013
- 1
Hi all,
I have an interesting issue with the findAt command.
I'm trying to select 2*m number of edges (both left and right) in a python script:
# Ld are the layer points
Lpts=[]
m=0
for m in range(len(Ld)-1):
Lpts.append(((max(side), (Ld[m]+(Ld[m+1]-Ld[m])/2), 0),),)
Lpts.append(((min(side), (Ld[m]+(Ld[m+1]-Ld[m])/4), 0),),)
Which creates a list of 2*m end points, the problem occurs with findAt:
inst.Surface(name='Surf-2', side1Edges= inst.instances['ThreeLayers-1'].edges.findAt(Lpts))
which returns -->
TypeError: arg1; too many arguments; expected 1, got m
however, if I print, then copy and past (without the brackets) the layer points into the above findAt, it works. I've tried converting the list to a tuple, but that fails as well
There seems to be a syntax problem when I pass the variable to findAt, but not for when I copy and paste. For the life of me, I can't seem to figure out what the problem is.
Any help would be appreciated!
Thanks,
~Matt
I have an interesting issue with the findAt command.
I'm trying to select 2*m number of edges (both left and right) in a python script:
# Ld are the layer points
Lpts=[]
m=0
for m in range(len(Ld)-1):
Lpts.append(((max(side), (Ld[m]+(Ld[m+1]-Ld[m])/2), 0),),)
Lpts.append(((min(side), (Ld[m]+(Ld[m+1]-Ld[m])/4), 0),),)
Which creates a list of 2*m end points, the problem occurs with findAt:
inst.Surface(name='Surf-2', side1Edges= inst.instances['ThreeLayers-1'].edges.findAt(Lpts))
which returns -->
TypeError: arg1; too many arguments; expected 1, got m
however, if I print, then copy and past (without the brackets) the layer points into the above findAt, it works. I've tried converting the list to a tuple, but that fails as well
There seems to be a syntax problem when I pass the variable to findAt, but not for when I copy and paste. For the life of me, I can't seem to figure out what the problem is.
Any help would be appreciated!
Thanks,
~Matt