floats2_from_array2
- compas_occ.conversions.floats2_from_array2(array)
Construct a list of lists of floats from two-dimensional real array.
- Parameters:
- arrayTColStd_Array2OfReal
- Returns:
- list[list[float]]
See also
Examples
>>> from itertools import product >>> from OCC.Core.TColStd import TColStd_Array2OfReal
>>> array2 = TColStd_Array2OfReal(1, 2, 1, 3) >>> array2.SetValue(1, 1, 0.0) >>> array2.SetValue(1, 2, 1.0) >>> array2.SetValue(1, 3, 2.0) >>> array2.SetValue(2, 1, 0.0) >>> array2.SetValue(2, 2, 1.0) >>> array2.SetValue(2, 3, 2.0)
>>> floats2 = floats2_from_array2(array2) >>> floats2 [(0.0, 0.0), (1.0, 1.0), (2.0, 2.0)]