using System;
namespace progress_bar
{
class Program
{
static int Main(string[] args)
{
if (args.Length != 1)
{
Console.WriteLine("Usage: " + System.Reflection.Assembly.GetExecutingAssembly().Location
+ " <input_file>, where:");
Console.WriteLine(" <input_file> is a name of the file to be read");
return 1;
}
string aKey = MTKLicenseKey.Value();
if (!LicenseHelper.SetupRuntimeKey())
{
return 1;
}
try
{
}
{
Console.WriteLine(
"Failed to activate Manufacturing Toolkit license: " + theException.
what());
return 1;
}
UTF16String aSource = new UTF16String(args[0]);
ProgressBarObserver anObserver = new ProgressBarObserver();
anObserver.SetAllNotifyingThreads();
{
{
{
aReader.
SetProgressStatus(aStatus);
aReader.
Read(aSource, aModel);
}
{
{
MeshGenerator aMesher = new MeshGenerator();
aMesher.SetProgressStatus(aStatus);
aMesher.Generate(aModel);
}
}
}
}
return 0;
}
{
{
Console.WriteLine(theInfo.
Value() +
"%");
}
{
Console.WriteLine(theInfo.
Value() +
"%: complete!");
}
};
}
}
Provides MTK data model.
Definition Model.hxx:39
bool IsEmpty() const
Returns true if the model is empty.
Definition Model.cxx:174
Reads supported formats, see Import section.
Definition ModelReader.hxx:32
bool Read(const UTF16String &theFilePath, ModelData::Model &theModel)
Reads the file at the specified path into the specified model.
Definition ModelReader.cxx:358
Represents a node in a hierarchy of progress scopes.
Definition ProgressScope.hxx:36
Provides progress status and notification mechanism.
Definition ProgressStatus.hxx:31
double Value() const
Returns a current value.
Definition ProgressStatus.cxx:137
bool WasCanceled() const
Returns true if the operation has been canceled.
Definition ProgressStatus.cxx:214
void Register(Observer &theObserver, double theValueThreshold=0.1f, unsigned int theTimeThreshold=20U)
Adds an observer that will be notified when the progress status has changed.
Definition ProgressStatus.cxx:157
Defines an exception thrown by a license manager when a valid license could not be acquired.
Definition LicenseError.hxx:37
const char * what() const noexcept override
Returns an error string.
Definition LicenseError.cxx:50
Provides MTK licensing activation and deactivation API.
Definition LicenseManager.hxx:33
static bool Deactivate()
Closes the active licensing session.
Definition LicenseManager.cxx:619
static bool Activate(const std::string &theDeveloperKey)
Activates MTK licensing using the development license key.
Definition LicenseManager.cxx:190
Contains classes and functions related to model processing.
Defines classes, types, enums, and functions related to topological entities and scene graph elements...
The mtk namespace is intended to become the primary namespace for MTK and replace direct use of the c...
Definition LicenseError.hxx:27
Contains classes, namespaces, enums, types, and global functions related to Manufacturing Toolkit.
Definition LicenseError.hxx:27