{"id":22768943,"url":"https://github.com/ab4d/cadimporter","last_synced_at":"2025-03-30T11:17:46.235Z","repository":{"id":265029332,"uuid":"851557233","full_name":"ab4d/CadImporter","owner":"ab4d","description":"CadImporter import and show 3D objects from STEP (.step and .stp) files","archived":false,"fork":false,"pushed_at":"2025-02-14T09:15:58.000Z","size":26736,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T10:25:45.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ab4d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-09-03T10:07:06.000Z","updated_at":"2025-02-14T09:16:01.000Z","dependencies_parsed_at":"2025-02-14T10:34:09.478Z","dependency_job_id":null,"html_url":"https://github.com/ab4d/CadImporter","commit_stats":null,"previous_names":["ab4d/cadimporter"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ab4d%2FCadImporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ab4d%2FCadImporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ab4d%2FCadImporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ab4d%2FCadImporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ab4d","download_url":"https://codeload.github.com/ab4d/CadImporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246308049,"owners_count":20756482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-11T14:13:31.532Z","updated_at":"2025-03-30T11:17:46.228Z","avatar_url":"https://github.com/ab4d.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CadImporter\n\n![Ab3d.DXEngine.CadImporter with import settings](https://www.ab4d.com/Images/CadImporter/CadImporter_1_0-1.png)\n\n![Ab3d.DXEngine.CadImporter with object hierarhy](https://www.ab4d.com/Images/CadImporter/CadImporter_1_0-2.png)\n\n**CadImporter** shows how to use Ab4d.OpenCascade library to **import and show 3D objects from STEP (.step and .stp) and IGES (.iges and .igs) files**.\n\nThis repository contains two projects:\n- **Ab3d.DXEngine.CadImporter** - shows how to use CadImporter with [Ab3d.DXEngine](https://www.ab4d.com/DXEngine.aspx) for DirectX rendering and [Ab3d.PowerToys](https://www.ab4d.com/PowerToys.aspx) for 3D helper functions.\n- **Ab4d.SharpEngine.CadImporter** - shows how to use CadImporter with [Ab4d.SharpEngine](https://www.ab4d.com/SharpEngine.aspx) for Vulkan rendering (can be used only on Windows).\n\nThe CadImporter reads the hierarchy of the Parts (Compound or Solid). It can use instanced Shells that are defined by a list of Faces. \nEach face can be defined by many Edges. For each Edge it is possible to get the original curve with its parameters. \nFor example, you can get a location and a radius for a Circle; for BSpline curve you can get control points (Poles), weights and knots.\n\nThe library preserves the original names from the step files. It can also calcualate the exact Part volume and surface area. \nSurface area can also be calculated for each face. Also, the exact edge length can be calculated.\n\nThe library can also get all the 3D meshes (positions and triangle indices) that are generated by triangulating the faces.\nAlso, the interpolated positions can be generated for each Edge.\n\nThis allows 3D models to be shown in a 3D viewer application.\n\n## Licenses\n\nThe Ab4d.OpenCascade is using [OpenCASCADE](https://dev.opencascade.org/) library that is licensed under [LGPL](https://github.com/Open-Cascade-SAS/OCCT/blob/master/LICENSE_LGPL_21.txt) and [an exception](https://github.com/Open-Cascade-SAS/OCCT/blob/master/OCCT_LGPL_EXCEPTION.txt).\n\nAb4d.OpenCascade can be used only when used with the [Ab3d.DXEngine](https://www.ab4d.com/DXEngine.aspx) or [Ab4d.SharpEngine](https://www.ab4d.com/SharpEngine.aspx) libraries.\n\nWhen Ab4d.OpenCascade is used with Ab3d.DXEngine, it needs to be activated by DXScene (DXScene must be already initialized).\n\nWhen Ab4d.OpenCascade is used with Ab4d.SharpEngine, it needs to be activated by SceneView or Scene (GpuDevice must be already initialized).\n\nIf you want to use Ab4d.OpenCascade without Ab3d.DXEngine or Ab4d.SharpEngine libraries, [contact support](https://www.ab4d.com/Feedback.aspx?Subject=OpenCascace_license).\n\n## System requirements\n- 64 bit Windows 10 or newer\n- .NET Framework 4.8 or .NET 6 or newer\n- App must be compiled with x64 only mode (AnyCpu is not supported)\n\n\n## Using Ab4d.OpenCascade\n\nThe CadImporter from Ab4d.OpenCascade library requires many native OpenCascade dlls.\nTo see a list of all required files check the \"OpenCascade required files.txt\" file.\n\nThe required files can be downloaded from https://github.com/Open-Cascade-SAS/OCCT/releases/ web page.\nTo get the required OpenCascade version, you can read the static Ab4d.OpenCascade.CadImporter.OpenCascadeVersion property.\nFor the required version, download the occt-vc143-64.zip and 3rdparty-vc14-64.zip and extract the zip files.\n\nThen you have multiple options:\n\n1. Copy the required dlls to the output folder of your application. This is a recommended option because you can use any type from the Ab4d.OpenCascade anywhere in the application. This is also recommended when distributing your application.\n2. Copy the required dlls to a custom folder and then adjust PATH environment variable or call system's SetDllDirectory function with the path to the OpenCascade folder. Updating the PATH is also used in the sample application. There the PATH is updated at runtime after the application starts (this way is the structure of files in the output folder nicer).\n\nFor both methods you can use the \"copy-open-cascade-dlls.bat\" batch file.\nBefore running it, open the file and update the OCCT and OCCT_THIRD_PARTY paths so that they point to the paths where you have extracted the zip files.\n\nTo correctly load the Ab4d.OpenCascade that is a C++/CLI assembly, the Ijwhost.dll file needs to be available in the application's output path. This file is part of the Ab4d.OpenCascade NuGet package and should be automatically installed when the package is used. This file is used for finding and loading the runtime to the C++/CLI assembly.\n\nSee also the InitializeCadImporter and CreateCadImporter methods in the MainWindow.xaml.cs.\n\n**IMPORTANT**\n\nIf the OpenCascade dlls are copied to a custom folder (2nd option above), then \nno type from Ab4d.OpenCascade should be used in the MainWindow constructor or DXSceneInitialized event handler.\nIf it is used, then the application will try to load the OpenCascade dlls before the InitializeCadImporter method is called.\nIf the OpenCascade dlls are not present in the output folder, then this will throw \"Cannot load file or assembly\" exception.\n\nFor example, in this sample the initialization of ImporterUnitsComboBox was removed from the MainWindow constructor because it uses Ab4d.OpenCascade.CadUnitTypes:\n    \n    // The following line will try to use CadUnitTypes enum from Ab4d.OpenCascade library. This will load OpenCascade dlls.\n    ImporterUnitsComboBox.ItemsSource = Enum.GetNames\u003cAb4d.OpenCascade.CadUnitTypes\u003e();\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fab4d%2Fcadimporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fab4d%2Fcadimporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fab4d%2Fcadimporter/lists"}