3D scanning is becoming more and more ubiquitous.

build-test-distribute

Welcome to the MeshLib!

3D scanning is becoming more and more ubiquitous. Robotic automation, self-driving cars and multitude of other industrial, medical and scientific applications require advanced computer vision to deliver the levels of automation customers expect these days. The great rise of AI gave another boost to computer vision and the need to utilize 3D data to make machines smarter. Not only are tasks at hand becoming more complex, but the size of data grows exponentially.

There is a multitude of general purpose libraries which deal with 3D data. Some stem from popular CAD packages, some are open source. The commercial ones tend to be quite expensive while open source are free though tend to be limited in functionality provided. Also those libraries value generality above other features to allow maximum number of applications, but with the growing amounts of 3D data, performance is critical as it never has been. Some of it can be addressed by using the scale of a commercial cloud, last generation CPU or GPU but underlying complexity of data representation makes it very hard and laborsome.

The goal which we set when designing MeshRus was to value simplicity and performance while providing a wide gamut of useful computational algorithms. The library also supports the most important data structures today’s sensors can produce - pointcloud, mesh, volume and more. For example, mesh is represented by half-edge data structure and cannot be made non-manifold. Some applications may require non-manifoldness, but most practical scans can be represented as manifoldness meshes without an issue.

Some features

This list is not full and updating each day

Math basics

  • Math primitives and operations support (Vectors 2D, 3D, 4D; Lines; Planes; Bounding Boxes; Matrices; Affine transformations; Quaternions; Histograms; etc.)

3D data handling, creation, modification

  • 3D data various representations support: Mesh, Voxel and Point Cloud.
  • Data creation
    • Mesh creation by given vertices and triangles,
    • Surface primitives (e.g. tor, cube, sphere, etc).
  • Representation conversions
    • Triangulation of a Point Cloud to Mesh,
    • Mesh to Cloud Point conversion,
    • Mesh to Voxel conversion,
    • Voxel To Mesh conversion.
  • Deformations
    • Laplassian deformation,
    • Freeform deformation,
    • Relax, mesh smoothing,
    • Position Verts Smoothly, arrangement of vertices in accordance with the gradient along the neighbors.
  • Offsets
    • Mesh offset,
    • Mesh partial offset.
  • Resolution
    • Breaking a mesh into smaller triangles (increasing the resolution)
    • Mesh decimation (decreasing the number of triangles, decreasing the resolution) with a specified error relative to the old mesh.
  • Cutting a contour on a surface. The mesh is modified so that the resulting contour contains new edges cut through triangles at the specified points.
  • Splitting
    • Splitting mesh into sub-meshes (components)

3D data operations

  • Boolean ops (union, intersection, difference)
    • Boolean ops on meshes via voxels. Efficient but not so accurate as explicit mesh operations.
    • Explicit mesh boolean ops, very exact, fast and accurate.

3D Data problems fixing

  • Fixing holes in mesh
    • Holes stitching (removing two holes by stitching their boundaries)
    • Hole filling,
    • Holes fixing metrics
      • Basic set of triangulation metrics,
      • Extended set of triangulation metrics,
      • Custom triangulation metrics.
  • Delaunay triangulation optimization, changing triangles without changing vertices, according to Delaunay criterion,
  • Tunnels fixing,
  • Multiple edges detection
  • Degenerate triangles fixing,
  • Undercuts fixing, via voxels,
  • Surface self-intersections fixing
    • Guaranteed fix via voxels,
    • Fix via Relax (mesh smoothing).

Functions on 3D data

  • Projection
    • Projecting a point onto a mesh
  • Intersection
    • Intersection of a ray with a mesh,
    • Intersection of a plane with a mesh, result is a contour,
    • Finding a contour representing intersection of two meshes, meshes remain unchanged,
  • Distance
    • Distance from a point to a mesh,
    • Minimal distance between two meshes,
    • Mesh distance map (height map),
    • 2D contour distance map.
  • Segmentation
    • Semi-auto voxel segmentation (volumes classification).
    • Semi-auto mesh segmentation by curvature.
  • Sampling
    • Mesh sampling. The result is a separate thinned set of vertices, the mesh remains unchanged.
    • Point cloud sampling. The result is a separate thinned set of points, the cloud remains unchanged
      • Uniform cloud sampling,
      • Grid cloud sampling.
  • Path
    • Finding a shortest path through the mesh vertices,
    • Finding a geodesic shortest path on the surface, not necessarily through mesh vertices.
  • Iterative Closest Points (ICP), two meshes aligning
    • Point to point,
    • Point to plane.

Some useful links

MeshInspector releases page

Our YouTube channel with updates

Slides

Documentation

Report an issue anonymously

Build

Build with VS2019 on Windows

git clone https://github.com/MeshRUs/MeshLib.git
cd MeshLib
git submodule update --init --recursive

Preparing Third Parties

Some third parties are taken from vcpkg, while others (missing in vcpkg) are configured as git submodules.

Vcpkg

  1. Please install vcpkg, and integrate it into Visual Studio (note that vcpkg requires English laguage pack installed in Visual Studio):

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    git checkout 5c54cc06554e450829d72013c4b9e4baae41529a
    .\bootstrap-vcpkg.bat
    .\vcpkg integrate install (with admin rights)

    More details here: vcpkg.

  2. Copy thirdparty/vcpkg/triplets/x64-windows-meshrus.cmake to vcpkg/triplets folder of vcpkg installation.

  3. Execute install.bat

    cd vcpkg # or add vcpkg to PATH
    <path_to_MeshLib>/thirdparty/install.bat

Build with CMake on Linux

This installation was checked on Ubuntu 20.04.4.

Use automated installation process. It takes ~40 minutes if no required packages are already installed. This approach is useful for new MR developers Install/Build dependencies. Build project. Run Test Application Run the following in terminal:

git clone https://github.com/MeshRUs/MeshLib.git
cd MeshLib
sudo ./scripts/build_thirdparty.sh # need sudo to check and install dependencies
./scripts/install_thirdparty.sh
./scripts/build_sources.sh
./scripts/distribution.sh
sudo apt install ./distr/meshrus-dev.deb

Note! ./scripts/install*.sh scripts could be used as well, but apt install is prefferable. Note! ./scripts/install*.sh scripts copy MR files directly to /usr/local/lib. Remove this directory manually if exists before apt install deb package Note! You could specify build type to Debug by export MESHRUS_BUILD_TYPE=Debug. Release is default.

Comments
  • use gnu cp on macos

    use gnu cp on macos

    Hi, I suggest you install coreutil and use gcp on mac OS X since you are already plugged in homebrew.

    https://stackoverflow.com/questions/11246070/cp-parents-option-on-mac

    same for findutils -> gfind https://stackoverflow.com/questions/752818/find-lacks-the-option-printf-now-what

  • Python,  'region' attribute error when subdivide mesh: 'meshlib.mrmeshpy.SubdivideSettings' object has no attribute 'region'

    Python, 'region' attribute error when subdivide mesh: 'meshlib.mrmeshpy.SubdivideSettings' object has no attribute 'region'

    Hello everyone,

    There is an attribute error when i want to subdivide a region of mesh and set the 'region' attribute. Below is my test code, its the test code from MeshLib/test_python/test_subdivider.py but with 'region' attribute modifed. And I have not figure out how to set the 'region' attribute value rightly, so just set as None to show the error.

    from helper import *
    import pytest
    
    
    def test_subdivider():
        torus = mrmesh.makeTorus(2, 1, 10, 10, None)
        countInit = torus.topology.getValidFaces().count()
    
        settings = mrmesh.SubdivideSettings()
        settings.maxEdgeLen = 0.3
        settings.maxEdgeSplits = 5
        settings.maxDeviationAfterFlip = 0.2
    
        # Error: 'meshlib.mrmeshpy.SubdivideSettings' object has no attribute 'region'
        settings.region = None
    
        mrmesh.subdivideMesh(torus, settings)
    
        assert (torus.topology.getValidFaces().count() > countInit)
    
    

    The error says,

    'meshlib.mrmeshpy.SubdivideSettings' object has no attribute 'region'
    

    Besides, I found the 'region' attribute is indeed binded and there also exists 'region' attribute in debug window, but i still cannot set this attribute and the error occured.

    the debug window picture, Screenshot from 2022-12-08 12-34-14

    Finally, thank you for this amazing library!

  • mrmeshpy.boolean intersection returns not(intersection)

    mrmeshpy.boolean intersection returns not(intersection)

    I am trying to calculate the intersection between two meshes by calling

    import meshlib.mrmeshpy as mr
    mesh_a = ...
    mesh_b = ...
    diff = mr.boolean(mesh_a, mesh_b, mr.BooleanOperation.Intersection)
    

    However, instead of returning the intersection of the two meshes, I end up getting the not(intersection) of the two meshes. By not(intersection) i mean parts of mesh_a that don't lie inside mesh_b.

    For example, given mesh_a: with mesh_b on top: i get the intersection as:

    Any clue on what might be happpening?

  • MacOS: update thirdparty install script

    MacOS: update thirdparty install script

    Python3.11 is default for macos-latest runner image since 12.6 image release https://github.com/actions/runner-images/blob/macOS-12/20221027.1/images/macos/macos-12-Readme.md

  • Bump tj-actions/branch-names from 6.3 to 6.4

    Bump tj-actions/branch-names from 6.3 to 6.4

    Bumps tj-actions/branch-names from 6.3 to 6.4.

    Release notes

    Sourced from tj-actions/branch-names's releases.

    v6.4

    What's Changed

    Full Changelog: https://github.com/tj-actions/branch-names/compare/v6...v6.4

    Changelog

    Sourced from tj-actions/branch-names's changelog.

    v6.4 (2022-12-19)

    Full Changelog

    v6 (2022-12-19)

    Full Changelog

    Closed issues:

    • Dependency Dashboard #36

    Merged pull requests:

    Commits
    • eee8675 Merge pull request #204 from tj-actions/chore/update-readme
    • f48100e Updated README.md
    • d1db4d2 Update README.md
    • 996bfd1 Merge pull request #202 from tj-actions/renovate/tj-actions-auto-doc-1.x
    • 4a3aec2 Merge pull request #203 from tj-actions/renovate/tj-actions-verify-changed-fi...
    • 74cff8b Update test.yml
    • 231653b Update tj-actions/verify-changed-files action to v13
    • 990f206 Update tj-actions/auto-doc action to v1.6.0
    • d2f6983 Update cirrus-actions/rebase action to v1.8
    • e546ac8 Update actions/checkout action to v3.2.0
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • How do i export a mesh into numpy verts and faces?

    How do i export a mesh into numpy verts and faces?

    In python, after manipulation of meshlib meshes, I want to export the mesh back to two numpy arrays, one containing the vertices and another containing the faces. Any help?

    Thanks!

  • Bump docker/login-action from 1 to 2

    Bump docker/login-action from 1 to 2

    Bumps docker/login-action from 1 to 2.

    Release notes

    Sourced from docker/login-action's releases.

    v2.0.0

    • Node 16 as default runtime by @​crazy-max (#161)
      • This requires a minimum Actions Runner version of v2.285.0, which is by default available in GHES 3.4 or later.
    • chore: update dev dependencies and workflow by @​crazy-max (#170)
    • Bump @​actions/exec from 1.1.0 to 1.1.1 (#167)
    • Bump @​actions/io from 1.1.1 to 1.1.2 (#168)
    • Bump minimist from 1.2.5 to 1.2.6 (#176)
    • Bump https-proxy-agent from 5.0.0 to 5.0.1 (#182)

    Full Changelog: https://github.com/docker/login-action/compare/v1.14.1...v2.0.0

    v1.14.1

    • Revert to Node 12 as default runtime to fix issue for GHE users (#160)

    v1.14.0

    • Update to node 16 (#158)
    • Bump @​aws-sdk/client-ecr from 3.45.0 to 3.53.0 (#157)
    • Bump @​aws-sdk/client-ecr-public from 3.45.0 to 3.53.0 (#156)

    v1.13.0

    • Handle proxy settings for aws-sdk (#152)
    • Workload identity based authentication docs for GCR and GAR (#112)
    • Test login against ACR (#49)
    • Bump @​aws-sdk/client-ecr from 3.44.0 to 3.45.0 (#132)
    • Bump @​aws-sdk/client-ecr-public from 3.43.0 to 3.45.0 (#131)

    v1.12.0

    • ECR: only set credentials if username and password are specified (#128)
    • Refactor to use aws-sdk v3 (#128)

    v1.11.0

    • ECR: switch implementation to use the AWS SDK (#126)
    • ecr input to specify whether the given registry is ECR (#123)
    • Test against Windows runner (#126)
    • Update instructions for Google registry (#127)
    • Update dev workflow (#111)
    • Small changes for GHCR doc (#86)
    • Update dev dependencies (#85)
    • Bump ansi-regex from 5.0.0 to 5.0.1 (#101)
    • Bump tmpl from 1.0.4 to 1.0.5 (#100)
    • Bump @​actions/core from 1.4.0 to 1.6.0 (#94 #103)
    • Bump codecov/codecov-action from 1 to 2 (#88)
    • Bump hosted-git-info from 2.8.8 to 2.8.9 (#83)
    • Bump node-notifier from 8.0.0 to 8.0.2 (#82)
    • Bump ws from 7.3.1 to 7.5.0 (#81)
    • Bump lodash from 4.17.20 to 4.17.21 (#80)
    • Bump y18n from 4.0.0 to 4.0.3 (#79)

    v1.10.0

    • GitHub Packages Docker Registry deprecated (#78)

    ... (truncated)

    Commits
    • f4ef78c Merge pull request #299 from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...
    • 9ad4ce3 Update generated content
    • 884eadd Bump @​aws-sdk/client-ecr-public from 3.53.0 to 3.186.0
    • a266232 Merge pull request #298 from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...
    • f97efcf Update generated content
    • 5ae789b Bump @​aws-sdk/client-ecr from 3.53.0 to 3.186.0
    • 71c23b5 Merge pull request #292 from docker/dependabot/npm_and_yarn/actions/core-1.10.0
    • 6401d70 Update generated content
    • 67e8909 Bump @​actions/core from 1.9.1 to 1.10.0
    • 21f251a Merge pull request #275 from crazy-max/redact-aws-creds
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @MaxRayskiy.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Improve voxels in python and other small

    Improve voxels in python and other small

    added convertation numpy 3D array <=> SimpleVolume added method gridToMesh with VdbVolume added representation Vector2 and Vector3 in python other small improvements

  • Apple: set rpath to @loader_path

    Apple: set rpath to @loader_path

    this change allows the python library to be run from everywhere on an apple computer, otherwise the build path is hardcoded in the library path. This change makes the system try to find the dylib in the same folder as the loader library.

    https://dev.my-gate.net/2021/08/04/understanding-rpath-with-cmake/

Skrull is a malware DRM, that prevents Automatic Sample Submission by AV/EDR and Signature Scanning from Kernel.
Skrull is a malware DRM, that prevents Automatic Sample Submission by AV/EDR and Signature Scanning from Kernel.

Skrull is a malware DRM, that prevents Automatic Sample Submission by AV/EDR and Signature Scanning from Kernel. It generates launchers that can run malware on the victim using the Process Ghosting technique. Also, launchers are totally anti-copy and naturally broken when got submitted.

Dec 10, 2022
ZXing ("Zebra Crossing") barcode scanning library for Java, Android
ZXing (

Project in Maintenance Mode Only The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enha

Dec 27, 2022
Lidar-with-velocity - Lidar with Velocity: Motion Distortion Correction of Point Clouds from Oscillating Scanning Lidars
Lidar-with-velocity - Lidar with Velocity: Motion Distortion Correction of Point Clouds from Oscillating Scanning Lidars

Lidar with Velocity A robust camera and Lidar fusion based velocity estimator to undistort the pointcloud. This repository is a barebones implementati

Dec 15, 2022
Dec 29, 2022
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

Oct 28, 2022
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more

EnTT is a header-only, tiny and easy to use library for game programming and much more written in modern C++. Among others, it's used in Minecraft by

Dec 30, 2022
C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and more

Archived cquery is no longer under development. clangd and ccls are both good replacements. cquery cquery is a highly-scalable, low-latency language s

Jan 2, 2023
EyeLog Can Record And Steal Consecutive Keystrokes (and much more) That The User Enters On A Device
EyeLog Can Record And Steal Consecutive Keystrokes (and much more) That The User Enters On A Device

What This EyeLog EyeLog Is A Keylogger Can Record And Steal Consecutive Keystrokes (and much more) That The User Enters On A Device How To Setup EyeLo

Dec 28, 2021
Add tensilica esp32 cpu and a board to qemu and dump the rom to learn more about esp-idf

qemu_esp32 Add tensilica esp32 cpu and a board to qemu and dump the rom to learn more about esp-idf ESP32 in QEMU. This documents how to add an esp32

Jan 8, 2023
A C++14 cheat-sheet on lvalues, rvalues, xvalues, and more

C++14 value category cheatsheet Herein lies a generated PDF which outlines the common pitfalls and edge cases with C++14's lvalues, rvalues, and the l

Dec 29, 2022
Companion source code for "Programming with C++20 - Concepts, Coroutines, Ranges, and more"
Companion source code for

Companion Source Code for "Programming with C++20 - Concepts, Coroutines, Ranges, and more" 1. Edition Code examples This repository contains runnable

Dec 31, 2022
A cleaner and more intuitive std::variant alternative

[WIP] ExtendedVariant This single header library is part of my C++ extended standard stdex libraries. Check our my profile for more. Working with C++

Jun 13, 2021
Bypass UAC at any level by abusing the Program Compatibility Assistant with RPC, WDI, and more Windows components
Bypass UAC at any level by abusing the Program Compatibility Assistant with RPC, WDI, and more Windows components

ByeIntegrity 8.0 The eighth Windows privilege escalation attack in the ByeIntegrity family. ByeIntegrity 8.0 is the most complex one I've created so f

Dec 15, 2022
Small and dirty header-only library that supports user input with some more advanced features than in the standard lib.

dirty-term Small and dirty header-only library that supports user input with some more advanced features than in the standard lib. This small, lightwe

Apr 24, 2022
Ziggified GLFW bindings with 100% API coverage, zero-fuss installation, cross compilation, and more.

mach/glfw - Ziggified GLFW bindings Ziggified GLFW bindings that Mach engine uses, with 100% API coverage, zero-fuss installation, cross compilation,

Dec 27, 2022
DOME plugin for opening file dialogues and more.

DOME Dialog Plugin See this page on info for including a plugin in your DOME project. See the demo folder for a small demo on how it works. Dialog cla

Sep 27, 2022
Sword Engine is a fork of Psych Engine that plans on adding more features and quality of life improvements.
Sword Engine is a fork of Psych Engine that plans on adding more features and quality of life improvements.

⚠️ WARNING: This README is currently incomplete, This warning will be removed once it's complete. Friday Night Funkin' - Sword Engine Sword Engine is

Jul 9, 2022
An optimized "RTOS" (more than HAL but less than RTOS) for ROV controling and getting sensor data

Nitori-ROV-OS 一个专门为水下机器人(ROV、AUV)进行优化的实时操作系统,暂命名为 Nitori,中文名 荷取 可以通过修改硬件兼容层(Port)进行移植 预计最初版本支持stm32f407和stm32h750,并在实验室目前的水下机器人中进行部署 系统分为四层,六个主要组件: 硬件

Jan 10, 2022