protected override Polyline2D vmethod_1(ns9.Class107 edge) { Point3D location1 = edge.StartVertex.Point.Location; Point3D location2 = edge.EndVertex.Point.Location; Polyline2D polyline2D = new Polyline2D(2); Interface26 pointParamMapper = this.PointParamMapper; polyline2D.Add(pointParamMapper.imethod_0(location1)); polyline2D.Add(pointParamMapper.imethod_0(location2)); return(polyline2D); }
protected override Polyline2D vmethod_1(ns9.Class107 edge) { Point3D location1 = edge.StartVertex.Point.Location; Point3D location2 = edge.EndVertex.Point.Location; Polyline2D polyline2D = new Polyline2D(2); if (location1 == location2 && this.double_2 != 0.0) { Point3D point3D1 = new Point3D(this.class247_0.Position); double length = this.class247_0.MajorAxis.GetLength(); Vector3D normal = this.class247_0.Normal; normal.Normalize(); Point3D point3D2 = point3D1 - normal * (length / System.Math.Tan(this.double_2)); if ((point3D2 - location1).GetLength() < 0.0001 * length) { double x1 = Vector3D.DotProduct(point3D2 - point3D1, normal) / System.Math.Cos(this.double_2); if (this.class690_0.Value) { double x2 = -x1; polyline2D.Add(new Point2D(x2, 2.0 * System.Math.PI)); polyline2D.Add(new Point2D(x2, 4.0 * System.Math.PI / 3.0)); polyline2D.Add(new Point2D(x2, 2.0 * System.Math.PI / 3.0)); polyline2D.Add(new Point2D(x2, 0.0)); } else { polyline2D.Add(new Point2D(x1, 0.0)); polyline2D.Add(new Point2D(x1, 2.0 * System.Math.PI / 3.0)); polyline2D.Add(new Point2D(x1, 4.0 * System.Math.PI / 3.0)); polyline2D.Add(new Point2D(x1, 2.0 * System.Math.PI)); } return(polyline2D); } } Interface26 pointParamMapper = this.PointParamMapper; polyline2D.Add(pointParamMapper.imethod_0(location1)); polyline2D.Add(pointParamMapper.imethod_0(location2)); return(polyline2D); }
private void method_40(AttrCollection A_0, int A_1, object A_2, Interface26 A_3) { object obj2; if (A_2 is Interface31) { Interface31 interface2 = (Interface31)A_2; if (interface2.imethod_0()) { return; } if (interface2 is Interface33) { Interface33 interface3 = (Interface33)A_0[A_1]; obj2 = ((Interface33)interface2).imethod_2(interface3); } else { obj2 = interface2.imethod_1(); } } else if (A_2 is Class650) { obj2 = ((Class650)A_2).method_3(A_0, A_1); } else { obj2 = A_2; } if (A_3 != null) { A_3.imethod_0(A_0, A_1, obj2); } else { A_0[A_1] = obj2; } }
public virtual void vmethod_2(Class95 firstLoop, Class608 wires) { Interface26 pointParamMapper = this.PointParamMapper; if (pointParamMapper != null) { List <Polygon2D> polygon2DList1 = new List <Polygon2D>(); List <Polygon2D> polygon2DList2 = new List <Polygon2D>(); foreach (Class95 loop in (IEnumerable <Class95>)Class80.smethod_0 <Class95>(firstLoop)) { Class917 approximation = new Class917(); Polygon2D polygon2D1 = new Polygon2D(); foreach (ns9.Class107 coedge in (IEnumerable <ns9.Class107>)loop.Coedges) { ns9.Class88 curve = (ns9.Class88)coedge.Edge.Curve; if (curve != null) { curve.CurvePrimitive.imethod_3(loop, curve, coedge, approximation, wires.Accuracy); } else { Polyline2D polyline2D = this.vmethod_1(coedge); polygon2D1.AddRange((IEnumerable <Point2D>)polyline2D); } } if (polygon2D1.Count > 0) { if (pointParamMapper.IsRightHandedParametric) { if (polygon2D1.GetArea() >= 0.0) { polygon2DList1.Add(polygon2D1); } else { polygon2DList2.Add(polygon2D1); } } else if (polygon2D1.GetArea() < 0.0) { polygon2DList1.Add(polygon2D1); } else { polygon2DList2.Add(polygon2D1); } } Point3D[] points = approximation.Points; if (points.Length > 0) { Polygon2D polygon2D2 = new Polygon2D(points.Length); foreach (Point3D point in points) { polygon2D2.Add(pointParamMapper.imethod_0(point)); } if (pointParamMapper.IsRightHandedParametric) { if (polygon2D2.GetArea() >= 0.0) { polygon2DList1.Add(polygon2D2); } else { polygon2DList2.Add(polygon2D2); } } else if (polygon2D2.GetArea() < 0.0) { polygon2DList1.Add(polygon2D2); } else { polygon2DList2.Add(polygon2D2); } } } if (polygon2DList1.Count == 0 && polygon2DList2.Count != 0) { foreach (List <Point2D> point2DList in polygon2DList2) { point2DList.Reverse(); } polygon2DList1.AddRange((IEnumerable <Polygon2D>)polygon2DList2); polygon2DList2.Clear(); } Polygon2D[] paramShape = Class794.smethod_9(this.ExtendedIntervalU, this.ExtendedIntervalV, polygon2DList1.ToArray(), polygon2DList2.ToArray(), pointParamMapper.IsRightHandedParametric, wires.Accuracy.Epsilon); if (paramShape == null) { return; } foreach (Polygon2D polygon2D in paramShape) { Polygon3D polygon3D = new Polygon3D(polygon2D.Count); foreach (Point2D point2D in (List <Point2D>)polygon2D) { polygon3D.Add(pointParamMapper.imethod_1(point2D.X, point2D.Y)); } wires.method_9((ICollection <Point3D>)polygon3D, true); } this.vmethod_0(wires, paramShape, pointParamMapper); } else { Class80.smethod_2((Class80)firstLoop, wires); } }