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

@@ -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
@@ -24,6 +24,7 @@ Then it creates one PRC per file. Finally the full model is reloaded in memory f
#define INITIALIZE_A3D_API
#include <A3DSDKIncludes.h>
#include <hoops_license.h>
#include "../common.hpp"
@@ -99,7 +100,7 @@ int main(A3DInt32 iArgc, A3DUTF8Char** ppcArgv)
if (iArgc > 4)
{
MY_PRINTF2("Usage:\n %s [input CAD file] [output PRC directory] [output LOG file]\n", ppcArgv[0]);
MY_PRINTF(" Default output PRC directory is the same as [input CAD file]\n");
MY_PRINTF(" Default output PRC directory is 'CURRENT_DIR'\n");
MY_PRINTF(" Default output LOG file is [input CAD file]_Log.txt\n\n");
return A3D_ERROR;
}
@@ -116,7 +117,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);
// Initialize callbacks
@@ -188,7 +189,7 @@ int main(A3DInt32 iArgc, A3DUTF8Char** ppcArgv)
sSubImport.m_sLoadData.m_sIncremental.m_bLoadNoDependencies = true;
A3DExport sExport(acPrcFilePath[uI]); // see A3DSDKInternalConvert.hxx for import and export detailed parameters
iRet = sHoopsExchangeLoader.Convert(sSubImport, sExport);
TEST_RET(sHoopsExchangeLoader.Convert(sSubImport, sExport));
}
//Convert CAD part files to PRC
@@ -223,7 +224,7 @@ int main(A3DInt32 iArgc, A3DUTF8Char** ppcArgv)
sSubImport.m_sLoadData.m_sIncremental.m_bLoadNoDependencies = true;
A3DExport sExport(acPrcFilePath[uI + uNbAssembly]); // see A3DSDKInternalConvert.hxx for import and export detailed parameters
iRet = sHoopsExchangeLoader.Convert(sSubImport, sExport);
TEST_RET(sHoopsExchangeLoader.Convert(sSubImport, sExport));
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -252,9 +253,9 @@ int main(A3DInt32 iArgc, A3DUTF8Char** ppcArgv)
sprintf(acRootPrcFilePath, "%s/%s.prc", &acDstPathName[0], acName);
#endif
iRet = A3DAsmModelFileLoadFromPRCFiles(&acRootPrcFilePath[0], uNbPart + uNbAssembly,
CHECK_RET(A3DAsmModelFileLoadFromPRCFiles(&acRootPrcFilePath[0], uNbPart + uNbAssembly,
(const A3DUTF8Char**)acPrcFilePath, (const A3DUTF8Char**)acCADFilePath, &sParamsLoadData,
&(sHoopsExchangeLoader.m_psModelFile));
&(sHoopsExchangeLoader.m_psModelFile)));
A3DAsmGetFilesPathFromModelFile(NULL, &uNbPart, &ppPart, &uNbAssembly, &ppAssembly, &uNbMissing, &ppMissing);