Skip to content

Commit bc50be9

Browse files
authored
Merge pull request #45 from petrasvestartas/polygon_with_holes
Polygon with holes
2 parents d004a8b + dfa58e5 commit bc50be9

27 files changed

+208
-63
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

1919
### Added
2020

21+
* Tests from 2D straight skeleton module.
22+
2123
### Changed
2224

25+
* Added polygon with holes offset test.
26+
2327
### Removed
2428

29+
* Profiling dependency and decorators from examples.
30+
2531

2632
## [0.7.7] 2025-03-20
2733

docs/examples/example_booleans.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from compas.geometry import Sphere
55
from compas.geometry import Translation
66
from compas_viewer import Viewer
7-
from line_profiler import profile
87

98
from compas_cgal.booleans import boolean_difference_mesh_mesh
109
from compas_cgal.booleans import boolean_intersection_mesh_mesh
@@ -59,7 +58,6 @@ def split():
5958
return mesh.exploded()
6059

6160

62-
@profile
6361
def main():
6462
"""Compute the boolean difference, intersection, union, and split of two triangle meshes."""
6563
difference = boolean_difference()

docs/examples/example_intersections.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
import profile
2-
31
from compas.datastructures import Mesh
42
from compas.geometry import Box
53
from compas.geometry import Point
64
from compas.geometry import Polyline
75
from compas.geometry import Sphere
86
from compas_viewer import Viewer
9-
from line_profiler import profile
107

118
from compas_cgal.intersections import intersection_mesh_mesh
129

1310

14-
@profile
1511
def main():
1612
# ==============================================================================
1713
# Make a box and a sphere

docs/examples/example_measure.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
from compas.datastructures import Mesh
22
from compas.geometry import Box
3-
from line_profiler import profile
43

54
from compas_cgal.measure import mesh_area
65
from compas_cgal.measure import mesh_centroid
76
from compas_cgal.measure import mesh_volume
87

98

10-
@profile
119
def main(mesh):
1210
"""Mesh measurement methods."""
1311
area = mesh_area(mesh)

docs/examples/example_meshing.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
from compas.geometry import scale_vector
1010
from compas.geometry import transform_points_numpy
1111
from compas_viewer import Viewer
12-
from line_profiler import profile
1312

1413
from compas_cgal.meshing import mesh_remesh
1514

1615

17-
@profile
1816
def main():
1917
"""Remesh a bunny mesh that is loaded from .ply file."""
2018

@@ -30,7 +28,7 @@ def main():
3028
S = Scale.from_factors([100, 100, 100])
3129
R = Rotation.from_axis_and_angle(Vector(1, 0, 0), math.radians(90))
3230

33-
bunny.transform(R * S * T)
31+
# bunny.transform(R * S * T)
3432
V0, F0 = bunny.to_vertices_and_faces()
3533
V1 = transform_points_numpy(V0, R * S * T)
3634

docs/examples/example_reconstruction_pointset_normal_estimation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
from compas_viewer import Viewer
66
from compas_viewer.config import Config
77
from compas_viewer.scene import Collection
8-
from line_profiler import profile
98

109
from compas_cgal.reconstruction import pointset_normal_estimation
1110
from compas_cgal.reconstruction import pointset_reduction
1211

1312

14-
@profile
1513
def reconstruction_pointset_normal_estimation():
1614
# ==============================================================================
1715
# Input geometry

docs/examples/example_reconstruction_pointset_outlier_removal.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
from compas.geometry import Pointcloud
44
from compas_viewer import Viewer
55
from compas_viewer.config import Config
6-
from line_profiler import profile
76

87
from compas_cgal.reconstruction import pointset_outlier_removal
98

109

11-
@profile
1210
def reconstruction_pointset_outlier_removal():
1311
"""Remove outliers from a point set."""
1412

docs/examples/example_reconstruction_pointset_reduction.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
from compas.geometry import transform_points_numpy
66
from compas_viewer import Viewer
77
from compas_viewer.config import Config
8-
from line_profiler import profile
98

109
from compas_cgal.reconstruction import pointset_reduction
1110

1211

13-
@profile
1412
def reconstruction_pointset_reduction():
1513
"""Reduce the number of points in a point set."""
1614

docs/examples/example_reconstruction_pointset_smoothing.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
from pathlib import Path
22

33
from compas.geometry import Pointcloud
4-
from compas.geometry import Translation
5-
from compas.geometry import transform_points_numpy
64
from compas_viewer import Viewer
75
from compas_viewer.config import Config
8-
from line_profiler import profile
96

107
from compas_cgal.reconstruction import pointset_smoothing
118

129

13-
@profile
1410
def reconstruction_pointset_smoothing():
1511
"""Smooth a point set."""
1612

docs/examples/example_reconstruction_poisson_surface_reconstruction.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1-
import math
21
from pathlib import Path
32

43
from compas.datastructures import Mesh
54
from compas.geometry import Pointcloud
6-
from compas.geometry import Rotation
7-
from compas.geometry import Scale
85
from compas_viewer import Viewer
9-
from line_profiler import profile
106

117
from compas_cgal.reconstruction import poisson_surface_reconstruction
128

139

14-
@profile
1510
def reconstruction_poisson_surface_reconstruction():
1611
FILE = Path(__file__).parent.parent.parent / "data" / "oni.xyz"
1712

0 commit comments

Comments
 (0)