@@ -2855,6 +2855,9 @@ def remove_duplicate_vertices(self, precision=None):
28552855 36
28562856 >>> for x, y, z in mesh.vertices_attributes("xyz", keys=list(mesh.vertices())[:5]):
28572857 ... mesh.add_vertex(x=x, y=y, z=z)
2858+ ...
2859+ 36
2860+ 37
28582861 38
28592862 39
28602863 40
@@ -4791,9 +4794,9 @@ def transform_numpy(self, T):
47914794 Examples
47924795 --------
47934796 >>> from compas.datastructures import Mesh
4794- >>> from compas.geometry import matrix_from_axis_and_angle_numpy
4797+ >>> from compas.geometry import matrix_from_axis_and_angle
47954798 >>> mesh = Mesh.from_polyhedron(6)
4796- >>> T = matrix_from_axis_and_angle_numpy ([0, 0, 1], math.pi / 4)
4799+ >>> T = matrix_from_axis_and_angle ([0, 0, 1], math.pi / 4)
47974800 >>> mesh.transform_numpy(T)
47984801
47994802 """
@@ -4906,9 +4909,9 @@ def face_matrix(self, rtype="array"):
49064909 >>> type(F)
49074910 <class 'numpy.ndarray'>
49084911
4909- >>> from numpy import allclose
4912+ >>> from numpy import allclose, asarray
49104913 >>> xyz = asarray(mesh.vertices_attributes('xyz'))
4911- >>> F = mesh.face_matrix(mesh, rtype='csr')
4914+ >>> F = mesh.face_matrix(rtype='csr')
49124915 >>> c1 = F.dot(xyz) / F.sum(axis=1)
49134916 >>> c2 = [mesh.face_centroid(fkey) for fkey in mesh.faces()]
49144917 >>> allclose(c1, c2)
@@ -4963,10 +4966,11 @@ def laplacian_matrix(self, rtype="array"):
49634966 --------
49644967 >>> from compas.datastructures import Mesh
49654968 >>> mesh = Mesh.from_polyhedron(6)
4966- >>> L = mesh.laplacian_matrix(mesh, rtype='array')
4969+ >>> L = mesh.laplacian_matrix(rtype='array')
49674970 >>> type(L)
49684971 <class 'numpy.ndarray'>
49694972
4973+ >>> from numpy import asarray
49704974 >>> xyz = asarray(mesh.vertices_attributes('xyz'))
49714975 >>> L = mesh.laplacian_matrix(mesh)
49724976 >>> d = L.dot(xyz)
@@ -5005,11 +5009,11 @@ def offset(self, distance=1.0):
50055009
50065010 Examples
50075011 --------
5008- >>> from compas.datastructures import Mesh, mesh_offset
5012+ >>> from compas.datastructures import Mesh
50095013 >>> from compas.geometry import distance_point_point as dist
50105014 >>> mesh = Mesh.from_vertices_and_faces([[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]], [[0, 1, 2, 3]])
5011- >>> mesh.offset()
5012- <compas.datastructures.mesh.mesh.Mesh object at 0x109eaad60 >
5015+ >>> mesh.offset() # doctest: +ELLIPSIS
5016+ <compas.datastructures.mesh.mesh.Mesh object at ... >
50135017
50145018 """
50155019 offset = self .copy ()
@@ -5047,8 +5051,8 @@ def thickened(self, thickness=1.0, both=True):
50475051 --------
50485052 >>> from compas.datastructures import Mesh
50495053 >>> mesh = Mesh.from_vertices_and_faces([[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]], [[0, 1, 2, 3]])
5050- >>> mesh.thicken(mesh)
5051- <compas.datastructures.mesh.mesh.Mesh object at 0x109eaad60 >
5054+ >>> mesh.thickened() # doctest: +ELLIPSIS
5055+ <compas.datastructures.mesh.mesh.Mesh object at ... >
50525056
50535057 """
50545058 if thickness <= 0 :
0 commit comments