Skip to content

Commit 986dce7

Browse files
committed
change theme to blue and light blue
1 parent 605028f commit 986dce7

File tree

3 files changed

+35
-16
lines changed

3 files changed

+35
-16
lines changed

docs/css/compas.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:root>* {
2+
--md-primary-fg-color: #0092d2;
3+
--md-primary-fg-color--light: #40b5e3;
4+
--md-primary-fg-color--dark: #006a9a;
5+
6+
--md-accent-fg-color: #0092d2;
7+
--md-accent-fg-color--light: #40b5e3;
8+
--md-accent-fg-color--dark: #006a9a;
9+
}

mkdocs.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,27 @@ extra:
1111
version:
1212
provider: mike
1313

14+
# extra_css:
15+
# - css/compas.css
16+
1417
theme:
1518
name: material
1619
palette:
17-
scheme: slate
18-
primary: indigo
19-
accent: indigo
20+
# Palette toggle for light mode
21+
- scheme: default
22+
primary: blue
23+
accent: light blue
24+
toggle:
25+
icon: material/brightness-7
26+
name: Switch to dark mode
27+
28+
# Palette toggle for dark mode
29+
- scheme: slate
30+
primary: blue
31+
accent: light blue
32+
toggle:
33+
icon: material/brightness-4
34+
name: Switch to light mode
2035
font:
2136
text: Roboto
2237
code: Roboto Mono

src/compas_model/algorithms/contacts.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -324,21 +324,16 @@ def brepface_brepface_overlap_holes(
324324
The holes in the overlap polygon, or None if there are no holes.
325325
326326
"""
327-
a_points = a.loops[0].to_polygon().points
328-
b_points = b.loops[0].to_polygon().points
327+
a_polygons = a.to_polygons()
328+
a_boundary = transform_points(a_polygons[0].points, matrix_to_local)
329+
a_holes = [transform_points(polygon.points, matrix_to_local) for polygon in a_polygons[1:]]
329330

330-
a_holes = []
331-
if len(a.loops) > 1:
332-
for loop in a.loops[1:]:
333-
a_holes.append(transform_points(loop.to_polygon().points, matrix_to_local))
331+
b_polygons = b.to_polygons()
332+
b_boundary = transform_points(b_polygons[0].points, matrix_to_local)
333+
b_holes = [transform_points(polygon.points, matrix_to_local) for polygon in b_polygons[1:]]
334334

335-
b_holes = []
336-
if len(b.loops) > 1:
337-
for loop in b.loops[1:]:
338-
b_holes.append(transform_points(loop.to_polygon().points, matrix_to_local))
339-
340-
a_shapely = ShapelyPolygon(transform_points(a_points, matrix_to_local), holes=a_holes)
341-
b_shapely = ShapelyPolygon(transform_points(b_points, matrix_to_local), holes=b_holes)
335+
a_shapely = ShapelyPolygon(a_boundary, holes=a_holes)
336+
b_shapely = ShapelyPolygon(b_boundary, holes=b_holes)
342337

343338
intersection: ShapelyPolygon = a_shapely.intersection(b_shapely) # type: ignore
344339
area = intersection.area

0 commit comments

Comments
 (0)