Skip to content

Commit 4a79b31

Browse files
authored
Document occ_impl.assembly.toJSON (#1241)
1 parent a2c1f7c commit 4a79b31

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cadquery/occ_impl/assembly.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ def toJSON(
262262
color: Tuple[float, float, float, float] = (1.0, 1.0, 1.0, 1.0),
263263
tolerance: float = 1e-3,
264264
) -> List[Dict[str, Any]]:
265+
"""
266+
Export an object to a structure suitable for converting to VTK.js JSON.
267+
"""
265268

266269
loc = loc * assy.loc
267270
trans, rot = loc.toTuple()

doc/classreference.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,5 @@ Class Details
9999
.. automodule:: cadquery.occ_impl.exporters.assembly
100100
:show-inheritance:
101101
:members:
102+
103+
.. autofunction:: cadquery.occ_impl.assembly.toJSON

0 commit comments

Comments
 (0)