static LWError SuperQ_Build( sqData *tool, MeshEditOp *edit ) { int ok; switch ( tool->shape ) { case 0: ok = ellipsoid( edit, tool ); break; case 1: ok = toroid( edit, tool ); break; default: break; } tool->update = LWT_TEST_NOTHING; return ok ? NULL : "Failed"; }
int main(int argc, char **argv) { IndentWriter writer; Component2D circle(Circle::create(1.0).translate(2, 0, 0)); Component toroid(circle.rotateExtrudedCopy()); writer << toroid; Component toroid2(Toroid(2.0, 1.0)); writer << toroid2; std::cout << writer; return 0; }