Skip to content

Commit 96c023a

Browse files
committed
grid imports
1 parent 0d822d2 commit 96c023a

File tree

17 files changed

+351
-132
lines changed

17 files changed

+351
-132
lines changed

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ addopts =
2828
--tb=short
2929

3030
[isort]
31-
force_single_line = True
31+
force_grid_wrap = 2
32+
multi_line_output = 3
3233
line_length = 180
3334
known_first_party = compas
3435
default_section = THIRDPARTY
3536
forced_separate = test_compas
36-
not_skip = __init__.py
3737
skip = migrations

src/compas/datastructures/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,12 @@
304304

305305
if not compas.IPY:
306306
__all__ += [
307+
# Networks
307308
'network_adjacency_matrix',
308309
'network_degree_matrix',
309310
'network_connectivity_matrix',
310311
'network_laplacian_matrix',
311-
]
312-
__all__ += [
312+
# Meshes
313313
'mesh_adjacency_matrix',
314314
'mesh_connectivity_matrix',
315315
'mesh_degree_matrix',

src/compas/files/__init__.py

Lines changed: 96 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,102 @@
9999
"""
100100
from __future__ import absolute_import
101101

102-
from .dxf import DXF, DXFReader, DXFParser
103-
from .gltf import GLTF, GLTFContent, GLTFExporter, GLTFMesh, GLTFParser, GLTFReader
104-
from .las import LAS, LASReader, LASParser
105-
from .obj import OBJ, OBJParser, OBJReader, OBJWriter
106-
from .off import OFF, OFFReader, OFFWriter
107-
from .ply import PLY, PLYParser, PLYReader, PLYWriter
108-
from .stl import STL, STLParser, STLReader, STLWriter
109-
from .urdf import URDF, URDFElement, URDFGenericElement, URDFParser
110-
from .xml import XML, XMLElement, XMLReader, XMLWriter
102+
from .dxf import (
103+
DXF,
104+
DXFParser,
105+
DXFReader
106+
)
107+
from .gltf import (
108+
GLTF,
109+
GLTFContent,
110+
GLTFExporter,
111+
GLTFMesh,
112+
GLTFParser,
113+
GLTFReader
114+
)
115+
from .las import (
116+
LAS,
117+
LASParser,
118+
LASReader
119+
)
120+
from .obj import (
121+
OBJ,
122+
OBJParser,
123+
OBJReader,
124+
OBJWriter
125+
)
126+
from .off import (
127+
OFF,
128+
OFFReader,
129+
OFFWriter
130+
)
131+
from .ply import (
132+
PLY,
133+
PLYParser,
134+
PLYReader,
135+
PLYWriter
136+
)
137+
from .stl import (
138+
STL,
139+
STLParser,
140+
STLReader,
141+
STLWriter
142+
)
143+
from .urdf import (
144+
URDF,
145+
URDFElement,
146+
URDFGenericElement,
147+
URDFParser
148+
)
149+
from .xml import (
150+
XML,
151+
XMLElement,
152+
XMLReader,
153+
XMLWriter
154+
)
111155

112156
__all__ = [
113-
'DXF', 'DXFReader', 'DXFParser',
114-
'GLTF', 'GLTFContent', 'GLTFMesh', 'GLTFReader', 'GLTFParser', 'GLTFExporter',
115-
'LAS', 'LASReader', 'LASParser',
116-
'OBJ', 'OBJParser', 'OBJReader', 'OBJWriter',
117-
'OFF', 'OFFReader', 'OFFWriter',
118-
'PLY', 'PLYParser', 'PLYReader', 'PLYWriter',
119-
'STL', 'STLParser', 'STLReader', 'STLWriter',
120-
'URDF', 'URDFElement', 'URDFGenericElement', 'URDFParser',
121-
'XML', 'XMLElement', 'XMLReader', 'XMLWriter'
157+
'DXF',
158+
'DXFReader',
159+
'DXFParser',
160+
161+
'GLTF',
162+
'GLTFContent',
163+
'GLTFMesh',
164+
'GLTFReader',
165+
'GLTFParser',
166+
'GLTFExporter',
167+
168+
'LAS',
169+
'LASReader',
170+
'LASParser',
171+
172+
'OBJ',
173+
'OBJParser',
174+
'OBJReader',
175+
'OBJWriter',
176+
177+
'OFF',
178+
'OFFReader',
179+
'OFFWriter',
180+
181+
'PLY',
182+
'PLYParser',
183+
'PLYReader',
184+
'PLYWriter',
185+
186+
'STL',
187+
'STLParser',
188+
'STLReader',
189+
'STLWriter',
190+
191+
'URDF',
192+
'URDFElement',
193+
'URDFGenericElement',
194+
'URDFParser',
195+
196+
'XML',
197+
'XMLElement',
198+
'XMLReader',
199+
'XMLWriter'
122200
]

src/compas/geometry/__init__.py

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -492,16 +492,14 @@
492492
vector_component_xy,
493493
vector_average,
494494
vector_variance,
495-
vector_standard_deviation
496-
)
497-
from ._core import (
495+
vector_standard_deviation,
496+
498497
circle_evaluate,
499498
ellipse_evaluate,
500499
archimedean_spiral_evaluate,
501500
logarithmic_spiral_evaluate,
502-
helix_evaluate
503-
)
504-
from ._core import (
501+
helix_evaluate,
502+
505503
angles_vectors,
506504
angles_vectors_xy,
507505
angles_points,
@@ -511,9 +509,8 @@
511509
angle_vectors_xy,
512510
angle_points,
513511
angle_points_xy,
514-
angle_planes
515-
)
516-
from ._core import (
512+
angle_planes,
513+
517514
midpoint_point_point,
518515
midpoint_point_point_xy,
519516
midpoint_line,
@@ -527,13 +524,11 @@
527524
centroid_polygon_vertices_xy,
528525
centroid_polygon_edges,
529526
centroid_polygon_edges_xy,
530-
centroid_polyhedron
531-
)
532-
from ._core import (
527+
centroid_polyhedron,
528+
533529
circle_from_points,
534-
circle_from_points_xy
535-
)
536-
from ._core import (
530+
circle_from_points_xy,
531+
537532
distance_point_point,
538533
distance_point_point_xy,
539534
distance_point_point_sqrd,
@@ -554,30 +549,27 @@
554549
closest_point_on_polyline,
555550
closest_point_on_polyline_xy,
556551
closest_point_on_plane,
557-
closest_line_to_point
558-
)
559-
from ._core import KDTree
560-
from ._core import (
552+
closest_line_to_point,
553+
554+
KDTree,
555+
561556
normal_polygon,
562557
normal_triangle,
563-
normal_triangle_xy
564-
)
565-
from ._core import (
558+
normal_triangle_xy,
559+
566560
quaternion_norm,
567561
quaternion_unitize,
568562
quaternion_is_unit,
569563
quaternion_multiply,
570564
quaternion_canonize,
571-
quaternion_conjugate
572-
)
573-
from ._core import (
565+
quaternion_conjugate,
566+
574567
area_polygon,
575568
area_polygon_xy,
576569
area_triangle,
577570
area_triangle_xy,
578-
volume_polyhedron
579-
)
580-
from ._core import (
571+
volume_polyhedron,
572+
581573
tangent_points_to_circle_xy
582574
)
583575
from .predicates import (
@@ -594,6 +586,7 @@
594586
is_polygon_in_polygon_xy,
595587
is_intersection_line_line_xy,
596588
is_intersection_segment_segment_xy,
589+
597590
is_colinear,
598591
is_colinear_line_line,
599592
is_coplanar,
@@ -676,6 +669,7 @@
676669
transform_frames,
677670
local_to_world_coordinates,
678671
world_to_local_coordinates,
672+
679673
translate_points,
680674
translate_points_xy,
681675
scale_points,
@@ -697,9 +691,8 @@
697691
project_points_line_xy,
698692
reflect_line_plane,
699693
reflect_line_triangle,
700-
orient_points
701-
)
702-
from .transformations import (
694+
orient_points,
695+
703696
Projection,
704697
Reflection,
705698
Rotation,
@@ -719,7 +712,6 @@
719712
world_to_local_coordinates_numpy,
720713
local_to_world_coordinates_numpy
721714
)
722-
723715
from .primitives import ( # noqa: E402
724716
Primitive,
725717
Circle,
@@ -743,7 +735,10 @@
743735
Sphere,
744736
Torus
745737
)
746-
from .bbox import bounding_box, bounding_box_xy # noqa: E402
738+
from .bbox import ( # noqa: E402
739+
bounding_box,
740+
bounding_box_xy
741+
)
747742
if not compas.IPY:
748743
from .bbox import (
749744
oriented_bounding_box_numpy,
@@ -763,21 +758,34 @@
763758
boolean_difference_mesh_mesh,
764759
boolean_intersection_mesh_mesh
765760
)
766-
from .hull import convex_hull, convex_hull_xy # noqa: E402
761+
from .hull import ( # noqa: E402
762+
convex_hull,
763+
convex_hull_xy
764+
)
767765
if not compas.IPY:
768-
from .hull import convex_hull_numpy, convex_hull_xy_numpy
766+
from .hull import (
767+
convex_hull_numpy,
768+
convex_hull_xy_numpy
769+
)
769770
from .interpolation import ( # noqa: E402
770771
barycentric_coordinates,
771772
discrete_coons_patch,
772773
tween_points,
773774
tween_points_distance
774775
)
775-
from .offset import offset_line, offset_polyline, offset_polygon # noqa: E402
776+
from .offset import ( # noqa: E402
777+
offset_line,
778+
offset_polyline,
779+
offset_polygon
780+
)
776781
from .pointclouds import Pointcloud # noqa: E402
777782
from .quadmesh import quadmesh_planarize # noqa: E402
778783
from .triangulation import delaunay_from_points # noqa: E402
779784
if not compas.IPY:
780-
from .triangulation import delaunay_from_points_numpy, voronoi_from_points_numpy
785+
from .triangulation import (
786+
delaunay_from_points_numpy,
787+
voronoi_from_points_numpy
788+
)
781789
from .trimesh import ( # noqa: E402
782790
trimesh_gaussian_curvature,
783791
trimesh_principal_curvature,
@@ -791,7 +799,6 @@
791799
trimesh_remesh_along_isoline,
792800
trimesh_slice
793801
)
794-
795802
if not compas.IPY:
796803
from .icp import icp_numpy
797804

@@ -1051,10 +1058,10 @@
10511058
'trimesh_remesh',
10521059
'trimesh_remesh_constrained',
10531060
'trimesh_remesh_along_isoline',
1054-
'trimesh_slice'
1055-
]
1056-
__all__ += [
1061+
'trimesh_slice',
1062+
10571063
'KDTree',
1064+
10581065
'Pointcloud',
10591066
'Primitive',
10601067
'Circle',
@@ -1067,6 +1074,7 @@
10671074
'Polyline',
10681075
'Quaternion',
10691076
'Vector',
1077+
10701078
'Shape',
10711079
'Box',
10721080
'Capsule',
@@ -1075,6 +1083,7 @@
10751083
'Polyhedron',
10761084
'Sphere',
10771085
'Torus',
1086+
10781087
'Projection',
10791088
'Reflection',
10801089
'Rotation',

src/compas/numerical/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@
176176
'float_formatter',
177177
'set_array_print_precision',
178178
'unset_array_print_precision',
179-
]
180-
__all__ += [
179+
181180
'descent_numpy',
182181
'topop_numpy',
183182
'pca_numpy',

0 commit comments

Comments
 (0)