Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Define zaxis of coordinate system with python

solero5

Mechanical
Joined
May 21, 2025
Messages
2
Hi,
I'am trying to create a coordinate system in abaqus through a python script. It works as intended but to comply with reference dokument I want to have the Z axis between node1 and node2 and xaxis in the plane from node3. From the code below I get xaxis between node1 and node2 and yaxis in the plane. Do anyone know a way to get this as I want?

csys_node1 = self.viewedOdbInstance.getNodeFromLabel(label=node1)
csys_node2 = self.viewedOdbInstance.getNodeFromLabel(label=node2)
csys_node3_old = self.viewedOdbInstance.getNodeFromLabel(label=node3)
self.scratchOdb.rootAssembly.DatumCsysByThreeNodes(name=self.name + '_Cys',coordSysType=CARTESIAN, origin=csys_node1, point1=csys_node2,point2=csys_node3_old)
 
I guess you should use different/additional points. When defining a coordinate system by 3 nodes, point1 is a point on the X axis while point2 is a point in the XY plane. So your csys will have the X axis passing through node2 and XY plane including node3.
 
Yes that is true and I think it is the only way forward. But The optimal way would have been if there where a way to define Z-axis instead of X-axis as the first axis as exists in some other softwares.
 

Part and Inventory Search

Sponsor

Back
Top