我需要访问特定节点的坐标。 我导入了一个孤立网格,当我在CAE中使用查询选项并请求节点坐标时,我得到了所需的corrdinates。 但是当我使用python命令请求相同的东西时,我会得到一些不同的坐标。 我不确定我的命令中有什么不对,为什么会有这样的差异。
这是我在请求图中提到的查询时得到的
节点69的坐标:3.732E-03,-3.118594,1.189815
当我使用以下命令时,我得到一个不同的值
mdb.models ['Model-4'] .parts ['Bio_Mech1_2']。nodes [69] .coordinates(-1.37620043754578,-3.04504609107971,1.26058506965637)
或者即使我从程序集中调用节点
mdb.models ['Model-4']。rootAssembly.instances ['Bio_Mech1_2-1']。nodes [69] .coordinates(-1.37620043754578,-3.04504609107971,1.26058506965637)
I need to access coordinates of a particular node. I have imported an orphan mesh and when I use query option in CAE and request the nodal coordinates, I get the required corrdinates. However when I request the same thing using a python command, I get some different coordinates. I am not sure what is incorrect in my command and why is there such a difference.
This is what I get when I request a query as mentioned in the fig
Coordinates of node 69 :3.732E-03,-3.118594,1.189815
And when I use the following command, I get a different value
mdb.models['Model-4'].parts['Bio_Mech1_2'].nodes[69].coordinates (-1.37620043754578, -3.04504609107971, 1.26058506965637)
or even if I call the node from the assembly
mdb.models['Model-4'].rootAssembly.instances['Bio_Mech1_2-1'].nodes[69].coordinates (-1.37620043754578, -3.04504609107971, 1.26058506965637)
最满意答案
当您访问某个集合中的节点时,例如示例中的部分节点,该集合中节点的索引与其标签不同。
查询工具返回节点的标签和坐标。 但是,部分节点集合中的确切节点的索引可能是68 。 尝试从节点集合中打印出该位置的节点,看看是否是这种情况。
print mdb.models['Model-4'].rootAssembly.instances['Bio_Mech1_2-1'].nodes[68]这应该告诉您节点标签和坐标,因此您可以验证您是否真正访问了正确的节点。
When you're accessing nodes in a certain collection, for example part nodes as in your example, the index of the node in that collection is not the same as its label.
Query tool returns node's label and coordinates. However, the index of that exact node in a collection of part nodes is probably 68. Try printing out the node at that location from node collection to see if that's the case.
print mdb.models['Model-4'].rootAssembly.instances['Bio_Mech1_2-1'].nodes[68]This should tell you both the node label and the coordinates, so you could verify if you're really accessing the correct node.
更多推荐
发布评论