Ejemplo n.º 1
0
 /// <summary>
 /// A new alignment by simply shifting offset from A to B.
 /// </summary>
 /// <param name="offsetA">The source offset.</param>
 /// <param name="offsetB">The target offset</param>
 /// <returns>An alignment structure.</returns>
 public static Alignment ByOffsetChange(XYZ offsetA, XYZ offsetB)
 {
     return(new Alignment(new IfcAxisAlignment
     {
         SourceReferenceAxis = new IfcAlignReferenceAxis(offsetA, XYZs.ByAdd(offsetA, 1, 0, 0)),
         TargetReferenceAxis = new IfcAlignReferenceAxis(offsetB, XYZs.ByAdd(offsetB, 1, 0, 0))
     }));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// A 2-by-2 point alignment. Given an offset and orientation point of A and of B, an affine aligment
 /// will be computed. No scaling will be done. The total distance of offset and orientation point is normalized during
 /// calculations.
 /// </summary>
 /// <param name="offsetA">The offset of A</param>
 /// <param name="axisRefA">The orientation point of A (or undefined if simpliy shifted along X)</param>
 /// <param name="offsetB">The offset of B</param>
 /// <param name="axisRefB">The orientation point of B (or undefined if simpliy shifted along X)</param>
 /// <returns>An alignment structure.</returns>
 public static Alignment ByPointReference(XYZ offsetA, XYZ axisRefA, XYZ offsetB, XYZ axisRefB)
 {
     return(new Alignment(new IfcAxisAlignment
     {
         SourceReferenceAxis = new IfcAlignReferenceAxis(offsetA, axisRefA ?? XYZs.ByAdd(offsetA, 1, 0, 0)),
         TargetReferenceAxis = new IfcAlignReferenceAxis(offsetB, axisRefB ?? XYZs.ByAdd(offsetB, 1, 0, 0))
     }));
 }