{"id":37043742,"url":"https://github.com/globallightingdata/l3d.net","last_synced_at":"2026-01-14T05:01:49.373Z","repository":{"id":65358440,"uuid":"385528369","full_name":"globallightingdata/l3d.net","owner":"globallightingdata","description":".NET library for the Luminaire 3D format L3D","archived":false,"fork":false,"pushed_at":"2025-11-27T10:43:57.000Z","size":1107,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-30T03:55:18.962Z","etag":null,"topics":["gldf","l3d","serializer","xml"],"latest_commit_sha":null,"homepage":"https://gldf.io","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/globallightingdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-07-13T08:13:33.000Z","updated_at":"2025-11-11T15:42:53.000Z","dependencies_parsed_at":"2025-06-05T13:37:24.579Z","dependency_job_id":null,"html_url":"https://github.com/globallightingdata/l3d.net","commit_stats":{"total_commits":37,"total_committers":5,"mean_commits":7.4,"dds":0.7027027027027026,"last_synced_commit":"f0e41e8441fa4095381b6757ca2c5da56279a399"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/globallightingdata/l3d.net","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globallightingdata%2Fl3d.net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globallightingdata%2Fl3d.net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globallightingdata%2Fl3d.net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globallightingdata%2Fl3d.net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globallightingdata","download_url":"https://codeload.github.com/globallightingdata/l3d.net/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globallightingdata%2Fl3d.net/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28410086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gldf","l3d","serializer","xml"],"created_at":"2026-01-14T05:01:48.282Z","updated_at":"2026-01-14T05:01:49.368Z","avatar_url":"https://github.com/globallightingdata.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# L3D .NET library\n\n[![OnPublishedRelease](https://github.com/globallightingdata/l3d.net/actions/workflows/OnPublishedRelease.yml/badge.svg)](https://github.com/globallightingdata/l3d.net/actions/workflows/OnPublishedRelease.yml)  \n[![OnPush develop](https://github.com/globallightingdata/l3d.net/actions/workflows/OnPushDevelop.yml/badge.svg)](https://github.com/globallightingdata/l3d.net/actions/workflows/OnPushDevelop.yml)  \n[![NuGet Status](https://img.shields.io/nuget/v/L3D.Net.svg)](https://www.nuget.org/packages/L3D.Net/)\n\n## Intro\n\n.NET Standard 2.0 library for the Luminaire 3D [L3D](https://gldf.io/docs/geometry/l3d-intro)\n\nWith the library it is possible to read and build L3D container files. For that the library exposes two classes '\nBuilder' and 'Reader'.\nThe Builder has a fluent API for defining all the luminaire parts and build the target container file.\nWith the Reader is is possible to read the content of a L3D container and to parse the containing .obj files at once. So\nthere is no other .obj parser needed.\n\n## How to get started\n\n### Requirements\n\n- [.NET Standard 2.0](https://docs.microsoft.com/de-de/dotnet/standard/net-standard) compatible project\n\n### Nuget package\n\nAdd the package within your IDE or using the CLI\n\n```bash\ndotnet add package L3D.Net\n```\n\n---\n\n### Building a L3D container\n\nSimple builder exmaple.\n\n```CSharp\nvar luminaire = new Luminaire();\nluminaire.Header = new Header\n{\n    CreatedWithApplication = \"Example-Tool\"\n};\n\nvar geometryDefinition = new GeometryFileDefinition\n{\n    GeometryId = \"PN.Ab12\",\n    Units = GeometricUnits.m,\n    Model = ObjParser.Instance.Parse(cubeObjPath, NullLogger.Instance),\n    FileName = cubeObjPath\n};\n\nluminaire.GeometryDefinitions = new List\u003cGeometryFileDefinition\u003e\n{\n    geometryDefinition\n};\n\nluminaire.Parts = new List\u003cGeometryPart\u003e\n{\n    new()\n    {\n        Name = \"luminaire\",\n        LightEmittingObjects = new List\u003cLightEmittingPart\u003e\n        {\n            new(new Rectangle { SizeX = 0.5, SizeY = 0.25 })\n            {\n                Name = \"leo\"\n            }\n        },\n        LightEmittingSurfaces = new List\u003cLightEmittingSurfacePart\u003e\n        {\n            new()\n            {\n                Name = \"les\",\n                FaceAssignments = new List\u003cFaceAssignment\u003e\n                {\n                    new SingleFaceAssignment\n                    {\n                        FaceIndex = 3\n                    }\n                },\n                LightEmittingPartIntensityMapping = new Dictionary\u003cstring, double\u003e\n                {\n                    [\"leo\"] = 1\n                }\n            }\n        },\n        GeometryReference = geometryDefinition\n    }\n};\n\nIWriter writer = new Writer();\nvar bytes = writer.WriteToByteArray(luminaire);\n```\n\n### Reading a L3D container\n\nRead an L3D container from disk:\n\n```CSharp\nvar reader = new Reader();\nvar container = reader.ReadContainer(\"path/to/container.l3d\");\n\nforeach (var geometryPartDto in container.Parts)\n{\n    // ...\n    var model = geometryPartDto.GeometryDefinition.Model;\n    foreach (var vertex in model.Vertices)\n    {\n        // .obj-Model vertices\n    }\n\n    // ...\n    \n    foreach (var lightEmittingPartDto in geometryPartDto.LightEmittingObjects)\n    {\n        // do something for light emitting part \n    }\n\n    // ...\n}\n```\n\nRead an L3D container already read from disk in byte array (byte[]) format:\n\n```CSharp\nvar reader = new Reader();\nbyte[] l3dContainer = // Get a byte[] representation of an L3D container;\nvar container = reader.ReadContainer(l3dContainer);\n\nforeach (var geometryPartDto in container.Parts)\n{\n    // From here on out everything is identical to the reading an L3D container from disk example,\n    // see the code sample above.\n}\n```\n\n### Validating a L3D container\n\nValidation of an L3D container from disk:\n\n```CSharp\nvar validator = new Validator();\nvar validationHints = validator.ValidateContainer(\"path/to/container.l3d\");\n\nif (!validationHints.Any())\n    // Container validation successful\nelse\n    // Container validation unsuccessful\n```\n\nValidation of an L3D container already read from disk in byte array (byte[]) format:\n\n```CSharp\nvar validator = new Validator();\nbyte[] l3dContainer = // Get a byte[] representation of an L3D container;\nvar validationHints = validator.ValidateContainer(l3dContainer);\n\nif (!validationHints.Any())\n    // Container validation successful\nelse\n    // Container validation unsuccessful\n```\n\n### Compatibility\n\nL3D.NET is able to read old and new unknown versions, with the exception of a new major version.\n\nWhen a new minor version is read, it is possible that optional information is not read.\nIf the L3D is saved again, this information is not written either and the version is set to the latest version of the\nL3D.NET component.\n\nThe following table explains this behaviour summarized:\n\n File version | L3D.NET version | Can read | Can write | Read and write changes the file                              \n--------------|-----------------|----------|-----------|--------------------------------------------------------------\n 1.0.0.0      | 0.9.0.0         | no       | no        | N/A                                                          \n 0.9.0.0      | 1.0.0.0         | yes      | yes*      | yes - the version is updated and the content accordingly too \n 1.0.0.0      | 1.0.0.0         | yes      | yes       | no                                                           \n 0.9.2.0      | 0.9.0.0         | yes*     | yes*      | yes - some optional information may not be read or written   \n 0.9.0.0      | 0.9.2.0         | yes      | yes*      | yes - the version is updated and the content accordingly too \n\n---\n\n## Questions, Issues \u0026 Contribution\n\nPlease use the discussion section for questions or create issues, when something seems to be wrong. PRs are welcome.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgloballightingdata%2Fl3d.net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgloballightingdata%2Fl3d.net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgloballightingdata%2Fl3d.net/lists"}