engeom 0.2.6__tar.gz → 0.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. {engeom-0.2.6 → engeom-0.2.7}/Cargo.lock +1 -1
  2. {engeom-0.2.6 → engeom-0.2.7}/Cargo.toml +1 -1
  3. {engeom-0.2.6 → engeom-0.2.7}/PKG-INFO +1 -1
  4. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/lib.rs +1 -0
  5. engeom-0.2.7/engeom/src/raster3.rs +60 -0
  6. engeom-0.2.7/python/engeom/raster3/__init__.py +9 -0
  7. engeom-0.2.7/python/engeom/raster3.pyi +19 -0
  8. {engeom-0.2.6 → engeom-0.2.7}/src/lib.rs +12 -0
  9. {engeom-0.2.6 → engeom-0.2.7}/src/mesh.rs +11 -2
  10. engeom-0.2.7/src/raster.rs +40 -0
  11. {engeom-0.2.6 → engeom-0.2.7}/.github/workflows/CI.yml +0 -0
  12. {engeom-0.2.6 → engeom-0.2.7}/.gitignore +0 -0
  13. {engeom-0.2.6 → engeom-0.2.7}/.gitmodules +0 -0
  14. {engeom-0.2.6 → engeom-0.2.7}/README.md +0 -0
  15. {engeom-0.2.6 → engeom-0.2.7}/docs/airfoils/intro.md +0 -0
  16. {engeom-0.2.6 → engeom-0.2.7}/docs/api/airfoil.md +0 -0
  17. {engeom-0.2.6 → engeom-0.2.7}/docs/api/engeom.md +0 -0
  18. {engeom-0.2.6 → engeom-0.2.7}/docs/api/geom2.md +0 -0
  19. {engeom-0.2.6 → engeom-0.2.7}/docs/api/geom3.md +0 -0
  20. {engeom-0.2.6 → engeom-0.2.7}/docs/api/metrology.md +0 -0
  21. {engeom-0.2.6 → engeom-0.2.7}/docs/api/plot.md +0 -0
  22. {engeom-0.2.6 → engeom-0.2.7}/docs/bounding_volumes.md +0 -0
  23. {engeom-0.2.6 → engeom-0.2.7}/docs/curves.md +0 -0
  24. {engeom-0.2.6 → engeom-0.2.7}/docs/images/surface_point_meas.svg +0 -0
  25. {engeom-0.2.6 → engeom-0.2.7}/docs/index.md +0 -0
  26. {engeom-0.2.6 → engeom-0.2.7}/docs/isometries.md +0 -0
  27. {engeom-0.2.6 → engeom-0.2.7}/docs/meshes.md +0 -0
  28. {engeom-0.2.6 → engeom-0.2.7}/docs/metrology.md +0 -0
  29. {engeom-0.2.6 → engeom-0.2.7}/docs/numpy.md +0 -0
  30. {engeom-0.2.6 → engeom-0.2.7}/docs/planes_circles_lines.md +0 -0
  31. {engeom-0.2.6 → engeom-0.2.7}/docs/points_vectors.md +0 -0
  32. {engeom-0.2.6 → engeom-0.2.7}/docs/surf_points.md +0 -0
  33. {engeom-0.2.6 → engeom-0.2.7}/docs/svd_basis.md +0 -0
  34. {engeom-0.2.6 → engeom-0.2.7}/engeom/.gitignore +0 -0
  35. {engeom-0.2.6 → engeom-0.2.7}/engeom/Cargo.lock +0 -0
  36. {engeom-0.2.6 → engeom-0.2.7}/engeom/Cargo.toml +0 -0
  37. {engeom-0.2.6 → engeom-0.2.7}/engeom/README.md +0 -0
  38. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/airfoils/camber.md +0 -0
  39. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/airfoils/overview.md +0 -0
  40. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/common/angles.md +0 -0
  41. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/common/core_space.md +0 -0
  42. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/common/discrete_domain.md +0 -0
  43. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/common/images/surface_point_meas.svg +0 -0
  44. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/common/svd_basis.md +0 -0
  45. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/geom2/alignment.md +0 -0
  46. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/geom2/curve.md +0 -0
  47. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/geom2/point_collections.md +0 -0
  48. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/geom2/shapes.md +0 -0
  49. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/index.md +0 -0
  50. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/javascripts/mathjax.js +0 -0
  51. {engeom-0.2.6 → engeom-0.2.7}/engeom/docs/python_rust.md +0 -0
  52. {engeom-0.2.6 → engeom-0.2.7}/engeom/mkdocs.yml +0 -0
  53. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/airfoil/camber.rs +0 -0
  54. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/airfoil/edges.rs +0 -0
  55. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/airfoil/helpers.rs +0 -0
  56. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/airfoil/inscribed_circle.rs +0 -0
  57. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/airfoil/orientation.rs +0 -0
  58. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/airfoil.rs +0 -0
  59. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/align.rs +0 -0
  60. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/angles.rs +0 -0
  61. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/convert_2d_3d.rs +0 -0
  62. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/discrete_domain.rs +0 -0
  63. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/indices.rs +0 -0
  64. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/interval.rs +0 -0
  65. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/kd_tree.rs +0 -0
  66. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/points.rs +0 -0
  67. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/poisson_disk.rs +0 -0
  68. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/surface_point.rs +0 -0
  69. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/svd_basis.rs +0 -0
  70. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common/vec_f64.rs +0 -0
  71. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/common.rs +0 -0
  72. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/errors.rs +0 -0
  73. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/func1/common_functions.rs +0 -0
  74. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/func1/polynomial.rs +0 -0
  75. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/func1/series1.rs +0 -0
  76. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/func1.rs +0 -0
  77. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/aabb2.rs +0 -0
  78. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/align2/jacobian.rs +0 -0
  79. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/align2/points_to_curve.rs +0 -0
  80. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/align2/rc_params2.rs +0 -0
  81. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/align2.rs +0 -0
  82. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/angles2.rs +0 -0
  83. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/circle2.rs +0 -0
  84. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/curve2.rs +0 -0
  85. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/hull.rs +0 -0
  86. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/line2.rs +0 -0
  87. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2/polyline2.rs +0 -0
  88. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom2.rs +0 -0
  89. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/align3/jacobian.rs +0 -0
  90. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/align3/multi_param.rs +0 -0
  91. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/align3/points_to_mesh.rs +0 -0
  92. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/align3/rotations.rs +0 -0
  93. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/align3.rs +0 -0
  94. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/curve3.rs +0 -0
  95. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh/conformal.rs +0 -0
  96. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh/edges.rs +0 -0
  97. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh/faces.rs +0 -0
  98. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh/filtering.rs +0 -0
  99. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh/measurement.rs +0 -0
  100. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh/patches.rs +0 -0
  101. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh/queries.rs +0 -0
  102. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh/sampling.rs +0 -0
  103. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh/uv_mapping.rs +0 -0
  104. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/mesh.rs +0 -0
  105. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/plane3.rs +0 -0
  106. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3/point_cloud.rs +0 -0
  107. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/geom3.rs +0 -0
  108. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/io.rs +0 -0
  109. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/metrology/dimension.rs +0 -0
  110. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/metrology/line_profiles.rs +0 -0
  111. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/metrology/surface_deviation.rs +0 -0
  112. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/metrology/tolerance.rs +0 -0
  113. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/metrology/tolerance_map.rs +0 -0
  114. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/metrology.rs +0 -0
  115. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/stats.rs +0 -0
  116. {engeom-0.2.6 → engeom-0.2.7}/engeom/src/utility.rs +0 -0
  117. {engeom-0.2.6 → engeom-0.2.7}/mkdocs.yml +0 -0
  118. {engeom-0.2.6 → engeom-0.2.7}/pyproject.toml +0 -0
  119. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/__init__.py +0 -0
  120. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/_plot/__init__.py +0 -0
  121. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/_plot/common.py +0 -0
  122. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/_plot/matplotlib.py +0 -0
  123. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/_plot/pyvista.py +0 -0
  124. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/airfoil/__init__.py +0 -0
  125. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/airfoil.pyi +0 -0
  126. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/align/__init__.py +0 -0
  127. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/align.pyi +0 -0
  128. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/engeom.pyi +0 -0
  129. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/geom2/__init__.py +0 -0
  130. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/geom2.pyi +0 -0
  131. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/geom3/__init__.py +0 -0
  132. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/geom3.pyi +0 -0
  133. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/metrology/__init__.py +0 -0
  134. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/metrology.pyi +0 -0
  135. {engeom-0.2.6 → engeom-0.2.7}/python/engeom/plot.py +0 -0
  136. {engeom-0.2.6 → engeom-0.2.7}/python/tests/test_all.py +0 -0
  137. {engeom-0.2.6 → engeom-0.2.7}/python/tests/test_geom2_simple.py +0 -0
  138. {engeom-0.2.6 → engeom-0.2.7}/python/tests/test_geom3_simple.py +0 -0
  139. {engeom-0.2.6 → engeom-0.2.7}/src/airfoil.rs +0 -0
  140. {engeom-0.2.6 → engeom-0.2.7}/src/alignments.rs +0 -0
  141. {engeom-0.2.6 → engeom-0.2.7}/src/bounding.rs +0 -0
  142. {engeom-0.2.6 → engeom-0.2.7}/src/common.rs +0 -0
  143. {engeom-0.2.6 → engeom-0.2.7}/src/conversions.rs +0 -0
  144. {engeom-0.2.6 → engeom-0.2.7}/src/geom2.rs +0 -0
  145. {engeom-0.2.6 → engeom-0.2.7}/src/geom3.rs +0 -0
  146. {engeom-0.2.6 → engeom-0.2.7}/src/metrology.rs +0 -0
  147. {engeom-0.2.6 → engeom-0.2.7}/src/svd_basis.rs +1 -1
@@ -1024,7 +1024,7 @@ dependencies = [
1024
1024
 
1025
1025
  [[package]]
1026
1026
  name = "py-engeom"
1027
- version = "0.2.6"
1027
+ version = "0.2.7"
1028
1028
  dependencies = [
1029
1029
  "engeom",
1030
1030
  "numpy",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "py-engeom"
3
- version = "0.2.6"
3
+ version = "0.2.7"
4
4
  edition = "2021"
5
5
 
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: engeom
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -10,6 +10,7 @@ pub mod io;
10
10
  pub mod metrology;
11
11
  pub mod stats;
12
12
  pub mod utility;
13
+ pub mod raster3;
13
14
 
14
15
  pub type Result<T> = std::result::Result<T, Box<dyn Error>>;
15
16
 
@@ -0,0 +1,60 @@
1
+ //! This module contains tools for working with 3D voxel grids.
2
+
3
+
4
+ use std::collections::HashSet;
5
+
6
+
7
+ /// This function takes a set of coordinates in a 3D grid and returns a list of clusters of
8
+ /// connected voxel coordinates.
9
+ ///
10
+ /// # Arguments
11
+ ///
12
+ /// * `indices`:
13
+ ///
14
+ /// returns: Vec<Vec<(u32, u32, u32), Global>, Global>
15
+ ///
16
+ /// # Examples
17
+ ///
18
+ /// ```
19
+ ///
20
+ /// ```
21
+ pub fn clusters_from_sparse(mut indices: HashSet<(i32, i32, i32)>) -> Vec<Vec<(i32, i32, i32)>> {
22
+ let mut results = Vec::new();
23
+
24
+ while !indices.is_empty() {
25
+ let mut working = Vec::new();
26
+ let mut to_visit = Vec::new();
27
+
28
+ to_visit.push(pop_index(&mut indices));
29
+
30
+ while !to_visit.is_empty() {
31
+ let current = to_visit.pop().unwrap();
32
+ working.push(current);
33
+
34
+ for x in -1..=1 {
35
+ for y in -1..=1 {
36
+ for z in -1..=1 {
37
+ if x == 0 && y == 0 && z == 0 {
38
+ continue;
39
+ }
40
+
41
+ let neighbor = (current.0 + x, current.1 + y, current.2 + z);
42
+ if indices.remove(&neighbor) {
43
+ to_visit.push(neighbor);
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ results.push(working.into_iter().collect());
51
+ }
52
+
53
+ results
54
+ }
55
+
56
+ fn pop_index(indices: &mut HashSet<(i32, i32, i32)>) -> (i32, i32, i32) {
57
+ let result = indices.iter().next().unwrap().clone();
58
+ indices.remove(&result);
59
+ result
60
+ }
@@ -0,0 +1,9 @@
1
+ """
2
+ This module provides a number of classes and functions for working with 3D raster (voxel) data.
3
+ """
4
+
5
+ from ..engeom import _raster3
6
+
7
+ # Global import of all functions
8
+ for name in [n for n in dir(_raster3) if not n.startswith("_")]:
9
+ globals()[name] = getattr(_raster3, name)
@@ -0,0 +1,19 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import List
4
+
5
+ from numpy.typing import NDArray
6
+
7
+ def clusters_from_sparse(indices: NDArray[int]) -> List[NDArray[int]]:
8
+ """
9
+ Find clusters of connected voxel indices from a sparse array of voxel coordinates. The input array should be a Nx3
10
+ array of integer voxel indices. The output is a list of arrays, where each array contains the indices of a single
11
+ cluster of connected voxels.
12
+
13
+ The connectivity is defined as 26-connectivity, i.e. each voxel is connected to all neighbors with which it shares
14
+ at least one corner.
15
+
16
+ :param indices: Nx3 array of voxel indices
17
+ :return: List of arrays, each containing a Mx3 numpy array of the indices of a single cluster of connected voxels
18
+ """
19
+ ...
@@ -7,6 +7,7 @@ mod geom2;
7
7
  mod geom3;
8
8
  mod mesh;
9
9
  mod metrology;
10
+ mod raster;
10
11
  mod svd_basis;
11
12
 
12
13
  use pyo3::prelude::*;
@@ -89,6 +90,14 @@ fn register_metrology_module(parent_module: &Bound<'_, PyModule>) -> PyResult<()
89
90
  parent_module.add_submodule(&child)
90
91
  }
91
92
 
93
+ fn register_raster3_module(parent_module: &Bound<'_, PyModule>) -> PyResult<()> {
94
+ let child = PyModule::new(parent_module.py(), "_raster3")?;
95
+
96
+ child.add_function(wrap_pyfunction!(raster::clusters_from_sparse, &child)?)?;
97
+
98
+ parent_module.add_submodule(&child)
99
+ }
100
+
92
101
  /// Engeom is a library for geometric operations in 2D and 3D space.
93
102
  #[pymodule(name = "engeom")]
94
103
  fn py_engeom(m: &Bound<'_, PyModule>) -> PyResult<()> {
@@ -98,6 +107,9 @@ fn py_engeom(m: &Bound<'_, PyModule>) -> PyResult<()> {
98
107
  // 3D geometry submodule
99
108
  register_geom3(m)?;
100
109
 
110
+ // 3D raster module
111
+ register_raster3_module(m)?;
112
+
101
113
  // Alignment submodule
102
114
  register_align_module(m)?;
103
115
 
@@ -161,12 +161,21 @@ impl Mesh {
161
161
  Ok(result.into_pyarray(py))
162
162
  }
163
163
 
164
- fn measure_point_deviation(&self, x: f64, y: f64, z: f64, dist_mode: DeviationMode) -> Distance3 {
164
+ fn measure_point_deviation(
165
+ &self,
166
+ x: f64,
167
+ y: f64,
168
+ z: f64,
169
+ dist_mode: DeviationMode,
170
+ ) -> Distance3 {
165
171
  let point = engeom::Point3::new(x, y, z);
166
172
  Distance3::from_inner(self.inner.measure_point_deviation(&point, dist_mode.into()))
167
173
  }
168
174
 
169
- fn boundary_first_flatten<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyArrayDyn<f64>>> {
175
+ fn boundary_first_flatten<'py>(
176
+ &self,
177
+ py: Python<'py>,
178
+ ) -> PyResult<Bound<'py, PyArrayDyn<f64>>> {
170
179
  let edges = self
171
180
  .inner
172
181
  .calc_edges()
@@ -0,0 +1,40 @@
1
+ use numpy::ndarray::{Array1, ArrayD};
2
+ use numpy::{IntoPyArray, PyArray1, PyArrayDyn, PyReadonlyArrayDyn, PyUntypedArrayMethods};
3
+ use pyo3::exceptions::PyValueError;
4
+ use pyo3::types::PyIterator;
5
+ use pyo3::{
6
+ pyclass, pyfunction, Bound, FromPyObject, IntoPyObject, IntoPyObjectExt, Py, PyAny, PyResult,
7
+ Python,
8
+ };
9
+ use std::collections::HashSet;
10
+
11
+ #[pyfunction]
12
+ pub fn clusters_from_sparse<'py>(
13
+ indices: PyReadonlyArrayDyn<'py, i32>,
14
+ ) -> PyResult<Vec<Bound<'py, PyArrayDyn<i32>>>> {
15
+ let shape = indices.shape();
16
+ if shape.len() != 2 || shape[1] != 3 {
17
+ return Err(PyValueError::new_err("Expected Nx3 array of indices"));
18
+ }
19
+
20
+ let mut working = HashSet::new();
21
+ for r in indices.as_array().rows().into_iter() {
22
+ let idx = (r[0], r[1], r[2]);
23
+ working.insert(idx);
24
+ }
25
+
26
+ let mut results = engeom::raster3::clusters_from_sparse(working);
27
+ let mut combined = Vec::new();
28
+
29
+ for result in results.drain(..) {
30
+ let mut array = ArrayD::zeros(vec![result.len(), 3]);
31
+ for (i, idx) in result.iter().enumerate() {
32
+ array[[i, 0]] = idx.0;
33
+ array[[i, 1]] = idx.1;
34
+ array[[i, 2]] = idx.2;
35
+ }
36
+ combined.push(array.into_pyarray(indices.py()));
37
+ }
38
+
39
+ Ok(combined)
40
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,9 +1,9 @@
1
1
  use crate::conversions::{array_to_points2, array_to_points3};
2
+ use crate::geom2::{Iso2, Vector2};
2
3
  use crate::geom3::{Iso3, Vector3};
3
4
  use numpy::ndarray::Array1;
4
5
  use numpy::{IntoPyArray, PyArray1, PyReadonlyArray1, PyReadonlyArrayDyn};
5
6
  use pyo3::prelude::*;
6
- use crate::geom2::{Iso2, Vector2};
7
7
 
8
8
  #[pyclass]
9
9
  pub struct SvdBasis2 {