UnitSystem

References
[IoId("00000000-9e7c-4faf-87c4-673462299b4a")] public sealed class UnitSystem : IStorable, IEquatable<UnitSystem>, IComparable<UnitSystem>

Constructors

UnitSystem

#
public UnitSystem(IReader reader)
reader (IReader)

UnitSystem

#
public UnitSystem(RhinoDoc document)
document (RhinoDoc)

UnitSystem

#
public UnitSystem(UnitSystem system, double factor = 1)
system (UnitSystem)
factor (double = 1)

Properties

Factor

#
public double Factor { get; }
Gets the additional scaling factor to be applied to the system.

System

#
public UnitSystem System { get; }
Gets the system for this instance.

Methods

CompareTo

#
public int CompareTo(UnitSystem other)
other (UnitSystem)

Equals

#
public override bool Equals(object obj)
obj (object)
Object.Equals

Equals

#
public bool Equals(UnitSystem other)
other (UnitSystem)

GetHashCode

#
public override int GetHashCode()

ResolveScalingFactor

#
public static double ResolveScalingFactor(UnitSystem from, UnitSystem to)
Compute the scaling factor required to go from one unit system to another.
from (UnitSystem)Origin system.
to (UnitSystem)Target system.
The scaling required so that a shape in the origin system retains its real world size when expressed in the units of the target system.

Store

#
public void Store(IWriter writer)
writer (IWriter)
Store

ToName

#
public static string ToName(UnitSystem system)
system (UnitSystem)

ToString

#
public override string ToString()
Object.ToString

ToString

#
public string ToString(NumberFormat format)
format (NumberFormat)

ToUnit

#
public static string ToUnit(UnitSystem system)
system (UnitSystem)

TryParse

#
public static Result<UnitSystem> TryParse(string text)
text (string)

TryParseSystem

#
public static UnitSystem TryParseSystem(string unit)
Tru and parse a unit system from a string. If the parsing fails, UnitSystem.Unset will be returned.
unit (string)

Convertors

OperationResultDescription
implicitdoubleUnitSystem
implicitUnitSystemUnitSystem