Interval#
- class ansys.geometry.core.shapes.parameterization.Interval(start: ansys.geometry.core.typing.Real, end: ansys.geometry.core.typing.Real)#
Interval class that defines a range of values.
- Parameters:
- start
Real Start value of the interval.
- end
Real End value of the interval.
- start
Overview#
If the interval is open (-inf, inf). |
|
If the interval is closed. Neither value is inf or -inf. |
|
Check if the current interval is empty. |
|
Get the quantity contained by the interval. |
|
Get an evaluation property of the interval, used in BoxUV. |
|
Indicate whether the current interval is negative. |
|
Get the union of two intervals and update the current interval. |
|
Get the intersection of two intervals and update the current one. |
|
Check if the current interval contains the value |
|
Check if interval contains value |
|
Enlarge the current interval by the given delta value. |
Import detail#
from ansys.geometry.core.shapes.parameterization import Interval
Property detail#
- property Interval.start: ansys.geometry.core.typing.Real#
Start value of the interval.
- property Interval.end: ansys.geometry.core.typing.Real#
End value of the interval.
Attribute detail#
- Interval.not_empty = True#
Method detail#
- Interval.is_open() bool#
If the interval is open (-inf, inf).
- Returns:
- bool
True if both ends of the interval are negative and positive infinity respectively.
- Interval.is_closed() bool#
If the interval is closed. Neither value is inf or -inf.
- Returns:
- bool
True if neither bound of the interval is infinite.
- Interval.is_empty() bool#
Check if the current interval is empty.
- Returns:
- bool
Truewhen the interval is empty,Falseotherwise.
- Interval.get_span() ansys.geometry.core.typing.Real#
Get the quantity contained by the interval.
The interval must be closed.
- Returns:
RealThe difference between the end and start of the interval.
- Interval.get_relative_val(t: ansys.geometry.core.typing.Real) ansys.geometry.core.typing.Real#
Get an evaluation property of the interval, used in BoxUV.
- Parameters:
- t
Real Offset to evaluate the interval at.
- t
- Returns:
RealActual value according to the offset.
- Interval.is_negative(tolerance: ansys.geometry.core.typing.Real) bool#
Indicate whether the current interval is negative.
- Parameters:
- tolerance
Real Accepted range because the data type of the interval could be in doubles.
- tolerance
- Returns:
- bool
Trueif the interval is negative,Falseotherwise.
- static Interval.unite(first: Interval, second: Interval) Interval#
Get the union of two intervals.
- Parameters:
- first
Interval First interval.
- second
Interval Second interval.
- first
- Returns:
IntervalUnion of the two intervals.
- Interval.self_unite(other: Interval) None#
Get the union of two intervals and update the current interval.
- Parameters:
- other
Interval Interval to unite with.
- other
- static Interval.intersect(first: Interval, second: Interval, tolerance: ansys.geometry.core.typing.Real) Interval#
Get the intersection of two intervals.
- Parameters:
- first
Interval First interval.
- second
Interval Second interval.
- first
- Returns:
IntervalIntersection of the two intervals.
- Interval.self_intersect(other: Interval, tolerance: ansys.geometry.core.typing.Real) None#
Get the intersection of two intervals and update the current one.
- Parameters:
- other
Interval Interval to intersect with.
- tolerance
Real Accepted range of error given that the interval could be in float values.
- other
- Interval.contains_value(t: ansys.geometry.core.typing.Real, accuracy: ansys.geometry.core.typing.Real) bool#
Check if the current interval contains the value
t.- Parameters:
- t
Real Value of interest.
- accuracy
Real Accepted range of error given that the interval could be in float values.
- t
- Returns:
- bool
Trueif the interval contains the value,Falseotherwise.
- Interval.contains(t: ansys.geometry.core.typing.Real) bool#
Check if interval contains value
tusing default accuracy.- Parameters:
- t
Real Value of interest.
- t
- Returns:
- bool
Trueif the interval contains the value,Falseotherwise.