Skip to content

Commit c7e95ca

Browse files
committed
FIX: update readme with new instructions
1 parent aa25873 commit c7e95ca

File tree

6 files changed

+149
-18
lines changed

6 files changed

+149
-18
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,15 @@ gantt
4747
## 3rd party libraries
4848

4949
The project uses the following 3rd party libraries:
50-
- `Open3d` for 3D point cloud processing (as binary submodule for win64 that we store in [submodule-open3d](https://github.com/diffCheckOrg/submodule-open3d)). Note that we deactivate the visualization part of `Open3d` to avoid conflicts with our visualizator.
50+
- `Open3d 0.18.0` for 3D point cloud processing it needs to be installed from source [from here](https://github.com/isl-org/Open3D/releases/download/v0.18.0/open3d-devel-windows-amd64-0.18.0.zip), unzip the file and by following the instructions below:
51+
```terminal
52+
cd open3d
53+
mkdir build
54+
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="C:\Program Files\Open3D" -S . -B build
55+
cmake --build build --config Release --target ALL_BUILD
56+
cmake --build build --config Release --target INSTALL
57+
58+
5159
- `Eigen` for linear algebra (needed by `Open3d`)
5260
- `fmt` for string formatting (needed by `Open3d`)
5361
- `libigl` mainly for I/O and visualization
@@ -57,8 +65,8 @@ The project uses the following 3rd party libraries:
5765
To build and test the project, follow the following steps:
5866
5967
```terminal
60-
cmake -S . -B build
61-
cmake --build build
68+
cmake/config.bat
69+
cmake/build.bat
6270
./build/bin/diffCheckApp.exe <-- for prototyping
6371
```
6472

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"class_name" : "PinholeCameraParameters",
3+
"extrinsic" :
4+
[
5+
-0.52712759467998116,
6+
0.1018139890505111,
7+
-0.84366486863002665,
8+
0.0,
9+
-0.74340824420839058,
10+
0.4257121323526159,
11+
0.51586176715355336,
12+
0.0,
13+
0.41168031452802739,
14+
0.89911239119556752,
15+
-0.14871525351722745,
16+
0.0,
17+
0.50975601716479924,
18+
0.041024562238211618,
19+
2.4917203707816649,
20+
1.0
21+
],
22+
"intrinsic" :
23+
{
24+
"height" : 800,
25+
"intrinsic_matrix" :
26+
[
27+
692.82032302755101,
28+
0.0,
29+
0.0,
30+
0.0,
31+
692.82032302755101,
32+
0.0,
33+
499.5,
34+
399.5,
35+
1.0
36+
],
37+
"width" : 1000
38+
},
39+
"version_major" : 1,
40+
"version_minor" : 0
41+
}
31.2 KB
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:593f0b8a66b79471756b5bc51381a06391cf29017bdc437fbdb3863f02ce14ce
3+
size 552225

cmake/install_open3d.bat

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
@echo off
2+
setlocal
3+
4+
:: run the following in a pop up window to avoid the console window and ask to ru n ass admin
5+
@echo off
6+
:: BatchGotAdmin
7+
:-------------------------------------
8+
REM --> Check for permissions
9+
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
10+
11+
REM --> If error flag set, we do not have admin.
12+
if '%errorlevel%' NEQ '0' (
13+
echo Requesting administrative privileges...
14+
goto UACPrompt
15+
) else ( goto gotAdmin )
16+
17+
:UACPrompt
18+
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
19+
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
20+
21+
"%temp%\getadmin.vbs"
22+
exit /B
23+
24+
:gotAdmin
25+
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
26+
pushd "%CD%"
27+
CD /D "%~dp0"
28+
:--------------------------------------
29+
30+
31+
32+
:: Define the download URL and the target directory
33+
set "url=https://github.com/isl-org/Open3D/releases/download/v0.18.0/open3d-devel-windows-amd64-0.18.0.zip"
34+
set "targetDir=C:\Program Files\Open3Dtest"
35+
36+
:: Create the if the directory does not exist
37+
if not exist "%targetDir%" mkdir "%targetDir%
38+
39+
:: check if the directory was created
40+
if not exist "%targetDir%" (
41+
echo Failed to create the target directory.
42+
exit /b 1
43+
)
44+
45+
:: Download the file
46+
echo Downloading Open3D...
47+
curl -L -o "%targetDir%\open3d.zip" "%url%"
48+
49+
:: wait for the file to be completely downloaded
50+
ping -n 5
51+
52+
:: check if the file was downloaded
53+
if not exist "%targetDir%\open3d.zip" (
54+
echo Failed to download Open3D.
55+
exit /b 1
56+
)
57+
58+
59+
:: Extract the file
60+
echo Extracting Open3D...
61+
powershell -Command "Expand-Archive -Path '%targetDir%\open3d.zip' -DestinationPath '%targetDir%'"
62+
63+
:: Delete the downloaded zip file
64+
del "%targetDir%\open3d.zip"
65+
66+
:: Change to the target directory
67+
cd /d "%targetDir%"
68+
69+
:: Run the cmake commands
70+
echo Building Open3D...
71+
cmake -DBUILD_WEBRTC=OFF -DBUILD_SHARED_LIBS=ON -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="%targetDir%" -S . -B build
72+
if errorlevel 1 (
73+
echo Failed to run cmake configuration command.
74+
exit /b 1
75+
)
76+
77+
cmake --build build --config Release --target ALL_BUILD
78+
if errorlevel 1 (
79+
echo Failed to build ALL_BUILD.
80+
exit /b 1
81+
)
82+
83+
cmake --build build --config Release --target INSTALL
84+
if errorlevel 1 (
85+
echo Failed to install.
86+
exit /b 1
87+
)
88+
89+
echo Done.
90+
endlocal

src/diffCheckApp.cc

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,13 @@ int main()
1515
std::shared_ptr<diffCheck::geometry::DFMesh> dfMeshPtr = std::make_shared<diffCheck::geometry::DFMesh>();
1616

1717
std::string pathCloud = R"(C:\Users\andre\Downloads\scan_data_normals.ply\scan_data_normals.ply)";
18-
// std::string pathMesh = R"(F:\diffCheck\temp\export_meesh_tri.ply)";
19-
// std::string pathMesh = R"(F:\diffCheck\temp\03_mesh.ply)";
20-
std::string pathMesh = R"(C:\Users\andre\Downloads\crankshaft-hd-ply\Crankshaft HD.ply)";
18+
std::string pathMesh = R"(F:\diffCheck\assets\dataset\mesh_fromRh_unfixedLength.ply)";
2119

22-
dfPointCloudPtr->LoadFromPLY(pathCloud);
23-
24-
25-
std::shared_ptr<open3d::geometry::TriangleMesh> sphereMesh = open3d::geometry::TriangleMesh::CreateSphere(50.0, 100, 100);
26-
27-
dfMeshPtr->Cvt2DFMesh(sphereMesh);
28-
29-
std::cout << "Number of vertices in the mesh: " << sphereMesh->vertices_.size() << std::endl;
30-
std::cout << "Number of faces in the mesh: " << sphereMesh->triangles_.size() << std::endl;
31-
32-
std::cout << "Loading mesh from: " << pathMesh << std::endl;
20+
dfMeshPtr->LoadFromPLY(pathMesh);
21+
// dfPointCloudPtr->LoadFromPLY(pathCloud);
3322

3423
std::shared_ptr<diffCheck::visualizer::Visualizer> vis = std::make_shared<diffCheck::visualizer::Visualizer>();
35-
vis->AddPointCloud(dfPointCloudPtr);
24+
// vis->AddPointCloud(dfPointCloudPtr);
3625
vis->AddMesh(dfMeshPtr);
3726
vis->Run();
3827

0 commit comments

Comments
 (0)