Stiffie
Mechanical
- Sep 11, 2009
- 10
I'm trying to define a cartesian coordinate system following three nodes.
First, I tried to create it in the model file, but strangely, the CSYS does not appear in the output database unless i create a dummy load which refers to this CSYS (e.g. 0.00001 N). Also, the CSYS does not appear to follow the nodes.
Then I tried using the python scripting interface. This is where I encountered strange behaviour. Look at this:
By printing, we can see the positions of the nodes. Now, if I run
So I have two questions:
- Why doesn't my model file defined in assembly module show in output database?
- Why in the World doesn't the axes of the defined CSYS follow the coordinates of the three points as given?
Any help is appreciated!
Thanks!
First, I tried to create it in the model file, but strangely, the CSYS does not appear in the output database unless i create a dummy load which refers to this CSYS (e.g. 0.00001 N). Also, the CSYS does not appear to follow the nodes.
Then I tried using the python scripting interface. This is where I encountered strange behaviour. Look at this:
Python:
>>> odb_result = odb.openOdb(path="Job-ThreeSteps.odb", readOnly=False)
>>> node1 = odb_result.rootAssembly.nodeSets['NODEORIGIN'].nodes[0][0]
>>> node2 = odb_result.rootAssembly.nodeSets['NODEX'].nodes[0][0]
>>> node3 = odb_result.rootAssembly.nodeSets['NODEY'].nodes[0][0]
>>> print node1
({'coordinates': array([2.00000002337219e-07, 3.00000010611257e-07, 0.0], 'f'), 'instanceName': 'PART-SPECIMEN-2D-HALF-1', 'label': 719})
>>> print node2
({[b]'coordinates': array([0.766044914722443, 0.642788171768188, 0.0][/b], 'f'), 'instanceName': 'PART-SPECIMEN-2D-HALF-1', 'label': 720})
>>> print node3
([b]{'coordinates': array([0.642788171768188, -0.76604437828064, 0.0][/b], 'f'), 'instanceName': 'PART-SPECIMEN-2D-HALF-1', 'label': 724})
By printing, we can see the positions of the nodes. Now, if I run
Python:
>>> csys = odb_result.rootAssembly.DatumCsysByThreeNodes(name="CSYS-1", origin=node1, point1=node2, point2=node3)
>>> print csys
({'coordSysType': CARTESIAN, 'name': 'CSYS-1', 'origin': array([0.0, 0.0, 0.0], 'f'), 'type': CARTESIAN, [b]'xAxis': array([0.0, 0.0, 1.0][/b], 'f'), [b]'yAxis': array([0.0, 0.0, 1.0],] 'f')[/b], 'zAxis': array([0.0, 0.0, 1.0], 'f')})
So I have two questions:
- Why doesn't my model file defined in assembly module show in output database?
- Why in the World doesn't the axes of the defined CSYS follow the coordinates of the three points as given?
Any help is appreciated!
Thanks!