Init
This commit is contained in:
154
exchange/exchangesource/NetWrapper/Translation.h
Normal file
154
exchange/exchangesource/NetWrapper/Translation.h
Normal file
@@ -0,0 +1,154 @@
|
||||
/***********************************************************************************************************************
|
||||
*
|
||||
* Copyright (c) 2010 - 2022 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
|
||||
* scope and manner of such use.
|
||||
*
|
||||
***********************************************************************************************************************/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
using namespace System;
|
||||
using namespace System::Collections::Generic;
|
||||
|
||||
|
||||
namespace TechSoft3D
|
||||
{
|
||||
namespace HOOPS
|
||||
{
|
||||
/// <summary>
|
||||
/// Class wrapping the HOOPS Exchange DLL.
|
||||
/// </summary>
|
||||
public ref class Exchange
|
||||
{
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Callback functions indicating what's starting: iStart == 1: Parsing CAD File
|
||||
/// iStart == 2: Reading CAD File
|
||||
/// iStart == 3: Writing Parasolid File
|
||||
/// </summary>
|
||||
delegate void CallbackStart(int iStart);
|
||||
|
||||
/// <summary>
|
||||
/// Callback function giving the name of the file being converted. Useful when managing assemblies.
|
||||
/// </summary>
|
||||
delegate void CallbackTitle(String^ sTitle);
|
||||
|
||||
/// <summary>
|
||||
/// Callback function giving the size of the progress bar.
|
||||
/// </summary>
|
||||
|
||||
delegate void CallbackSize(int iSize);
|
||||
/// <summary>
|
||||
/// Callback function giving the current position in the progress bar the positions relative to iSize (provided by CallbackSize).
|
||||
/// </summary>
|
||||
delegate void CallbackIncrement(int iIncr);
|
||||
|
||||
/// <summary>
|
||||
/// Callback function indicating the end of a reading/parsing/writing phase.
|
||||
/// </summary>
|
||||
delegate void CallbackEnd(void);
|
||||
|
||||
/// <summary>
|
||||
/// Callback function reporting messages.
|
||||
/// </summary>
|
||||
delegate int CallbackReportMessage(String^ pMsg);
|
||||
|
||||
/// <summary>
|
||||
/// Callback function reporting warning messages.
|
||||
/// </summary>
|
||||
delegate int CallbackReportWarning(String^ pCode,String^ pMsg);
|
||||
|
||||
/// <summary>
|
||||
/// Callback function reporting error messages.
|
||||
/// </summary>
|
||||
delegate int CallbackReportError(String^ pCode,String^ pMsg);
|
||||
|
||||
/// <summary>
|
||||
/// Load HOOPS Exchange DLL and check if the license is valid.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// true if DLL has been loaded and the license is valid.
|
||||
/// </returns>
|
||||
bool Init();
|
||||
Exchange();
|
||||
~Exchange();
|
||||
!Exchange();
|
||||
|
||||
/// <summary>
|
||||
/// Determine if a file is a ProeFile
|
||||
/// </summary>
|
||||
bool IsProEFile(String^ path);
|
||||
|
||||
/// <summary>
|
||||
/// Function setting the unit in mm. The default value is 1000 as Parasolid files are usually in meters.
|
||||
/// </summary>
|
||||
void SetUnit(double dUnit);
|
||||
|
||||
/// <summary>
|
||||
/// Function to define a log file
|
||||
/// </summary>
|
||||
void SetLogFile(String^ LogFileName);
|
||||
|
||||
/// <summary>
|
||||
/// Convert any CAD file into XT file.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// true if both reading and writing succeeded.
|
||||
/// </returns>
|
||||
bool ConvertToXT(String^ sourceFileName, String^ destinationFileName, IDictionary<String^,String^>^ sOptions);
|
||||
|
||||
/// <summary>
|
||||
/// Break the conversion.
|
||||
/// </summary>
|
||||
void Break();
|
||||
|
||||
/// <summary>
|
||||
/// Set callback functions to manage a progress bar.
|
||||
/// </summary>
|
||||
/// <param>
|
||||
/// fctStart: Function called when the parsing or reading or writing phase of a file is starting.
|
||||
/// fctTitle: Function called when a new file is being loaded.
|
||||
/// fctSize: Function called during conversion that gives the size of the progress bar.
|
||||
/// fctIncr: Function called during conversion that gives the position in the progress bar.
|
||||
/// </param>
|
||||
void SetCallBackFct(CallbackStart^ fctStart,CallbackTitle^ fctTitle, CallbackSize^ stm_pFCTSize, CallbackIncrement^ fctIncr, CallbackEnd^ fctEnd);
|
||||
|
||||
/// <summary>
|
||||
/// Set callback functions to manage a progress bar.
|
||||
/// </summary>
|
||||
/// <param>
|
||||
/// fctStart: Function called when the parsing or reading or writing phase of a file is starting.
|
||||
/// fctTitle: Function called when a new file is being loaded.
|
||||
/// fctSize: Function called during conversion that gives the size of the progress bar.
|
||||
/// fctIncr: Function called during conversion that gives the position in the progress bar.
|
||||
/// </param>
|
||||
void SetCallBackMessageFct(CallbackReportMessage^ fctReportMessage,CallbackReportWarning^ fctReportWarning, CallbackReportError^ fctReportError);
|
||||
|
||||
static CallbackStart^ stm_pFCTStart;
|
||||
static CallbackTitle^ stm_pFCTTitle;
|
||||
static CallbackSize^ stm_pFCTSize;
|
||||
static CallbackIncrement^ stm_pFCTIncr;
|
||||
static CallbackEnd^ stm_pFCTEnd;
|
||||
|
||||
static CallbackReportMessage^ stm_pFctReportMessage;
|
||||
static CallbackReportWarning^ stm_pFctReportWarning;
|
||||
static CallbackReportError^ stm_pFctReportError;
|
||||
|
||||
private:
|
||||
|
||||
void Terminate();
|
||||
|
||||
void SetLoadParametersOptions(A3DRWParamsLoadData & sLoadParametersData, IDictionary<String^, String^>^ sOptions);
|
||||
|
||||
double m_dUnit;
|
||||
|
||||
bool m_bBreakTranslation;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user