本文整理汇总了C++中ON_Brep::Dump方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_Brep::Dump方法的具体用法?C++ ON_Brep::Dump怎么用?C++ ON_Brep::Dump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_Brep
的用法示例。
在下文中一共展示了ON_Brep::Dump方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: log
int
main(int argc, char *argv[])
{
struct rt_wdb *wdbp = NULL;
const char *name = "brep";
ON_Brep *brep = NULL;
int ret;
if ( BU_STR_EQUAL(argv[1],"-h") || BU_STR_EQUAL(argv[1],"-?")) {
printusage();
return 0;
}
if (argc >= 1) {
printusage();
fprintf(stderr," Program continues running (will create file breplicator.g):\n");
}
bu_log("Breplicating...please wait...\n");
ON_3dPoint points[8] = {
/* left */
ON_3dPoint(0.0, 0.0, 0.0), // 0
ON_3dPoint(1.0, 0.0, 0.0), // 1
ON_3dPoint(1.0, 0.0, 2.5), // 2
ON_3dPoint(0.0, 0.0, 2.5), // 3
/* right */
ON_3dPoint(0.0, 1.0, 0.0), // 4
ON_3dPoint(1.0, 1.0, 0.0), // 5
ON_3dPoint(1.0, 1.0, 2.5), // 6
ON_3dPoint(0.0, 1.0, 2.5), // 7
};
brep = generate_brep(8, points);
if (!brep)
bu_exit(1, "ERROR: We don't have a BREP\n");
ON_TextLog log(stdout);
brep->Dump(log);
if (!brep->IsValid(&log)) {
delete brep;
bu_exit(1, "ERROR: We don't have a valid BREP\n");
}
brep->Dump(log);
wdbp = wdb_fopen("breplicator.g");
if (!wdbp) {
delete brep;
bu_exit(2, "ERROR: Unable to open breplicator.g\n");
}
mk_id(wdbp, "Breplicator test geometry");
bu_log("Creating the BREP as BRL-CAD geometry\n");
ret = mk_brep(wdbp, name, brep);
if (ret) {
delete brep;
wdb_close(wdbp);
bu_exit(3, "ERROR: Unable to export %s\n", name);
}
bu_log("Done.\n");
delete brep;
wdb_close(wdbp);
return 0;
}