public override IGH_GeometricGoo Transform(Transform xform) { if (Value == null) { return(null); } if (Value.PolyCurve == null) { return(null); } GsaMember1d mem = Value.Duplicate(); List <Point3d> pts = Value.Topology.ToList(); Point3dList xpts = new Point3dList(pts); xpts.Transform(xform); mem.Topology = xpts.ToList(); mem.TopologyType = Value.TopologyType.ToList(); if (Value.PolyCurve != null) { PolyCurve crv = Value.PolyCurve.DuplicatePolyCurve(); crv.Transform(xform); mem.PolyCurve = crv; } return(new GsaMember1dGoo(mem)); }
public override IGH_GeometricGoo Transform(Transform xform) { if (Value == null) { return(null); } if (Value.NgonMesh == null) { return(null); } GsaElement3d elem = Value.Duplicate(); Mesh xMs = elem.NgonMesh; xMs.Transform(xform); elem.NgonMesh = xMs; Point3dList pts = new Point3dList(Value.Topology); pts.Transform(xform); elem.Topology = pts.ToList(); return(new GsaElement3dGoo(elem)); }
public override IGH_GeometricGoo Transform(Transform xform) { if (Value == null) { return(null); } if (Value.Brep == null & Value.PolyCurve == null) { return(null); } GsaMember2d mem = new GsaMember2d { Member = Value.Member }; List <Point3d> pts = Value.Topology; Point3dList xpts = new Point3dList(pts); xpts.Transform(xform); mem.Topology = xpts.ToList(); mem.TopologyType = Value.TopologyType; if (Value.VoidTopology != null) { for (int i = 0; i < Value.VoidTopology.Count; i++) { xpts = new Point3dList(Value.VoidTopology[i]); xpts.Transform(xform); mem.VoidTopology.Add(xpts.ToList()); } mem.VoidTopologyType = Value.VoidTopologyType; } if (Value.InclusionLines != null) { for (int i = 0; i < Value.InclusionLines.Count; i++) { PolyCurve xLn = Value.InclusionLines[i]; xLn.Transform(xform); mem.InclusionLines.Add(xLn); } for (int i = 0; i < Value.IncLinesTopology.Count; i++) { xpts = new Point3dList(Value.IncLinesTopology[i]); xpts.Transform(xform); mem.IncLinesTopology.Add(xpts.ToList()); } mem.IncLinesTopologyType = Value.IncLinesTopologyType; } if (Value.InclusionPoints != null) { xpts = new Point3dList(Value.InclusionPoints); xpts.Transform(xform); mem.InclusionPoints = xpts.ToList(); } if (Value.Brep != null) { Brep brep = Value.Brep.DuplicateBrep(); brep.Transform(xform); mem.Brep = brep; } if (Value.PolyCurve != null) { PolyCurve crv = Value.PolyCurve.DuplicatePolyCurve(); crv.Transform(xform); mem.PolyCurve = crv; } return(new GsaMember2dGoo(mem)); }