Skip to content

Commit b0b25a3

Browse files
committed
no utilities
1 parent 7be7ecf commit b0b25a3

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

docs/examples/__temp/intersections_rhino.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
from compas.geometry import Point
1+
from compas.datastructures import Mesh
22
from compas.geometry import Box
3-
from compas.geometry import Sphere
3+
from compas.geometry import Point
44
from compas.geometry import Polyline
5-
from compas.datastructures import Mesh
6-
from compas.utilities import hex_to_rgb
7-
8-
from compas_rhino.artists import PointArtist, PolylineArtist, MeshArtist
5+
from compas.geometry import Sphere
96

107
# @me add restart option to init
118
from compas.rpc import Proxy
9+
from compas.utilities import hex_to_rgb
10+
from compas_rhino.artists import MeshArtist
11+
from compas_rhino.artists import PointArtist
12+
from compas_rhino.artists import PolylineArtist
1213

1314
proxy = Proxy()
1415

@@ -32,15 +33,15 @@
3233
# Remesh the sphere
3334
# ==============================================================================
3435

35-
proxy.package = 'compas_cgal.meshing'
36+
proxy.package = "compas_cgal.meshing"
3637

3738
B = proxy.remesh(B, 0.3, 10)
3839

3940
# ==============================================================================
4041
# Compute the intersections
4142
# ==============================================================================
4243

43-
proxy.package = 'compas_cgal.intersections'
44+
proxy.package = "compas_cgal.intersections"
4445

4546
pointsets = proxy.intersection_mesh_mesh(A, B)
4647

@@ -63,23 +64,22 @@
6364
meshartist.mesh = Mesh.from_vertices_and_faces(*A)
6465
meshartist.layer = "CGAL::Intersections::A"
6566
meshartist.clear_layer()
66-
meshartist.draw_faces(join_faces=True, color=hex_to_rgb('#222222'))
67+
meshartist.draw_faces(join_faces=True, color=hex_to_rgb("#222222"))
6768

6869
meshartist.mesh = Mesh.from_vertices_and_faces(*B)
6970
meshartist.layer = "CGAL::Intersections::B"
7071
meshartist.clear_layer()
71-
meshartist.draw_faces(join_faces=True, color=hex_to_rgb('#888888'))
72+
meshartist.draw_faces(join_faces=True, color=hex_to_rgb("#888888"))
7273

7374
polylineartist = PolylineArtist(None, layer="CGAL::Intersections::Polylines")
7475
polylineartist.clear_layer()
75-
pointartist = PointArtist(None, layer='CGAL::Intersections::Points')
76+
pointartist = PointArtist(None, layer="CGAL::Intersections::Points")
7677
pointartist.clear_layer()
7778

7879
for polyline in polylines:
7980
polylineartist.primitive = polyline
80-
polylineartist.color = hex_to_rgb('#ffffff')
81+
polylineartist.color = hex_to_rgb("#ffffff")
8182
polylineartist.draw()
82-
PointArtist.draw_collection(
83-
polyline.points, color=(255, 0, 0), layer='CGAL::Intersections::Points')
83+
PointArtist.draw_collection(polyline.points, color=(255, 0, 0), layer="CGAL::Intersections::Points")
8484

8585
polylineartist.redraw()

src/compas_cgal/slicer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def slice_mesh_planes(mesh: VerticesFaces, planes: Planes) -> PolylinesNumpy:
2727
Examples
2828
--------
2929
>>> from compas.geometry import Sphere, Plane, Polyline
30-
>>> from compas.utilities import linspace
30+
>>> from compas.itertools import linspace
3131
>>> from compas_cgal.slicer import slice_mesh
3232
3333
>>> sphere = Sphere(1.0, point=[0, 0, 1.0])

0 commit comments

Comments
 (0)