Revision: 57911 http://sourceforge.net/p/brlcad/code/57911 Author: starseeker Date: 2013-09-26 19:44:17 +0000 (Thu, 26 Sep 2013) Log Message: ----------- looks like we will need both shape and product from the breps.
Modified Paths: -------------- brlcad/trunk/src/conv/step/g-step/Comb_Tree.cpp brlcad/trunk/src/conv/step/g-step/ON_Brep.cpp brlcad/trunk/src/conv/step/g-step/ON_Brep.h brlcad/trunk/src/conv/step/g-step/g-step.cpp Modified: brlcad/trunk/src/conv/step/g-step/Comb_Tree.cpp =================================================================== --- brlcad/trunk/src/conv/step/g-step/Comb_Tree.cpp 2013-09-26 18:09:56 UTC (rev 57910) +++ brlcad/trunk/src/conv/step/g-step/Comb_Tree.cpp 2013-09-26 19:44:17 UTC (rev 57911) @@ -100,11 +100,14 @@ const char *brep_search = "-type brep"; struct bu_ptbl *breps = db_search_path_obj(brep_search, dp, wdbp); for (int j = (int)BU_PTBL_LEN(breps) - 1; j >= 0; j--){ + STEPentity *brep_shape; + STEPentity *brep_product; struct directory *curr_dp = (struct directory *)BU_PTBL_GET(breps, j); struct rt_db_internal brep_intern; rt_db_get_internal(&brep_intern, curr_dp, wdbp->dbip, bn_mat_identity, &rt_uniresource); RT_CK_DB_INTERNAL(&brep_intern); - (*brep_to_step)[curr_dp] = ON_BRep_to_STEP(curr_dp, &brep_intern, registry, instance_list); + ON_BRep_to_STEP(curr_dp, &brep_intern, registry, instance_list, &brep_shape, &brep_product); + (*brep_to_step)[curr_dp] = brep_product; bu_log("Brep: %s\n", curr_dp->d_namep); } Modified: brlcad/trunk/src/conv/step/g-step/ON_Brep.cpp =================================================================== --- brlcad/trunk/src/conv/step/g-step/ON_Brep.cpp 2013-09-26 18:09:56 UTC (rev 57910) +++ brlcad/trunk/src/conv/step/g-step/ON_Brep.cpp 2013-09-26 19:44:17 UTC (rev 57911) @@ -200,10 +200,9 @@ ON_NurbsSurfaceCV_Finalize_GenericAggregates(info); } -STEPentity * -ON_BRep_to_STEP(struct directory *dp, struct rt_db_internal *intern, Registry *registry, InstMgr *instance_list) +void +ON_BRep_to_STEP(struct directory *dp, struct rt_db_internal *intern, Registry *registry, InstMgr *instance_list, STEPentity **brep_shape, STEPentity **brep_product) { - STEPentity *brep_shape = NULL; RT_CK_DB_INTERNAL(intern); struct rt_brep_internal *bi = (struct rt_brep_internal*)(intern->idb_ptr); RT_BREP_TEST_MAGIC(bi); @@ -481,14 +480,12 @@ items->AddNode(new EntityNode((SDAI_Application_instance *)info->manifold_solid_brep)); info->advanced_brep->context_of_items_((SdaiRepresentation_context *) context); - // Top level structures - brep_shape = Add_Shape_Definition_Representation(info->registry, info->instance_list, info->advanced_brep); + (*brep_product) = Add_Shape_Definition_Representation(info->registry, info->instance_list, info->advanced_brep); + (*brep_shape) = info->advanced_brep; Populate_Instance_List(info); delete info; - - return brep_shape; } Modified: brlcad/trunk/src/conv/step/g-step/ON_Brep.h =================================================================== --- brlcad/trunk/src/conv/step/g-step/ON_Brep.h 2013-09-26 18:09:56 UTC (rev 57910) +++ brlcad/trunk/src/conv/step/g-step/ON_Brep.h 2013-09-26 19:44:17 UTC (rev 57911) @@ -59,7 +59,8 @@ void ON_NurbsSurfaceCV_Finalize_GenericAggregates(ON_Brep_Info_AP203 *info); bool ON_NurbsSurface_to_STEP(ON_NurbsSurface *n_surface, ON_Brep_Info_AP203 *info, int i); -STEPentity *ON_BRep_to_STEP(struct directory *dp, struct rt_db_internal *intern, Registry *registry, InstMgr *instance_list); +void ON_BRep_to_STEP(struct directory *dp, struct rt_db_internal *intern, Registry *registry, + InstMgr *instance_list, STEPentity **brep_shape, STEPentity **brep_product); #endif /* ON_BREP_H_ */ Modified: brlcad/trunk/src/conv/step/g-step/g-step.cpp =================================================================== --- brlcad/trunk/src/conv/step/g-step/g-step.cpp 2013-09-26 18:09:56 UTC (rev 57910) +++ brlcad/trunk/src/conv/step/g-step/g-step.cpp 2013-09-26 19:44:17 UTC (rev 57911) @@ -68,6 +68,8 @@ int main(int argc, char *argv[]) { + STEPentity *brep_shape; + STEPentity *brep_product; int ret = 0; // process command line arguments @@ -181,7 +183,7 @@ /* Now, add actual DATA */ switch (intern.idb_minor_type) { case DB5_MINORTYPE_BRLCAD_BREP: - (void)ON_BRep_to_STEP(dp, &intern, registry, &instance_list); + (void)ON_BRep_to_STEP(dp, &intern, registry, &instance_list, &brep_shape, &brep_product); break; case DB5_MINORTYPE_BRLCAD_COMBINATION: (void)Comb_Tree_to_STEP(dp, wdbp, registry, &instance_list); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits