L3D.Net 0.9.2

.NET Standard 2.0
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package L3D.Net --version 0.9.2
NuGet\Install-Package L3D.Net -Version 0.9.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="L3D.Net" Version="0.9.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add L3D.Net --version 0.9.2
#r "nuget: L3D.Net, 0.9.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install L3D.Net as a Cake Addin
#addin nuget:?package=L3D.Net&version=0.9.2

// Install L3D.Net as a Cake Tool
#tool nuget:?package=L3D.Net&version=0.9.2

L3D .NET library

OnPublishedRelease
OnPush develop
NuGet Status L3D.Net on fuget.org

Intro

.NET Standard 2.0 library for the Luminaire 3D L3D

With the library it is possible to read and build L3D container files. For that the library exposes two classes 'Builder' and 'Reader'. The Builder has a fluent API for defining all the luminaire parts and build the target container file. With the Reader is is possible to read the content of a L3D container and to parse the containing .obj files at once. So there is no other .obj parser needed.

How to get started

Requirements

Nuget package

Add the package within your IDE or using the CLI

dotnet add package L3D.Net

Building a L3D container

Simple builder exmaple.

Builder.NewLuminaire()
    .WithTool("Example-Tool")
    .AddGeometry("luminairePartName", "path/to/model.obj", GeometricUnits.m, geomOptions => geomOptions
        .AddRectangularLightEmittingObject("lightEmittingPartName", 0.5, 0.25, leoOptions => leoOptions
            .WithLightEmittingSurfaceOnParent(3)
        )
    )
    .Build("path/to/new/container.l3d");

Reading a L3D container

var reader = new Reader();
var container = reader.ReadContainer("path/to/container.l3d");

foreach (var geometryPartDto in container.Parts)
{
    // ...
    var model = geometryPartDto.GeometryDefinition.Model;
    foreach (var vertex in model.Vertices)
    {
        // .obj-Model vertices
    }

    // ...
    
    foreach (var lightEmittingPartDto in geometryPartDto.LightEmittingObjects)
    {
        // do something for light emitting part 
    }

    // ...
}

Questions, Issues & Contribution

Please use the discussion section for questions or create issues, when something seems to be wrong. PRs are welcome.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.9.3-preview.1 50 11/9/2022
0.9.2 236 5/25/2022
0.9.0 226 8/30/2021