IntervalExtensionMethods

public static class IntervalExtensionMethods
Extension methods for Rhino.Geometry.Interval

Methods

Cut holes into an interval.
public static Interval[] Cut(
this Interval
interval,
Interval to split.
splitters
Intervals to remove from main interval.
)
Array of split intervals.

DateTimeToSeconds

#
Convert a DateTime instance into an double used in Interval timespans.
public static double DateTimeToSeconds(
time,
DateTime value to convert.
out string
message
A failure message in case the time falls outside the scope.
)
Number of seconds since midnight, January 1st, 2000
Scale an interval.
public static Interval Scale(
this Interval
interval,
Interval to scale.
origin,
Scaling origin.
factor
Scaling factor.
)
Scaled interval.

SecondsToDateTime

#
Convert a second count used in Interval timespans into a DateTime value.
public static DateTime SecondsToDateTime(
seconds,
DateTime value to convert.
out string
message
A failure message in case the time falls outside the scope.
)
DateTime associated with the given second count.

Shrink

#Example
Shrink an interval by moving the extremes inwards.
public static Interval Shrink(
this Interval
interval,
Interval to shrink.
amount
Amount to shrink by. If the amount falls short of the double-precision accuracy, the domain will be shrunk the smallest possible amount instead.
)
Shrunk domain.
Split an interval into multiple intervals at given parameters.
public static Interval[] Split(
this Interval
interval,
Interval to split.
parameters
Parameters to split at.
)
Array of split intervals.