Revision: 57906
          http://sourceforge.net/p/brlcad/code/57906
Author:   starseeker
Date:     2013-09-26 17:15:52 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Start working on representation relationship and context dependent shape for 
combs

Modified Paths:
--------------
    brlcad/trunk/src/conv/step/g-step/Assembly_Product.cpp

Modified: brlcad/trunk/src/conv/step/g-step/Assembly_Product.cpp
===================================================================
--- brlcad/trunk/src/conv/step/g-step/Assembly_Product.cpp      2013-09-26 
16:31:50 UTC (rev 57905)
+++ brlcad/trunk/src/conv/step/g-step/Assembly_Product.cpp      2013-09-26 
17:15:52 UTC (rev 57906)
@@ -206,6 +206,39 @@
     }
 }
 
+// Representation relationships are a complex type
+STEPentity *
+Build_Representation_Relationship(STEPentity *transformation, Registry 
*registry, InstMgr *instance_list) {
+    STEPattribute *attr;
+    STEPcomplex *stepcomplex;
+    const char *entNmArr[4] = {"representation_relationship", 
"representation_relationship_with_transformation", 
"shape_representation_relationship", "*"};
+    STEPcomplex *complex_entity = new STEPcomplex(registry, (const char 
**)entNmArr, registry->GetEntityCnt() + 1);
+    /* REPRESENTATION_RELATIONSHIP */
+    stepcomplex = complex_entity->EntityPart("representation_relationship");
+    stepcomplex->ResetAttributes();
+    while ((attr = stepcomplex->NextAttribute()) != NULL) {
+       std::cout << attr->Name() << "\n";
+       /*
+       if (!bu_strcmp(attr->Name(), "rep_1")) attr->ptr.i = new 
SDAI_Integer(nsurface->Degree(0));
+       if (!bu_strcmp(attr->Name(), "rep_2")) attr->ptr.i = new 
SDAI_Integer(nsurface->Degree(1));
+       */
+    }
+
+    /* REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION */
+    stepcomplex = 
complex_entity->EntityPart("representation_relationship_with_transformation");
+    stepcomplex->ResetAttributes();
+    while ((attr = stepcomplex->NextAttribute()) != NULL) {
+       std::cout << attr->Name() << "\n";
+       /*
+       if (!bu_strcmp(attr->Name(), "transformation_operator")) attr->ptr.i = 
new SDAI_Integer(nsurface->Degree(0));
+       */
+    }
+
+    instance_list->Append((STEPentity *)complex_entity, completeSE);
+
+    return complex_entity;
+}
+
 void
 Add_Assembly_Product(struct directory *dp, struct db_i *dbip, struct bu_ptbl 
*children,
        std::map<struct directory *, STEPentity *> *comb_to_step,
@@ -255,6 +288,11 @@
            SdaiCharacterized_product_definition *cpd = new 
SdaiCharacterized_product_definition(usage);
            pshape->definition_(new SdaiCharacterized_definition(cpd));
            instance_list->Append((STEPentity *)pshape, completeSE);
+           STEPentity *rep_rel = 
Build_Representation_Relationship(curr_transform, registry, instance_list);
+           SdaiContext_dependent_shape_representation *cshape = 
(SdaiContext_dependent_shape_representation 
*)registry->ObjCreate("CONTEXT_DEPENDENT_SHAPE_REPRESENTATION");
+           
cshape->representation_relation_((SdaiShape_representation_relationship 
*)rep_rel);
+           cshape->represented_product_relation_(pshape);
+           instance_list->Append((STEPentity *)cshape, completeSE);
        } else {
            bu_log("non-uniform scaling detected: %s/%s\n", dp->d_namep, 
curr_dp->d_namep);
        }

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

Reply via email to