2025.6.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/***********************************************************************************************************************
|
||||
*
|
||||
* Copyright (c) 2010 - 2022 by Tech Soft 3D, Inc.
|
||||
* Copyright (c) 2010 - 2025 by Tech Soft 3D, Inc.
|
||||
* The information contained herein is confidential and proprietary to Tech Soft 3D, Inc., and considered a trade secret
|
||||
* as defined under civil and criminal statutes. Tech Soft 3D shall pursue its civil and criminal remedies in the event
|
||||
* of unauthorized use or misappropriation of its trade secrets. Use of this information by anyone other than authorized
|
||||
@@ -11,11 +11,14 @@
|
||||
|
||||
#include <A3DSDKIncludes.h>
|
||||
#include "PRC2XML.h"
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
A3DStatus traverseDisplayFilters(A3DUns32 uiSize, A3DAsmFilter** ppFilters, _TiXmlElement* setting);
|
||||
A3DStatus traverseGraphScene(const A3DGraphSceneDisplayParametersData& sData, _TiXmlElement* setting);
|
||||
|
||||
int traverseDisplayFilters(A3DUns32 uiSize, A3DAsmFilter** ppFilters, _TiXmlElement* setting);
|
||||
int traverseGraphScene(const A3DGraphSceneDisplayParametersData& sData, _TiXmlElement* setting);
|
||||
//######################################################################################################################
|
||||
int traverseMaterialProperties(const A3DEntity* pEntity, _TiXmlElement* xmlfather)
|
||||
A3DStatus traverseMaterialProperties(const A3DEntity* pEntity, _TiXmlElement* xmlfather)
|
||||
{
|
||||
_TiXmlElement* xml = new _TiXmlElement("A3DMiscMaterialPropertiesData");
|
||||
A3DMiscMaterialPropertiesData sMaterialPropertiesData;
|
||||
@@ -27,19 +30,118 @@ int traverseMaterialProperties(const A3DEntity* pEntity, _TiXmlElement* xmlfathe
|
||||
xml->SetDoubleAttribute("m_dDensity", sMaterialPropertiesData.m_dDensity);
|
||||
xml->SetAttribute("m_pcMaterialName", sMaterialPropertiesData.m_pcMaterialName ? sMaterialPropertiesData.m_pcMaterialName:"NULL");
|
||||
xml->SetAttribute("m_ePhysicType", sMaterialPropertiesData.m_ePhysicType);
|
||||
|
||||
_TiXmlElement* xmlphysics = nullptr;
|
||||
|
||||
switch (sMaterialPropertiesData.m_ePhysicType)
|
||||
{
|
||||
case A3DPhysicType_None:
|
||||
case A3DPhysicType_Fiber:
|
||||
case A3DPhysicType_HoneyComb:
|
||||
case A3DPhysicType_Isotropic:
|
||||
case A3DPhysicType_Orthotropic2D:
|
||||
case A3DPhysicType_Orthotropic3D:
|
||||
case A3DPhysicType_Anisotropic:
|
||||
xmlphysics = new _TiXmlElement("A3DMiscMaterialFiberData");
|
||||
xmlphysics->SetDoubleAttribute("m_dYoungModulus_X", sMaterialPropertiesData.m_sFiber.m_dYoungModulus_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dYoungModulus_Y", sMaterialPropertiesData.m_sFiber.m_dYoungModulus_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dPoissonRatio_XY", sMaterialPropertiesData.m_sFiber.m_dPoissonRatio_XY);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_XY", sMaterialPropertiesData.m_sFiber.m_dShearModulus_XY);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_YZ", sMaterialPropertiesData.m_sFiber.m_dShearModulus_YZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_X", sMaterialPropertiesData.m_sFiber.m_dThermalExpansion_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_Y", sMaterialPropertiesData.m_sFiber.m_dThermalExpansion_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStressLimit_X", sMaterialPropertiesData.m_sFiber.m_dTensileStressLimit_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dCompressiveStressLimit_X", sMaterialPropertiesData.m_sFiber.m_dCompressiveStressLimit_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStressLimit_Y", sMaterialPropertiesData.m_sFiber.m_dTensileStressLimit_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dCompressiveStressLimit_Y", sMaterialPropertiesData.m_sFiber.m_dCompressiveStressLimit_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearStressLimit_XY", sMaterialPropertiesData.m_sFiber.m_dShearStressLimit_XY);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearStressLimit_YZ", sMaterialPropertiesData.m_sFiber.m_dShearStressLimit_YZ);
|
||||
break;
|
||||
|
||||
case A3DPhysicType_HoneyComb:
|
||||
xmlphysics = new _TiXmlElement("A3DMiscMaterialHoneyCombData");
|
||||
xmlphysics->SetDoubleAttribute("m_dYoungModulus", sMaterialPropertiesData.m_sHoneyComb.m_dYoungModulus);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_XZ", sMaterialPropertiesData.m_sHoneyComb.m_dShearModulus_XZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_YZ", sMaterialPropertiesData.m_sHoneyComb.m_dShearModulus_YZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearStressLimit_XZ", sMaterialPropertiesData.m_sHoneyComb.m_dShearStressLimit_XZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearStressLimit_YZ", sMaterialPropertiesData.m_sHoneyComb.m_dShearStressLimit_YZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion", sMaterialPropertiesData.m_sHoneyComb.m_dThermalExpansion);
|
||||
break;
|
||||
|
||||
case A3DPhysicType_Isotropic:
|
||||
xmlphysics = new _TiXmlElement("A3DMiscMaterialIsotropicData");
|
||||
xmlphysics->SetDoubleAttribute("m_dYoungModulus", sMaterialPropertiesData.m_sIsotropic.m_dYoungModulus);
|
||||
xmlphysics->SetDoubleAttribute("m_dPoissonRatio", sMaterialPropertiesData.m_sIsotropic.m_dPoissonRatio);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus", sMaterialPropertiesData.m_sIsotropic.m_dShearModulus);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion", sMaterialPropertiesData.m_sIsotropic.m_dThermalExpansion);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalConductivity", sMaterialPropertiesData.m_sIsotropic.m_dThermalConductivity);
|
||||
xmlphysics->SetDoubleAttribute("m_dSpecificHeat", sMaterialPropertiesData.m_sIsotropic.m_dSpecificHeat);
|
||||
xmlphysics->SetDoubleAttribute("m_dYieldStrength", sMaterialPropertiesData.m_sIsotropic.m_dYieldStrength);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStrength", sMaterialPropertiesData.m_sIsotropic.m_dTensileStrength);
|
||||
break;
|
||||
|
||||
case A3DPhysicType_Orthotropic2D:
|
||||
xmlphysics = new _TiXmlElement("A3DMiscMaterialOrthotropic2DData");
|
||||
xmlphysics->SetDoubleAttribute("m_dYoungModulus_X", sMaterialPropertiesData.m_sOrthotropic2D.m_dYoungModulus_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dYoungModulus_Y", sMaterialPropertiesData.m_sOrthotropic2D.m_dYoungModulus_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dPoissonRatio_XY", sMaterialPropertiesData.m_sOrthotropic2D.m_dPoissonRatio_XY);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_XY", sMaterialPropertiesData.m_sOrthotropic2D.m_dShearModulus_XY);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_XZ", sMaterialPropertiesData.m_sOrthotropic2D.m_dShearModulus_XZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_YZ", sMaterialPropertiesData.m_sOrthotropic2D.m_dShearModulus_YZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStressLimit_X", sMaterialPropertiesData.m_sOrthotropic2D.m_dTensileStressLimit_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dCompressiveStressLimit_X", sMaterialPropertiesData.m_sOrthotropic2D.m_dCompressiveStressLimit_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStressLimit_Y", sMaterialPropertiesData.m_sOrthotropic2D.m_dTensileStressLimit_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dCompressiveStressLimit_Y", sMaterialPropertiesData.m_sOrthotropic2D.m_dCompressiveStressLimit_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_X", sMaterialPropertiesData.m_sOrthotropic2D.m_dThermalExpansion_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_Y", sMaterialPropertiesData.m_sOrthotropic2D.m_dThermalExpansion_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStrainLimit_X", sMaterialPropertiesData.m_sOrthotropic2D.m_dTensileStrainLimit_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dCompressiveStrainLimit_X", sMaterialPropertiesData.m_sOrthotropic2D.m_dCompressiveStrainLimit_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStrainLimit_Y", sMaterialPropertiesData.m_sOrthotropic2D.m_dTensileStrainLimit_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dCompressiveStrainLimit_Y", sMaterialPropertiesData.m_sOrthotropic2D.m_dCompressiveStrainLimit_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearStressLimit_XY", sMaterialPropertiesData.m_sOrthotropic2D.m_dShearStressLimit_XY);
|
||||
break;
|
||||
|
||||
case A3DPhysicType_Orthotropic3D:
|
||||
xmlphysics = new _TiXmlElement("A3DMiscMaterialOrthotropic3DData");
|
||||
xmlphysics->SetDoubleAttribute("m_dYoungModulus_X", sMaterialPropertiesData.m_sOrthotropic3D.m_dYoungModulus_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dYoungModulus_Y", sMaterialPropertiesData.m_sOrthotropic3D.m_dYoungModulus_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dYoungModulus_Z", sMaterialPropertiesData.m_sOrthotropic3D.m_dYoungModulus_Z);
|
||||
xmlphysics->SetDoubleAttribute("m_dPoissonRatio_XY", sMaterialPropertiesData.m_sOrthotropic3D.m_dPoissonRatio_XY);
|
||||
xmlphysics->SetDoubleAttribute("m_dPoissonRatio_XZ", sMaterialPropertiesData.m_sOrthotropic3D.m_dPoissonRatio_XZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dPoissonRatio_YZ", sMaterialPropertiesData.m_sOrthotropic3D.m_dPoissonRatio_YZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_XY", sMaterialPropertiesData.m_sOrthotropic3D.m_dShearModulus_XY);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_XZ", sMaterialPropertiesData.m_sOrthotropic3D.m_dShearModulus_XZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_YZ", sMaterialPropertiesData.m_sOrthotropic3D.m_dShearModulus_YZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_X", sMaterialPropertiesData.m_sOrthotropic3D.m_dThermalExpansion_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_Y", sMaterialPropertiesData.m_sOrthotropic3D.m_dThermalExpansion_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_Z", sMaterialPropertiesData.m_sOrthotropic3D.m_dThermalExpansion_Z);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStressLimit_X", sMaterialPropertiesData.m_sOrthotropic3D.m_dTensileStressLimit_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dCompressiveStressLimit_X", sMaterialPropertiesData.m_sOrthotropic3D.m_dCompressiveStressLimit_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStressLimit_Y", sMaterialPropertiesData.m_sOrthotropic3D.m_dTensileStressLimit_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dCompressiveStressLimit_Y", sMaterialPropertiesData.m_sOrthotropic3D.m_dCompressiveStressLimit_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearStressLimit_XY", sMaterialPropertiesData.m_sOrthotropic3D.m_dShearStressLimit_XY);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearStressLimit_XZ", sMaterialPropertiesData.m_sOrthotropic3D.m_dShearStressLimit_XZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearStressLimit_YZ", sMaterialPropertiesData.m_sOrthotropic3D.m_dShearStressLimit_YZ);
|
||||
break;
|
||||
|
||||
case A3DPhysicType_Anisotropic:
|
||||
xmlphysics = new _TiXmlElement("A3DMiscMaterialAnisotropicData");
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_XX", sMaterialPropertiesData.m_sAnisotropic.m_dShearModulus_XX);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_XY", sMaterialPropertiesData.m_sAnisotropic.m_dShearModulus_XY);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_XZ", sMaterialPropertiesData.m_sAnisotropic.m_dShearModulus_XZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_YY", sMaterialPropertiesData.m_sAnisotropic.m_dShearModulus_YY);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_YZ", sMaterialPropertiesData.m_sAnisotropic.m_dShearModulus_YZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearModulus_ZZ", sMaterialPropertiesData.m_sAnisotropic.m_dShearModulus_ZZ);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_X", sMaterialPropertiesData.m_sAnisotropic.m_dThermalExpansion_X);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_Y", sMaterialPropertiesData.m_sAnisotropic.m_dThermalExpansion_Y);
|
||||
xmlphysics->SetDoubleAttribute("m_dThermalExpansion_Z", sMaterialPropertiesData.m_sAnisotropic.m_dThermalExpansion_Z);
|
||||
xmlphysics->SetDoubleAttribute("m_dTensileStressLimit", sMaterialPropertiesData.m_sAnisotropic.m_dTensileStressLimit);
|
||||
xmlphysics->SetDoubleAttribute("m_dCompressiveStressLimit", sMaterialPropertiesData.m_sAnisotropic.m_dCompressiveStressLimit);
|
||||
xmlphysics->SetDoubleAttribute("m_dShearStressLimit", sMaterialPropertiesData.m_sAnisotropic.m_dShearStressLimit);
|
||||
break;
|
||||
|
||||
case A3DPhysicType_None:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(xmlphysics)
|
||||
xml->LinkEndChild(xmlphysics);
|
||||
|
||||
A3DMiscGetMaterialProperties(NULL, &sMaterialPropertiesData);
|
||||
}
|
||||
|
||||
@@ -47,14 +149,77 @@ int traverseMaterialProperties(const A3DEntity* pEntity, _TiXmlElement* xmlfathe
|
||||
return A3D_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
//######################################################################################################################
|
||||
static int stTraversePartDef(const A3DAsmPartDefinition* pPart, _TiXmlElement* xmlfather)
|
||||
A3DStatus traverseLayer(A3DAsmLayerEntity* pLayer, _TiXmlElement* setting)
|
||||
{
|
||||
A3DInt32 iRet = A3D_SUCCESS;
|
||||
A3DStatus iRet = A3D_SUCCESS;
|
||||
|
||||
if (pLayer)
|
||||
{
|
||||
A3DAsmLayerEntityData oData;
|
||||
A3D_INITIALIZE_DATA(A3DAsmLayerEntityData, oData);
|
||||
iRet = A3DAsmLayerEntityGet(pLayer, &oData);
|
||||
|
||||
_TiXmlElement* layer = new _TiXmlElement("Layer");
|
||||
if (iRet == A3D_SUCCESS)
|
||||
{
|
||||
layer->SetAttribute("Name", oData.m_pcLayerName ? oData.m_pcLayerName : "null");
|
||||
layer->SetAttribute("LayerID", oData.m_uiLayerID);
|
||||
if (oData.m_pcNote)
|
||||
layer->SetAttribute("Note", oData.m_pcNote);
|
||||
switch (oData.m_eDisplayStatus)
|
||||
{
|
||||
case kA3DLayerDisplayShow:
|
||||
layer->SetAttribute("DisplayStatus", "Show");
|
||||
break;
|
||||
case kA3DLayerDisplayHide:
|
||||
layer->SetAttribute("DisplayStatus", "Hide");
|
||||
break;
|
||||
case kA3DLayerDisplayIsolate:
|
||||
layer->SetAttribute("DisplayStatus", "Isolate");
|
||||
break;
|
||||
case kA3DLayerDisplayUnknown:
|
||||
layer->SetAttribute("DisplayStatus", "Unknown");
|
||||
break;
|
||||
}
|
||||
if (oData.m_uiReferenceEntitiesSize != 0)
|
||||
{
|
||||
_TiXmlElement* Reference = new _TiXmlElement("ReferenceEntities");
|
||||
for (A3DUns32 j = 0; j < oData.m_uiReferenceEntitiesSize; ++j)
|
||||
{
|
||||
traverseEntityReference(oData.m_ppReferenceEntities[j], Reference);
|
||||
}
|
||||
layer->LinkEndChild(Reference);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
layer->SetAttribute("error", A3DMiscGetErrorMsg(iRet));
|
||||
}
|
||||
setting->LinkEndChild(layer);
|
||||
A3DAsmLayerEntityGet(NULL, &oData);
|
||||
}
|
||||
return iRet;
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
A3DStatus traverseLayers(A3DUns32 uiSize, A3DAsmLayerEntity** ppLayers, _TiXmlElement* setting)
|
||||
{
|
||||
for (A3DUns32 ui = 0; ui < uiSize; ++ui)
|
||||
traverseLayer(ppLayers[ui], setting);
|
||||
return A3D_SUCCESS;
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
static A3DStatus stTraversePartDef(const A3DAsmPartDefinition* pPart, _TiXmlElement* xmlfather)
|
||||
{
|
||||
A3DStatus iRet = A3D_SUCCESS;
|
||||
A3DAsmPartDefinitionData sData;
|
||||
A3D_INITIALIZE_DATA(A3DAsmPartDefinitionData, sData);
|
||||
|
||||
_TiXmlElement* part = new _TiXmlElement("A3DAsmPartDefinitionData");
|
||||
setAttributePRC2XMLID(pPart, part);
|
||||
traverseSource(pPart, part);
|
||||
|
||||
iRet = A3DAsmPartDefinitionGet(pPart, &sData);
|
||||
@@ -82,7 +247,7 @@ static int stTraversePartDef(const A3DAsmPartDefinition* pPart, _TiXmlElement* x
|
||||
}
|
||||
else
|
||||
{
|
||||
part->SetAttribute("error", iRet);
|
||||
part->SetAttribute("error", A3DMiscGetErrorMsg(iRet));
|
||||
}
|
||||
|
||||
traverseMaterialProperties(pPart, part);
|
||||
@@ -91,9 +256,9 @@ static int stTraversePartDef(const A3DAsmPartDefinition* pPart, _TiXmlElement* x
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
static int stTraverseFilter(const A3DAsmFilter* pFilter, _TiXmlElement* setting)
|
||||
static A3DStatus stTraverseFilter(const A3DAsmFilter* pFilter, _TiXmlElement* setting)
|
||||
{
|
||||
A3DInt32 iRet = A3D_SUCCESS;
|
||||
A3DStatus iRet = A3D_SUCCESS;
|
||||
A3DAsmFilterData sData;
|
||||
A3D_INITIALIZE_DATA(A3DAsmFilterData, sData);
|
||||
|
||||
@@ -108,7 +273,7 @@ static int stTraverseFilter(const A3DAsmFilter* pFilter, _TiXmlElement* setting)
|
||||
}
|
||||
else
|
||||
{
|
||||
filter->SetAttribute("error", iRet);
|
||||
filter->SetAttribute("error", A3DMiscGetErrorMsg(iRet));
|
||||
}
|
||||
|
||||
setting->LinkEndChild(filter);
|
||||
@@ -116,9 +281,198 @@ static int stTraverseFilter(const A3DAsmFilter* pFilter, _TiXmlElement* setting)
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
int traverseEntityReference(const A3DMiscEntityReference* pEntityReference, _TiXmlElement* setting)
|
||||
static A3DStatus stTraverseUg(const A3DAsmProductOccurrence* pOccurrence, _TiXmlElement* occurrence)
|
||||
{
|
||||
A3DInt32 iRet = A3D_SUCCESS;
|
||||
A3DAsmProductOccurrenceDataUg sDataUg;
|
||||
A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceDataUg, sDataUg);
|
||||
A3DStatus const iRet = A3DAsmProductOccurrenceGetUg(pOccurrence, &sDataUg);
|
||||
if (iRet == A3D_SUCCESS)
|
||||
{
|
||||
_TiXmlElement* occurrencedataug = new _TiXmlElement("A3DAsmProductOccurrenceDataUg");
|
||||
|
||||
occurrencedataug->SetAttribute("m_psRootFilePath", sDataUg.m_psRootFilePath ? sDataUg.m_psRootFilePath : "NULL");
|
||||
occurrencedataug->SetAttribute("m_psFileName", sDataUg.m_psFileName ? sDataUg.m_psFileName : "NULL");
|
||||
occurrencedataug->SetAttribute("m_psRefSet", sDataUg.m_psRefSet ? sDataUg.m_psRefSet : "NULL");
|
||||
occurrencedataug->SetAttribute("m_psPartUID", sDataUg.m_psPartUID ? sDataUg.m_psPartUID : "NULL");
|
||||
occurrencedataug->SetAttribute("m_psInstanceFileName", sDataUg.m_psInstanceFileName ? sDataUg.m_psInstanceFileName : "NULL");
|
||||
occurrencedataug->SetAttribute("m_uiInstanceTag", sDataUg.m_uiInstanceTag);
|
||||
|
||||
// Process RefSets
|
||||
if (sDataUg.m_uiChildrenByRefsetsSize || sDataUg.m_uiSolidsByRefsetsSize)
|
||||
{
|
||||
_TiXmlElement* refsetList = new _TiXmlElement("RefSets");
|
||||
|
||||
// Children by RefSet
|
||||
for (A3DUns32 iRefSet = 0; iRefSet < sDataUg.m_uiChildrenByRefsetsSize; ++iRefSet)
|
||||
{
|
||||
const A3DElementsByRefsetUg &pRefsetData = sDataUg.m_asChildrenByRefsets[iRefSet];
|
||||
|
||||
// Init XML Element if first occurrence
|
||||
_TiXmlElement* refset = new _TiXmlElement("RefSet");
|
||||
refset->SetAttribute("Name", pRefsetData.m_psRefset);
|
||||
|
||||
// Add children
|
||||
for (A3DUns32 i = 0; i < pRefsetData.m_uiElementsSize; ++i)
|
||||
{
|
||||
_TiXmlElement * refsetChild = new _TiXmlElement("Child");
|
||||
refsetChild->SetAttribute("id", pRefsetData.m_auiElements[i]);
|
||||
refset->LinkEndChild(refsetChild);
|
||||
}
|
||||
|
||||
refsetList->LinkEndChild(refset);
|
||||
}
|
||||
|
||||
// Solids by RefSet
|
||||
for (A3DUns32 iRefSet = 0; iRefSet < sDataUg.m_uiSolidsByRefsetsSize; ++iRefSet)
|
||||
{
|
||||
const A3DElementsByRefsetUg &pRefsetData = sDataUg.m_asSolidsByRefsets[iRefSet];
|
||||
|
||||
// Init XML Element if first occurrence
|
||||
_TiXmlElement* refset = new _TiXmlElement("RefSet");
|
||||
refset->SetAttribute("Name", pRefsetData.m_psRefset);
|
||||
|
||||
// Add Solids
|
||||
for (A3DUns32 i = 0; i < pRefsetData.m_uiElementsSize; ++i)
|
||||
{
|
||||
_TiXmlElement * refsetChild = new _TiXmlElement("Solid");
|
||||
refsetChild->SetAttribute("id", pRefsetData.m_auiElements[i]);
|
||||
refset->LinkEndChild(refsetChild);
|
||||
}
|
||||
|
||||
refsetList->LinkEndChild(refset);
|
||||
}
|
||||
|
||||
occurrencedataug->LinkEndChild(refsetList);
|
||||
}
|
||||
|
||||
occurrence->LinkEndChild(occurrencedataug);
|
||||
|
||||
CHECK_RET(A3DAsmProductOccurrenceGetUg(NULL, &sDataUg));
|
||||
}
|
||||
|
||||
return iRet;
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
static void stTraverseSLWType(A3DEProductOccurrenceTypeSLW usType, _TiXmlElement* occurrencedataslw)
|
||||
{
|
||||
const A3DUTF8Char* psType = nullptr;
|
||||
switch (usType)
|
||||
{
|
||||
case A3DEProductOccurrenceTypeSLW_ContainerTess:
|
||||
{
|
||||
psType = "A3DEProductOccurrenceTypeSLW_ContainerTess";
|
||||
break;
|
||||
}
|
||||
case A3DEProductOccurrenceTypeSLW_Container:
|
||||
{
|
||||
psType = "A3DEProductOccurrenceTypeSLW_Container";
|
||||
break;
|
||||
}
|
||||
case A3DEProductOccurrenceTypeSLW_Part:
|
||||
{
|
||||
psType = "A3DEProductOccurrenceTypeSLW_Part";
|
||||
break;
|
||||
}
|
||||
case A3DEProductOccurrenceTypeSLW_Assembly:
|
||||
{
|
||||
psType = "A3DEProductOccurrenceTypeSLW_Assembly";
|
||||
break;
|
||||
}
|
||||
case A3DEProductOccurrenceTypeSLW_Drawing:
|
||||
{
|
||||
psType = "A3DEProductOccurrenceTypeSLW_Drawing";
|
||||
break;
|
||||
}
|
||||
case A3DEProductOccurrenceTypeSLW_Unknown:
|
||||
{
|
||||
psType = "A3DEProductOccurrenceTypeSLW_Unknown";
|
||||
break;
|
||||
}
|
||||
case A3DEProductOccurrenceTypeSLW_PartTesselated:
|
||||
{
|
||||
psType = "A3DEProductOccurrenceTypeSLW_PartTesselated";
|
||||
break;
|
||||
}
|
||||
case A3DEProductOccurrenceTypeSLW_AssemblyTesselated:
|
||||
{
|
||||
psType = "A3DEProductOccurrenceTypeSLW_AssemblyTesselated";
|
||||
break;
|
||||
}
|
||||
case A3DEProductOccurrenceTypeSLW_StandalonePart:
|
||||
{
|
||||
psType = "A3DEProductOccurrenceTypeSLW_StandalonePart";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
occurrencedataslw->SetAttribute("m_usType", psType ? psType : "NULL");
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
static void stTraverseSLWAttachment(A3DUns32 usSize, A3DAsmAttachmentsInfosSLW* pAttachments, _TiXmlElement* occurrencedataslw)
|
||||
{
|
||||
_TiXmlElement* attachmentList = new _TiXmlElement("Attachments");
|
||||
for (A3DUns32 iAttachment = 0; iAttachment < usSize; ++iAttachment)
|
||||
{
|
||||
_TiXmlElement* attachment = new _TiXmlElement("Attachment");
|
||||
|
||||
A3DAsmAttachmentsInfosSLW sCurrentAttachment = pAttachments[iAttachment];
|
||||
attachment->SetAttribute("m_iConfigID", sCurrentAttachment.m_iConfigID);
|
||||
attachment->SetAttribute("m_psReplacedFilePath", sCurrentAttachment.m_psReplacedFilePath ? sCurrentAttachment.m_psReplacedFilePath : "NULL");
|
||||
|
||||
std::string sCurrentAttachmentPath("[");
|
||||
for (A3DUns32 iPathInAssemblyTree = 0; iPathInAssemblyTree < sCurrentAttachment.m_uiPathsInAssemblyTreeSize; ++iPathInAssemblyTree)
|
||||
{
|
||||
sCurrentAttachmentPath += sCurrentAttachment.m_ppsPathsInAssemblyTree[iPathInAssemblyTree];
|
||||
if (iPathInAssemblyTree != sCurrentAttachment.m_uiPathsInAssemblyTreeSize - 1)
|
||||
sCurrentAttachmentPath += ", ";
|
||||
}
|
||||
sCurrentAttachmentPath += "]";
|
||||
|
||||
attachment->SetAttribute("PathsInAssemblyTree", !sCurrentAttachmentPath.empty() ? sCurrentAttachmentPath.c_str() : "NULL");
|
||||
|
||||
|
||||
attachmentList->LinkEndChild(attachment);
|
||||
}
|
||||
|
||||
occurrencedataslw->LinkEndChild(attachmentList);
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
static A3DStatus stTraverseSLW(const A3DAsmProductOccurrence* pOccurrence, _TiXmlElement* occurrence)
|
||||
{
|
||||
A3DAsmProductOccurrenceDataSLW sDataSLW;
|
||||
A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceDataSLW, sDataSLW);
|
||||
A3DStatus const iRet = A3DAsmProductOccurrenceGetSLW(pOccurrence, &sDataSLW);
|
||||
if (iRet == A3D_SUCCESS)
|
||||
{
|
||||
_TiXmlElement* occurrencedataslw = new _TiXmlElement("A3DAsmProductOccurrenceDataSlw");
|
||||
|
||||
occurrencedataslw->SetAttribute("m_psNodeSlwID", sDataSLW.m_psNodeSlwID ? sDataSLW.m_psNodeSlwID : "NULL");
|
||||
occurrencedataslw->SetAttribute("m_iIndexCfg", sDataSLW.m_iIndexCfg);
|
||||
occurrencedataslw->SetAttribute("m_psCfgName", sDataSLW.m_psCfgName ? sDataSLW.m_psCfgName : "NULL");
|
||||
|
||||
stTraverseSLWType(sDataSLW.m_usType, occurrencedataslw);
|
||||
|
||||
if (sDataSLW.m_uiAttachementsSize)
|
||||
{
|
||||
stTraverseSLWAttachment(sDataSLW.m_uiAttachementsSize, sDataSLW.m_psAttachements, occurrencedataslw);
|
||||
}
|
||||
|
||||
occurrence->LinkEndChild(occurrencedataslw);
|
||||
|
||||
CHECK_RET(A3DAsmProductOccurrenceGetSLW(NULL, &sDataSLW));
|
||||
}
|
||||
|
||||
return iRet;
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
A3DStatus traverseEntityReference(const A3DMiscEntityReference* pEntityReference, _TiXmlElement* setting)
|
||||
{
|
||||
A3DStatus iRet = A3D_SUCCESS;
|
||||
A3DMiscEntityReferenceData sData;
|
||||
A3D_INITIALIZE_DATA(A3DMiscEntityReferenceData, sData);
|
||||
|
||||
@@ -128,12 +482,12 @@ int traverseEntityReference(const A3DMiscEntityReference* pEntityReference, _TiX
|
||||
iRet = A3DMiscEntityReferenceGet(pEntityReference, &sData);
|
||||
if (iRet != A3D_SUCCESS || sData.m_pEntity == NULL)
|
||||
{
|
||||
entityreference->SetAttribute("error", iRet);
|
||||
entityreference->SetAttribute("error", sData.m_pEntity ? A3DMiscGetErrorMsg(iRet) : A3DMiscGetErrorMsg(A3D_INVALID_ENTITY_NULL));
|
||||
setting->LinkEndChild(entityreference);
|
||||
return iRet;
|
||||
}
|
||||
_TiXmlElement* entity = new _TiXmlElement("m_pEntity");
|
||||
_SetAttributePtr(entity, "Address", (void*)sData.m_pEntity);
|
||||
setAttributePRC2XMLID(sData.m_pEntity, entity);
|
||||
entityreference->LinkEndChild(entity);
|
||||
|
||||
if (sData.m_pCoordinateSystem != NULL)
|
||||
@@ -158,6 +512,10 @@ int traverseEntityReference(const A3DMiscEntityReference* pEntityReference, _TiX
|
||||
setting->LinkEndChild(entityreference);
|
||||
return iRet;
|
||||
}
|
||||
if (sReferenceOnTopologyData.m_pBrepData)
|
||||
{
|
||||
setAttributePRC2XMLID(sReferenceOnTopologyData.m_pBrepData, entity);
|
||||
}
|
||||
|
||||
switch(sReferenceOnTopologyData.m_eTopoItemType)
|
||||
{
|
||||
@@ -230,7 +588,8 @@ int traverseEntityReference(const A3DMiscEntityReference* pEntityReference, _TiX
|
||||
iRet = A3DMiscReferenceOnCsysItemGet(sData.m_pEntity, &sA3DMiscReferenceOnCSYSITemData);
|
||||
if(iRet!=A3D_SUCCESS || !sA3DMiscReferenceOnCSYSITemData.m_pCoordinateSystem)
|
||||
{
|
||||
entityreference->SetAttribute("error_A3DMiscReferenceOnCsysItemGet", iRet);
|
||||
entityreference->SetAttribute("error_A3DMiscReferenceOnCsysItemGet",
|
||||
sA3DMiscReferenceOnCSYSITemData.m_pCoordinateSystem ? A3DMiscGetErrorMsg(iRet) : A3DMiscGetErrorMsg(A3D_INVALID_ENTITY_NULL));
|
||||
setting->LinkEndChild(entityreference);
|
||||
A3DMiscReferenceOnCsysItemGet(nullptr, &sA3DMiscReferenceOnCSYSITemData);
|
||||
return iRet;
|
||||
@@ -262,6 +621,11 @@ int traverseEntityReference(const A3DMiscEntityReference* pEntityReference, _TiX
|
||||
A3D_INITIALIZE_DATA(A3DMiscReferenceOnTessData, sReferenceOnTessData);
|
||||
if (A3DMiscReferenceOnTessGet(pEntityReference, &sReferenceOnTessData) == A3D_SUCCESS)
|
||||
{
|
||||
if (sReferenceOnTessData.m_pPolyBrepModel)
|
||||
{
|
||||
setAttributePRC2XMLID(sReferenceOnTessData.m_pPolyBrepModel, entity);
|
||||
}
|
||||
|
||||
switch(sReferenceOnTessData.m_eTopoItemType)
|
||||
{
|
||||
case kA3DTypeTessFace:
|
||||
@@ -331,7 +695,7 @@ int traverseEntityReference(const A3DMiscEntityReference* pEntityReference, _TiX
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
static int traverseMaterialAndVis(const A3DMaterialAndVisualisationInfos& oMatVis, _TiXmlElement* setting)
|
||||
static A3DStatus traverseMaterialAndVis(const A3DMaterialAndVisualisationInfos& oMatVis, _TiXmlElement* setting)
|
||||
{
|
||||
setting->SetAttribute("m_bIsSuppressed", oMatVis.m_bIsSuppressed);
|
||||
setting->SetAttribute("m_usLayer", oMatVis.m_usLayer);
|
||||
@@ -352,17 +716,22 @@ static int traverseMaterialAndVis(const A3DMaterialAndVisualisationInfos& oMatVi
|
||||
|
||||
if (oMatVis.m_pTransform)
|
||||
traverseCartesianTransformationData(*oMatVis.m_pTransform, setting);
|
||||
return 0;
|
||||
|
||||
return A3D_SUCCESS;
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
static int stTraversePOccurrence(const A3DAsmProductOccurrence* pOccurrence, _TiXmlElement* setting)
|
||||
static A3DStatus stTraversePOccurrence(const A3DAsmProductOccurrence* pOccurrence, _TiXmlElement* setting)
|
||||
{
|
||||
A3DInt32 iRet = A3D_SUCCESS;
|
||||
A3DStatus iRet = A3D_SUCCESS;
|
||||
A3DAsmProductOccurrenceData sData;
|
||||
A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceData, sData);
|
||||
|
||||
_TiXmlElement* occurrence = new _TiXmlElement("A3DAsmProductOccurrenceData");
|
||||
static std::set<const A3DAsmProductOccurrence*> occurrenceSet;
|
||||
|
||||
occurrenceSet.emplace(pOccurrence);
|
||||
setAttributePRC2XMLID(pOccurrence, occurrence);
|
||||
traverseSource(pOccurrence, occurrence);
|
||||
|
||||
A3DRootBaseData sRootBaseData;
|
||||
@@ -402,29 +771,20 @@ static int stTraversePOccurrence(const A3DAsmProductOccurrence* pOccurrence, _Ti
|
||||
occurrence->LinkEndChild(displayfilters);
|
||||
}
|
||||
|
||||
A3DUns32 uiLayers=0;
|
||||
A3DAsmLayer* asLayers = 0;
|
||||
if (A3DAsmProductOccurrenceGetLayerList(pOccurrence,&uiLayers,&asLayers) == A3D_SUCCESS)
|
||||
if (sData.m_uiLayersSize && sData.m_ppLayers)
|
||||
{
|
||||
if (uiLayers)
|
||||
{
|
||||
_TiXmlElement * pLayers = new _TiXmlElement("Layers");
|
||||
for (A3DUns32 i = 0; i < uiLayers; ++i)
|
||||
{
|
||||
_TiXmlElement * Layer = new _TiXmlElement("Layer");
|
||||
Layer->SetAttribute("Name", asLayers[i].m_pcLayerName ? asLayers[i].m_pcLayerName : "null");
|
||||
Layer->SetAttribute("Layer", asLayers[i].m_usLayer);
|
||||
pLayers->LinkEndChild(Layer);
|
||||
}
|
||||
occurrence->LinkEndChild(pLayers);
|
||||
}
|
||||
A3DAsmProductOccurrenceGetLayerList(0, &uiLayers, &asLayers);
|
||||
_TiXmlElement* layers = new _TiXmlElement("Layers");
|
||||
traverseLayers(sData.m_uiLayersSize, sData.m_ppLayers, layers);
|
||||
occurrence->LinkEndChild(layers);
|
||||
}
|
||||
|
||||
if (sData.m_pPrototype)
|
||||
{
|
||||
_TiXmlElement* occurrenceproto = new _TiXmlElement("m_pPrototype");
|
||||
stTraversePOccurrence(sData.m_pPrototype, occurrenceproto);
|
||||
setAttributePRC2XMLID(sData.m_pPrototype, occurrenceproto);
|
||||
if (occurrenceSet.find(sData.m_pPrototype) == occurrenceSet.end())
|
||||
stTraversePOccurrence(sData.m_pPrototype, occurrenceproto); // recurse only if not already treated (i.e not already inserted)
|
||||
|
||||
occurrence->LinkEndChild(occurrenceproto);
|
||||
}
|
||||
//else // this is commented but beware http://docs.techsoft3d.com/exchange/latest/build/group__a3d__productoccurrence.html#ga497615eb89393c2aba37cce2e2323f4d
|
||||
@@ -450,7 +810,10 @@ static int stTraversePOccurrence(const A3DAsmProductOccurrence* pOccurrence, _Ti
|
||||
if (sData.m_pExternalData)
|
||||
{
|
||||
_TiXmlElement* occurrenceexternaldata = new _TiXmlElement("m_pExternalData");
|
||||
stTraversePOccurrence(sData.m_pExternalData, occurrenceexternaldata);
|
||||
setAttributePRC2XMLID(sData.m_pExternalData, occurrenceexternaldata);
|
||||
if (occurrenceSet.find(sData.m_pExternalData) == occurrenceSet.end())
|
||||
stTraversePOccurrence(sData.m_pExternalData, occurrenceexternaldata); // recurse only if not already treated (i.e not already inserted)
|
||||
|
||||
occurrence->LinkEndChild(occurrenceexternaldata);
|
||||
}
|
||||
|
||||
@@ -478,9 +841,11 @@ static int stTraversePOccurrence(const A3DAsmProductOccurrence* pOccurrence, _Ti
|
||||
for (ui = 0; ui < sData.m_uiFeatureBasedEntitiesSize; ++ui)
|
||||
traverseFeatureTree(sData.m_ppFeatureBasedEntities[ui], occurrence);
|
||||
|
||||
for (ui = 0; ui < sData.m_uiContraintsSize; ++ui)
|
||||
for (ui = 0; ui < sData.m_uiConstraintsSize; ++ui)
|
||||
traverseConstraint(sData.m_ppConstraints[ui], occurrence);
|
||||
|
||||
traversePublicationSet(sData.m_pPublicationSet, occurrence);
|
||||
|
||||
for (ui = 0; ui < sData.m_uiMaterialAndVisualisationSetupSize; ++ui)
|
||||
{
|
||||
_TiXmlElement* materialandvis = new _TiXmlElement("m_psMaterialAndVisualisationSetup");
|
||||
@@ -491,84 +856,25 @@ static int stTraversePOccurrence(const A3DAsmProductOccurrence* pOccurrence, _Ti
|
||||
//----------- Export Specific information per CAD format -----------
|
||||
switch (sData.m_eModellerType)
|
||||
{
|
||||
case kA3DModellerUnigraphics:
|
||||
{
|
||||
A3DAsmProductOccurrenceDataUg sDataUg;
|
||||
A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceDataUg, sDataUg);
|
||||
iRet = A3DAsmProductOccurrenceGetUg(pOccurrence, &sDataUg);
|
||||
if (iRet == A3D_SUCCESS)
|
||||
{
|
||||
_TiXmlElement* occurrencedataug = new _TiXmlElement("A3DAsmProductOccurrenceDataUg");
|
||||
|
||||
occurrencedataug->SetAttribute("RootFilePath", sDataUg.m_psRootFilePath ? sDataUg.m_psRootFilePath : "NULL");
|
||||
occurrencedataug->SetAttribute("FileName", sDataUg.m_psFileName ? sDataUg.m_psFileName : "NULL");
|
||||
occurrencedataug->SetAttribute("PartUID", sDataUg.m_psPartUID ? sDataUg.m_psPartUID : "NULL");
|
||||
occurrencedataug->SetAttribute("InstanceFileName", sDataUg.m_psInstanceFileName ? sDataUg.m_psInstanceFileName : "NULL");
|
||||
occurrencedataug->SetAttribute("InstanceTag", sDataUg.m_uiInstanceTag);
|
||||
|
||||
// Treat RefSets
|
||||
if (sDataUg.m_uiChildrenByRefsetsSize || sDataUg.m_uiSolidsByRefsetsSize)
|
||||
{
|
||||
_TiXmlElement* refsetList = new _TiXmlElement("RefSets");
|
||||
|
||||
// Children by RefSet
|
||||
for (A3DUns32 iRefSet = 0; iRefSet < sDataUg.m_uiChildrenByRefsetsSize; ++iRefSet)
|
||||
{
|
||||
const A3DElementsByRefsetUg &pRefsetData = sDataUg.m_asChildrenByRefsets[iRefSet];
|
||||
|
||||
// Init Xml Element if first occurrence
|
||||
_TiXmlElement* refset = new _TiXmlElement("RefSet");
|
||||
refset->SetAttribute("Name", pRefsetData.m_psRefset);
|
||||
|
||||
// Add children
|
||||
for (A3DUns32 i = 0; i < pRefsetData.m_uiElementsSize; ++i)
|
||||
{
|
||||
_TiXmlElement * refsetChild = new _TiXmlElement("Child");
|
||||
refsetChild->SetAttribute("id", pRefsetData.m_auiElements[i]);
|
||||
refset->LinkEndChild(refsetChild);
|
||||
}
|
||||
|
||||
refsetList->LinkEndChild(refset);
|
||||
}
|
||||
|
||||
// Solid by RefSet
|
||||
for (A3DUns32 iRefSet = 0; iRefSet < sDataUg.m_uiSolidsByRefsetsSize; ++iRefSet)
|
||||
{
|
||||
const A3DElementsByRefsetUg &pRefsetData = sDataUg.m_asSolidsByRefsets[iRefSet];
|
||||
|
||||
// Init Xml Element if first occurrence
|
||||
_TiXmlElement* refset = new _TiXmlElement("RefSet");
|
||||
refset->SetAttribute("Name", pRefsetData.m_psRefset);
|
||||
|
||||
// Add Solid
|
||||
for (A3DUns32 i = 0; i < pRefsetData.m_uiElementsSize; ++i)
|
||||
{
|
||||
_TiXmlElement * refsetChild = new _TiXmlElement("Solid");
|
||||
refsetChild->SetAttribute("id", pRefsetData.m_auiElements[i]);
|
||||
refset->LinkEndChild(refsetChild);
|
||||
}
|
||||
|
||||
refsetList->LinkEndChild(refset);
|
||||
}
|
||||
|
||||
occurrencedataug->LinkEndChild(refsetList);
|
||||
}
|
||||
|
||||
occurrence->LinkEndChild(occurrencedataug);
|
||||
|
||||
CHECK_RET(A3DAsmProductOccurrenceGetUg(NULL, &sDataUg));
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
case kA3DModellerUnigraphics:
|
||||
{
|
||||
stTraverseUg(pOccurrence, occurrence);
|
||||
break;
|
||||
}
|
||||
case kA3DModellerSlw:
|
||||
{
|
||||
stTraverseSLW(pOccurrence, occurrence);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
CHECK_RET(A3DAsmProductOccurrenceGet(NULL, &sData));
|
||||
}
|
||||
else
|
||||
{
|
||||
occurrence->SetAttribute("error", iRet);
|
||||
occurrence->SetAttribute("error", A3DMiscGetErrorMsg(iRet));
|
||||
}
|
||||
|
||||
traverseMaterialProperties(pOccurrence, occurrence);
|
||||
@@ -579,13 +885,14 @@ static int stTraversePOccurrence(const A3DAsmProductOccurrence* pOccurrence, _Ti
|
||||
}
|
||||
|
||||
//######################################################################################################################
|
||||
int traverseModel(const A3DAsmModelFile* pModelFile, _TiXmlElement* setting)
|
||||
A3DStatus traverseModel(const A3DAsmModelFile* pModelFile, _TiXmlElement* setting)
|
||||
{
|
||||
A3DInt32 iRet = A3D_SUCCESS;
|
||||
A3DStatus iRet = A3D_SUCCESS;
|
||||
A3DAsmModelFileData sData;
|
||||
A3D_INITIALIZE_DATA(A3DAsmModelFileData, sData);
|
||||
|
||||
_TiXmlElement* model = new _TiXmlElement("A3DAsmModelFileData");
|
||||
setAttributePRC2XMLID(pModelFile, model);
|
||||
traverseSource(pModelFile, model);
|
||||
|
||||
iRet = A3DAsmModelFileGet(pModelFile , &sData);
|
||||
@@ -606,7 +913,7 @@ int traverseModel(const A3DAsmModelFile* pModelFile, _TiXmlElement* setting)
|
||||
}
|
||||
else
|
||||
{
|
||||
model->SetAttribute("error", iRet);
|
||||
model->SetAttribute("error", A3DMiscGetErrorMsg(iRet));
|
||||
}
|
||||
|
||||
setting->LinkEndChild(model);
|
||||
|
||||
Reference in New Issue
Block a user