Revision: 54512
http://brlcad.svn.sourceforge.net/brlcad/?rev=54512&view=rev
Author: r_weiss
Date: 2013-02-28 20:51:15 +0000 (Thu, 28 Feb 2013)
Log Message:
-----------
Added plate mode bot support in the mged bot_merge command.
Modified Paths:
--------------
brlcad/trunk/src/libged/bot_merge.c
Modified: brlcad/trunk/src/libged/bot_merge.c
===================================================================
--- brlcad/trunk/src/libged/bot_merge.c 2013-02-28 18:46:34 UTC (rev 54511)
+++ brlcad/trunk/src/libged/bot_merge.c 2013-02-28 20:51:15 UTC (rev 54512)
@@ -117,7 +117,6 @@
bots[0]->mode = bots[i]->mode;
}
-
if (bots[i]->bot_flags & RT_BOT_HAS_SURFACE_NORMALS) bots[0]->bot_flags
|= RT_BOT_HAS_SURFACE_NORMALS;
if (bots[i]->bot_flags & RT_BOT_USE_NORMALS) bots[0]->bot_flags |=
RT_BOT_USE_NORMALS;
@@ -136,6 +135,11 @@
bots[0]->vertices = bu_calloc(bots[0]->num_vertices*3, sizeof(fastf_t),
"verts");
bots[0]->faces = bu_calloc(bots[0]->num_faces*3, sizeof(int), "verts");
+ if (bots[0]->mode == RT_BOT_PLATE || bots[0]->mode == RT_BOT_PLATE_NOCOS) {
+ bots[0]->thickness = bu_calloc(bots[0]->num_faces, sizeof(fastf_t),
"thickness");
+ bots[0]->face_mode = bu_calloc(bots[0]->num_faces, sizeof(struct
bu_bitv), "face_mode");
+ }
+
avail_vert = 0;
avail_face = 0;
@@ -152,6 +156,11 @@
bots[0]->faces[avail_face*3+face*3+2] = bots[i]->faces[face*3
] + avail_vert;
bots[0]->faces[avail_face*3+face*3+1] =
bots[i]->faces[face*3+1] + avail_vert;
bots[0]->faces[avail_face*3+face*3 ] =
bots[i]->faces[face*3+2] + avail_vert;
+
+ if (bots[0]->mode == RT_BOT_PLATE || bots[0]->mode ==
RT_BOT_PLATE_NOCOS) {
+ bots[0]->thickness[avail_face+face] =
bots[i]->thickness[face];
+ bots[0]->face_mode[avail_face+face] =
bots[i]->face_mode[face];
+ }
}
} else {
/* just copy */
@@ -160,6 +169,11 @@
bots[0]->faces[avail_face*3+face*3 ] = bots[i]->faces[face*3
] + avail_vert;
bots[0]->faces[avail_face*3+face*3+1] =
bots[i]->faces[face*3+1] + avail_vert;
bots[0]->faces[avail_face*3+face*3+2] =
bots[i]->faces[face*3+2] + avail_vert;
+
+ if (bots[0]->mode == RT_BOT_PLATE || bots[0]->mode ==
RT_BOT_PLATE_NOCOS) {
+ bots[0]->thickness[avail_face+face] =
bots[i]->thickness[face];
+ bots[0]->face_mode[avail_face+face] =
bots[i]->face_mode[face];
+ }
}
}
@@ -171,7 +185,6 @@
}
}
-
avail_vert += bots[i]->num_vertices;
avail_face += bots[i]->num_faces;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits