public override IGH_GeometricGoo Morph(SpaceMorph xmorph) { Point3d start = xmorph.MorphPoint(Value.From); Point3d end = xmorph.MorphPoint(Value.To); Line ln = new Line(start, end); return(new ResultLine(ln, m_result1, m_result2, m_colour1, m_colour2, m_size1, m_size2)); }
public override IGH_GeometricGoo Morph(SpaceMorph xmorph) { if (Value == null) { return(null); } if (Value.PolyCurve == null) { return(null); } GsaMember1d mem = new GsaMember1d { Member = Value.Member }; List <Point3d> pts = Value.Topology; for (int i = 0; i < pts.Count; i++) { pts[i] = xmorph.MorphPoint(pts[i]); } mem.Topology = pts; if (Value.PolyCurve != null) { PolyCurve crv = Value.PolyCurve.DuplicatePolyCurve(); xmorph.Morph(crv); mem.PolyCurve = crv; } return(new GsaMember1dGoo(mem)); }
//no idea if they work public override Grasshopper.Kernel.Types.IGH_GeometricGoo Morph(SpaceMorph xmorph) { for (int i = 0; i < this.Value.Nodes.Count; i++) { this.Value.Nodes[i] = xmorph.MorphPoint(this.Value.Nodes[i]); } return(this); }
public override IGH_GeometricGoo Morph(SpaceMorph xmorph) { if (Value == null) { return(null); } if (Value.Point == null) { return(null); } Point3d pt = Value.Point; pt = xmorph.MorphPoint(pt); GsaNode node = new GsaNode(pt); return(new GsaNodeGoo(node)); }
public override IGH_GeometricGoo Morph(SpaceMorph xmorph) { if (Value == null) { return(null); } if (Value.Point == null) { return(null); } GsaNode node = Value.Duplicate(); Point3d pt = node.Point; pt = xmorph.MorphPoint(pt); node.Point = pt; return(new GsaNodeGoo(node)); }
/*******************************************/ public IGH_GeometricGoo Morph(SpaceMorph xmorph) { if (m_RhinoGeometry == null) { return(null); } else if (m_RhinoGeometry is Point3d) { Point3d morphed = xmorph.MorphPoint((Rhino.Geometry.Point3d)m_RhinoGeometry); return(new GH_IBHoMGeometry { Value = morphed.FromRhino() }); } else { GeometryBase geometry = ((GeometryBase)m_RhinoGeometry).Duplicate(); xmorph.Morph(geometry); return(new GH_IBHoMGeometry { Value = geometry?.IFromRhino() }); } }
public override IGH_GeometricGoo Morph(SpaceMorph xmorph) { Point3d point = xmorph.MorphPoint(Value); return(new ResultPoint(point, m_result, m_colour, m_size)); }