Line 385... |
Line 385... |
385 |
loop_split(me->active_mesh(),me->active_mesh());
|
385 |
loop_split(me->active_mesh(),me->active_mesh());
|
386 |
loop_smooth(me->active_mesh());
|
386 |
loop_smooth(me->active_mesh());
|
387 |
|
387 |
|
388 |
return;
|
388 |
return;
|
389 |
}
|
389 |
}
|
- |
|
390 |
void console_stitch(MeshEditor* me, const std::vector<std::string> & args)
|
- |
|
391 |
{
|
- |
|
392 |
if(wantshelp(args)) {
|
- |
|
393 |
me->printf("usage: cleanup.stitch");
|
- |
|
394 |
me->printf("Stitches faces");
|
- |
|
395 |
|
- |
|
396 |
return;
|
- |
|
397 |
}
|
- |
|
398 |
me->save_active_mesh();
|
- |
|
399 |
|
- |
|
400 |
stitch_mesh(me->active_mesh());
|
- |
|
401 |
return;
|
- |
|
402 |
}
|
390 |
|
403 |
|
391 |
void console_root3_subdivide(MeshEditor* me, const std::vector<std::string> & args)
|
404 |
void console_root3_subdivide(MeshEditor* me, const std::vector<std::string> & args)
|
392 |
{
|
405 |
{
|
393 |
if(wantshelp(args)) {
|
406 |
if(wantshelp(args)) {
|
394 |
me->printf("usage: subdivide.root3");
|
407 |
me->printf("usage: subdivide.root3");
|
Line 585... |
Line 598... |
585 |
me->harmonics_analyze_mesh();
|
598 |
me->harmonics_analyze_mesh();
|
586 |
return;
|
599 |
return;
|
587 |
}
|
600 |
}
|
588 |
|
601 |
|
589 |
|
602 |
|
590 |
// void console_partial_reconstruct(MeshEditor* me, const std::vector<std::string> & args)
|
603 |
void console_partial_reconstruct(MeshEditor* me, const std::vector<std::string> & args)
|
591 |
// {
|
604 |
{
|
592 |
// if(args.size() != 3)
|
605 |
if(args.size() != 3)
|
593 |
// me->printf("usage: haramonics.partial_reconstruct <e0> <e1> <s>");
|
606 |
me->printf("usage: haramonics.partial_reconstruct <e0> <e1> <s>");
|
594 |
//
|
607 |
|
595 |
// if(wantshelp(args)) {
|
608 |
if(wantshelp(args)) {
|
596 |
// me->printf("Reconstruct from projections onto eigenvectors. The two first arguments indicate");
|
609 |
me->printf("Reconstruct from projections onto eigenvectors. The two first arguments indicate");
|
597 |
// me->printf("the eigenvector interval that we reconstruct from. The last argument is the ");
|
610 |
me->printf("the eigenvector interval that we reconstruct from. The last argument is the ");
|
598 |
// me->printf("scaling factor. Thus, for a vertex, v, the formula for computing the position, p, is:");
|
611 |
me->printf("scaling factor. Thus, for a vertex, v, the formula for computing the position, p, is:");
|
599 |
// me->printf("for (i=e0; i<=e1;++i) p += proj[i] * Q[i][v] * s;");
|
612 |
me->printf("for (i=e0; i<=e1;++i) p += proj[i] * Q[i][v] * s;");
|
600 |
// me->printf("where proj[i] is the 3D vector containing the x, y, and z projections of the mesh onto");
|
613 |
me->printf("where proj[i] is the 3D vector containing the x, y, and z projections of the mesh onto");
|
601 |
// me->printf("eigenvector i. Q[i][v] is the v'th coordinate of the i'th eigenvector.");
|
614 |
me->printf("eigenvector i. Q[i][v] is the v'th coordinate of the i'th eigenvector.");
|
602 |
// me->printf("Note that if vertex coordinates are not first reset, the result is probably unexpected.");
|
615 |
me->printf("Note that if vertex coordinates are not first reset, the result is probably unexpected.");
|
603 |
// }
|
616 |
}
|
604 |
// me->save_active_mesh();
|
617 |
me->save_active_mesh();
|
605 |
//
|
618 |
|
606 |
// if(args.size() != 3)
|
619 |
if(args.size() != 3)
|
607 |
// return;
|
620 |
return;
|
608 |
//
|
621 |
|
609 |
// int E0,E1;
|
622 |
int E0,E1;
|
610 |
// float scale;
|
623 |
float scale;
|
611 |
// istringstream a0(args[0]);
|
624 |
istringstream a0(args[0]);
|
612 |
// a0 >> E0;
|
625 |
a0 >> E0;
|
613 |
// istringstream a1(args[1]);
|
626 |
istringstream a1(args[1]);
|
614 |
// a1 >> E1;
|
627 |
a1 >> E1;
|
615 |
// istringstream a2(args[2]);
|
628 |
istringstream a2(args[2]);
|
616 |
// a2 >> scale;
|
629 |
a2 >> scale;
|
617 |
// me->harmonics_partial_reconstruct(E0,E1,scale);
|
630 |
me->harmonics_partial_reconstruct(E0,E1,scale);
|
618 |
// return;
|
631 |
return;
|
619 |
// }
|
632 |
}
|
620 |
//
|
633 |
|
621 |
// void console_reset_shape(MeshEditor* me, const std::vector<std::string> & args)
|
634 |
void console_reset_shape(MeshEditor* me, const std::vector<std::string> & args)
|
622 |
// {
|
635 |
{
|
623 |
// if(wantshelp(args))
|
636 |
if(wantshelp(args))
|
624 |
// {
|
637 |
{
|
625 |
// me->printf("usage: harmonics.reset_shape ");
|
638 |
me->printf("usage: harmonics.reset_shape ");
|
626 |
// me->printf("Simply sets all vertices to 0,0,0. Call this before doing partial_reconstruct");
|
639 |
me->printf("Simply sets all vertices to 0,0,0. Call this before doing partial_reconstruct");
|
627 |
// me->printf("unless you know what you are doing.");
|
640 |
me->printf("unless you know what you are doing.");
|
628 |
// return;
|
641 |
return;
|
629 |
// }
|
642 |
}
|
630 |
// me->save_active_mesh();
|
643 |
me->save_active_mesh();
|
631 |
// me->harmonics_reset_shape();
|
644 |
me->harmonics_reset_shape();
|
632 |
// return;
|
645 |
return;
|
633 |
// }
|
646 |
}
|
634 |
|
647 |
|
635 |
|
648 |
|
636 |
void console_close_holes(MeshEditor* me, const std::vector<std::string> & args)
|
649 |
void console_close_holes(MeshEditor* me, const std::vector<std::string> & args)
|
637 |
{
|
650 |
{
|
638 |
if(wantshelp(args))
|
651 |
if(wantshelp(args))
|
Line 1388... |
Line 1401... |
1388 |
register_console_function("optimize.maximize_min_angle", console_maximize_min_angle,"");
|
1401 |
register_console_function("optimize.maximize_min_angle", console_maximize_min_angle,"");
|
1389 |
register_console_function("cleanup.close_holes", console_close_holes,"");
|
1402 |
register_console_function("cleanup.close_holes", console_close_holes,"");
|
1390 |
register_console_function("load_mesh", console_reload,"");
|
1403 |
register_console_function("load_mesh", console_reload,"");
|
1391 |
register_console_function("add_mesh", console_add_mesh,"");
|
1404 |
register_console_function("add_mesh", console_add_mesh,"");
|
1392 |
|
1405 |
|
- |
|
1406 |
register_console_function("cleanup.stitch", console_stitch,"");
|
1393 |
register_console_function("cleanup.remove_caps", console_remove_caps,"");
|
1407 |
register_console_function("cleanup.remove_caps", console_remove_caps,"");
|
1394 |
register_console_function("cleanup.remove_needles", console_remove_needles,"");
|
1408 |
register_console_function("cleanup.remove_needles", console_remove_needles,"");
|
1395 |
register_console_function("triangulate", console_triangulate,"");
|
1409 |
register_console_function("triangulate", console_triangulate,"");
|
1396 |
register_console_function("refine.split_edges", console_refine_edges,"");
|
1410 |
register_console_function("refine.split_edges", console_refine_edges,"");
|
1397 |
register_console_function("refine.split_faces", console_refine_faces,"");
|
1411 |
register_console_function("refine.split_faces", console_refine_faces,"");
|
Line 1412... |
Line 1426... |
1412 |
register_console_function("undo", console_undo,"");
|
1426 |
register_console_function("undo", console_undo,"");
|
1413 |
|
1427 |
|
1414 |
register_console_function("validity", console_valid,"");
|
1428 |
register_console_function("validity", console_valid,"");
|
1415 |
register_console_function("info", console_info,"");
|
1429 |
register_console_function("info", console_info,"");
|
1416 |
|
1430 |
|
1417 |
// register_console_function("harmonics.reset_shape", console_reset_shape, "");
|
1431 |
register_console_function("harmonics.reset_shape", console_reset_shape, "");
|
1418 |
register_console_function("harmonics.analyze", console_analyze, "");
|
1432 |
register_console_function("harmonics.analyze", console_analyze, "");
|
1419 |
// register_console_function("harmonics.partial_reconstruct", console_partial_reconstruct,"");
|
1433 |
register_console_function("harmonics.partial_reconstruct", console_partial_reconstruct,"");
|
1420 |
|
1434 |
|
1421 |
register_console_function("Dijkstra", console_Dijkstra,"");
|
1435 |
register_console_function("Dijkstra", console_Dijkstra,"");
|
1422 |
|
1436 |
|
1423 |
register_console_function("display.save_trackball", console_save_trackball, "Saves trackball to disk");
|
1437 |
register_console_function("display.save_trackball", console_save_trackball, "Saves trackball to disk");
|
1424 |
register_console_function("display.load_trackball", console_load_trackball, "Load trackball to disk");
|
1438 |
register_console_function("display.load_trackball", console_load_trackball, "Load trackball to disk");
|