Skip to content

Commit

Permalink
fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Nov 19, 2023
1 parent be7aacf commit 11ec088
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/compas_cgal/booleans.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ def boolean_union_mesh_mesh(
Examples
--------
>>> from compas.geometry import Box, Sphere, Polyhedron
>>> from compas_cgal.booleans import boolean_union
>>> from compas_cgal.booleans import boolean_union_mesh_mesh
>>> box = Box(1)
>>> sphere = Sphere(0.5, point=[1, 1, 1])
>>> A = box.to_vertices_and_faces(triangulated=True)
>>> B = sphere.to_vertices_and_faces(u=32, v=32, triangulated=True)
>>> C = boolean_union(A, B)
>>> C = boolean_union_mesh_mesh(A, B)
>>> shape = Polyhedron(*C)
"""
Expand Down Expand Up @@ -112,15 +112,15 @@ def boolean_difference_mesh_mesh(
Examples
--------
>>> from compas.geometry import Box, Sphere, Polyhedron
>>> from compas_cgal.booleans import boolean_difference
>>> from compas_cgal.booleans import boolean_difference_mesh_mesh
>>> box = Box(1)
>>> sphere = Sphere(0.5, point=[1, 1, 1])
>>> A = box.to_vertices_and_faces(triangulated=True)
>>> B = sphere.to_vertices_and_faces(u=32, v=32, triangulated=True)
>>> C = boolean_difference(A, B)
>>> C = boolean_difference_mesh_mesh(A, B)
>>> shape = Polyhedron(*C)
"""
Expand Down Expand Up @@ -148,15 +148,15 @@ def boolean_intersection_mesh_mesh(
Examples
--------
>>> from compas.geometry import Box, Sphere, Polyhedron
>>> from compas_cgal.booleans import boolean_intersection
>>> from compas_cgal.booleans import boolean_intersection_mesh_mesh
>>> box = Box(1)
>>> sphere = Sphere(0.5, point=[1, 1, 1])
>>> A = box.to_vertices_and_faces(triangulated=True)
>>> B = sphere.to_vertices_and_faces(u=32, v=32, triangulated=True)
>>> C = boolean_intersection(A, B)
>>> C = boolean_intersection_mesh_mesh(A, B)
>>> shape = Polyhedron(*C)
"""
Expand Down
4 changes: 2 additions & 2 deletions src/compas_cgal/meshing.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def remesh(
>>> sphere = Sphere(0.5, point=[1, 1, 1])
>>> mesh = sphere.to_vertices_and_faces(u=32, v=32, triangulated=True)
>>> result = remesh(mesh)
>>> shape = Polyhedron(*result)
>>> V, F = remesh(mesh, 1.0)
>>> shape = Polyhedron(V.tolist(), F.tolist())
"""
V, F = mesh
Expand Down
4 changes: 2 additions & 2 deletions src/compas_cgal/slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def slice_mesh_planes(mesh: VerticesFaces, planes: Planes) -> PolylinesNumpy:
Examples
--------
>>> from compas.geometry import Sphere, Plane, Polylines
>>> from compas.geometry import Sphere, Plane, Polyline
>>> from compas.utilities import linspace
>>> from compas_cgal.slicer import slice_mesh
>>> sphere = Sphere([0, 0, 1.0], 1.0)
>>> sphere = Sphere(1.0, point=[0, 0, 1.0])
>>> mesh = sphere.to_vertices_and_faces(u=32, v=32, triangulated=True)
>>> planes = [Plane([0, 0, z], [0, 0, 1.0]) for z in linspace(0.1, 1.9, 19)]
Expand Down

0 comments on commit 11ec088

Please sign in to comment.