Revision: 56584
http://sourceforge.net/p/brlcad/code/56584
Author: starseeker
Date: 2013-08-05 16:05:57 +0000 (Mon, 05 Aug 2013)
Log Message:
-----------
note that STEPentity == SDAI_Application_instance
Modified Paths:
--------------
brlcad/trunk/src/conv/step/ON_Brep.cpp
brlcad/trunk/src/conv/step/g-step.cpp
Modified: brlcad/trunk/src/conv/step/ON_Brep.cpp
===================================================================
--- brlcad/trunk/src/conv/step/ON_Brep.cpp 2013-08-05 15:36:54 UTC (rev
56583)
+++ brlcad/trunk/src/conv/step/ON_Brep.cpp 2013-08-05 16:05:57 UTC (rev
56584)
@@ -53,6 +53,9 @@
//
// 2d trimming curves -> pcurve using point_on_surface? almost doesn't look as
if there is a good AP203 way to represent 2d trimming curves...
//
+//
+// Note that STEPentity is the same thing as SDAI_Application_instance... see
src/clstepcore/sdai.h line 220
+//
STEPattribute * getAttribute(STEPentity *ent, const char *name)
{
@@ -69,7 +72,7 @@
return attr_result;
}
-bool ON_BRep_to_STEP(ON_Brep *brep)
+bool ON_BRep_to_STEP(ON_Brep *brep, , Registry *registry)
{
STEPentity ** vertex_cartesian_pt_array = new
STEPentity*[brep->m_V.Count()];
STEPentity ** vertex_pt_array = new STEPentity*[brep->m_V.Count()];
@@ -88,8 +91,7 @@
for (int i = 0; i < brep->m_V.Count(); ++i) {
// Cartesian points (actual 3D geometry)
vertex_cartesian_pt_array[i] =
registry->ObjCreate("CARTESIAN_POINT");
- STEPentity *ent = vertex_cartesian_pt_array[i];
- STEPattribute *coords = getAttribute(ent, "coordinates");
+ STEPattribute *coords =
getAttribute(vertex_cartesian_pt_array[i], "coordinates");
RealAggregate_ptr coord_vals = coords->coordinates_();
RealNode *xnode = new RealNode();
xnode->value = brep->m_V[i].x;
@@ -102,5 +104,6 @@
coord_vals.AddNode(znode);
// Vertex points (topological, references actual 3D geometry)
vertex_pt_array[i] = registry->ObjCreate("VERTEX_POINT");
+ vertex_pt_array[i]->vertex_geometry_((const
SdaiPoint_ptr)cartesian_pt_array[i]);
}
}
Modified: brlcad/trunk/src/conv/step/g-step.cpp
===================================================================
--- brlcad/trunk/src/conv/step/g-step.cpp 2013-08-05 15:36:54 UTC (rev
56583)
+++ brlcad/trunk/src/conv/step/g-step.cpp 2013-08-05 16:05:57 UTC (rev
56584)
@@ -129,9 +129,10 @@
brep->Dump(dump);
ON_String ss = wstr;
//std::cout << ss.Array() << "\n";
-
+ //
Registry *registry = new Registry( SchemaInit );
InstMgr instance_list;
+ STEPfile *sfile = new STEPfile(*registry, instance_list);
int entities_cnt = brep->m_S.Count() + brep->m_C3.Count() +
brep->m_C2.Count() +
brep->m_V.Count() + brep->m_E.Count() +
brep->m_T.Count() +
@@ -141,6 +142,9 @@
registry->ResetSchemas();
registry->ResetEntities();
+
+// ON_BRep_to_STEP(brep, registry);
+
const SchemaDescriptor * schema = registry->NextSchema();
cout << "Printing entities in schema " << schema->Name() << endl;
const EntityDescriptor * ent; // needs to be declared const...
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits