Revision: 57198
http://sourceforge.net/p/brlcad/code/57198
Author: brlcad
Date: 2013-08-28 02:55:30 +0000 (Wed, 28 Aug 2013)
Log Message:
-----------
convert the name field to a bu_vls to eliminate the fixed object name limit.
untested but fairly benign.
Modified Paths:
--------------
brlcad/trunk/src/conv/3dm/3dm-g.cpp
Modified: brlcad/trunk/src/conv/3dm/3dm-g.cpp
===================================================================
--- brlcad/trunk/src/conv/3dm/3dm-g.cpp 2013-08-28 02:54:19 UTC (rev 57197)
+++ brlcad/trunk/src/conv/3dm/3dm-g.cpp 2013-08-28 02:55:30 UTC (rev 57198)
@@ -162,6 +162,7 @@
{
std::string root_uuid = "00000000-0000-0000-0000-000000000000";
MEMBER_MAP::iterator iter = member_map.find(root_uuid);
+
if (iter != member_map.end()) {
std::string uuid = iter->first;
BuildHierarchy(outfp, uuid, dump);
@@ -172,17 +173,19 @@
static void
ProcessLayers(ONX_Model &model, ON_TextLog* dump)
{
- char name[256];
- char uuidstr[50];
+ struct bu_vls name = BU_VLS_INIT_ZERO;
+ char uuidstr[50] = {0};
std::string layer_name, uuid, parent_uuid;
ON_UuidIndex uuidIndex;
int i, count = model.m_layer_table.Count();
+
dump->Print("Number of layers: %d\n", count);
for (i=0; i < count; ++i) {
const ON_Layer& layer = model.m_layer_table[i];
ON_wString lname = layer.LayerName();
- bu_strlcpy(name, ON_String(lname), sizeof(name));
- layer_name = name;
+
+ bu_vls_strcpy(&name, ON_String(lname));
+ layer_name = bu_vls_addr(&name);
uuid = ON_UuidToString(layer.m_layer_id, uuidstr);
parent_uuid = ON_UuidToString(layer.m_parent_layer_id, uuidstr);
MapLayer(layer_name, uuid, parent_uuid);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits