brep_simple constructs a simple b-rep twisted cube directly using the openNURBS API. The constructed twisted cube is written to a geometry database (brep_simple.g) using the wdb interface. The cube is constructed by first defining and creating the vertices, then the twisted edges (using trimming curves), and finally the faces to get a final topology like the following:
H-------e6-------G
/ /|
/ | / |
/ e7 / e5
/ | / |
/ e10 |
/ | / |
e11 E- - e4- -/- - - F
/ / /
/ / / /
D---------e2-----C e9
| / | /
| e8 | /
e3 / e1 /
| | /
| / | /
| |/
A-------e0-------B