Skip to content

Commit 99a332a

Browse files
committed
πŸ§πŸΏβ€β™‚ Refactor dependencies
1 parent 7eceb6b commit 99a332a

4 files changed

Lines changed: 33 additions & 8 deletions

File tree

β€ŽCondaPkg.tomlβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ channels = ["conda-forge", "anaconda"]
44
python = ">=3.12,<3.13"
55
numpy = ">=2.2"
66
shapely = ">=2.1"
7-
open3d = ">=0.19"
8-
trimesh = ">=4.6"
7+
open3d = ">=0.19"

β€ŽProject.tomlβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ version = "0.1.0"
55

66
[deps]
77
CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab"
8-
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
98
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
109

1110
[compat]

β€Žsrc/FastPointQuery.jlβ€Ž

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module FastPointQuery
22

3-
using CondaPkg, Printf, PythonCall
3+
using CondaPkg, PythonCall
44

55
const np = PythonCall.pynew()
66
const shapely = PythonCall.pynew()
@@ -19,13 +19,41 @@ function __init__()
1919
end
2020
end
2121

22-
include(joinpath(@__DIR__, "STLInfo.jl"))
22+
struct STLInfo2D
23+
mesh ::Py
24+
vmin ::Vector
25+
vmax ::Vector
26+
py_vertices ::Py
27+
py_triangles::Py
28+
end
29+
30+
struct STLInfo3D
31+
mesh ::Py
32+
vmin ::Vector
33+
vmax ::Vector
34+
py_vertices ::Py
35+
py_triangles::Py
36+
end
37+
38+
struct QueryPolygon
39+
ju_xy::AbstractMatrix
40+
py_xy::Py
41+
function QueryPolygon(ju_xy::AbstractMatrix, py_xy::Py)
42+
n, m = size(ju_xy)
43+
m >= 3 || error("at least 3 points are required")
44+
n == 2 || error("points must be 2D (2Γ—N array)")
45+
new(ju_xy, py_xy)
46+
end
47+
end
48+
49+
include(joinpath(@__DIR__, "utils.jl"))
2350
include(joinpath(@__DIR__, "polygon.jl"))
51+
include(joinpath(@__DIR__, "polyhedron.jl"))
2452

2553

2654
# export structs
27-
export QueryPolygon, STLInfo
55+
export QueryPolygon, STLInfo2D, STLInfo3D
2856
# export functions
29-
export get_polygon, pip_query, loadmesh
57+
export get_polygon, pip_query, readSTL2D, readSTL3D
3058

3159
end

β€Žtest/runtests.jlβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ using FastPointQuery
22
using PythonCall
33
using Test
44

5-
@test !PythonCall.pyisnull(FastPointQuery.trimesh)
65
@test !PythonCall.pyisnull(FastPointQuery.np )
76
@test !PythonCall.pyisnull(FastPointQuery.shapely)
87
@test !PythonCall.pyisnull(FastPointQuery.o3d )

0 commit comments

Comments
Β (0)