Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refined registration #10

Closed
wants to merge 153 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
07667a4
WIP-ADD: Fast Global Registration added
DamienGilliard Mar 29, 2024
f35e0df
WIP: Correction for naming convention
DamienGilliard Mar 29, 2024
bf1ccc6
WIP-ADD: FastGlobalRegistrationBasedOnFeatureCorrespondence method ad…
DamienGilliard Apr 2, 2024
7007eab
ADD-WIP: Point to point error calculation method added to Registratio…
DamienGilliard Apr 3, 2024
d9f7014
FIRST commit
9and3 Apr 4, 2024
492c72d
ADD: add dataflow diag
9and3 Apr 4, 2024
1a661c6
ADD: gitignore for python
9and3 Apr 6, 2024
0fe9c50
WIP-ADD: basic draft for python structure in gh
9and3 Apr 6, 2024
2041732
WIP-CAP: working xml dumper for diffcheck ghcomponent - missing joint…
9and3 Apr 7, 2024
ac89bd5
FIX: timestamp for file working
9and3 Apr 7, 2024
3cc8d04
FIX: minors and typos
9and3 Apr 7, 2024
17364e1
FIX: better button for output component
9and3 Apr 7, 2024
9db6763
WIP: testing componentizer action
9and3 Apr 7, 2024
44748b2
WIP: testing componentizer action x2
9and3 Apr 7, 2024
4ccb8cc
WIP: testing action componentizer
9and3 Apr 7, 2024
27c2dd6
WIP: using default compas action
9and3 Apr 7, 2024
f9535a2
WIP: using default compas action x2
9and3 Apr 7, 2024
c3e7ee4
FIX-CAP: component fixed + componentizer
9and3 Apr 7, 2024
05afa78
FIX: correct categories for metadata componentizer
9and3 Apr 7, 2024
6ef7bf1
FIX-WIP: solving problem with metadata componentizer
9and3 Apr 7, 2024
8068233
ADD: badge to readme for pypi
9and3 Apr 7, 2024
1d72a73
WIP-FLASH: basic reverse transform, working on detection
9and3 Apr 8, 2024
0e11970
WIP-ADD: Registrations tested and produce csv for error and computati…
DamienGilliard Apr 8, 2024
88c0882
WIP-FLASH: need to clean and add loop but joint detector in place
9and3 Apr 8, 2024
096cadf
CAP: proper first draft of joint detector
9and3 Apr 8, 2024
50b2786
FIX: updated component code
9and3 Apr 8, 2024
d8eefa6
WIP: working on solving tenon-mortise
9and3 Apr 9, 2024
9b4b8a9
WIP: almost working conversion dface to brep rhino
9and3 Apr 10, 2024
69262c8
WIP-CAP: solved DFace-brep convertion, adapting exporting new structu…
9and3 Apr 10, 2024
93a5a0a
ADD: meshing DFace convertion
9and3 Apr 10, 2024
a39080b
CAP: exporter source code in decent state
9and3 Apr 10, 2024
52aff60
WIP: working basic imports on script-sync
9and3 Apr 12, 2024
ad575da
ADD: logo proposal
9and3 Apr 12, 2024
dbe7d49
CAP: finsihed ghuser for exporter
9and3 Apr 12, 2024
d1f4b02
WIP: GlobalRegistration methods now static
DamienGilliard Apr 12, 2024
b3d8648
WIP: More precise names of classes added to diffcheck.hh
DamienGilliard Apr 12, 2024
c40590f
ADD: docstring documentation and registration parameters now paramete…
DamienGilliard Apr 12, 2024
e588653
WIP: remove automatic csv dump and fix small typo in globalRegistrati…
DamienGilliard Apr 12, 2024
807a6db
REMOVE: plotter.py, as it is not needed anymore
DamienGilliard Apr 12, 2024
0534d67
WIP removed .vscode file
DamienGilliard Apr 12, 2024
f63dc6e
ADD: refinedRegistration files to create PR
DamienGilliard Apr 12, 2024
fdd77be
ADD: link to badge pypi
9and3 Apr 14, 2024
49afd57
WIP-FIX: solved circular import problem
9and3 Apr 15, 2024
3e258ca
Merge branch 'RhDFExporter' of https://github.com/diffCheckOrg/diffCh…
9and3 Apr 15, 2024
9a80177
FIX: added numpy to module
9and3 Apr 15, 2024
a2c1246
FIX: no need for numpy for diffcheck
9and3 Apr 15, 2024
0bf7ecd
FIX: missing math import
9and3 Apr 15, 2024
b88d852
ADD: basic instructions for pyhton ghplugin
9and3 Apr 15, 2024
15f8fb3
WIP: saved before integrating release pipeline
9and3 Apr 15, 2024
cda8985
ADD: isntructions without vscode
9and3 Apr 15, 2024
a18986f
WIP: Open3d ICP added to registration class
DamienGilliard Apr 15, 2024
034cbfd
WIP: improvements on documentation and removal of hard-coded parameters
DamienGilliard Apr 15, 2024
fcffcb4
WIP-FIX: improvements on documentation and missing doxygen tags
DamienGilliard Apr 15, 2024
f32b840
ADD: extra info and corrections on how to develop
9and3 Apr 16, 2024
fc27476
WIP: EvaluateRegistration static method added and default parameters …
DamienGilliard Apr 16, 2024
5ea3a29
FIX: Delete diffCheckErrors.log
9and3 Apr 17, 2024
1c8bba6
FIX: Delete diffCheckEvery.log
9and3 Apr 17, 2024
a928f89
FIX: catching non-planar faces
9and3 Apr 17, 2024
c4a4a3f
ADD: catch if there is a hole, it stops
9and3 Apr 17, 2024
95a810b
FIX: got rid of loggers
9and3 Apr 17, 2024
e9f9595
Merge pull request #8 from diffCheckOrg/RhDFExporter
9and3 Apr 17, 2024
2fd09da
ADD: proposal icons - pcdlike
9and3 Apr 18, 2024
e4c2bce
WIP-ADD: DFTransformation datatype created and code adapted to use th…
DamienGilliard Apr 19, 2024
051995b
FIX: typo in DFTransformation.cc
DamienGilliard Apr 19, 2024
e64d668
ADD-FIX: missing isntructions for package
9and3 Apr 19, 2024
dd8c8e6
ADD: tester gh file
9and3 Apr 21, 2024
8f0d50d
FIX: trying to get rid of eigen for conflict
9and3 Apr 21, 2024
898c165
FIX: merging fixes for logo
9and3 Apr 21, 2024
e351100
MERGE: Merge branch 'main' into logo_proposal
9and3 Apr 21, 2024
5f29342
FIX: trying to keep eigen
9and3 Apr 21, 2024
429acc5
Merge pull request #9 from diffCheckOrg/logo_proposal
9and3 Apr 21, 2024
456b4e7
ADD: a bunch of variations of logo
9and3 Apr 21, 2024
7224d98
Merge branch 'main' of https://github.com/diffCheckOrg/diffCheck
9and3 Apr 21, 2024
7b316c7
ADD: additional logos and variation
9and3 Apr 21, 2024
5489ce1
FIX: in source code and general reorganization + cleaning
9and3 Apr 22, 2024
6b06583
WIP: refined registrations implemented
DamienGilliard Apr 22, 2024
0647d70
FIX: small typo in CONTRIBUTING.md
DamienGilliard Apr 22, 2024
5a8d9d9
FIX: minors
9and3 Apr 22, 2024
7b3d16d
Merge branch 'registration-dev' of https://github.com/diffCheckOrg/di…
9and3 Apr 22, 2024
7ecfe27
FIX: replaced bool parameter with instation in default parameter (bad…
9and3 Apr 24, 2024
3885182
WIP: ApplyTransformation method
DamienGilliard Apr 25, 2024
a48aa4d
Merge branch 'registration-dev' of github.com:diffCheckOrg/diffCheck …
DamienGilliard Apr 25, 2024
61b6fc1
ADD: bounding box member for DFPointCloud class
DamienGilliard Apr 26, 2024
ac494df
FIX-ADD: registrations now with relative parameters for voxelization …
DamienGilliard Apr 26, 2024
3338447
WIP-ADD: add to ground truth from file + adaptations to implement sma…
DamienGilliard Apr 26, 2024
028a744
ADD: relative parameters, and tuned default values
DamienGilliard Apr 26, 2024
169458a
ADD: pipeline for overlapping point clouds
DamienGilliard Apr 26, 2024
f9c8ad9
ADD: loguru submodule
DamienGilliard Apr 26, 2024
487bff8
FIX: indent
DamienGilliard Apr 26, 2024
ca9af48
FIX: trying to solve merge conflicts on .gitmodules and .vscode
DamienGilliard Apr 26, 2024
45b2f43
Merge branch 'registration-dev'
9and3 Apr 29, 2024
2085ae7
WIP: stashing before refactoring cmake project
9and3 Mar 29, 2024
e1ca01f
WIP: testing docker windows
9and3 Mar 29, 2024
04626cd
FIX: updated version with bats for workflow
9and3 Mar 29, 2024
64218d1
WIP: testing different config for ci
9and3 Mar 29, 2024
d7baa30
FIX: udpated correct istructions README
9and3 Mar 29, 2024
87775ed
FIX: udpated correct istructions README x2
9and3 Mar 29, 2024
5f278b7
CAP: added logging
9and3 Mar 30, 2024
9c355e5
FIX: updated planning
9and3 Mar 29, 2024
99f0332
FIX: minor const for logger
9and3 Mar 30, 2024
535904a
FIX: no logging to be pushed
9and3 Apr 2, 2024
1e07e4c
ADD: refinedRegistration files to create PR
DamienGilliard Apr 12, 2024
79f4ddd
WIP: Open3d ICP added to registration class
DamienGilliard Apr 15, 2024
727c8cc
WIP: refined registrations implemented
DamienGilliard Apr 22, 2024
3143ac9
Merge branch 'refined_registration' of github.com:diffCheckOrg/diffCh…
DamienGilliard May 2, 2024
7da7b8b
WIP: stashing before refactoring cmake project
9and3 Mar 29, 2024
3e49bc9
WIP: testing docker windows
9and3 Mar 29, 2024
4211a03
FIX: udpated correct istructions README
9and3 Mar 29, 2024
8c59e13
FIX: udpated correct istructions README x2
9and3 Mar 29, 2024
1537aaf
CAP: added logging
9and3 Mar 30, 2024
b7346c8
FIX: minor const for logger
9and3 Mar 30, 2024
d56f8c4
ADD: refinedRegistration files to create PR
DamienGilliard Apr 12, 2024
3115296
WIP: Open3d ICP added to registration class
DamienGilliard Apr 15, 2024
e5dcdf5
WIP: refined registrations implemented
DamienGilliard Apr 22, 2024
9ca50de
Merge branch 'refined_registration' of github.com:diffCheckOrg/diffCh…
DamienGilliard May 2, 2024
f7dcbf7
FIX: open3d and boost submodules erronously deleted: re-added using l…
DamienGilliard May 2, 2024
9d957a5
WIP: change file name to DFRefinedRegistration and add documentation
DamienGilliard May 2, 2024
f458659
WIP: stashing before refactoring cmake project
9and3 Mar 29, 2024
ba27e3e
WIP: testing docker windows
9and3 Mar 29, 2024
05d8f51
FIX: udpated correct istructions README
9and3 Mar 29, 2024
e5923e8
FIX: udpated correct istructions README x2
9and3 Mar 29, 2024
9969a8a
CAP: added logging
9and3 Mar 30, 2024
8cf9894
FIX: minor const for logger
9and3 Mar 30, 2024
b20c82c
FIX: no logging to be pushed
9and3 Apr 2, 2024
34e14a1
ADD: refinedRegistration files to create PR
DamienGilliard Apr 12, 2024
b7ba041
WIP: Open3d ICP added to registration class
DamienGilliard Apr 15, 2024
ebeedab
WIP: refined registrations implemented
DamienGilliard Apr 22, 2024
9228e15
WIP: stashing before refactoring cmake project
9and3 Mar 29, 2024
36cd8b1
WIP: testing docker windows
9and3 Mar 29, 2024
b6e0072
FIX: udpated correct istructions README
9and3 Mar 29, 2024
c6f5c21
FIX: udpated correct istructions README x2
9and3 Mar 29, 2024
b1f400c
CAP: added logging
9and3 Mar 30, 2024
b0d4068
FIX: minor const for logger
9and3 Mar 30, 2024
f44069d
ADD: refinedRegistration files to create PR
DamienGilliard Apr 12, 2024
19bf804
WIP: Open3d ICP added to registration class
DamienGilliard Apr 15, 2024
3e9d752
WIP: refined registrations implemented
DamienGilliard Apr 22, 2024
4598514
ADD: refinedRegistration files to create PR
DamienGilliard Apr 12, 2024
3cdf659
WIP: Open3d ICP added to registration class
DamienGilliard Apr 15, 2024
d8fe53b
WIP: refined registrations implemented
DamienGilliard Apr 22, 2024
ab2b85b
FIX: open3d and boost submodules erronously deleted: re-added using l…
DamienGilliard May 2, 2024
fbd16db
WIP: change file name to DFRefinedRegistration and add documentation
DamienGilliard May 2, 2024
2bb29ed
WIP: rebase on main
DamienGilliard May 2, 2024
8416784
Merge branch 'refined_registration' of github.com:diffCheckOrg/diffCh…
DamienGilliard May 2, 2024
455881e
FIX: folder naming
DamienGilliard May 2, 2024
f852b97
FIX: folder naming
DamienGilliard May 2, 2024
a3b23a2
ADD: ICP refined registrations with exposed parameters
DamienGilliard May 2, 2024
bd6de0a
ADD: ICP refined registrations with exposed parameters
DamienGilliard May 2, 2024
283b57f
Fix: GeneralizedICP
DamienGilliard May 2, 2024
e7de865
WIP-FIX: normal computation for point to plane ICP added, and improve…
DamienGilliard May 3, 2024
c583767
CAP: Fully functionning and documented O3D ICP registration methods
DamienGilliard May 3, 2024
746d49b
FIX: doi instead of URL for external reference
DamienGilliard May 3, 2024
f366cd6
FIX: solve .gitmodule merge conflict
DamienGilliard May 3, 2024
c497970
FIX: sentence in documentation not clear
DamienGilliard May 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/gh-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: gh-build

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build_ghuser_components:
runs-on: windows-latest
name: Build components
steps:
- uses: actions/checkout@v2
- uses: NuGet/[email protected]

- name: Install CPython and pythonnet package
run: |
choco install python --version=3.9.10
python -m pip install pythonnet==3.0.3

- uses: compas-dev/compas-actions.ghpython_components@v5
with:
source: src/gh/components
target: build
interpreter: cpython

- uses: actions/upload-artifact@v2
with:
name: ghuser-components
path: build
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
[submodule "deps/loguru"]
path = deps/loguru
url = https://github.com/emilk/loguru.git
[submodule "deps/pybind11"]
path = deps/pybind11
url = https://github.com/pybind/pybind11.git
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
endif()

#--------------------------------------------------------------------------
# pre-compiled definitions
#--------------------------------------------------------------------------
if(SILENT_LOGGING)
target_compile_definitions(${PROJECT_NAME} PRIVATE SILENT_LOGGING=true)
endif()

#--------------------------------------------------------------------------
# pre-compiled definitions
Expand Down
109 changes: 108 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,120 @@ git add .gitmodules
git commit -m "Remove a submodule name"
```

---
# Python
DiffCheck is distributed as a Python Grasshopperr plug-in via yak and its source code via PyPI. The plug-in is composed by a series of `.ghuser` components.

There are 3 ways you can contribute to the Python GH plug-in:
1. By adding new components to the plug-in.
2. By fixing bugs of existing components in the plug-in.
3. By adding new functionalities to existing components in the plug-in.

Before committing to the repository you need to have tested the components in the Grasshopper environment and be sure that this is working correctly. Also, provide a sufficient documentation in the PR (for now) please.

Follow these steps to develop and test the Python GH plug-in:
- [GHPy: A) preparation](#ghpy-a-preparation)
- [GHPy: B) development/debug](#ghpy-b-developmentdebug)
- [GHPy: C) Release](#ghpy-c-release)
- [GHPy: D) Documentation](#ghpy-d-documentation)

## GHPy: A) preparation
Download this repo if you haven't already.
```terminal
git clone https://github.com/diffCheckOrg/diffCheck.git
```

Next, if you used diffCheck before as an end-user clean all the `diffCheck folders` in the following directory (the last name will change):
```terminal
C:\Users\<user-name>\.rhinocode\py39-rh8\site-envs\default-wMh5LZL3
```
> note that if you drop an official released diffCheck component from yak, this one will have the `#r : diffCheck==<version_number>` notation at the top of the script. Get rid of all these release components before to start and be sur to erase again the previous folders (they recreated each time `#r : diffCheck` is called).

Build the package from the py source code's directory:
```py
python setup.py sdist bdist_wheel
```

Lastly, install the pip pacakge from the repository in editable mode. This way, all the modifications made to the source code of the repository will be reflected in the installed package. Open a terminal and run the following command (replace the path with where you download the repository):
```terminal
C:\Users\<your-username>\.rhinocode\py39-rh8\python.exe -m pip install -e "<path-to-repository-root>\src\gh\diffCheck"
```

For your info the packages is installed in `C:\Users\andre\.rhinocode\py39-rh8\Lib\site-packages`.

That's it you are now a contributor to the diffCheck! We raccomand to not download anymore from yak package but rather use the source code in the repository. If you want the latest diffCheck, checkout and pull the main.

## GHPy: B) development/debug

### B.1) Code structure
For DiffCheck there are 2 main folders in the repository:
* `src/gh/diffCheck/components` here you can add new components or modify existing ones (for more info on how to create one we point you to [this documentation](https://github.com/compas-dev/compas-actions.ghpython_components)). Here we call the
* `src/gh/diffCheck/diffCheck` this is our package where the core functionalities are implemented.

### B.2) Developing component's content
The idea is to start by developing the content of the component in the file `src/gh/diffCheck/diffCgeck_app.py`. This would be a simple script that contains the logic of the component. Once the script `diffCheck_app.py` is working correctly, you can move the code to the component file in the `src/gh/diffCheck/components` folder. This is because the component file is the one that will be componentized and distributed via yak.

We reccomand to use `VSCode` as IDE for developing the components. This is because it has a good integration with the `Grasshopper` environment and it is easy to debug the components. To set up the IDE follow these steps:
1. Install the `ScriptSync` extension for `VSCode`.
2. Install the `ScriptSync` from the yak manager in Rhino.
3. Open the `diffCheckApp.py` from the `src/gh/diffCheck/components` folder you are working on in `VSCode`, and set its path to the ScriptSync ghcomponent.
4. If you modify the code in `VSCode`, the changes will be reflected in the Grasshopper component as soon as you save in `VSCode` again the `code.py`.
5. Once your code is working, prepare the code and componentize it.

If you want to use the GHEditor it's ok but everytime you modify the pakcage or the component's code, after any modifications you need to restart the Python interpreter from the ScriptEditor (`Tools > Reload Python3 (CPython) Engine`) and recompute the solution in Grasshopper.

### B.3) Componentize the code
Prepare your component as explained here. You can componentize it locally and test it in Grasshopper. Here's how to componentize:
```terminal
python f:\diffCheck\src\gh\util\componentizer_cpy.py --ghio "C:\Users\andre\.nuget\packages\grasshopper\8.2.23346.13001\lib\net48\" .\src\gh\components\ .\build\gh
```
> Note that you need to find the path to your GHIO folder. This is the folder where the `Grasshopper.dll` is located. E.g. You can find it in the `nuget` folder in the Rhino installation directory.

Once you are sure that the component is working correctly, you can push the changes to the repository.

## GHPy: C) Release
The release will be made via CI from main. As a contributor you don't need to worry about this. The plug-in is componentized, pushed to yak/PyPI and the user can download the latest version from yak.

## GHPy: D) Documentation
More to come.


<!-- ## PyPI
To push the package to PyPI, you need to:
1. Install the package `twine`:
```bash
pip install twine
```
2. Build the package:
```bash
python setup.py sdist bdist_wheel
```
3. Check the package:
```bash
twine check dist/*
```
4. Upload the package:
```bash
twine upload dist/*
```
Be sure to have the right to upload the package to the PyPI repository.
To do so you need to set the `~/.pypirc` file with the following content:
```bash
[distutils]
index-servers=pypi

[pypi]
username = __token__
password = pypi-<your-TOKEN>
``` -->

---
# C++

### Naming & synthax convention
Here's the naming convention for this project:
- ` `: lowerCamelCase.
- `type PrivateVariable`: public member of a class
- `type PublicVariable`: public member of a class
- `type m_PrivateVariable`: Hungarian notation with UpperCamelCase for private class members.
- `static type s_StaticVariable`: Hungarian notation with UpperCamelCase for static members of class.
- `APP_SPEC`: Constants with SNAKE_UPPER_CASE.
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# diffCheck
<p align="left">
<p align="center">
<img src="./assets/logo/logo_pixelized_bwvioelt.png" width="150">
</p>
<p align="center">
<img src="https://github.com/diffCheckOrg/diffCheck/actions/workflows/win-build.yml/badge.svg">
<img src="https://github.com/diffCheckOrg/diffCheck/actions/workflows/gh-build.yml/badge.svg">
<img src="https://img.shields.io/pypi/v/diffCheck" href="https://pypi.org/project/diffCheck/">
</p>

Temporary repository for diffCheck

## Roadmap

Expand Down
Loading