using System;
namespace progress_bar
{
class Program
{
static int Main(string[] args)
{
string aKey = MTKLicenseKey.Value();
if (!LicenseManager.Activate(aKey))
{
Console.WriteLine("Failed to activate Manufacturing Toolkit license.");
return 1;
}
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;
}
ProgressBarObserver anObserver = new ProgressBarObserver();
anObserver.SetAllNotifyingThreads();
{
{
{
aReader.
SetProgressStatus(aStatus);
aReader.
Read(aSource, aModel);
}
{
{
aMesher.
SetProgressStatus(aStatus);
}
}
}
}
return 0;
}
{
{
Console.WriteLine(theInfo.
Value() +
"%");
}
{
Console.WriteLine(theInfo.
Value() +
"%: complete!");
}
};
}
}
Generates a polygonal mesh for a B-Rep body.
Definition MeshGenerator.hxx:39
void Generate(const ModelData::Model &theModel, bool theEnforceGeneration=true) const
Definition MeshGenerator.cxx:363
Provides MTK data model.
Definition Model.hxx:40
bool IsEmpty() const
Returns true if the model is empty.
Definition Model.cxx:173
Reads supported formats, see Import section.
Definition ModelReader.hxx:33
bool Read(const UTF16String &theFilePath, ModelData::Model &theModel)
Reads the file at the specified path into the specified model.
Definition ModelReader.cxx:266
Represents a node in a hierarchy of progress scopes.
Definition ProgressScope.hxx:35
Provides progress status and notification mechanism.
Definition ProgressStatus.hxx:32
double Value() const
Returns a current value.
Definition ProgressStatus.cxx:237
bool WasCanceled() const
Returns true if the operation has been canceled.
Definition ProgressStatus.cxx:316
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:257
Defines a Unicode (UTF-16) string wrapping a standard string.
Definition UTF16String.hxx:30
Contains classes, and functions related to model processing.
Defines classes, types, enums, and functions related to topological entities and scene graph elements...
Contains classes, namespaces, enums, types, and global functions related to Manufacturing Toolkit.
Definition LicenseManager_LicenseError.hxx:30