internal static void Extrude( WW.Cad.Drawing.Surface.Geometry geometry, WW.Math.Geometry.Polyline3D polyline, bool isSurface, Vector3D extrusion) { if (polyline.Count == 1) { WW.Math.Point3D start = polyline[0]; geometry.Add((IPrimitive) new WW.Cad.Drawing.Surface.Segment(start, start + extrusion)); } else if (polyline.Count == 2) { WW.Math.Point3D v0 = polyline[0]; WW.Math.Point3D v1 = polyline[1]; geometry.Add((IPrimitive) new Quad(v0, v1, v1 + extrusion, v0 + extrusion)); } else if (isSurface) { Class940.smethod_22(geometry, (IList <WW.Math.Point3D>)polyline); WW.Math.Point3D v1 = polyline[polyline.Count - 1]; WW.Math.Point3D v2 = v1 + extrusion; WW.Math.Geometry.Polyline3D polyline3D = new WW.Math.Geometry.Polyline3D(polyline.Count, polyline.Closed); for (int index = 0; index < polyline.Count; ++index) { WW.Math.Point3D v0 = polyline[index]; WW.Math.Point3D v3 = v0 + extrusion; polyline3D.Add(v3); geometry.Add((IPrimitive) new Quad(v0, v1, v2, v3)); v1 = v0; v2 = v3; } Class940.smethod_22(geometry, (IList <WW.Math.Point3D>)polyline3D); } else { WW.Math.Point3D v1 = polyline[polyline.Count - 1]; WW.Math.Point3D v2 = v1 + extrusion; WW.Math.Geometry.Polyline3D polyline3D = new WW.Math.Geometry.Polyline3D(polyline.Count, polyline.Closed); for (int index = 0; index < polyline.Count; ++index) { WW.Math.Point3D v0 = polyline[index]; WW.Math.Point3D v3 = v0 + extrusion; polyline3D.Add(v3); geometry.Add((IPrimitive) new Quad(v0, v1, v2, v3)); v1 = v0; v2 = v3; } } }
public static void smethod_21( DxfEntity entity, DrawContext.Surface context, WW.Cad.Drawing.Surface.Geometry geometry, WW.Math.Geometry.Polyline3D polyline, bool isSurface) { if (isSurface) { Class940.smethod_22(geometry, (IList <WW.Math.Point3D>)polyline); } else { geometry.Add(WW.Cad.Drawing.Surface.Polyline3D.CreatePrimitive(polyline)); } }