public static Roughness ToBHoM(this BHX.Roughness roughness) { if (roughness.Value.Equals("MediumRough")) { return(Roughness.MediumRough); } if (roughness.Value.Equals("MediumSmooth")) { return(Roughness.MediumSmooth); } if (roughness.Value.Equals("Rough")) { return(Roughness.Rough); } if (roughness.Value.Equals("Smooth")) { return(Roughness.Smooth); } if (roughness.Value.Equals("VeryRough")) { return(Roughness.VeryRough); } if (roughness.Value.Equals("VerySmooth")) { return(Roughness.VerySmooth); } return(Roughness.Undefined); }
public static BHX.Roughness ToGBXML(this Roughness roughness) { BHX.Roughness r = new BHX.Roughness(); switch (roughness) { case Roughness.MediumRough: r.Value = "MediumRough"; break; case Roughness.MediumSmooth: r.Value = "MediumSmooth"; break; case Roughness.Rough: r.Value = "Rough"; break; case Roughness.Smooth: r.Value = "Smooth"; break; case Roughness.VeryRough: r.Value = "VeryRough"; break; case Roughness.VerySmooth: r.Value = "VerySmooth"; break; } return(r); }