3
3
import numpy as np
4
4
5
5
import classy_blocks as cb
6
- from classy_blocks .grading .autograding .grader import HighReGrader
7
6
from classy_blocks .types import PointType
8
7
from classy_blocks .util import functions as f
9
8
@@ -33,6 +32,8 @@ class RoundSquare(cb.MappedSketch):
33
32
[21 , 22 , 23 , 20 ],
34
33
]
35
34
35
+ chops = [[0 ], [0 , 1 , 4 , 5 , 8 , 12 ]]
36
+
36
37
def __init__ (self , center : PointType , side : float , corner_round : float ):
37
38
center = np .array (center )
38
39
points = [
@@ -56,17 +57,17 @@ def add_edges(self) -> None:
56
57
self .faces [i ].add_edge (1 , cb .Angle (np .pi / 2 , [0 , 0 , 1 ]))
57
58
58
59
59
- base_1 = RoundSquare ([0 , 0 , 0 ], 1 , 0.5 )
60
- smoother = cb .SketchSmoother (base_1 )
60
+ base = RoundSquare ([0 , 0 , 0 ], 1 , 0.5 )
61
+ smoother = cb .SketchSmoother (base )
61
62
smoother .smooth ()
62
63
63
- shape = cb .ExtrudedShape (base_1 , 1 )
64
+ shape = cb .ExtrudedShape (base , 1 )
65
+ shape .chop (0 , start_size = 0.05 )
66
+ shape .chop (1 , start_size = 0.05 )
67
+ shape .chop (2 , count = 5 )
64
68
65
69
mesh .add (shape )
66
70
mesh .assemble ()
67
71
68
- grader = HighReGrader (mesh , 0.03 )
69
- grader .grade (take = "max" )
70
-
71
72
mesh .set_default_patch ("walls" , "wall" )
72
73
mesh .write (os .path .join (".." , "case" , "system" , "blockMeshDict" ), debug_path = "debug.vtk" )
0 commit comments