public static PolylineCurve ToPolylineCurve(this NXOpen.Polyline value) { var rhino = RawDecoder.ToRhinoCurve(value); UnitConverter.Scale(rhino, UnitConverter.NXToRhinoUnitsRatio); return(rhino); }
public static Curve ToRhino(this NXOpen.Curve value) { Curve rhino = RawDecoder.ToRhinoCurve(value); UnitConverter.Scale(rhino, UnitConverter.NXToRhinoUnitsRatio); return(rhino); }
public static Curve ToRhinoCurve(this NXOpen.IBaseCurve value) { Curve rhino = null; switch (value) { case NXOpen.Edge edge: rhino = RawDecoder.ToRhinoCurve(edge); break; case NXOpen.Curve c: rhino = RawDecoder.ToRhinoCurve(c); break; default: throw new NotImplementedException("未实现的曲线转换类型:" + value.GetType().FullName); } UnitConverter.Scale(rhino, UnitConverter.NXToRhinoUnitsRatio); return(rhino); }