/// <summary> /// Method to construct the Bobillier Line /// </summary> private void ConstructBobillierLine() { ///<summary>Computing the intersection of the <see cref="PlaneSTEERING"/> and the <see cref="PlaneB"/> which results in the <see cref="BobillierLine"/></summary> Plane.Intersection(PlaneB, PlaneSTEERING, out Segment3D BobillierSegment); BobillierLine = new Line(BobillierSegment); //cad1.viewportLayout1.SetView(viewType.Isometric); ///<summary>Extending the <see cref="BobillierLine"/> by 500mm on each side</summary> CustomInfiniteLine.DrawInfiniteLine(BobillierLine, 500); Bar BobillierLine_Ent = new Bar(BobillierLine.StartPoint, BobillierLine.EndPoint, 4.5, 8); BobillierLine_Ent.Color = Color.AliceBlue; //cad1.viewportLayout1.Entities.Add(BobillierLine_Ent); BobillierLine.GetPointsByLength(1); }
/// <summary> /// Method to Construct the Instant Axis /// </summary> private void ConstructInstantCentreLine() { ///<summary>Calculating the Intersection of the Top and Bottom Wishbone Planes. The result of this calculation is the Instant Axis Line</summary> Plane.Intersection(TopWishbonePlane, BottomWishbonePlane, out Segment3D ICSegment); ///<summary>Creating the Instant Axis Line using the result of the Intersection calculation above</summary> InstantAxis = new Line(ICSegment); ///<summary>Extending the Line along both ends by an amount of 500 each</summary> CustomInfiniteLine.DrawInfiniteLine(InstantAxis, 500); Plane f = new Plane(); //cad1.viewportLayout1.Entities.Add(InstantAxis); ///<summary>Determining the Instant Axis is Inoard or Outboard using the Contact Patch Coordinate and the Instant Axis Mid Point</summary> double ICDistance = ICSegment.MidPoint.DistanceTo(new Point3D()); if (Corner == VehicleCorner.FrontLeft || Corner == VehicleCorner.FrontRight) { if ((SCM.W1x) - (InstantAxis.MidPoint.X) > 0) { ICPosition = InstntCentrePosition.Inboard; } else { ICPosition = InstntCentrePosition.Outboard; } } else { if ((SCM.W1x - InstantAxis.MidPoint.X) < 0) { ICPosition = InstntCentrePosition.Inboard; } else { ICPosition = InstntCentrePosition.Outboard; } } }