You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorial/brep.rst
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,7 @@ For example, when in Rhino
65
65
compas_rhino.geometry.RhinoBrep
66
66
67
67
Every backend is expected to implement some alternative constructors
68
+
68
69
.. code-block::
69
70
70
71
>>> from compas.geometry import Box
@@ -75,6 +76,7 @@ Every backend is expected to implement some alternative constructors
75
76
76
77
77
78
`Brep` can also be instantiated from an instance of a backend native `Brep`
79
+
78
80
.. code-block::
79
81
80
82
>>> import Rhino
@@ -114,7 +116,7 @@ Implementing a new backend
114
116
115
117
If you wish to create an additional backend to `Brep` in your package, this can be done using the plugin system of COMPAS.
116
118
117
-
Create a Brep type in your package which inherits from `compas.geometry.Brep` and override the `__new__` dundle as follows:
119
+
Create a Brep type in your package which inherits from :class:`compas.geometry.Brep` and override the `__new__` dundle as follows:
118
120
119
121
.. code-block::
120
122
@@ -144,5 +146,5 @@ Now, a call to `compas.geometry.Brep()` will result in an instance of `your.pack
144
146
Implementing the `compas.data.Data` interface
145
147
---------------------------------------------
146
148
A powerful feature of this approach is to be able to serialize a Brep created in one backend and de-serialize it using another.
147
-
For that, it is required that `your.package.OccBrep` implements the `compas.data.Data` interface and follows the unified serialization protocol.
149
+
For that, it is required that `your.package.OccBrep` implements the :class:`compas.data.Data` interface and follows the unified serialization protocol.
0 commit comments