Skip to content

Commit 98a2944

Browse files
committed
ruff
1 parent 2ae5bf3 commit 98a2944

18 files changed

+64
-50
lines changed

docs/examples/example_booleans.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1+
from compas.datastructures import Mesh
12
from compas.geometry import Box
23
from compas.geometry import Polyhedron
34
from compas.geometry import Sphere
4-
from compas.datastructures import Mesh
5-
from compas_cgal.booleans import (
6-
boolean_difference_mesh_mesh,
7-
boolean_intersection_mesh_mesh,
8-
boolean_union_mesh_mesh,
9-
split_mesh_mesh,
10-
)
11-
from compas_cgal.meshing import mesh_remesh
12-
from compas_viewer import Viewer
135
from compas.geometry import Translation
6+
from compas_viewer import Viewer
147
from line_profiler import profile
158

9+
from compas_cgal.booleans import boolean_difference_mesh_mesh
10+
from compas_cgal.booleans import boolean_intersection_mesh_mesh
11+
from compas_cgal.booleans import boolean_union_mesh_mesh
12+
from compas_cgal.booleans import split_mesh_mesh
13+
from compas_cgal.meshing import mesh_remesh
14+
1615

1716
def input():
1817
"""Create an input for the boolean methods."""

docs/examples/example_intersections.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import profile
2+
23
from compas.datastructures import Mesh
34
from compas.geometry import Box
45
from compas.geometry import Point
56
from compas.geometry import Polyline
67
from compas.geometry import Sphere
7-
from compas_cgal.intersections import intersection_mesh_mesh
88
from compas_viewer import Viewer
99
from line_profiler import profile
1010

11+
from compas_cgal.intersections import intersection_mesh_mesh
12+
1113

1214
@profile
1315
def main():

docs/examples/example_measure.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
from compas.geometry import Box
2-
from compas_cgal.measure import (
3-
mesh_area,
4-
mesh_volume,
5-
mesh_centroid,
6-
)
71
from compas.datastructures import Mesh
2+
from compas.geometry import Box
83
from line_profiler import profile
94

5+
from compas_cgal.measure import mesh_area
6+
from compas_cgal.measure import mesh_centroid
7+
from compas_cgal.measure import mesh_volume
8+
109

1110
@profile
1211
def main(mesh):

docs/examples/example_meshing.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
from compas.datastructures import Mesh
1+
import math
2+
from pathlib import Path
23

3-
from compas.geometry import scale_vector
4-
from compas.geometry import Translation
4+
from compas.datastructures import Mesh
55
from compas.geometry import Rotation
66
from compas.geometry import Scale
7+
from compas.geometry import Translation
78
from compas.geometry import Vector
9+
from compas.geometry import scale_vector
810
from compas.geometry import transform_points_numpy
9-
from pathlib import Path
10-
import math
11-
from line_profiler import profile
1211
from compas_viewer import Viewer
12+
from line_profiler import profile
13+
1314
from compas_cgal.meshing import mesh_remesh
1415

1516

docs/examples/example_nanobind_types.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
from compas_cgal.compas_cgal_ext import scale_matrix, create_matrix, add
21
import numpy as np
32
from line_profiler import profile
43

4+
from compas_cgal.compas_cgal_ext import add
5+
from compas_cgal.compas_cgal_ext import create_matrix
6+
from compas_cgal.compas_cgal_ext import scale_matrix
7+
58

69
@profile
710
def add_binding(a: int = 1, b: int = 2) -> int:

docs/examples/example_reconstruction_pointset_normal_estimation.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
from pathlib import Path
22

3-
from compas.geometry import Pointcloud
43
from compas.geometry import Line
5-
from compas_cgal.reconstruction import pointset_normal_estimation
6-
from compas_cgal.reconstruction import pointset_reduction
4+
from compas.geometry import Pointcloud
75
from compas_viewer import Viewer
8-
from compas_viewer.scene import Collection
96
from compas_viewer.config import Config
7+
from compas_viewer.scene import Collection
108
from line_profiler import profile
119

10+
from compas_cgal.reconstruction import pointset_normal_estimation
11+
from compas_cgal.reconstruction import pointset_reduction
12+
1213

1314
@profile
1415
def reconstruction_pointset_normal_estimation():

docs/examples/example_reconstruction_pointset_outlier_removal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
from pathlib import Path
22

33
from compas.geometry import Pointcloud
4-
from compas_cgal.reconstruction import pointset_outlier_removal
54
from compas_viewer import Viewer
65
from compas_viewer.config import Config
76
from line_profiler import profile
87

8+
from compas_cgal.reconstruction import pointset_outlier_removal
9+
910

1011
@profile
1112
def reconstruction_pointset_outlier_removal():

docs/examples/example_reconstruction_pointset_reduction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
from compas.geometry import Pointcloud
44
from compas.geometry import Translation
55
from compas.geometry import transform_points_numpy
6-
from compas_cgal.reconstruction import pointset_reduction
76
from compas_viewer import Viewer
87
from compas_viewer.config import Config
98
from line_profiler import profile
109

10+
from compas_cgal.reconstruction import pointset_reduction
11+
1112

1213
@profile
1314
def reconstruction_pointset_reduction():

docs/examples/example_reconstruction_pointset_smoothing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
from compas.geometry import Pointcloud
44
from compas.geometry import Translation
5-
from compas_cgal.reconstruction import pointset_smoothing
65
from compas.geometry import transform_points_numpy
76
from compas_viewer import Viewer
87
from compas_viewer.config import Config
98
from line_profiler import profile
109

10+
from compas_cgal.reconstruction import pointset_smoothing
11+
1112

1213
@profile
1314
def reconstruction_pointset_smoothing():

docs/examples/example_reconstruction_poisson_surface_reconstruction.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
from compas.geometry import Pointcloud
66
from compas.geometry import Rotation
77
from compas.geometry import Scale
8-
from compas_cgal.reconstruction import poisson_surface_reconstruction
98
from compas_viewer import Viewer
109
from line_profiler import profile
1110

11+
from compas_cgal.reconstruction import poisson_surface_reconstruction
12+
1213

1314
@profile
1415
def reconstruction_poisson_surface_reconstruction():

0 commit comments

Comments
 (0)