This commit is contained in:
ninja
2025-12-15 23:22:33 +08:00
parent 019570564b
commit 8782765fbc
809 changed files with 118753 additions and 18289 deletions

View File

@@ -0,0 +1,37 @@
add_executable(DumpFeatureTree)
target_include_directories(DumpFeatureTree PRIVATE ./ TinyXML Visitor)
target_link_libraries(DumpFeatureTree PRIVATE hoops_samples)
set(_srcs
DumpFeatureTree.cpp
DumpFeatureTree.h
HXFeatureTreeReport.cpp
HXFeatureTreeReport.h)
set(_xml_srcs
TinyXML/tinyxmlparser.cpp
TinyXML/tinystr.cpp
TinyXML/tinystr.h
TinyXML/tinyxml.cpp
TinyXML/tinyxml.h
TinyXML/tinyxmlerror.cpp
HXmlElement.cpp
HXmlElement.h
HXmlReport.cpp
HXmlReport.h)
set(_visitor_srcs
Visitor/Connector.h
Visitor/TreeTraverse.cpp
Visitor/TreeTraverse.h
Visitor/VisitorContainer.cpp
Visitor/VisitorContainer.h
Visitor/Visitors.h
Visitor/VisitorTree.cpp
Visitor/VisitorTree.h)
target_sources(DumpFeatureTree PRIVATE ${_srcs} ${_xml_srcs} ${_visitor_srcs})
source_group("" FILES ${_srcs})
source_group(xml FILES ${_xml_srcs})
source_group(visitor FILES ${_visitor_srcs})

View File

@@ -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
@@ -10,6 +10,8 @@
*
***********************************************************************************************************************/
#include <hoops_license.h>
#define INITIALIZE_A3D_API
#include "DumpFeatureTree.h"
@@ -25,13 +27,7 @@
#include "VisitorTree.h"
#include "HXFeatureTreeReport.h"
A3DVoid _InitializeFontsArray();
A3DVoid _TerminateFontsArray();
static A3DStatus TraverseModel(const A3DAsmModelFile* pModelFile, const char * pcOutputFile);
//=============================== TraverseModel function
//######################################################################################################################
static A3DStatus TraverseModel(const A3DAsmModelFile* pModelFile, const char * pcOutputFile)
{
// Creation of the ModelFile Connector
@@ -50,10 +46,10 @@ static A3DStatus TraverseModel(const A3DAsmModelFile* pModelFile, const char * p
return A3D_SUCCESS;
}
//######################################################################################################################
static MY_CHAR acSrcFileName[_MAX_PATH * 2];
static MY_CHAR acDstFileName[_MAX_PATH * 2];
static MY_CHAR acLogFileName[_MAX_PATH * 2];
static MY_CHAR acDstFileName[_MAX_PATH * 2 + 4];
static MY_CHAR acLogFileName[_MAX_PATH * 2 + 12];
//######################################################################################################################
#ifdef _MSC_VER
@@ -91,7 +87,7 @@ int main(A3DInt32 iArgc, A3DUTF8Char** ppcArgv)
// ### INITIALIZE HOOPS EXCHANGE
//
A3DSDKHOOPSExchangeLoader sHoopsExchangeLoader(_T(HOOPS_BINARY_DIRECTORY));
A3DSDKHOOPSExchangeLoader sHoopsExchangeLoader(_T(HOOPS_BINARY_DIRECTORY), HOOPS_LICENSE);
CHECK_RET(sHoopsExchangeLoader.m_eSDKStatus);
CHECK_RET(A3DDllSetCallbacksMemory(CheckMalloc, CheckFree));
@@ -105,6 +101,7 @@ int main(A3DInt32 iArgc, A3DUTF8Char** ppcArgv)
sImport.m_sLoadData.m_sGeneral.m_bReadFeature = TRUE;
sImport.m_sLoadData.m_sGeneral.m_bReadHiddenObjects = TRUE;
sImport.m_sLoadData.m_sGeneral.m_bReadConstructionAndReferences = TRUE;
sImport.m_sLoadData.m_sGeneral.m_bReadPmis = FALSE;
A3DStatus iRet = sHoopsExchangeLoader.Import(sImport);
if (iRet != A3D_SUCCESS && iRet != A3D_LOAD_MISSING_COMPONENTS)

View File

@@ -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

View File

@@ -1,14 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
@@ -25,39 +17,20 @@
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\HOOPSExchangePublishSample.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\HOOPSExchangePublishSample.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\HOOPSExchangePublishSample.props" />
@@ -67,23 +40,6 @@
<Import Project="$(SolutionDir)\HOOPSExchangePublishSample.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>false</SDLCheck>
<AdditionalIncludeDirectories>.\TinyXML;.\Visitor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>legacy_stdio_float_rounding.obj;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
@@ -101,26 +57,6 @@
<AdditionalDependencies>legacy_stdio_float_rounding.obj;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>false</SDLCheck>
<AdditionalIncludeDirectories>.\TinyXML;.\Visitor;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>legacy_stdio_float_rounding.obj;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>

View File

@@ -1,193 +1,235 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
As loading a local file with included local ressources now result in CORS errors,
one has to set up a local server to perform local testing.
To set up this local server (one of many ways), one has to be placed in the directory including all ressources,
i.e., all XML files and this associated XSL, then, run "python -m http.server", open Firefox or Chrome, and finally access
the files from http://localhost:8000.
For more information, see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" version="4.0"/>
<xsl:template match="Root">
<xsl:template match="ModelFile">
<html>
<head>
<script type="text/javascript">
<xsl:text>
function showHide(obj){
<xsl:text>
function showHide(obj)
{
var tbody = obj.parentNode.parentNode.parentNode.getElementsByTagName("tbody")[0];
var old = tbody.style.display;
tbody.style.display = (old == "none"?"":"none");
}
</xsl:text>
tbody.style.display = (old == "none" ? "" : "none");
}
</xsl:text>
</script>
<style type="text/css">
th{
th
{
text-align: left;
cursor: pointer;
}
table tbody tr td{
table tbody tr td
{
padding-left: 5px;
padding-right: 5px;
border-collapse: collapse;
}
table {
table
{
border-top: 3px solid grey;
border-collapse: collapse;
}
</style>
</head>
<body>
<xsl:apply-templates select="CONTAINER"/>
<xsl:apply-templates select="Container"/>
</body>
</html>
</xsl:template>
<xsl:template match="CONTAINER|CONTAINER_INTERNAL">
<xsl:apply-templates select="NODE"/>
<xsl:template match="Container|ContainerInternal">
<xsl:apply-templates select="Node"/>
</xsl:template>
<xsl:template match="TYPE">
<tr>
<th><xsl:value-of select="FEATURE/@Type_type" /></th>
<td colspan = "3">
<xsl:value-of select="FEATURE/@Value" />
</td>
</tr>
<xsl:template match="Type">
<tr>
<th>
<xsl:value-of select="Feature/@type_type"/>
</th>
<td colspan="3">
<xsl:value-of select="Feature/@Value"/>
</td>
</tr>
</xsl:template>
<xsl:template match="NODE">
<xsl:template match="Node">
<p>
<table BORDER = "2">
<xsl:for-each select="RootBaseData">
<table BORDER="2">
<xsl:for-each select="RootBase">
<thead>
<tr bgcolor="#93B6CD" style="color: white;">
<th colspan = "4" onclick="showHide(this)" ><xsl:value-of select="@m_pcName" /></th>
</tr>
<tr bgcolor="#93B6CD" style="color: white;">
<th colspan="4" onclick="showHide(this)">
<xsl:value-of select="@name"/>
</th>
</tr>
</thead>
</xsl:for-each>
<tbody style="display:none">
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="DATA"/>
<xsl:for-each select="SPECIFICATION/FeatureMode">
<tr>
<th>Feature mode</th>
<td>
<xsl:value-of select="@Value" />
</td>
</tr>
</xsl:for-each>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="FEATURE_DEFINITION"/>
<xsl:if test = "CONTAINER">
<tr>
<th>CONTAINER</th>
<td style="padding: 0px 0px 0px 0px;margin: 0px 0 0 0;">
<table BORDER = "1" width="100%">
<xsl:apply-templates select="CONTAINER"/>
</table>
</td>
</tr>
</xsl:if>
<xsl:if test = "CONTAINER_INTERNAL">
<p style="padding: 0px 0px 0px 0px;margin: 0px 0 0 0;">
<tr>
<th>CONTAINER_INTERNAL</th>
<td >
<table BORDER = "1" width="100%">
<xsl:apply-templates select="CONTAINER_INTERNAL"/>
</table>
</td>
</tr>
</p>
</xsl:if>
<tbody style="display: none">
<xsl:apply-templates select="Type"/>
<xsl:apply-templates select="Data"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="FeatureDefinition"/>
<xsl:if test="Container">
<tr>
<th>CONTAINER</th>
<td style="padding: 0px 0px 0px 0px;margin: 0px 0 0 0;">
<table BORDER="1" width="100%">
<xsl:apply-templates select="Container"/>
</table>
</td>
</tr>
</xsl:if>
<xsl:if test="ContainerInternal">
<p style="padding: 0px 0px 0px 0px;margin: 0px 0 0 0;">
<tr>
<th>CONTAINER_INTERNAL</th>
<td>
<table BORDER="1" width="100%">
<xsl:apply-templates select="ContainerInternal"/>
</table>
</td>
</tr>
</p>
</xsl:if>
</tbody>
</table>
</p>
</xsl:template>
<xsl:template match="FEATURE_DEFINITION">
<xsl:for-each select="FEATURE">
<xsl:template match="FeatureDefinition">
<xsl:for-each select="Feature">
<tr bgcolor="#CEE3F6">
<th colspan = "4" ><xsl:value-of select="@feature_definition_type" /></th>
<th colspan="4">
<xsl:value-of select="@feature_definition_type"/>
</th>
</tr>
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="DEFINITION"/>
<xsl:apply-templates select="DATA"/>
<xsl:apply-templates select="Type"/>
<xsl:apply-templates select="Definition"/>
<xsl:apply-templates select="Data"/>
</xsl:for-each>
</xsl:template>
<xsl:template name="data_text">
<xsl:param name="text" />
<xsl:template name="attribute_text">
<xsl:param name="text"/>
<xsl:choose>
<xsl:when test="contains($text,',,')">
<xsl:value-of select= "substring-before($text,',,')"/>
<BR/>
<xsl:call-template name="data_text"><xsl:with-param name="text" select="substring-after($text,',,')" /></xsl:call-template>
<xsl:when test="contains($text, 'xts3dx')">
<td>
<xsl:value-of select="substring-before($text, 'xts3dx')"/>
</td>
<xsl:call-template name="attribute_text">
<xsl:with-param name="text" select="substring-after($text, 'xts3dx')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of disable-output-escaping="yes" select="$text" />
<td>
<xsl:value-of select="$text"/>
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="DATA">
<xsl:for-each select="FEATURE">
<xsl:template match="Data">
<xsl:for-each select="Feature">
<xsl:choose>
<xsl:when test="@data_type='value'">
<tr>
<th><xsl:value-of select = "@value_type"/></th>
<!--xsl:apply-templates select="DATA"/-->
<xsl:choose>
<xsl:when test="DATA/FEATURE/@data_type='double'">
<td colspan = "3"> <xsl:call-template name="data_text"><xsl:with-param name="text" select="DATA/FEATURE/@data" /></xsl:call-template></td>
</xsl:when>
<xsl:otherwise>
<td colspan = "3"><xsl:value-of select = "DATA/FEATURE/@data"/></td>
</xsl:otherwise>
</xsl:choose>
</tr>
<th>
<xsl:value-of select="@value_type"/>
</th>
<xsl:choose>
<xsl:when test="Data/Feature/@data_type='double'">
<td colspan="3">
<xsl:value-of select="Data/Feature/@data"/>
</td>
</xsl:when>
<xsl:otherwise>
<td colspan="3">
<xsl:value-of select="Data/Feature/@data"/>
</td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:when>
<xsl:when test="@data_type='double'">
<tr>
<xsl:if test = "@double_type != 'unknown'">
<th><xsl:value-of select = "@double_type"/></th>
<xsl:if test="@double_type != 'None'">
<th>
<xsl:value-of select="@double_type"/>
</th>
</xsl:if>
<td colspan = "3"> <xsl:call-template name="data_text"><xsl:with-param name="text" select="@data" /></xsl:call-template></td>
<td colspan="3">
<xsl:value-of select="@data"/>
</td>
</tr>
</xsl:when>
<xsl:when test="@data_type='integer'">
<tr>
<xsl:if test = "@integer_type != 'unknown'">
<th><xsl:value-of select = "@integer_type"/></th>
<xsl:if test="@integer_type != 'None'">
<th>
<xsl:value-of select = "@integer_type"/>
</th>
</xsl:if>
<xsl:if test = "@integer_type != 'boolean'">
<td colspan = "3"> <xsl:call-template name="data_text"><xsl:with-param name="text" select="@data" /></xsl:call-template></td>
</xsl:if>
<xsl:if test = "@integer_type = 'boolean'">
<xsl:if test = "@data = '0'">
<td colspan = "3"> FALSE</td>
</xsl:if>
<xsl:if test = "@data = '1'">
<td colspan = "3"> TRUE</td>
<xsl:if test="@integer_type != 'Boolean'">
<td colspan="3">
<xsl:value-of select="@data"/>
</td>
</xsl:if>
<xsl:if test="@integer_type = 'Boolean'">
<xsl:if test="@data = '0'">
<td colspan="3">FALSE</td>
</xsl:if>
<xsl:if test="@data = '1'">
<td colspan="3">TRUE</td>
</xsl:if>
</xsl:if>
</tr>
</xsl:when>
<xsl:when test="@data_type='string'">
<xsl:choose>
<xsl:when test="@string_type='unknown'">
<tr><td colspan = "3"><xsl:value-of select = "@data"/></td></tr>
</xsl:when>
<xsl:when test="@string_type='attribute'">
<xsl:when test="@string_type='None'">
<tr>
<td><xsl:value-of select= "substring-before(@data,' xts3dx ')"/></td>
<td colspan = "2"><xsl:value-of select= "substring-after(@data,' xts3dx ')"/></td>
<td colspan="3">
<xsl:value-of select="@data"/>
</td>
</tr>
</xsl:when>
<xsl:when test="@string_type='Attribute'">
<tr>
<xsl:call-template name="attribute_text">
<xsl:with-param name="text" select="@data"/>
</xsl:call-template>
</tr>
</xsl:when>
<xsl:otherwise>
<tr><th><xsl:value-of select = "@string_type"/></th></tr>
<tr><td colspan = "3"><xsl:value-of select = "@data"/></td></tr>
<tr>
<th>
<xsl:value-of select="@string_type"/>
</th>
</tr>
<tr>
<td colspan="3">
<xsl:value-of select="@data"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
@@ -196,41 +238,47 @@
</xsl:template>
<xsl:template match="DEFINITION">
<xsl:for-each select="FEATURE">
<xsl:template match="Definition">
<xsl:for-each select="Feature">
<xsl:choose>
<xsl:when test="@data_type='definition'">
<tr>
<th colspan = "4" bgcolor="#E6E6E6" ><xsl:value-of select = "@definition_type"/></th>
<!-- <xsl:apply-templates select="Connection/DrawingBlock"/> -->
</tr>
<xsl:apply-templates select="TYPE"/>
<th colspan="4" bgcolor="#E6E6E6" >
<xsl:value-of select="@definition_type"/>
</th>
</tr>
<xsl:apply-templates select="Type"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="DATA"/>
<xsl:apply-templates select="DEFINITION"/>
<xsl:apply-templates select="Data"/>
<xsl:apply-templates select="Definition"/>
</xsl:when>
<xsl:when test="@data_type='definition_pattern'">
<xsl:choose>
<xsl:when test="@definition_pattern_type='InstanceStatus'">
<tr >
<th>instance status</th><td colspan="3"><xsl:value-of select = ".//@data"/></td>
<tr>
<th>Instance status</th>
<td colspan="3">
<xsl:value-of select=".//@data"/>
</td>
</tr>
</xsl:when>
<xsl:otherwise>
<tr style="padding: 0px 0px 0px 0px; border-collapse: collapse; border-spacing: 0px 0px 0px 0px;">
<td colspan = "4" style="padding: 0px 0px 0px 0px; border-collapse: collapse; ">
<table BORDER = "1" width="100%" >
<thead>
<tr >
<th colspan = "4" onclick="showHide(this)" bgcolor="#EFF5FB" ><xsl:value-of select = "@definition_pattern_type"/></th>
</tr>
</thead>
<tbody style="display:none">
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="DATA"/>
<xsl:apply-templates select="DEFINITION"/>
</tbody>
<td colspan="4" style="padding: 0px 0px 0px 0px; border-collapse: collapse;">
<table BORDER="1" width="100%" >
<thead>
<tr>
<th colspan="4" onclick="showHide(this)" bgcolor="#EFF5FB">
<xsl:value-of select="@definition_pattern_type"/>
</th>
</tr>
</thead>
<tbody style="display:none">
<xsl:apply-templates select="Type"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="Data"/>
<xsl:apply-templates select="Definition"/>
</tbody>
</table>
</td>
</tr>
@@ -239,15 +287,17 @@
</xsl:when>
<xsl:when test="@data_type='definition_hole'">
<tr >
<td style="padding: 0px 0px 0px 0px;border-spacing: 0px;" colspan = "4">
<table BORDER = "1" width="100%">
<th colspan = "4" onclick="showHide(this)" bgcolor="#EFF5FB" ><xsl:value-of select = "@definition_hole_type"/></th>
<tr>
<td style="padding: 0px 0px 0px 0px;border-spacing: 0px;" colspan="4">
<table BORDER="1" width="100%">
<th colspan="4" onclick="showHide(this)" bgcolor="#EFF5FB">
<xsl:value-of select="@definition_hole_type"/>
</th>
<tbody style="display:none">
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="Type"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="DATA"/>
<xsl:apply-templates select="DEFINITION"/>
<xsl:apply-templates select="Data"/>
<xsl:apply-templates select="Definition"/>
</tbody>
</table>
</td>
@@ -255,15 +305,17 @@
</xsl:when>
<xsl:when test="@data_type='definition_thread'">
<tr >
<td style="padding: 0px 0px 0px 0px;border-spacing: 0px;" colspan = "4">
<table BORDER = "1" width="100%">
<th colspan = "4" onclick="showHide(this)" bgcolor="#EFF5FB" ><xsl:value-of select = "@definition_thread_type"/></th>
<tr>
<td style="padding: 0px 0px 0px 0px;border-spacing: 0px;" colspan="4">
<table BORDER="1" width="100%">
<th colspan="4" onclick="showHide(this)" bgcolor="#EFF5FB">
<xsl:value-of select="@definition_thread_type"/>
</th>
<tbody style="display:none">
<xsl:apply-templates select="TYPE"/>
<xsl:apply-templates select="Type"/>
<xsl:apply-templates select="Connection"/>
<xsl:apply-templates select="DATA"/>
<xsl:apply-templates select="DEFINITION"/>
<xsl:apply-templates select="Data"/>
<xsl:apply-templates select="Definition"/>
</tbody>
</table>
</td>
@@ -273,81 +325,135 @@
</xsl:for-each>
</xsl:template>
<!-- connection -->
<xsl:template match="Connection">
<tr bgcolor="#F5F6CE">
<th >Link</th>
<td> <xsl:value-of select= "@Type"/></td>
<xsl:apply-templates select="RootBaseData"/>
<xsl:apply-templates select="DrawingBlock/RootBaseData"/>
<xsl:apply-templates select="ReferenceOnTopology"/>
<xsl:apply-templates select="A3DFRMFeatureLinkedItemConnector"/>
<th>Link</th>
<td colspan="2">
<xsl:value-of select="@Type"/>
</td>
</tr>
<xsl:apply-templates select="RootBase"/>
<tr style="padding: 0px 0px 0px 0px; border-collapse: collapse; border-spacing: 0px 0px 0px 0px;">
<td colspan="2" style="padding: 0px 0px 0px 0px; border-collapse: collapse;">
<xsl:apply-templates select="DrawingBlock"/>
</td>
</tr>
<tr style="padding: 0px 0px 0px 0px; border-collapse: collapse; border-spacing: 0px 0px 0px 0px;">
<td colspan="2" style="padding: 0px 0px 0px 0px; border-collapse: collapse;">
<xsl:apply-templates select="ReferenceOnTopology|ReferenceOnTessellation"/>
</td>
</tr>
</xsl:template>
<xsl:template match="A3DFRMFeatureLinkedItemConnector">
<td>
error
</td>
<td>
<xsl:value-of select= "@error"/>
</td>
</xsl:template>
<xsl:template match="DrawingBlock">
<td colspan = "2">DrawingBlock</td>
<!--tr >
<th colspan = "2">Entities</th>
</tr>
<tr>
<td>count</td>
<td>
<xsl:value-of select= "@Entity_count"/>
</td>
</tr>
<tr>
<td>markup_count</td>
<td>
<xsl:value-of select= "@Markup_count"/>
</td>
</tr>
<tr>
<td>subblock_count</td>
<td>
<xsl:value-of select= "@SubBlock_count"/>
</td-->
<table BORDER="1" width="100%">
<thead>
<tr>
<th colspan="2" onclick="showHide(this)" bgcolor="#EFF5FB" >DrawingBlock</th>
</tr>
</thead>
<tbody style="display:none">
<tr>
<xsl:apply-templates select="RootBase"/>
</tr>
<tr>
<td>Entities</td>
<td>
<xsl:value-of select="@nb_entities"/>
</td>
</tr>
<tr>
<td>Markups</td>
<td>
<xsl:value-of select="@nb_markups"/>
</td>
</tr>
<tr>
<td>Drawing blocks</td>
<td>
<xsl:value-of select="@nb_drawing_blocks"/>
</td>
</tr>
<xsl:if test="@nb_drawing_blocks != 0">
<tr style="padding: 0px 0px 0px 0px; border-collapse: collapse; border-spacing: 0px 0px 0px 0px;">
<td>Children</td>
<td colspan="2" style="padding: 0px 0px 0px 0px; border-collapse: collapse;">
<xsl:apply-templates select="DrawingBlock"/>
</td>
</tr>
</xsl:if>
</tbody>
</table>
</xsl:template>
<xsl:template match="ReferenceOnTopology">
<td>
<xsl:value-of select= "@topotype"/>
</td>
<td>
<xsl:value-of select= "face_indexes/@indexes"/>
</td>
<xsl:template match="ReferenceOnTopology|ReferenceOnTessellation">
<table BORDER="1" width="100%">
<thead>
<tr>
<th colspan="2" onclick="showHide(this)" bgcolor="#EFF5FB" >
<xsl:value-of select="@topo_type"/>
</th>
</tr>
</thead>
<tbody style="display:none">
<xsl:if test="@topo_type = 'Face'">
<td>Indexes</td>
<td>
<xsl:value-of select="@indexes"/>
</td>
</xsl:if>
<xsl:if test="@topo_type = 'Edge' or @topo_type = 'CoEdge'">
<xsl:for-each select="Edge">
<tr>
<td>Indexes</td>
<td>
<xsl:value-of select="@indexes"/>
</td>
</tr>
</xsl:for-each>
</xsl:if>
<xsl:if test="@topo_type = 'UniqueVertex' or @topo_type = 'MultipleVertex'">
<xsl:for-each select="Vertex">
<tr>
<td>Indexes</td>
<td>
<xsl:value-of select="@indexes"/>
</td>
</tr>
</xsl:for-each>
</xsl:if>
</tbody>
</table>
</xsl:template>
<xsl:template match="RootBaseData">
<xsl:if test = "@m_pcName">
<td>
<xsl:value-of select= "@m_pcName"/>
</td>
<td>
<xsl:value-of select= "@m_uiPersistentId"/>
</td>
</xsl:if>
<xsl:if test = "Connection/DrawingBlock">
<td>
<xsl:value-of select= "Connection/DrawingBlock/RootBaseData/@m_pcName"/>
</td>
<xsl:template match="RootBase">
<xsl:choose>
<xsl:when test="not(@name) and @persistent_id = 0">
<!-- Do nothing -->
</xsl:when>
<xsl:when test="@name">
<td>
<xsl:value-of select= "Connection/DrawingBlock/RootBaseData/@m_uiPersistentId"/>
<xsl:value-of select="@name"/>
</td>
</xsl:if>
<td>
Persistent id:
<xsl:value-of select="@persistent_id"/>
</td>
</xsl:when>
<xsl:otherwise>
<td>
Empty name
</td>
<td>
Persistent id:
<xsl:value-of select="@persistent_id"/>
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>

View File

@@ -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
@@ -22,8 +22,8 @@ public:
HXFeatureTreeReport(A3DVisitorContainer* pContainer):
A3DVisitor("FeatureTreeReport", pContainer),
m_failed_count(0),
m_non_implemented_node_count(0),
m_non_implemented_subnode_count(0),
m_not_implemented_node_count(0),
m_not_implemented_subnode_count(0),
m_mandatory_missing_count(0),
m_hole_mandatory_missing_count(0),
m_pattern_mandatory_missing_count(0)
@@ -46,8 +46,8 @@ public:
private:
int m_failed_count;
int m_non_implemented_node_count;
int m_non_implemented_subnode_count;
int m_not_implemented_node_count;
int m_not_implemented_subnode_count;
int m_mandatory_missing_count;
int m_hole_mandatory_missing_count;
int m_pattern_mandatory_missing_count;
@@ -56,15 +56,27 @@ private:
bool isAlreadyTreadted(const A3DFRMFeatureConnector& sFeature);
HXmlElement* traverseRootBaseData(const A3DEntity* pEntity);
HXmlElement* traverseReferenceOnTopology(const A3DMiscReferenceOnTopology* pEntityReference);
HXmlElement* traverseA3DMiscReferenceOnCsysItem(const A3DMiscReferenceOnCsysItem* pEntityReference);
HXmlElement* traverseA3DMiscReferenceOnTessData(const A3DMiscEntityReference* pEntityReference);
void traverseRootBaseData(const A3DEntity* pEntity);
void traverseMiscReferenceOnTopology(const A3DMiscReferenceOnTopology* pEntityReference);
void traverseMiscReferenceOnCsysItem(const A3DMiscReferenceOnCsysItem* pEntityReference);
void traverseMiscReferenceOnTessData(const A3DMiscEntityReference* pEntityReference);
void traverseMiscReferenceOnBRep(
const A3DEntity* pEntity,
const A3DEEntityType eType,
const A3DUns32* puiAdditionalIndexes,
const A3DUns32 uiAdditionalIndexesSize);
void traverseEntityReference(const A3DEntity* pEntityReference);
void traverseDrawingBlock(const A3DDrawingBlockBasic* pEntityReference);
void traverseFeatureStatus(const A3DFRMFeatureConnector& sFeature);
void traverseFeatureData(const A3DFRMFeatureConnector& sFeature);
void traverseIndexes(const A3DUns32 uiSize, const A3DUns32* puiIndexes);
void DumpIndexesBy3(const char* name, const A3DUns32 uiAdditionalIndexesSize,
const A3DUns32* puiAdditionalIndexes);
void DumpIndexesBy4(const char* name, const A3DUns32 uiAdditionalIndexesSize,
const A3DUns32* puiAdditionalIndexes);
};
#endif // __HTREEDUMP_H__

View File

@@ -1,7 +1,7 @@
#include "HXmlElement.h"
#ifdef COMPUTE_RTF_STRING
#include <A3DSDKIncludes.h>
# include <A3DSDKIncludes.h>
#endif
HXmlElement* HXmlElement::add_element( const char* pcText)
@@ -10,6 +10,7 @@ HXmlElement* HXmlElement::add_element( const char* pcText)
this->LinkEndChild( psElement);
return psElement;
}
HXmlElement* HXmlElement::add_element_with_id( const char* pcText, const char* pcTextId)
{
HXmlElement* psElement = new HXmlElement(pcText);
@@ -17,50 +18,52 @@ HXmlElement* HXmlElement::add_element_with_id( const char* pcText, const char* p
psElement->SetAttribute("id", pcTextId);
return psElement;
}
HXmlElement* HXmlElement::add_header( const char* pcText)
{
HXmlElement* psElementHeader = this->add_element("h2");
psElementHeader->LinkEndChild( new TiXmlText(pcText));
return psElementHeader;
}
#ifdef COMPUTE_RTF_STRING
void HXmlElement::add_value( const char* pcValue, bool bRTF)
{
if(bRTF == false)
{
this->LinkEndChild( new TiXmlText(pcValue));
LinkEndChild( new TiXmlText(pcValue));
}
char acAttributValue[1024];
//A3DVoid* pRTFData = NULL;
A3DUTF8Char* pRTFString = (A3DUTF8Char*)pcValue;
A3DMkpRTFField* pRTF = NULL;
if (A3DMkpRTFFieldCreate(pRTFString, &pRTF) == A3D_SUCCESS)
A3DMkpRTFField* pRTF = NULL;
if (A3DMkpRTFFieldCreate(pRTFString, &pRTF) == A3D_SUCCESS)
{
A3DMkpRTFFieldData sRTFFieldData;
A3DMkpRTFFieldData sRTFFieldData;
A3D_INITIALIZE_DATA(A3DRTFFieldData, sRTFFieldData);
//add_element( "rtf - ");
while (A3DMkpRTFFieldGet(pRTF, &sRTFFieldData) == A3D_SUCCESS)
while (A3DMkpRTFFieldGet(pRTF, &sRTFFieldData) == A3D_SUCCESS)
{
if(sRTFFieldData.m_pcFamilyName)
sprintf(acAttributValue, "font-family:%s;", sRTFFieldData.m_pcFamilyName);
this->SetAttribute("style", acAttributValue);
this->LinkEndChild(new TiXmlText(sRTFFieldData.m_pcText));
SetAttribute("style", acAttributValue);
LinkEndChild(new TiXmlText(sRTFFieldData.m_pcText));
A3DMkpRTFFieldGet(NULL, &sRTFFieldData);
A3DMkpRTFFieldGet(NULL, &sRTFFieldData);
}
//add_element( " -");
A3DMkpRTFFieldDelete(pRTF);
A3DMkpRTFFieldDelete(pRTF);
}
}
#else
#else // ifdef COMPUTE_RTF_STRING
void HXmlElement::add_value( const char* pcValue, bool /*bRTF*/)
{
this->LinkEndChild( new TiXmlText(pcValue));
}
#endif
#endif // ifdef COMPUTE_RTF_STRING
void HXmlElement::add_value(double dValue, int idecimal)
{
@@ -68,12 +71,14 @@ void HXmlElement::add_value(double dValue, int idecimal)
snprintf(acValue,sizeof(acValue), "%.*f", idecimal, dValue);
return add_value(acValue);
}
void HXmlElement::add_value(int iValue)
{
char acValue[1024];
snprintf(acValue, sizeof(acValue), " %d", iValue);
return add_value(acValue);
}
HXmlElement* HXmlElement::add_element_and_value( char* pcText, const char* pcValue, bool bRTF)
{
HXmlElement* psElement = new HXmlElement(pcText);
@@ -104,9 +109,7 @@ HXmlElement* HXmlElement::add_element_and_value( char* pcText, double dValue, in
return add_element_and_value( pcText, acValue);
}
void HXmlTableRow::add_cell( char* pcText, int span_count)
void HXmlTableRow::add_cell( const char* pcText, int span_count)
{
TiXmlElement* psCell = add_element( "TD");
psCell->LinkEndChild( new TiXmlText(pcText));
@@ -123,8 +126,7 @@ void HXmlTableRow::add_cell( char* pcText, int span_count)
}
}
void HXmlTableRow::add_cell( char* pcText, int row_span, int col_span)
void HXmlTableRow::add_cell( const char* pcText, int row_span, int col_span)
{
TiXmlElement* psCell = add_element( "TD");
psCell->LinkEndChild( new TiXmlText(pcText));
@@ -141,6 +143,7 @@ void HXmlTableRow::add_cell_double( double dValue, int span_count)
snprintf(acValue, sizeof(acValue), "%f", dValue);
add_cell( acValue, span_count);
}
void HXmlTableRow::add_cell_int( int iValue, int span_count)
{
char acValue[1024];
@@ -155,10 +158,7 @@ void HXmlTableRow::add_cell_double_formated( double dValue, int idecimal, int sp
add_cell( acValue, span_count);
}
void HXmlTableRow::add_rtf_cell( char* /*pcText*/, int span_count)
{
add_cell( "rtf", span_count);
}

View File

@@ -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
@@ -42,8 +42,8 @@ public:
~HXmlTableRow() {}
public:
void add_cell( char* pcText, int span_count = 0);
void add_cell( char* pcText, int row_span, int col_span);
void add_cell( const char* pcText, int span_count = 0);
void add_cell( const char* pcText, int row_span, int col_span);
void add_cell_double( double dValue, int span_count = 0);
void add_cell_double_formated( double dValue, int idecimal, int span_count);
void add_cell_int( int iValue, int span_count = 0);

View File

@@ -4,11 +4,11 @@
HXmlReport::HXmlReport()
{
HXmlElement* psXmlElement = new HXmlElement("Root");
HXmlElement* psXmlElement = new HXmlElement("ModelFile");
m_apPath.push_back(psXmlElement);
psXmlElement->SetAttribute("rel", "stylesheet");
m_sDocument.LinkEndChild(psXmlElement);
}
HXmlReport::~HXmlReport()
{
}
@@ -24,6 +24,7 @@ void HXmlReport::SaveFile(const char* pcReportPath, const char* pcXslFile)
// Instead of directly write into file, plug a printer to XML document, to "write" xml in a std::string
TiXmlPrinter printer;
printer.SetIndent("\t");
m_sDocument.Accept(&printer);
// Write xst information + printer string into file
@@ -58,6 +59,7 @@ void HXmlReport::addNode(HXmlElement* psNewNode)
{
if(psNewNode == NULL)
return;
if (m_apPath.empty())
{
//no tree create
@@ -72,6 +74,7 @@ void HXmlReport::createSubNode(const char* pcNameNode)
HXmlElement*psNewNode = new HXmlElement(pcNameNode);
if (psNewNode == NULL)
return;
if (m_apPath.empty())
{
//no tree create
@@ -80,5 +83,4 @@ void HXmlReport::createSubNode(const char* pcNameNode)
m_apPath.back()->LinkEndChild(psNewNode);
m_apPath.push_back(psNewNode);
}

View File

@@ -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

View File

@@ -0,0 +1,17 @@
# Description
This example dumps the feature tree of a model into an XML file.
## Using FeatureHTML.xsl
This XML file is best viewed with a style sheet; please copy FeatureHTML.xsl in your XML output directory for better readability.
As loading a local file with included local ressources now result in CORS errors, one has to set up a local server to perform local testing.
To set up this local server (one of many ways), one has to be placed in the directory including all ressources,
i.e., all XML files and the XSL, then, run "python -m http.server", open Firefox or Chrome, and finally access
the files from http://localhost:8000.
For more information, see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp.
## Details
This implementation was modeled after A3DSDKConverterInternals.h

View File

@@ -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

View File

@@ -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
@@ -34,7 +34,7 @@ A3DStatus A3DModelFileConnector::Traverse(A3DVisitorContainer* psVisitor, bool b
{
psVisitor->SetCurrentPoFather(NULL);
A3DProductOccurrenceConnector sTreeConnector(m_sModelFileData.m_ppPOccurrences[uI]);
if (sTreeConnector.TraversePO(m_sModelFileData.m_ppPOccurrences[uI], psVisitor, bVisitPrototype) != A3D_SUCCESS)
if (sTreeConnector.TraversePO(psVisitor, bVisitPrototype) != A3D_SUCCESS)
return A3D_ERROR;
}
psVisitor->visitLeave(*this);
@@ -42,291 +42,38 @@ A3DStatus A3DModelFileConnector::Traverse(A3DVisitorContainer* psVisitor, bool b
}
// Traversing the assembly Structure
A3DStatus A3DProductOccurrenceConnector::TraversePO(const A3DAsmProductOccurrence* pOccurrence,
A3DVisitorContainer* psVisitor,
bool bVisitPrototype)
A3DStatus A3DProductOccurrenceConnector::TraversePO(A3DVisitorContainer* psVisitor, bool bVisitPrototype)
{
A3DStatus iRet = A3D_SUCCESS;
CHECK_RET(psVisitor->visitEnter(*this));
//Traverse AnnotationEntity
A3DUns32 uI;
#ifdef CONNECT_PMI
A3DUns32 uNbAnnotationEntity = m_sProductOccurrenceData.m_uiAnnotationsSize;
for (uI = 0; uI < uNbAnnotationEntity; uI++)
if (m_sProductOccurrenceData.m_pPrototype != nullptr || m_sProductOccurrenceData.m_pExternalData != nullptr)
{
A3DMkpAnnotationEntityConnector sAnnotationEntityConnector(m_sProductOccurrenceData.m_ppAnnotations[uI]);
sAnnotationEntityConnector.TraverseAnnotationEntity(psVisitor);
}
if (!uNbAnnotationEntity && m_sProductOccurrenceData.m_pPrototype != NULL)
{
A3DAsmProductOccurrence* pProductPrototype = m_sProductOccurrenceData.m_pPrototype;
while (pProductPrototype)
{
A3DAsmProductOccurrenceData sProductPrototypeData;
A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceData, sProductPrototypeData);
CHECK_RET_CALL_A3D_FCTION(A3DAsmProductOccurrenceGet,(pProductPrototype, &sProductPrototypeData));
uNbAnnotationEntity = sProductPrototypeData.m_uiAnnotationsSize;
for (uI = 0; uI < uNbAnnotationEntity; uI++)
{
A3DMkpAnnotationEntityConnector sAnnotationEntityConnector(sProductPrototypeData.m_ppAnnotations[uI]);
sAnnotationEntityConnector.TraverseAnnotationEntity(psVisitor);
}
pProductPrototype = sProductPrototypeData.m_pPrototype;
CHECK_RET_CALL_A3D_FCTION(A3DAsmProductOccurrenceGet,(NULL, &sProductPrototypeData));
}
}
#endif
A3DAsmProductOccurrence* pPo = m_sProductOccurrenceData.m_pPrototype ?
m_sProductOccurrenceData.m_pPrototype : m_sProductOccurrenceData.m_pExternalData;
#ifdef CONNECT_VIEWS
A3DUns32 uNbView = m_sProductOccurrenceData.m_uiViewsSize;
if (!uNbView && m_sProductOccurrenceData.m_pPrototype != NULL)
{
A3DAsmProductOccurrence* pProductPrototype = m_sProductOccurrenceData.m_pPrototype;
while (pProductPrototype)
{
A3DAsmProductOccurrenceData sProductPrototypeData;
A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceData, sProductPrototypeData);
CHECK_RET_CALL_A3D_FCTION(A3DAsmProductOccurrenceGet,(pProductPrototype, &sProductPrototypeData));
uNbView = sProductPrototypeData.m_uiViewsSize;
for (uI = 0; uI < uNbView; uI++)
{
A3DMkpViewConnector sMkpViewConnector(sProductPrototypeData.m_ppViews[uI]);
sMkpViewConnector.TraverseView(psVisitor);
}
pProductPrototype = sProductPrototypeData.m_pPrototype;
CHECK_RET_CALL_A3D_FCTION(A3DAsmProductOccurrenceGet,(NULL, &sProductPrototypeData));
}
A3DProductOccurrenceConnector oPoConnector(pPo);
oPoConnector.TraversePO(psVisitor, bVisitPrototype);
}
else if (uNbView)
else
{
for (uI = 0; uI < uNbView; uI++)
for (A3DUns32 i = 0; i < m_sProductOccurrenceData.m_uiPOccurrencesSize; i++)
{
A3DMkpViewConnector sMkpViewConnector(m_sProductOccurrenceData.m_ppViews[uI]);
sMkpViewConnector.TraverseView(psVisitor);
}
}
A3DAsmProductOccurrence* pPo = m_sProductOccurrenceData.m_ppPOccurrences[i];
A3DProductOccurrenceConnector oPoConnector(pPo);
#endif
#ifdef CONNECT_FEATURE
A3DUns32 uNbFeatureBasedEntity = m_sProductOccurrenceData.m_uiFeatureBasedEntitiesSize;
if (!uNbFeatureBasedEntity && m_sProductOccurrenceData.m_pPrototype != NULL)
{
A3DAsmProductOccurrence* pProductPrototype = m_sProductOccurrenceData.m_pPrototype;
while (pProductPrototype)
{
A3DAsmProductOccurrenceData sProductPrototypeData;
A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceData, sProductPrototypeData);
CHECK_RET(A3DAsmProductOccurrenceGet(pProductPrototype, &sProductPrototypeData));
uNbFeatureBasedEntity = sProductPrototypeData.m_uiFeatureBasedEntitiesSize;
for (uI = 0; uI < uNbFeatureBasedEntity; uI++)
{
A3DFRMTreeConnector sConnector(sProductPrototypeData.m_ppFeatureBasedEntities[uI]);
sConnector.TraverseFeatureTree(psVisitor);
}
pProductPrototype = sProductPrototypeData.m_pPrototype;
CHECK_RET(A3DAsmProductOccurrenceGet(NULL, &sProductPrototypeData));
oPoConnector.TraversePO(psVisitor, bVisitPrototype);
}
}
else if (uNbFeatureBasedEntity)
{
for (uI = 0; uI < uNbFeatureBasedEntity; uI++)
for (A3DUns32 i = 0; i < m_sProductOccurrenceData.m_uiFeatureBasedEntitiesSize; i++)
{
A3DFRMTreeConnector sConnector(m_sProductOccurrenceData.m_ppFeatureBasedEntities[uI]);
A3DFRMTreeConnector sConnector(m_sProductOccurrenceData.m_ppFeatureBasedEntities[i]);
sConnector.TraverseFeatureTree(psVisitor);
}
}
#endif
A3DAsmPartDefinition* pPart = NULL;
if (!bVisitPrototype)
{
CHECK_RET(GetPart(pPart));
}
else
{
pPart = m_sProductOccurrenceData.m_pPart;
}
if (pPart)
{
void * pEntityInMap = psVisitor->FindInMap(pPart);
psVisitor->SetInMap(pPart, pPart);
A3DPartConnector sPartConnector(pPart);
psVisitor->SetCurrentPoFather(pOccurrence);
sPartConnector.SetProductOccurenceFather(pOccurrence);
// if we haven't found the part in the map or if we traverse the instance
if (pEntityInMap == NULL || psVisitor->TraverseInstances())
{
CHECK_RET(sPartConnector.TraversePart(psVisitor));
}
psVisitor->SetCurrentPoFather(NULL);
}
std::vector<A3DAsmProductOccurrence*> apSons;
if (!bVisitPrototype)
{
CollectSons(apSons);
}
else
{
if (m_sProductOccurrenceData.m_pPrototype)
{
if (psVisitor->FindInMap(m_sProductOccurrenceData.m_pPrototype) == NULL)
{
psVisitor->SetInMap(m_sProductOccurrenceData.m_pPrototype, m_sProductOccurrenceData.m_pPrototype);
A3DProductOccurrenceConnector sPrototypeConnector(m_sProductOccurrenceData.m_pPrototype);
sPrototypeConnector.SetPrototypeType(true);
sPrototypeConnector.TraversePO(m_sProductOccurrenceData.m_pPrototype, psVisitor, bVisitPrototype);
}
}
if (m_sProductOccurrenceData.m_pExternalData)
{
if (psVisitor->FindInMap(m_sProductOccurrenceData.m_pExternalData) == NULL)
{
psVisitor->SetInMap(m_sProductOccurrenceData.m_pExternalData, m_sProductOccurrenceData.m_pExternalData);
A3DProductOccurrenceConnector sExternalConnector(m_sProductOccurrenceData.m_pExternalData);
sExternalConnector.SetExternalType(true);
sExternalConnector.TraversePO(m_sProductOccurrenceData.m_pExternalData, psVisitor, bVisitPrototype);
}
}
unsigned int uSize = m_sProductOccurrenceData.m_uiPOccurrencesSize;
for (uI = 0; uI < uSize; uI++)
{
apSons.push_back(m_sProductOccurrenceData.m_ppPOccurrences[uI]);
}
}
for (uI = 0; uI < apSons.size(); uI++)
{
A3DProductOccurrenceConnector sPoConnector(apSons[uI]);
sPoConnector.SetProductOccurrenceFather(this->GetA3DEntity());
psVisitor->SetCurrentPoFather(pOccurrence);
CHECK_RET(sPoConnector.TraversePO(apSons[uI], psVisitor, bVisitPrototype));
psVisitor->SetCurrentPoFather(NULL);
}
CHECK_RET(psVisitor->visitLeave(*this));
return A3D_SUCCESS;
}
A3DStatus A3DProductOccurrenceConnector::CollectSons(
std::vector<A3DAsmProductOccurrence*>& apSons) const
{
//Get Children or children on Prototype's ....Prototype's
A3DAsmProductOccurrence* pPrototype = m_sProductOccurrenceData.m_pPrototype;
A3DAsmProductOccurrence** ppPo = m_sProductOccurrenceData.m_ppPOccurrences;
unsigned int uSize = m_sProductOccurrenceData.m_uiPOccurrencesSize;
A3DStatus iRet = A3D_SUCCESS;
while (uSize == 0 && pPrototype)
{
A3DAsmProductOccurrenceData sPrototypeData;
A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceData, sPrototypeData);
CHECK_RET_CALL_A3D_FCTION(A3DAsmProductOccurrenceGet,(pPrototype, &sPrototypeData));
pPrototype = sPrototypeData.m_pPrototype;
uSize = sPrototypeData.m_uiPOccurrencesSize;
ppPo = sPrototypeData.m_ppPOccurrences;
CHECK_RET_CALL_A3D_FCTION(A3DAsmProductOccurrenceGet,(NULL, &sPrototypeData));
}
unsigned uI;
for (uI = 0; uI < uSize; uI++)
apSons.push_back(ppPo[uI]);
//Get Children on Externals
if (m_sProductOccurrenceData.m_pExternalData)
{
if (apSons.size() == 0)
{
A3DProductOccurrenceConnector sExternalConnector(m_sProductOccurrenceData.m_pExternalData);
CHECK_RET(sExternalConnector.CollectSons(apSons));
}
else
apSons.push_back(m_sProductOccurrenceData.m_pExternalData);
}
return A3D_SUCCESS;
}
A3DStatus A3DProductOccurrenceConnector::GetPart(
A3DAsmPartDefinition*& pPart) const
{
pPart = NULL;
A3DStatus iRet = A3D_SUCCESS;;
if (m_sProductOccurrenceData.m_pPart)
{
pPart = m_sProductOccurrenceData.m_pPart;
return A3D_SUCCESS;
}
A3DAsmProductOccurrence* pProductPrototype = m_sProductOccurrenceData.m_pPrototype;
while (pProductPrototype)
{
A3DAsmProductOccurrenceData sProductPrototypeData;
A3D_INITIALIZE_DATA(A3DAsmProductOccurrenceData, sProductPrototypeData);
CHECK_RET_CALL_A3D_FCTION(A3DAsmProductOccurrenceGet,(pProductPrototype, &sProductPrototypeData));
if (sProductPrototypeData.m_pPart)
{
pPart = sProductPrototypeData.m_pPart;
CHECK_RET_CALL_A3D_FCTION(A3DAsmProductOccurrenceGet,(NULL, &sProductPrototypeData));
return A3D_SUCCESS;
}
else
pProductPrototype = sProductPrototypeData.m_pPrototype;
CHECK_RET_CALL_A3D_FCTION(A3DAsmProductOccurrenceGet,(NULL, &sProductPrototypeData));
}
if (m_sProductOccurrenceData.m_uiPOccurrencesSize == 0)
{
if (m_sProductOccurrenceData.m_pExternalData)
{
A3DProductOccurrenceConnector sExternalconnector(m_sProductOccurrenceData.m_pExternalData);
CHECK_RET(sExternalconnector.GetPart(pPart));
}
}
return A3D_SUCCESS;
}
A3DStatus A3DPartConnector::TraversePart(A3DVisitorContainer* psVisitor) const
{
A3DStatus iRet = A3D_SUCCESS;
CHECK_RET(psVisitor->visitEnter(*this));
//Traverse AnnotationEntity
A3DUns32 uI;
#ifdef CONNECT_PMI
A3DUns32 uNbAnnotationEntity = m_sPartData.m_uiAnnotationsSize;
for (uI = 0; uI < uNbAnnotationEntity; uI++)
{
A3DMkpAnnotationEntityConnector sAnnotationEntityConnector(m_sPartData.m_ppAnnotations[uI]);
sAnnotationEntityConnector.TraverseAnnotationEntity(psVisitor);
}
#endif
#ifdef CONNECT_VIEWS
A3DUns32 uNbView = m_sPartData.m_uiViewsSize;
for (uI = 0; uI < uNbView; uI++)
{
A3DMkpViewConnector sMkpViewConnector(m_sPartData.m_ppViews[uI]);
sMkpViewConnector.TraverseView(psVisitor);
}
#endif
//Traverse RI
for (uI = 0; uI < m_sPartData.m_uiRepItemsSize; uI++)
{
A3DRiConnector sRiConnector(m_sPartData.m_ppRepItems[uI]);
sRiConnector.TraverseRi(psVisitor);
}
CHECK_RET(psVisitor->visitLeave(*this));
return A3D_SUCCESS;
}
@@ -496,7 +243,6 @@ A3DStatus A3DRiPolyWireConnector::TraverseRiPolyWire(A3DVisitorContainer* psVisi
return iRet;
}
// A3DFRMParameter
A3DStatus A3DFRMFeatureConnector::TraverseFeature(A3DVisitorContainer* psVisitor) const
{
@@ -550,7 +296,6 @@ A3DStatus A3DFRMParameterConnector::TraverseParameter(A3DVisitorContainer* psVis
return iRet;
}
// FeatureTree
A3DStatus A3DFRMTreeConnector::TraverseFeatureTree(A3DVisitorContainer* psVisitor) const
{

View File

@@ -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
@@ -16,13 +16,12 @@
#include "Connector.h"
//######################################################################################################################
class A3DVisitorContainer;
class A3DModelFileConnector : public A3DConnector
class A3DModelFileConnector: public A3DConnector
{
public:
A3DModelFileConnector(const A3DAsmModelFile* pModelFile) : A3DConnector(pModelFile)
A3DModelFileConnector(const A3DAsmModelFile* pModelFile): A3DConnector(pModelFile)
{
A3D_INITIALIZE_DATA(A3DAsmModelFileData, m_sModelFileData);
A3DAsmModelFileGet(pModelFile, &m_sModelFileData);
@@ -33,12 +32,11 @@ public:
A3DStatus Traverse(A3DVisitorContainer* psVisitor, bool bVisitPrototype = false);
public:
A3DAsmModelFileData m_sModelFileData;
};
//######################################################################################################################
class A3DProductOccurrenceConnector : public A3DConnector
class A3DProductOccurrenceConnector: public A3DConnector
{
friend class A3DModelFileConnector;
const A3DAsmProductOccurrence* m_pFather;
@@ -47,9 +45,8 @@ class A3DProductOccurrenceConnector : public A3DConnector
bool m_bIsExternal;
private:
A3DProductOccurrenceConnector(const A3DAsmProductOccurrence* pProductOccurrence)
: A3DConnector(pProductOccurrence)
A3DProductOccurrenceConnector(const A3DAsmProductOccurrence* pProductOccurrence):
A3DConnector(pProductOccurrence)
{
m_pFather = NULL;
m_bIsInstanciated = false;
@@ -59,16 +56,13 @@ private:
m_bIsExternal = false;
}
~A3DProductOccurrenceConnector() { A3DAsmProductOccurrenceGet(NULL, &m_sProductOccurrenceData); }
~A3DProductOccurrenceConnector() { A3DAsmProductOccurrenceGet(NULL, &m_sProductOccurrenceData); }
A3DStatus TraversePO(const A3DAsmProductOccurrence* pOccurrence, A3DVisitorContainer* psVisitor, bool bVisitPrototype = false);
A3DStatus TraversePO(A3DVisitorContainer* psVisitor, bool bVisitPrototype = false);
void SetProductOccurrenceFather(const A3DAsmProductOccurrence* pFather) { m_pFather = pFather; }
public:
A3DStatus GetPart(A3DAsmPartDefinition*& pPart) const;
A3DStatus CollectSons(std::vector<A3DAsmProductOccurrence*>& apSons) const;
A3DAsmProductOccurrenceData m_sProductOccurrenceData;
const A3DAsmProductOccurrence* GetProductOccurrenceFather() { return m_pFather; }
void SetIsInstanciated(bool bIsInstanciated) { m_bIsInstanciated = bIsInstanciated; }
@@ -80,47 +74,13 @@ public:
};
//######################################################################################################################
class A3DPartConnector : public A3DConnector
class A3DRiConnector: public A3DConnector
{
friend class A3DProductOccurrenceConnector;
const A3DAsmProductOccurrence* m_pFather;
bool m_bIsInstanciated;
private:
A3DPartConnector(const A3DAsmPartDefinition *pPart) : A3DConnector(pPart)
{
m_pFather = NULL;
m_bIsInstanciated = false;
A3D_INITIALIZE_DATA(A3DAsmPartDefinitionData, m_sPartData);
A3DAsmPartDefinitionGet(pPart, &m_sPartData);
}
~A3DPartConnector()
{
A3DAsmPartDefinitionGet(NULL, &m_sPartData);
}
void SetProductOccurenceFather(const A3DAsmProductOccurrence* pFather) { m_pFather = pFather; }
public:
A3DStatus TraversePart(A3DVisitorContainer* psVisitor) const;
A3DAsmPartDefinitionData m_sPartData;
const A3DAsmProductOccurrence* GetProductOccurenceFather() { return m_pFather; }
void SetIsInstanciated(bool bIsInstanciated) { m_bIsInstanciated = bIsInstanciated; }
bool IsInstanciated() { return m_bIsInstanciated; }
};
//######################################################################################################################
class A3DRiConnector : public A3DConnector
{
friend class A3DPartConnector;
friend class A3DRiSetConnector;
bool m_bIsInstanciated;
public:
A3DRiConnector(const A3DRiRepresentationItem *pRi) : A3DConnector(pRi)
A3DRiConnector(const A3DRiRepresentationItem *pRi): A3DConnector(pRi)
{
m_bIsInstanciated = false;
A3D_INITIALIZE_DATA(A3DRiRepresentationItemData, m_sRiData);
@@ -132,22 +92,23 @@ public:
A3DRiRepresentationItemGet(NULL, &m_sRiData);
}
A3DStatus TraverseRi(A3DVisitorContainer* psVisitor);
A3DStatus TraverseRi(A3DVisitorContainer* psVisitor);
public:
A3DRiRepresentationItemData m_sRiData;
void SetIsInstanciated(bool bIsInstanciated) { m_bIsInstanciated = bIsInstanciated; }
bool IsInstanciated() { return m_bIsInstanciated; }
bool IsInstanciated() { return m_bIsInstanciated; }
};
//######################################################################################################################
class A3DRiBrepModelConnector : public A3DConnector
class A3DRiBrepModelConnector: public A3DConnector
{
friend class A3DRiConnector;
public:
A3DRiBrepModelConnector(const A3DRiBrepModel *pRi) : m_pRiBrepModel(pRi), A3DConnector(pRi)
public:
A3DRiBrepModelConnector(const A3DRiBrepModel *pRi):
m_pRiBrepModel(pRi),
A3DConnector(pRi)
{
A3D_INITIALIZE_DATA(A3DRiBrepModelData, m_sRiBrepModelData);
A3DRiBrepModelGet(m_pRiBrepModel, &m_sRiBrepModelData);
@@ -166,12 +127,12 @@ public:
};
//######################################################################################################################
class A3DRiSetConnector : public A3DConnector
class A3DRiSetConnector: public A3DConnector
{
friend class A3DRiConnector;
private:
A3DRiSetConnector(const A3DRiSet *pRi) : A3DConnector(pRi)
private:
A3DRiSetConnector(const A3DRiSet *pRi): A3DConnector(pRi)
{
A3D_INITIALIZE_DATA(A3DRiSetData, m_sRiSetData);
A3DRiSetGet(pRi, &m_sRiSetData);
@@ -182,20 +143,19 @@ private:
A3DRiSetGet(NULL, &m_sRiSetData);
}
A3DStatus TraverseRiSet(A3DVisitorContainer* psVisitor);
A3DStatus TraverseRiSet(A3DVisitorContainer* psVisitor);
public:
A3DRiSetData m_sRiSetData;
};
//######################################################################################################################
class A3DPolyRiBrepModelConnector : public A3DConnector
class A3DPolyRiBrepModelConnector: public A3DConnector
{
friend class A3DRiConnector;
private:
A3DPolyRiBrepModelConnector(const A3DRiPolyBrepModel* pRi) : A3DConnector(pRi)
private:
A3DPolyRiBrepModelConnector(const A3DRiPolyBrepModel* pRi): A3DConnector(pRi)
{
A3D_INITIALIZE_DATA(A3DRiPolyBrepModelData, m_sRiPolyBrepModelData);
A3DRiPolyBrepModelGet(pRi, &m_sRiPolyBrepModelData);
@@ -212,12 +172,12 @@ public:
};
//######################################################################################################################
class A3DRiCurveConnector : public A3DConnector
class A3DRiCurveConnector: public A3DConnector
{
friend class A3DRiConnector;
private:
A3DRiCurveConnector(const A3DRiCurve* pRi) : A3DConnector(pRi)
private:
A3DRiCurveConnector(const A3DRiCurve* pRi): A3DConnector(pRi)
{
A3D_INITIALIZE_DATA(A3DRiCurveData, m_sRiCurveData);
A3DRiCurveGet(pRi, &m_sRiCurveData);
@@ -231,17 +191,16 @@ private:
A3DStatus TraverseRiCurve(A3DVisitorContainer* psVisitor);
public:
A3DRiCurveData m_sRiCurveData;
};
//######################################################################################################################
class A3DRiPolyWireConnector : public A3DConnector
class A3DRiPolyWireConnector: public A3DConnector
{
friend class A3DRiConnector;
private:
A3DRiPolyWireConnector(const A3DRiPolyWire* pRi) : A3DConnector(pRi)
private:
A3DRiPolyWireConnector(const A3DRiPolyWire* pRi): A3DConnector(pRi)
{
A3D_INITIALIZE_DATA(A3DRiPolyWireData, m_sRiPolyWireData);
A3DRiPolyWireGet(pRi, &m_sRiPolyWireData);
@@ -255,18 +214,17 @@ private:
A3DStatus TraverseRiPolyWire(A3DVisitorContainer* psVisitor);
public:
A3DRiPolyWireData m_sRiPolyWireData;
};
//######################################################################################################################
class A3DFRMParameterConnector : public A3DConnector
class A3DFRMParameterConnector: public A3DConnector
{
friend class A3DFRMTreeConnector;
friend class A3DFRMFeatureConnector;
private:
A3DFRMParameterConnector(const A3DFRMParameter *pParameter) : A3DConnector(pParameter)
private:
A3DFRMParameterConnector(const A3DFRMParameter *pParameter): A3DConnector(pParameter)
{
A3D_INITIALIZE_DATA(A3DFRMParameterData, m_sData);
A3DFRMParameterGet(pParameter, &m_sData);
@@ -277,22 +235,19 @@ private:
A3DFRMParameterGet(NULL, &m_sData);
}
public:
A3DFRMParameterData m_sData;
A3DStatus TraverseParameter(A3DVisitorContainer* psVisitor) const;
A3DStatus TraverseParameter(A3DVisitorContainer* psVisitor) const;
};
//######################################################################################################################
class A3DFRMLinkedItemConnector : public A3DConnector
class A3DFRMLinkedItemConnector: public A3DConnector
{
friend class A3DFRMFeatureConnector;
private:
A3DFRMLinkedItemConnector(const A3DFRMLinkedItem *pLinkedItem) : A3DConnector(pLinkedItem)
private:
A3DFRMLinkedItemConnector(const A3DFRMLinkedItem *pLinkedItem): A3DConnector(pLinkedItem)
{
A3D_INITIALIZE_DATA(A3DFRMLinkedItemData, m_sData);
A3DFRMLinkedItemGet(pLinkedItem, &m_sData);
@@ -303,22 +258,19 @@ private:
A3DFRMLinkedItemGet(NULL, &m_sData);
}
public:
A3DFRMLinkedItemData m_sData;
A3DStatus TraverseConnection(A3DVisitorContainer* psVisitor) const;
A3DStatus TraverseConnection(A3DVisitorContainer* psVisitor) const;
};
//######################################################################################################################
class A3DFRMFeatureConnector : public A3DConnector
class A3DFRMFeatureConnector: public A3DConnector
{
friend class A3DFRMParameterConnector;
private:
A3DFRMFeatureConnector(const A3DFRMFeature *pFeature) : A3DConnector(pFeature)
private:
A3DFRMFeatureConnector(const A3DFRMFeature *pFeature): A3DConnector(pFeature)
{
A3D_INITIALIZE_DATA(A3DFRMFeatureData, m_sData);
A3DFRMFeatureGet(pFeature, &m_sData);
@@ -329,22 +281,19 @@ private:
A3DFRMFeatureGet(NULL, &m_sData);
}
public:
A3DFRMFeatureData m_sData;
A3DStatus TraverseFeature(A3DVisitorContainer* psVisitor) const;
A3DStatus TraverseFeature(A3DVisitorContainer* psVisitor) const;
};
//######################################################################################################################
class A3DFRMTreeConnector : public A3DConnector
{
friend class A3DProductOccurrenceConnector;
protected:
A3DFRMTreeConnector(const A3DFRMTree *pTree) : A3DConnector(pTree)
protected:
A3DFRMTreeConnector(const A3DFRMTree *pTree): A3DConnector(pTree)
{
A3D_INITIALIZE_DATA(A3DFRMTreeData, m_sTreeData);
A3DFRMTreeGet(pTree, &m_sTreeData);
@@ -355,10 +304,10 @@ protected:
A3DFRMTreeGet(NULL, &m_sTreeData);
}
A3DStatus TraverseFeatureTree(A3DVisitorContainer* psVisitor) const;
A3DStatus TraverseFeatureTree(A3DVisitorContainer* psVisitor) const;
public:
A3DFRMTreeData m_sTreeData;
};
#endif
#endif // A3D_TREE_CONNECTOR

View File

@@ -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
@@ -115,8 +115,6 @@ A3DStatus A3DVisitorContainer::visitEnter(const A3DProductOccurrenceConnector& s
return iRet;
}
A3DStatus A3DVisitorContainer::visitEnter(const A3DPartConnector& sConnector)
VISITENTER
A3DStatus A3DVisitorContainer::visitEnter(const A3DRiConnector& sConnector)
VISITENTER
A3DStatus A3DVisitorContainer::visitEnter(const A3DRiBrepModelConnector& sConnector)
@@ -151,8 +149,6 @@ A3DStatus A3DVisitorContainer::visitLeave(const A3DProductOccurrenceConnector& s
return A3D_SUCCESS;
}
A3DStatus A3DVisitorContainer::visitLeave(const A3DPartConnector& sConnector)
VISITLEAVE
A3DStatus A3DVisitorContainer::visitLeave(const A3DRiConnector& sConnector)
VISITLEAVE
A3DStatus A3DVisitorContainer::visitLeave(const A3DRiBrepModelConnector& sConnector)
@@ -451,7 +447,7 @@ void* A3DVisitorContainer::FindInMap(const A3DEntity* pA3DEntity)
void A3DVisitorContainer::SetInMap(const A3DEntity* pA3DEntity, void* pYourEntity)
{
m_apA3DEntityYourEntityMap.insert(std::pair<const A3DEntity*, void*>(pA3DEntity, pYourEntity));
m_apA3DEntityYourEntityMap.emplace(pA3DEntity, pYourEntity);
}
A3DVisitor* A3DVisitorContainer::GetVisitorByName( std::string strName )

View File

@@ -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
@@ -101,15 +101,11 @@ public:
virtual A3DStatus visitLeave(const A3DModelFileConnector& sConnector);
virtual A3DStatus visitEnter(const A3DProductOccurrenceConnector& sConnector);
virtual A3DStatus visitLeave(const A3DProductOccurrenceConnector& sConnector);
virtual A3DStatus visitEnter(const A3DPartConnector& sConnector);
virtual A3DStatus visitLeave(const A3DPartConnector& sConnector);
virtual A3DStatus visitLeave(const A3DProductOccurrenceConnector& sConnector);
virtual A3DStatus visitEnter(const A3DRiConnector& sConnector);
virtual A3DStatus visitLeave(const A3DRiConnector& sConnector);
virtual A3DStatus visitEnter(const A3DRiBrepModelConnector& sConnector);
virtual A3DStatus visitLeave(const A3DRiBrepModelConnector& sConnector);

View File

@@ -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
@@ -41,16 +41,6 @@ A3DStatus A3DTreeVisitor::visitLeave(const A3DRiConnector& /*sConnector*/)
return A3D_SUCCESS;
}
A3DStatus A3DTreeVisitor::visitEnter(const A3DPartConnector& /*sConnector*/)
{
return A3D_SUCCESS;
}
A3DStatus A3DTreeVisitor::visitLeave(const A3DPartConnector& /*sConnector*/)
{
return A3D_SUCCESS;
}
A3DStatus A3DTreeVisitor::visitEnter(const A3DProductOccurrenceConnector& sConnector)
{
if(m_uOption&NODE_INSTANCES)

View File

@@ -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
@@ -44,9 +44,6 @@ public:
virtual A3DStatus visitEnter(const A3DRiConnector& sConnector);
virtual A3DStatus visitLeave(const A3DRiConnector& sConnector);
virtual A3DStatus visitEnter(const A3DPartConnector& sConnector );
virtual A3DStatus visitLeave(const A3DPartConnector& sConnector);
virtual A3DStatus visitEnter(const A3DProductOccurrenceConnector& sConnector);
virtual A3DStatus visitLeave(const A3DProductOccurrenceConnector& sConnector);

View File

@@ -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
@@ -99,9 +99,6 @@ public :
virtual A3DStatus visitEnter(const A3DProductOccurrenceConnector& /*sConnector*/) { return A3D_SUCCESS; }
virtual A3DStatus visitLeave(const A3DProductOccurrenceConnector& /*sConnector*/) { return A3D_SUCCESS; }
virtual A3DStatus visitEnter(const A3DPartConnector& /*sConnector*/) { return A3D_SUCCESS; }
virtual A3DStatus visitLeave(const A3DPartConnector& /*sConnector*/) { return A3D_SUCCESS; }
virtual A3DStatus visitEnter(const A3DRiConnector& /*sConnector*/) { return A3D_SUCCESS; }
virtual A3DStatus visitLeave(const A3DRiConnector& /*sConnector*/) { return A3D_SUCCESS; }