using System;
namespace progress_bar
{
class Program
{
static int Main(string[] args)
{
string aKey = MTKLicenseKey.Value();
{
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!");
}
};
}
}
Activates the license key.
Definition LicenseManager.cs:48
Computes a bounding box for theShape, takes its maximum dimension and multiplies by thePrec.
Definition MeshGenerator.cs:36
void Generate(cadex.ModelData.Model theModel, bool theEnforceGeneration)
Generates a mesh for the model.
Definition MeshGenerator.cs:94
Provides MTK data model.
Definition Model.cs:31
bool IsEmpty()
Returns true if the model has no roots, i.e.
Definition Model.cs:100
Reads supported formats, see Import section.
Definition ModelReader.cs:17
bool Read(cadex.UTF16String theFilePath, cadex.ModelData.Model theModel)
Reads the file at the specified path into the specified model.
Definition ModelReader.cs:82
Represents a node in a hierarchy of progress scopes.
Definition ProgressScope.cs:50
Provides progress status and notification mechanism.
Definition ProgressStatus.cs:64
void Register(ProgressStatus.Observer theObserver, float theValueThreshold, uint theTimeThreshold)
The life span of theObserver must be greater than one of this status object.
Definition ProgressStatus.cs:136
double Value()
Beware of internal rounding errors.
Definition ProgressStatus.cs:429
bool WasCanceled()
The operation can be canceled either by explicit call to Cancel() or when a cancelation checker set w...
Definition ProgressStatus.cs:492
Defines a Unicode (UTF-16) string wrapping a standard string.
Definition UTF16String.cs:17
Contains classes and functions related to model processing.
Definition MeshGenerator.cs:12
Defines classes, types, enums, and functions related to topological entities and scene graph elements...
Definition AngleUnit.cs:12
Contains classes, namespaces, enums, types, and global functions related to Manufacturing Toolkit.
Definition BaseObject.cs:12