Development in the .NET Environment
C3D can run in the .NET environment. To develop applications in the .NET environment, you must use the wrapper supplied with C3D.
The C3D wrapper is a dll file NetC3D.dll built on the .NET Framework 4.5.2 platform in 32bit/64bit, Debug/Release configurations, and for the Visual Studio 2019 and Visual Studio 2022 development environments. The library is compiled with “Strong Name” signing enabled.
To use C3D in C# applications, follow these steps:
Select the NetC3D.dll file of the required configuration from the C3D distribution: 32bit/64bit, Debug/Release for one of the development environments: Visual Studio 2019, Visual Studio 2022.
Place the c3d.dll file from the same distribution, with the same configuration and development environment (32bit/64bit, Debug/Release, Visual Studio 2019, Visual Studio 2022), into the same directory as NetC3D.dll.
Add the NetC3D.dll file to the project under development: References -> Add Reference -> Browse…, then select the NetC3D.dll file.
Before calling functions from NetC3D.dll, you must enter the license key and signature. One possible way to input the key and signature is as follows:
System.String key = Environment.GetEnvironmentVariable("C3Dkey");
System.String signature = Environment.GetEnvironmentVariable("C3Dsignature");
NetC3D.ToolEnabler.EnableMathModules(key, signature);
where C3Dkey and C3Dsignature are environment variables that store the key and signature.