CadConvert 0.1.0
See the version list below for details.
dotnet add package CadConvert --version 0.1.0
NuGet\Install-Package CadConvert -Version 0.1.0
<PackageReference Include="CadConvert" Version="0.1.0" />
<PackageVersion Include="CadConvert" Version="0.1.0" />
<PackageReference Include="CadConvert" />
paket add CadConvert --version 0.1.0
#r "nuget: CadConvert, 0.1.0"
#:package CadConvert@0.1.0
#addin nuget:?package=CadConvert&version=0.1.0
#tool nuget:?package=CadConvert&version=0.1.0
CadConvert
Parasolid (.x_t) and STEP (.stp) to glTF 2.0 or USDZ. Reads the
B-Rep, tessellates it watertight, and writes a mesh with materials — no CAD
kernel to install.
using CadConvert;
var result = CadConverter.Convert("housing.x_t", "housing.glb");
// The output's extension chooses the container: .glb or .usdz.
Console.WriteLine($"{result.Bodies} bodies, {result.Triangles:N0} triangles");
foreach (var warning in result.Warnings)
Console.WriteLine($"warning: {warning}");
Defaults
The mesh is held to 0.04 % of the model's own diagonal and 8° between
adjacent facet normals. Both are needed: a distance alone is satisfied by almost
no subdivision on a small radius, which is how a 1 mm hole becomes a triangle.
SagMillimetres and AngleDegrees are null by default and mean "the
converter's own"; setting a distance also turns the relative reading off.
MeshTarget.Lean, the default, encodes normals a byte a component and leaves
every vertex exactly where it was computed. Compact also puts positions on
each mesh's own 16-bit grid — about a quarter smaller again, and it collapses
the mesh's finest slivers, so it is for delivery rather than for modelling with.
Plain compresses nothing.
Warnings are not failures
A call that returns normally produced a file. Warnings lists what the readers
or the tessellator could not do — faces that produced no triangles, bodies that
were skipped. It is usually empty, and when it is not, ignoring it is how a hole
ships.
Threads and robustness
Conversions are independent: four threads converting at once produce identical
results. A malformed file returns CadConvertException with a reason rather
than taking the process down — the native side catches any panic at the
boundary, because unwinding into a host is undefined behaviour.
Runtimes
The package carries the native library for every runtime it was built for,
under runtimes/{rid}/native: linux-x64, linux-arm64, osx-arm64,
osx-x64, win-x64. If a P/Invoke fails at load time, the runtime you are on
was not among them.
A .NET Core host finds those on its own. .NET Framework does not — it copies a
runtime-specific file only when the project names a runtime identifier, and
most do not — so the package brings a build/CadConvert.targets that puts the
right one beside your executable, and warns at build time if it has none for
the platform you are building for.
build/native/include/cadconvert.h is there for a caller that is not .NET at
all; it describes the same library.
Source, benchmarks and the engineering record: https://github.com/omerbasavul/cadconvert
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.