Revision: 77838
          http://sourceforge.net/p/brlcad/code/77838
Author:   starseeker
Date:     2020-12-01 02:10:26 +0000 (Tue, 01 Dec 2020)
Log Message:
-----------
Merge from trunk through r77837

Modified Paths:
--------------
    brlcad/branches/extbuild/src/conv/step/STEPWrapper.cpp
    brlcad/branches/extbuild/src/conv/step/step-g/BSplineCurveWithKnots.cpp
    brlcad/branches/extbuild/src/conv/step/step-g/BSplineSurfaceWithKnots.cpp
    brlcad/branches/extbuild/src/conv/step/step-g/CartesianPoint.cpp
    brlcad/branches/extbuild/src/conv/step/step-g/Direction.cpp
    brlcad/branches/extbuild/src/conv/step/step-g/RationalBSplineCurve.cpp
    brlcad/branches/extbuild/src/conv/step/step-g/RationalBSplineSurface.cpp
    brlcad/branches/extbuild/src/conv/step/step-g/ShellBasedSurfaceModel.cpp
    brlcad/branches/extbuild/src/conv/step/step-g/SurfaceCurve.cpp
    brlcad/branches/extbuild/src/conv/step/step-g/TrimmedCurve.cpp
    
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/STEPattribute.cc
    
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/STEPattribute.h
    
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/complexSupport.h
    
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/sdaiApplication_instance.cc
    
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/sdaiApplication_instance.h

Property Changed:
----------------
    brlcad/branches/extbuild/
    brlcad/branches/extbuild/src/other/

Index: brlcad/branches/extbuild
===================================================================
--- brlcad/branches/extbuild    2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild    2020-12-01 02:10:26 UTC (rev 77838)

Property changes on: brlcad/branches/extbuild
___________________________________________________________________
Modified: svn:mergeinfo
## -11,4 +11,4 ##
 /brlcad/branches/osg:62110-62113
 /brlcad/branches/prep-cache:68236-68933
 /brlcad/branches/tcltk86:68300-75257
-/brlcad/trunk:77547-77835
\ No newline at end of property
+/brlcad/trunk:77547-77837
\ No newline at end of property
Modified: brlcad/branches/extbuild/src/conv/step/STEPWrapper.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/STEPWrapper.cpp      2020-12-01 
02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/STEPWrapper.cpp      2020-12-01 
02:10:26 UTC (rev 77838)
@@ -763,7 +763,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = (Boolean)(*attr->ptr.e).asInt();
+           retValue = (Boolean)(*attr->Raw()->e).asInt();
            if (retValue > BUnset) {
                retValue = BUnset;
            }
@@ -787,7 +787,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = (*attr->ptr.e).asInt();
+           retValue = (*attr->Raw()->e).asInt();
            break;
        }
     }
@@ -808,7 +808,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = (Logical)(*attr->ptr.e).asInt();
+           retValue = (Logical)(*attr->Raw()->e).asInt();
            if (retValue > LUnknown) {
                retValue = LUnknown;
            }
@@ -875,7 +875,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = (SDAI_Application_instance *)*attr->ptr.c;
+           retValue = (SDAI_Application_instance *)*attr->Raw()->c;
            break;
        }
     }
@@ -896,7 +896,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = *attr->ptr.i;
+           retValue = *attr->Raw()->i;
            break;
        }
     }
@@ -917,7 +917,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = *attr->ptr.r;
+           retValue = *attr->Raw()->r;
            break;
        }
     }
@@ -939,7 +939,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           STEPaggregate *sa = (STEPaggregate *)attr->ptr.a;
+           STEPaggregate *sa = (STEPaggregate *)attr->Raw()->a;
 
            EntityNode *sn = (EntityNode *)sa->GetHead();
            SDAI_Application_instance *se;
@@ -977,7 +977,7 @@
            //std::cout << attr->TypeName() << std::endl;
 
 
-           GenericAggregate_ptr gp = (GenericAggregate_ptr)attr->ptr.a;
+           GenericAggregate_ptr gp = (GenericAggregate_ptr)attr->Raw()->a;
 
            STEPnode *sn = (STEPnode *)gp->GetHead();
            //EntityAggregate *ag = new EntityAggregate();
@@ -1113,7 +1113,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = (Boolean)(*attr->ptr.e).asInt();
+           retValue = (Boolean)(*attr->Raw()->e).asInt();
            if (retValue > BUnset) {
                retValue = BUnset;
            }
@@ -1137,8 +1137,8 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = (*attr->ptr.e).asInt();
-           //std::cout << "debug enum: " << (*attr->ptr.e).asStr(attrval) << 
std::endl;
+           retValue = (*attr->Raw()->e).asInt();
+           //std::cout << "debug enum: " << (*attr->Raw()->e).asStr(attrval) 
<< std::endl;
            break;
        }
     }
@@ -1164,7 +1164,7 @@
            std::string attrval;
            //std::cout << "attr:" << name << ":" << attr->TypeName() << ":" << 
attr->Name() << std::endl;
            //std::cout << "attr:" << attr->asStr(attrval) << std::endl;
-           retValue = (SDAI_Application_instance *)*attr->ptr.c;
+           retValue = (SDAI_Application_instance *)*attr->Raw()->c;
            break;
        }
     }
@@ -1184,7 +1184,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = (Logical)(*attr->ptr.e).asInt();
+           retValue = (Logical)(*attr->Raw()->e).asInt();
            if (retValue > LUnknown) {
                retValue = LUnknown;
            }
@@ -1207,7 +1207,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = *attr->ptr.i;
+           retValue = *attr->Raw()->i;
            break;
        }
     }
@@ -1227,7 +1227,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = *attr->ptr.r;
+           retValue = *attr->Raw()->r;
            break;
        }
     }
@@ -1247,7 +1247,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           retValue = (SDAI_Select *)attr->ptr.sh;
+           retValue = (SDAI_Select *)attr->Raw()->sh;
            break;
        }
     }
@@ -1268,7 +1268,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           STEPaggregate *sa = (STEPaggregate *)attr->ptr.a;
+           STEPaggregate *sa = (STEPaggregate *)attr->Raw()->a;
 
            EntityNode *sn = (EntityNode *)sa->GetHead();
            SDAI_Application_instance *se;
@@ -1300,7 +1300,7 @@
 
        if (attrname.compare(name) == 0) {
 
-           SelectAggregate *sa = (SelectAggregate *)attr->ptr.a;
+           SelectAggregate *sa = (SelectAggregate *)attr->Raw()->a;
            SelectNode *sn = (SelectNode *)sa->GetHead();
            while (sn) {
                l->push_back(sn->node);
@@ -1333,7 +1333,7 @@
            //std::cout << attr->TypeName() << std::endl;
 
 
-           GenericAggregate_ptr gp = (GenericAggregate_ptr)attr->ptr.a;
+           GenericAggregate_ptr gp = (GenericAggregate_ptr)attr->Raw()->a;
 
            STEPnode *sn = (STEPnode *)gp->GetHead();
            //EntityAggregate *ag = new EntityAggregate();
@@ -1377,7 +1377,7 @@
            //std::cout << attr->TypeName() << std::endl;
 
 
-           GenericAggregate_ptr gp = (GenericAggregate_ptr)attr->ptr.a;
+           GenericAggregate_ptr gp = (GenericAggregate_ptr)attr->Raw()->a;
 
            STEPnode *sn = (STEPnode *)gp->GetHead();
            //EntityAggregate *ag = new EntityAggregate();
@@ -1463,10 +1463,7 @@
        std::string attrname = attr->Name();
 
        if (attrname.compare(name) == 0) {
-           const char *str = attr->asStr(attrval);
-           if (str != NULL) {
-               retValue = str;
-           }
+           retValue = attr->asStr(attrval.c_str());
            break;
        }
     }
@@ -1592,11 +1589,11 @@
     for (int i = 0; i < level; i++) {
        std::cout << "    ";
     }
-    std::cout << "Description:" << se->eDesc->Description() << std::endl;
+    std::cout << "Description:" << se->getEDesc()->Description() << std::endl;
     for (int i = 0; i < level; i++) {
        std::cout << "    ";
     }
-    std::cout << "Entity Type:" << se->eDesc->Type() << std::endl;
+    std::cout << "Entity Type:" << se->getEDesc()->Type() << std::endl;
     for (int i = 0; i < level; i++) {
        std::cout << "    ";
     }
@@ -1610,7 +1607,7 @@
        for (int i = 0; i <= level; i++) {
            std::cout << "    ";
        }
-       std::cout << attr->Name() << ": " << attr->asStr(attrval) << " 
TypeName: " << attr->TypeName() << " Type: " << attr->Type() << std::endl;
+       std::cout << attr->Name() << ": " << attr->asStr(attrval.c_str()) << " 
TypeName: " << attr->TypeName() << " Type: " << attr->Type() << std::endl;
        if (attr->Type() == 256) {
            if (attr->IsDerived()) {
                for (int i = 0; i <= level; i++) {
@@ -1618,10 +1615,10 @@
                }
                std::cout << "        ********* DERIVED *********" << std::endl;
            } else {
-               printEntity(*(attr->ptr.c), level + 2);
+               printEntity(*(attr->Raw()->c), level + 2);
            }
        } else if ((attr->Type() == SET_TYPE) || (attr->Type() == LIST_TYPE)) {
-           STEPaggregate *sa = (STEPaggregate *)(attr->ptr.a);
+           STEPaggregate *sa = (STEPaggregate *)(attr->Raw()->a);
 
            // std::cout << "aggr:" << sa->asStr(attrval) << "  BaseType:" << 
attr->BaseType() << std::endl;
 
@@ -1650,9 +1647,9 @@
     while (sn != NULL) {
        sse = (SDAI_Application_instance *)sn->node;
 
-       if (((sse->eDesc->Type() == SET_TYPE) || (sse->eDesc->Type() == 
LIST_TYPE)) && (sse->eDesc->BaseType() == ENTITY_TYPE)) {
+       if (((sse->getEDesc()->Type() == SET_TYPE) || (sse->getEDesc()->Type() 
== LIST_TYPE)) && (sse->getEDesc()->BaseType() == ENTITY_TYPE)) {
            printEntityAggregate((STEPaggregate *)sse, level + 2);
-       } else if (sse->eDesc->Type() == ENTITY_TYPE) {
+       } else if (sse->getEDesc()->Type() == ENTITY_TYPE) {
            printEntity(sse, level + 2);
        } else {
            std::cout << "Instance Type not handled:" << std::endl;

Modified: 
brlcad/branches/extbuild/src/conv/step/step-g/BSplineCurveWithKnots.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/step-g/BSplineCurveWithKnots.cpp     
2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/step-g/BSplineCurveWithKnots.cpp     
2020-12-01 02:10:26 UTC (rev 77838)
@@ -80,7 +80,7 @@
        STEPattribute *attr = step->getAttribute(sse, "knot_multiplicities");
 
        if (attr) {
-           STEPaggregate *sa = (STEPaggregate *)(attr->ptr.a);
+           STEPaggregate *sa = (STEPaggregate *)(attr->Raw()->a);
            if (!sa) goto step_error;
            IntNode *in = (IntNode *)sa->GetHead();
            if (!in) goto step_error;
@@ -98,7 +98,7 @@
     if (knots.empty()) {
        STEPattribute *attr = step->getAttribute(sse, "knots");
        if (attr) {
-           STEPaggregate *sa = (STEPaggregate *)(attr->ptr.a);
+           STEPaggregate *sa = (STEPaggregate *)(attr->Raw()->a);
            if (!sa) goto step_error;
            RealNode *rn = (RealNode *)sa->GetHead();
            if (!rn) goto step_error;

Modified: 
brlcad/branches/extbuild/src/conv/step/step-g/BSplineSurfaceWithKnots.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/step-g/BSplineSurfaceWithKnots.cpp   
2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/step-g/BSplineSurfaceWithKnots.cpp   
2020-12-01 02:10:26 UTC (rev 77838)
@@ -79,7 +79,7 @@
     if (u_multiplicities.empty()) {
        STEPattribute *attr = step->getAttribute(sse, "u_multiplicities");
        if (attr) {
-           STEPaggregate *sa = (STEPaggregate *)(attr->ptr.a);
+           STEPaggregate *sa = (STEPaggregate *)(attr->Raw()->a);
            if (!sa) goto step_error;
            IntNode *in = (IntNode *)sa->GetHead();
 
@@ -95,7 +95,7 @@
     if (v_multiplicities.empty()) {
        STEPattribute *attr = step->getAttribute(sse, "v_multiplicities");
        if (attr) {
-           STEPaggregate *sa = (STEPaggregate *)(attr->ptr.a);
+           STEPaggregate *sa = (STEPaggregate *)(attr->Raw()->a);
            if (!sa) goto step_error;
            IntNode *in = (IntNode *)sa->GetHead();
 
@@ -111,7 +111,7 @@
     if (u_knots.empty()) {
        STEPattribute *attr = step->getAttribute(sse, "u_knots");
        if (attr) {
-           STEPaggregate *sa = (STEPaggregate *)(attr->ptr.a);
+           STEPaggregate *sa = (STEPaggregate *)(attr->Raw()->a);
            if (!sa) goto step_error;
            RealNode *rn = (RealNode *)sa->GetHead();
 
@@ -127,7 +127,7 @@
     if (v_knots.empty()) {
        STEPattribute *attr = step->getAttribute(sse, "v_knots");
        if (attr) {
-           STEPaggregate *sa = (STEPaggregate *)(attr->ptr.a);
+           STEPaggregate *sa = (STEPaggregate *)(attr->Raw()->a);
            if (!sa) goto step_error;
            RealNode *rn = (RealNode *)sa->GetHead();
 

Modified: brlcad/branches/extbuild/src/conv/step/step-g/CartesianPoint.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/step-g/CartesianPoint.cpp    
2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/step-g/CartesianPoint.cpp    
2020-12-01 02:10:26 UTC (rev 77838)
@@ -73,7 +73,7 @@
 
     attr = step->getAttribute(sse, "coordinates");
     if (attr != NULL) {
-       sa = (STEPaggregate *)(attr->ptr.a);
+       sa = (STEPaggregate *)(attr->Raw()->a);
        if (!sa) goto step_error;
        RealNode *rn = (RealNode *)sa->GetHead();
        if (!rn) goto step_error;

Modified: brlcad/branches/extbuild/src/conv/step/step-g/Direction.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/step-g/Direction.cpp 2020-12-01 
02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/step-g/Direction.cpp 2020-12-01 
02:10:26 UTC (rev 77838)
@@ -71,7 +71,7 @@
 
     STEPattribute *attr = step->getAttribute(sse, "direction_ratios");
     if (attr != NULL) {
-       STEPaggregate *sa = (STEPaggregate *)(attr->ptr.a);
+       STEPaggregate *sa = (STEPaggregate *)(attr->Raw()->a);
        RealNode *rn = (RealNode *)sa->GetHead();
        int index = 0;
        while (rn != NULL) {

Modified: brlcad/branches/extbuild/src/conv/step/step-g/RationalBSplineCurve.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/step-g/RationalBSplineCurve.cpp      
2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/step-g/RationalBSplineCurve.cpp      
2020-12-01 02:10:26 UTC (rev 77838)
@@ -71,7 +71,7 @@
        STEPattribute *attr = step->getAttribute(sse, "weights_data");
 
        if (attr) {
-           STEPaggregate *sa = (STEPaggregate *)(attr->ptr.a);
+           STEPaggregate *sa = (STEPaggregate *)(attr->Raw()->a);
            if (!sa) goto step_error;
            RealNode *rn = (RealNode *)sa->GetHead();
 

Modified: 
brlcad/branches/extbuild/src/conv/step/step-g/RationalBSplineSurface.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/step-g/RationalBSplineSurface.cpp    
2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/step-g/RationalBSplineSurface.cpp    
2020-12-01 02:10:26 UTC (rev 77838)
@@ -77,7 +77,7 @@
        STEPattribute *attr = step->getAttribute(sse, "weights_data");
 
        if (attr) {
-           GenericAggregate_ptr gp = (GenericAggregate_ptr)attr->ptr.a;
+           GenericAggregate_ptr gp = (GenericAggregate_ptr)attr->Raw()->a;
            if (!gp) goto step_error;
            STEPnode *sn = (STEPnode *)gp->GetHead();
            const char *eaStr;

Modified: 
brlcad/branches/extbuild/src/conv/step/step-g/ShellBasedSurfaceModel.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/step-g/ShellBasedSurfaceModel.cpp    
2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/step-g/ShellBasedSurfaceModel.cpp    
2020-12-01 02:10:26 UTC (rev 77838)
@@ -68,7 +68,7 @@
     if (sbsm_boundary.empty()) {
        STEPattribute *attr = step->getAttribute(sse, "sbsm_boundary");
        if (attr) {
-           SelectAggregate *sa = static_cast<SelectAggregate *>(attr->ptr.a);
+           SelectAggregate *sa = static_cast<SelectAggregate 
*>(attr->Raw()->a);
            if (!sa) goto step_error;
            SelectNode *sn = static_cast<SelectNode *>(sa->GetHead());
 

Modified: brlcad/branches/extbuild/src/conv/step/step-g/SurfaceCurve.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/step-g/SurfaceCurve.cpp      
2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/step-g/SurfaceCurve.cpp      
2020-12-01 02:10:26 UTC (rev 77838)
@@ -118,7 +118,7 @@
     if (associated_geometry.empty()) {
        STEPattribute *attr = step->getAttribute(sse, "associated_geometry");
        if (attr) {
-           SelectAggregate *sa = static_cast<SelectAggregate *>(attr->ptr.a);
+           SelectAggregate *sa = static_cast<SelectAggregate 
*>(attr->Raw()->a);
            if (!sa) goto step_error;
            SelectNode *sn = static_cast<SelectNode *>(sa->GetHead());
 

Modified: brlcad/branches/extbuild/src/conv/step/step-g/TrimmedCurve.cpp
===================================================================
--- brlcad/branches/extbuild/src/conv/step/step-g/TrimmedCurve.cpp      
2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/conv/step/step-g/TrimmedCurve.cpp      
2020-12-01 02:10:26 UTC (rev 77838)
@@ -106,7 +106,7 @@
     if (trim_1.empty()) {
        STEPattribute *attr = step->getAttribute(sse, "trim_1");
        if (attr) {
-           SelectAggregate *sa = static_cast<SelectAggregate *>(attr->ptr.a);
+           SelectAggregate *sa = static_cast<SelectAggregate 
*>(attr->Raw()->a);
            if (!sa) goto step_error;
            SelectNode *sn = static_cast<SelectNode *>(sa->GetHead());
            SDAI_Select *p;
@@ -127,7 +127,7 @@
     if (trim_2.empty()) {
        STEPattribute *attr = step->getAttribute(sse, "trim_2");
        if (attr) {
-           SelectAggregate *sa = static_cast<SelectAggregate *>(attr->ptr.a);
+           SelectAggregate *sa = static_cast<SelectAggregate 
*>(attr->Raw()->a);
            if (!sa) goto step_error;
            SelectNode *sn = static_cast<SelectNode *>(sa->GetHead());
            SDAI_Select *p;

Index: brlcad/branches/extbuild/src/other
===================================================================
--- brlcad/branches/extbuild/src/other  2020-12-01 02:00:21 UTC (rev 77837)
+++ brlcad/branches/extbuild/src/other  2020-12-01 02:10:26 UTC (rev 77838)

Property changes on: brlcad/branches/extbuild/src/other
___________________________________________________________________
Modified: svn:mergeinfo
## -9,4 +9,4 ##
 /brlcad/branches/osg/src/other:62110-62113
 /brlcad/branches/prep-cache/src/other:68236-68933
 /brlcad/branches/tcltk86/src/other:68300-75257
-/brlcad/trunk/src/other:77547-77657
\ No newline at end of property
+/brlcad/trunk/src/other:77547-77657,77836-77837
\ No newline at end of property
Modified: 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/STEPattribute.cc
===================================================================
--- 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/STEPattribute.cc 
    2020-12-01 02:00:21 UTC (rev 77837)
+++ 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/STEPattribute.cc 
    2020-12-01 02:10:26 UTC (rev 77838)
@@ -482,6 +482,99 @@
     return const_cast<char *>( str.c_str() );
 }
 
+/*****************************************************************//**
+ ** \fn asStr
+ ** \param currSch - used for select type writes.  See commenting in 
SDAI_Select::STEPwrite().
+ ** \returns the value of the attribute
+ ** Status:  complete 3/91
+ *********************************************************************/
+std::string STEPattribute::asStr( const char * currSch ) const {
+    ostringstream ss;
+    std::string str;
+
+    // The attribute has been derived by a subtype's attribute
+    if( IsDerived() )  {
+        str = "*";
+        return str;
+    }
+
+    // The attribute has been redefined by the attribute pointed
+    // to by _redefAttr so write the redefined value.
+    if( _redefAttr )  {
+        return _redefAttr->asStr( currSch );
+    }
+
+    if( is_null() )  {
+        return str;
+    }
+
+    switch( NonRefType() ) {
+        case INTEGER_TYPE:
+            ss << *( ptr.i );
+            str += ss.str();
+            break;
+
+        case NUMBER_TYPE:
+        case REAL_TYPE:
+
+            ss.precision( ( int ) Real_Num_Precision );
+            ss << *( ptr.r );
+            str += ss.str();
+            break;
+
+        case ENTITY_TYPE:
+            // print instance id only if not empty pointer
+            // and has value assigned
+            if( ( *( ptr.c ) == S_ENTITY_NULL ) || ( *( ptr.c ) == 0 ) ) {
+                break;
+            } else {
+                ( *( ptr.c ) )->STEPwrite_reference( str );
+            }
+            break;
+
+        case BINARY_TYPE:
+            if( !( ptr.b->empty() ) ) {
+                ptr.b->STEPwrite( str );
+            }
+            break;
+
+        case STRING_TYPE:
+            if( !( ( ptr.S )->empty() ) ) {
+                ptr.S->asStr( str );
+            }
+            break;
+
+        case AGGREGATE_TYPE:
+        case ARRAY_TYPE:      // DAS
+        case BAG_TYPE:        // DAS
+        case SET_TYPE:        // DAS
+        case LIST_TYPE:       // DAS
+            ptr.a->asStr( str );
+            break;
+
+        case ENUM_TYPE:
+        case BOOLEAN_TYPE:
+        case LOGICAL_TYPE:
+            ptr.e->asStr( str );
+            break;
+
+        case SELECT_TYPE:
+            ptr.sh->STEPwrite( str, currSch );
+            break;
+
+        case REFERENCE_TYPE:
+        case GENERIC_TYPE:
+            cerr << "Internal error:  " << __FILE__ <<  __LINE__
+                 << "\n" << _POC_ "\n";
+            str.clear();
+            break;
+
+        case UNKNOWN_TYPE:
+        default:
+            ptr.u->asStr( str );
+    }
+    return str;
+}
 /**
  * The value of the attribute is printed to the output stream specified by out.
  * The output is in physical file format.

Modified: 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/STEPattribute.h
===================================================================
--- 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/STEPattribute.h  
    2020-12-01 02:00:21 UTC (rev 77837)
+++ 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/STEPattribute.h  
    2020-12-01 02:10:26 UTC (rev 77838)
@@ -100,7 +100,7 @@
         ** class in the generated schema class library (the entity class is
         ** inherited from SDAI_Application_instance)
         */
-        union  {
+        union attrUnion {
             SDAI_String * S;                 // STRING_TYPE
             SDAI_Integer * i;                // INTEGER_TYPE (Integer is a 
long int)
             SDAI_Binary * b;                 // BINARY_TYPE
@@ -128,6 +128,7 @@
                            int addFileId = 0, const char * = NULL, bool strict 
= true );
 
         const char * asStr( std::string &, const char * = 0 ) const;
+        string asStr( const char * currSch = 0 ) const;
         // return the attr value as a string
         void STEPwrite( ostream & out = cout, const char * = 0 );
 
@@ -135,6 +136,10 @@
 
         Severity set_null();
 
+        /// allows direct access to the union containing attr data (dangerous!)
+        attrUnion * Raw() {
+            return & ptr;
+        }
 ////////////// Return info on attr
 
         int Nullable() const; // may this attribute be null?

Modified: 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/complexSupport.h
===================================================================
--- 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/complexSupport.h 
    2020-12-01 02:00:21 UTC (rev 77837)
+++ 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/complexSupport.h 
    2020-12-01 02:10:26 UTC (rev 77838)
@@ -208,19 +208,19 @@
         // but all we need.
         EntList * firstNot( JoinType );
         EntList * nextNot( JoinType j ) {
-            return (next) ? next->firstNot( j ) : NULL;
+            return next->firstNot( j );
         }
         EntList * firstWanted( MatchType );
         EntList * nextWanted( MatchType mat ) {
-            return (next) ? next->firstWanted( mat ) : NULL;
+            return next->firstWanted( mat );
         }
         EntList * lastNot( JoinType );
         EntList * prevNot( JoinType j ) {
-            return (prev) ? prev->lastNot( j ) : NULL;
+            return prev->lastNot( j );
         }
         EntList * lastWanted( MatchType );
         EntList * prevWanted( MatchType mat ) {
-            return (prev) ? prev->lastWanted( mat ) : NULL;
+            return prev->lastWanted( mat );
         }
 
         JoinType join;

Modified: 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/sdaiApplication_instance.cc
===================================================================
--- 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/sdaiApplication_instance.cc
  2020-12-01 02:00:21 UTC (rev 77837)
+++ 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/sdaiApplication_instance.cc
  2020-12-01 02:10:26 UTC (rev 77838)
@@ -139,6 +139,10 @@
     }
 }
 
+const EntityDescriptor* SDAI_Application_instance::getEDesc() const {
+    return eDesc;
+}
+
 // BUG implement this -- FIXME function is never used
 
 SDAI_Application_instance * SDAI_Application_instance::GetMiEntity( char * 
entName ) {

Modified: 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/sdaiApplication_instance.h
===================================================================
--- 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/sdaiApplication_instance.h
   2020-12-01 02:00:21 UTC (rev 77837)
+++ 
brlcad/branches/extbuild/src/other/ext/stepcode/src/clstepcore/sdaiApplication_instance.h
   2020-12-01 02:10:26 UTC (rev 77838)
@@ -52,6 +52,10 @@
             return _complex;
         }
 
+        void setEDesc( const EntityDescriptor * const ed ) {
+            eDesc = ed;
+        }
+        const EntityDescriptor * getEDesc() const;
         void StepFileId( int fid ) {
             STEPfile_id = fid;
         }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to