Skip to content

Commit 2e9a3a5

Browse files
committed
update docs
1 parent da8983c commit 2e9a3a5

File tree

11 files changed

+201
-158
lines changed

11 files changed

+201
-158
lines changed

docs/index.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
COMPAS OCC
33
********************************************************************************
44

5-
.. figure:: /_images/compas_occ.png
6-
:figclass: figure
7-
:class: figure-img img-fluid
8-
95
.. rst-class:: lead
106

117
COMPAS OCC provides an easy-to-use interface to the Python bindings
128
of the `3D modelling kernel of Open CasCade <https://www.opencascade.com/open-cascade-technology/>`_.
139

10+
.. figure:: /_images/compas_occ.png
11+
:figclass: figure
12+
:class: figure-img img-fluid
1413

15-
:mod:`compas_occ.geometry` defines :class:`compas_occ.geometry.Curve`, :class:`compas_occ.geometry.NurbsCurve`,
16-
:class:`compas_occ.geometry.Surface` and :class:`compas_occ.geometry.NurbsSurface`, which are wrappers around the
17-
``Geom_Curve`` [1]_, ``Geom_BSplineCurve`` [2]_, ``Geom_Surface`` [3]_ and ``Geom_BSplineSurface`` [4]_ objects of OCC, repsectively.
14+
:mod:`compas_occ.geometry` defines :class:`~compas_occ.geometry.Curve`, :class:`~compas_occ.geometry.NurbsCurve`,
15+
:class:`~compas_occ.geometry.Surface` and :class:`~compas_occ.geometry.NurbsSurface`, which are wrappers around
16+
``Geom_Curve`` [1]_, ``Geom_BSplineCurve`` [2]_, ``Geom_Surface`` [3]_ and ``Geom_BSplineSurface`` [4]_ of OCC, repsectively.
1817
The :mod:`compas_occ` wrappers provide an API for working with NURBS curves and surfaces similar to the API of RhinoCommon.
1918

2019
:mod:`compas_occ.brep` is a package for working with Boundary Representation (BRep) objects

src/compas_occ/brep/brepedge.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ class BRepEdge:
3434
3535
Attributes
3636
----------
37-
edge : ``TopoDS_Edge``
38-
The underlying OCC topological edge data structure.
3937
type : :class:`BRepEdge.CurveType`, read-only
4038
The type of the geometric curve underlying the topological edge.
4139
is_line : bool, read-only
@@ -54,16 +52,21 @@ class BRepEdge:
5452
True if the underlying curve is a bspline curve.
5553
is_other : bool, read-only
5654
True if the underlying curve is an other type of curve.
57-
vertices : list[:class:`compas_occ.brep.BRepVertex`], read-only
55+
vertices : list[:class:`~compas_occ.brep.BRepVertex`], read-only
5856
The topological vertices of the edge.
59-
first_vertex : :class:`compas_occ.brep.BRepVertex`, read-only
57+
first_vertex : :class:`~compas_occ.brep.BRepVertex`, read-only
6058
The first vertex with forward orientation.
61-
last_vertex : :class:`compas_occ.brep.BRepVertex`, read-only
59+
last_vertex : :class:`~compas_occ.brep.BRepVertex`, read-only
6260
The first vertex with reversed orientation.
61+
curve : :class:`~compas_occ.geometry.Curve`
62+
Curve geometry from the edge adaptor.
63+
64+
Other Attributes
65+
----------------
66+
edge : ``TopoDS_Edge``
67+
The underlying OCC topological edge data structure.
6368
adaptor : ``BRepAdaptor_Curve``
6469
Edge adaptor for extracting curve geometry.
65-
curve : :class:`compas_occ.geometry.OCCCurve`
66-
Curve geometry from the edge adaptor.
6770
6871
"""
6972

@@ -163,7 +166,7 @@ def to_line(self) -> compas.geometry.Line:
163166
164167
Returns
165168
-------
166-
:class:`compas.geometry.Line`
169+
:class:`~compas.geometry.Line`
167170
A COMPAS line.
168171
169172
Raises
@@ -184,7 +187,7 @@ def to_circle(self) -> compas.geometry.Circle:
184187
185188
Returns
186189
-------
187-
:class:`compas.geometry.Circle`
190+
:class:`~compas.geometry.Circle`
188191
A COMPAS circle.
189192
190193
Raises
@@ -210,7 +213,7 @@ def to_ellipse(self) -> compas.geometry.Ellipse:
210213
211214
Returns
212215
-------
213-
:class:`compas.geometry.Ellipse`
216+
:class:`~compas.geometry.Ellipse`
214217
A COMPAS ellipse.
215218
216219
Raises
@@ -305,7 +308,7 @@ def to_curve(self) -> Curve:
305308
306309
Returns
307310
-------
308-
:class:`compas_occ.geometry.Curve`
311+
:class:`~compas_occ.geometry.Curve`
309312
310313
"""
311314
return self.curve

src/compas_occ/brep/brepface.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,27 @@ class BRepFace:
2222
2323
Parameters
2424
----------
25-
face : TopoDS_Face
25+
face : ``TopoDS_Face``
2626
An OCC BRep face.
2727
2828
Attributes
2929
----------
30-
face : TopoDS_Face
31-
The OCC BRep face.
32-
vertices : list[:class:`compas_occ.brep.BRepVertex`], read-only
30+
vertices : list[:class:`~compas_occ.brep.BRepVertex`], read-only
3331
List of BRep vertices.
34-
edges : list[:class:`compas_occ.brep.BRepEdge`], read-only
32+
edges : list[:class:`~compas_occ.brep.BRepEdge`], read-only
3533
List of BRep edges.
36-
loops : list[:class:`compas_occ.brep.BRepLoop`], read-only
34+
loops : list[:class:`~compas_occ.brep.BRepLoop`], read-only
3735
List of BRep loops.
38-
adaptor : BRepAdaptor_Surface
39-
Adaptor for extracting surface geometry from the BRep face.
40-
surface : GeomAdaptor_Surface
36+
surface : ``GeomAdaptor_Surface``
4137
Surface geometry from the adaptor.
4238
39+
Other Attributes
40+
----------------
41+
face : ``TopoDS_Face``
42+
The OCC BRep face.
43+
adaptor : ``BRepAdaptor_Surface``
44+
Adaptor for extracting surface geometry from the BRep face.
45+
4346
"""
4447

4548
def __init__(self, face: TopoDS_Face):

src/compas_occ/brep/breploop.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,21 @@ class BRepLoop:
1313
1414
Parameters
1515
----------
16-
loop : TopoDS_Wire
16+
loop : ``TopoDS_Wire``
1717
An OCC BRep wire.
1818
1919
Attributes
2020
----------
21-
loop : TopoDS_Wire
22-
The OCC BRep wire.
23-
vertices : list[:class:`compas_occ.brep.BRepVertex`], read-only
21+
vertices : list[:class:`~compas_occ.brep.BRepVertex`], read-only
2422
List of BRep vertices.
25-
edges : list[:class:`compas_occ.brep.BRepEdge`], read-only
23+
edges : list[:class:`~compas_occ.brep.BRepEdge`], read-only
2624
List of BRep edges.
2725
26+
Other Attributes
27+
----------------
28+
loop : ``TopoDS_Wire``
29+
The OCC BRep wire.
30+
2831
"""
2932

3033
def __init__(self, loop: TopoDS_Wire):

src/compas_occ/brep/brepvertex.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ class BRepVertex:
1717
1818
Attributes
1919
----------
20+
point : :class:`~compas.geometry.Point`, read-only
21+
The geometric point underlying the topological vertex.
22+
23+
Other Attributes
24+
----------------
2025
vertex : ``TopoDS_Vertex``
2126
The underlying OCC vertex.
22-
point : :class:`compas.geometry.Point`, read-only
23-
The geometric point underlying the topological vertex.
2427
2528
"""
2629

src/compas_occ/conversions/arrays.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def array1_from_points1(points: List[Point]) -> TColgp_Array1OfPnt:
1616
1717
Parameters
1818
----------
19-
points : list[:class:`compas.geometry.Point`]
19+
points : list[:class:`~compas.geometry.Point`]
2020
2121
Returns
2222
-------
@@ -34,7 +34,7 @@ def harray1_from_points1(points: List[Point]) -> TColgp_HArray1OfPnt:
3434
3535
Parameters
3636
----------
37-
points : list[:class:`compas.geometry.Point`]
37+
points : list[:class:`~compas.geometry.Point`]
3838
3939
Returns
4040
-------
@@ -56,7 +56,7 @@ def points1_from_array1(array: TColgp_Array1OfPnt) -> List[Point]:
5656
5757
Returns
5858
-------
59-
list[:class:`compas.geometry.Point`]
59+
list[:class:`~compas.geometry.Point`]
6060
6161
"""
6262
return [Point(point.X(), point.Y(), point.Z()) for point in array]
@@ -67,7 +67,7 @@ def array2_from_points2(points: List[List[Point]]) -> TColgp_Array2OfPnt:
6767
6868
Parameters
6969
----------
70-
points : list[list[:class:`compas.geometry.Point`]]
70+
points : list[list[:class:`~compas.geometry.Point`]]
7171
7272
Returns
7373
-------
@@ -93,7 +93,7 @@ def points2_from_array2(array: TColgp_Array2OfPnt) -> List[List[Point]]:
9393
9494
Returns
9595
-------
96-
list[list[:class:`compas.geometry.Point`]]
96+
list[list[:class:`~compas.geometry.Point`]]
9797
9898
"""
9999
points = [[None for j in range(array.NbRows())] for i in range(array.NbColumns())]

src/compas_occ/conversions/meshes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def compas_trimesh_to_occ_shell(mesh: Mesh) -> TopoDS_Shell:
113113
114114
Parameters
115115
----------
116-
mesh : :class:`compas.datastructures.Mesh`
116+
mesh : :class:`~compas.datastructures.Mesh`
117117
A COMPAS mesh data structure with triangle faces.
118118
119119
Returns
@@ -144,7 +144,7 @@ def compas_quadmesh_to_occ_shell(mesh: Mesh) -> TopoDS_Shell:
144144
145145
Parameters
146146
----------
147-
mesh : :class:`compas.datastructures.Mesh`
147+
mesh : :class:`~compas.datastructures.Mesh`
148148
A COMPAS mesh data structure with quad faces.
149149
150150
Returns
@@ -175,7 +175,7 @@ def compas_mesh_to_occ_shell(mesh: Mesh) -> TopoDS_Shell:
175175
176176
Parameters
177177
----------
178-
mesh : :class:`compas.datastructures.Mesh`
178+
mesh : :class:`~compas.datastructures.Mesh`
179179
A COMPAS mesh data structure.
180180
181181
Returns

0 commit comments

Comments
 (0)