2025.6.1
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
/***********************************************************************************************************************
|
||||
*
|
||||
* 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
|
||||
* employees of Tech Soft 3D, Inc. is granted only under a written non-disclosure agreement, expressly prescribing the
|
||||
* of unauthorized use or misappropriation of its trade secrets. Use of this information by anyone other than authorized
|
||||
* employees of Tech Soft 3D, Inc. is granted only under a written non-disclosure agreement, expressly prescribing the
|
||||
* scope and manner of such use.
|
||||
*
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#include <hoops_license.h>
|
||||
|
||||
#define _CRTDBG_MAP_ALLOC
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -21,7 +23,8 @@ A3DStatus ProcessFile(
|
||||
A3DSDKHOOPSExchangeLoader& sHoopsExchangeLoader,
|
||||
A3DImport& sImport,
|
||||
const MY_CHAR* pcPRCFile,
|
||||
const MY_CHAR* pcXMLFile);
|
||||
const MY_CHAR* pcXMLFile,
|
||||
bool bDumpPictures);
|
||||
|
||||
//######################################################################################################################
|
||||
// Main function
|
||||
@@ -31,34 +34,27 @@ int wmain(A3DInt32 iArgc, wchar_t** ppcArgv)
|
||||
int main(A3DInt32 iArgc, A3DUTF8Char** ppcArgv)
|
||||
#endif
|
||||
{
|
||||
//
|
||||
// ### COMMAND LINE ARGUMENTS
|
||||
//
|
||||
MY_CHAR acSrcFileName[_MAX_PATH * 2] = { '\0' };
|
||||
MY_CHAR acDstFileName[_MAX_PATH * 2] = { '\0' };
|
||||
MY_CHAR acLogFileName[_MAX_PATH * 2] = { '\0' };
|
||||
|
||||
if (iArgc > 4)
|
||||
unsigned uPrc2xmlFlagArgs(EMPTY);
|
||||
if (!ParseArgs(iArgc, ppcArgv, acSrcFileName, acDstFileName, acLogFileName, uPrc2xmlFlagArgs))
|
||||
{
|
||||
MY_PRINTF2("Usage:\n %s [input CAD file] [output XML file] [output LOG file]\n", ppcArgv[0]);
|
||||
MY_PRINTF(" Default output XML file is [input CAD file].xml\n");
|
||||
MY_PRINTF(" Default output LOG file is [output XML file]_Log.txt\n\n");
|
||||
ShowUsage(ppcArgv);
|
||||
return A3D_ERROR;
|
||||
}
|
||||
|
||||
MY_CHAR acSrcFileName[_MAX_PATH * 2];
|
||||
MY_CHAR acDstFileName[_MAX_PATH * 2];
|
||||
MY_CHAR acLogFileName[_MAX_PATH * 2];
|
||||
|
||||
if (iArgc > 1) MY_STRCPY(acSrcFileName, ppcArgv[1]);
|
||||
else MY_STRCPY(acSrcFileName, DEFAULT_INPUT_CAD);
|
||||
if (iArgc > 2) MY_STRCPY(acDstFileName, ppcArgv[2]);
|
||||
else MY_SPRINTF(acDstFileName, "%s.xml", acSrcFileName);
|
||||
if (iArgc > 3) MY_STRCPY(acLogFileName, ppcArgv[3]);
|
||||
else MY_SPRINTF(acLogFileName, "%s_Log.txt", acDstFileName);
|
||||
GetLogFile(acLogFileName); // Initialize log file
|
||||
|
||||
//
|
||||
// ### INITIALIZE HOOPS EXCHANGE
|
||||
//
|
||||
|
||||
A3DSDKHOOPSExchangeLoader sHoopsExchangeLoader(_T(HOOPS_BINARY_DIRECTORY));
|
||||
A3DSDKHOOPSExchangeLoader sHoopsExchangeLoader(_T(HOOPS_BINARY_DIRECTORY), HOOPS_LICENSE);
|
||||
CHECK_RET(sHoopsExchangeLoader.m_eSDKStatus);
|
||||
|
||||
// Initialize callbacks
|
||||
@@ -71,7 +67,18 @@ int main(A3DInt32 iArgc, A3DUTF8Char** ppcArgv)
|
||||
|
||||
A3DImport sImport(acSrcFileName); // see A3DSDKInternalConvert.hxx for import and export detailed parameters
|
||||
|
||||
ProcessFile(sHoopsExchangeLoader, sImport, acSrcFileName, acDstFileName);
|
||||
//args utilisation
|
||||
bool bDumpPictures = false;
|
||||
if (DUMPPICTURES & uPrc2xmlFlagArgs)
|
||||
{
|
||||
bDumpPictures = true;
|
||||
}
|
||||
if (DUMPRELATIONSHIPS & uPrc2xmlFlagArgs)
|
||||
{
|
||||
sImport.m_sLoadData.m_sSpecifics.m_sIFC.m_bReadRelationships = true;
|
||||
}
|
||||
|
||||
ProcessFile(sHoopsExchangeLoader, sImport, acSrcFileName, acDstFileName, bDumpPictures);
|
||||
|
||||
//
|
||||
// ### TERMINATE HOOPS EXCHANGE
|
||||
|
||||
Reference in New Issue
Block a user