yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #21743
Re: [Question #688040]: dimensions of an imported body
Question #688040 on Yade changed:
https://answers.launchpad.net/yade/+question/688040
Status: Answered => Open
Rioual is still having a problem:
Hello Jan,
I just did what you propose but I have an error message, possibly very
basic mistake ??:
*******************************************************************************************************
fctIdscylinder=O.bodies.append(ymport.stl('Pot-FR-1.stl',color=(1,0,0),material=facetMat))
###
minX = 1e99
maxX = -1e99
minY = 1e99
maxY = -1e99
minZ = 1e99
maxZ = -1e99
for facet in fctIdscylinder:
print 'facet=', facet
vs = [facet.state.pos + facet.state.ori * v for v in facet.shape.vertices] # vertices in global coord system
minX = min(minX,min(v[0] for v in vs))
maxX = max(maxX,max(v[0] for v in vs)) ###
minY = min(minY,min(v[1] for v in vs))
maxY = max(maxY,max(v[1] for v in vs)) ###
minX = min(minZ,min(v[2] for v in vs))
maxX = max(maxZ,max(v[2] for v in vs)) ###
The error message is the following (facet is an integer!):
vs = [facet.state.pos + facet.state.ori * v for v in facet.shape.vertices] # vertices in global coord system
AttributeError: 'int' object has no attribute 'shape'
Thanks for your answer!
Best
V.
--
You received this question notification because your team yade-users is
an answer contact for Yade.