Closed OzKitsune closed 1 year ago
Hello!
Please help me figure out how to set the rotation of an object when creating of IFC.
I have a rotation given by a quaternion and I am using this code from the example:
parent.ObjectPlacement = i.New<IfcLocalPlacement>(p => p.RelativePlacement = i.New<IfcAxis2Placement3D>(a => { a.Location = i.New<IfcCartesianPoint>(cp => cp.SetXYZ(0, 0, 0)); a.RefDirection = i.New<IfcDirection>(); a.RefDirection.SetXYZ(1, 0, 0); a.Axis = i.New<IfcDirection>(); a.Axis.SetXYZ(0, 0, 1); }));
As I understood, I need to set the value in RefDirection, but I do not understand how exactly this should be done.
You need to use quaternion to compute directions of the X (RefDirection) and Z (Axis) axes. These define the local coordination system.
RefDirection
Axis
Thanks for help, I think I figured it out.
Hello!
Please help me figure out how to set the rotation of an object when creating of IFC.
I have a rotation given by a quaternion and I am using this code from the example:
As I understood, I need to set the value in RefDirection, but I do not understand how exactly this should be done.