Comments (28)
This function is needs to be compiled. Travel to the mex/
folder and checkout the README there.
It might take a little effort to compile these on Windows, but you could have a look at compile_gptoolbox
.
You'll definitely need to install libigl and make sure those are properly included.
from gptoolbox.
Thank you. I will see if i can compile it.
from gptoolbox.
Can you tell me how to install libigl?
Note: I'm wording on Matlab R2017b and Windows 7. (in case it matters)
Thank you
from gptoolbox.
from gptoolbox.
Is it this one?
https://github.com/libigl/libigl/
I f yes, I already did downloaded it. and tried to run (compile_gptoolbox_mex)
But I got this error!
Error using find_first_path (line 8)
Could not find path
Error in path_to_libigl (line 8)
s = find_first_path({'/usr/local/igl/libigl/','/usr/local/libigl/'});
Error in gptoolbox_mexopts (line 51)
use_libigl_static_library = exist([path_to_libigl '/lib/libigl.a'],'file')~=0;
Error in compile_gptoolbox_mex (line 1)
[all_opts,use_libigl_static_library] = gptoolbox_mexopts();
so should I save it in a specific place on my PC ?
Thanks a lot
from gptoolbox.
Try this code, but adjust the path of "libgl" & "eigen" before you run the script.
clearvars
eigen_version='07105f7124f9';
path_to_eigen=['C:\dev\eigen-eigen-' eigen_version];
path_to_libigl='C:\dev\libigl';
%%
MEXOPTS={'-v','-largeArrayDims','-DMEX'};
EIGEN_INC= ['-I' path_to_eigen];
LIBIGL_INC=['-I' path_to_libigl '\include'];
LIBIGL_FLAGS='-DIGL_SKIP';
LIBIGL_LIB={'-DIGL_SKIP'};
LIBIGL_LIBMATLAB='-DIGL_SKIP';
LIBIGL_LIBCGAL='-DIGL_SKIP';
LIBIGL_LIBCORK='-DIGL_NO_CORK';
LIBIGL_BASE={LIBIGL_INC, LIBIGL_FLAGS,LIBIGL_LIB{:}, LIBIGL_LIBMATLAB};
mex( ...
MEXOPTS{:}, ...
LIBIGL_BASE{:},EIGEN_INC, ...
'signed_distance.cpp');
Works for me with MATLAB R2017b & Microsoft Visual C++ 2015 Professional.
from gptoolbox.
Hi oqilipo
It started to build with Microsoft compiler . But I got the next error:
Error using mex
signed_distance.cpp
C:\Users\faa23\Desktop\MatlabCodes\libigl\include\igl/per_vertex_normals.h(11) : fatal error C1083: Cannot open include file: 'Eigen/Core': No such file or directory
Error in Untitled (line 22)
mex( ...
Do you have any idea what is this error about ?
Thank you so much
from gptoolbox.
Try this code, but adjust the path of "libgl" & "eigen" before you run the script.
First download "eigen". Link above ^^^^
from gptoolbox.
I did downloaded it.
and first part worked fine.
clearvars
eigen_version='07105f7124f9';
path_to_eigen=['C:\dev\eigen-eigen-' eigen_version];
path_to_libigl='C:\dev\libigl';
The problem is in Line 22 i think
from gptoolbox.
The problem is that the compiler does not find eigen:
Cannot open include file: 'Eigen/Core
Did you adjust version of eigen to the version you have downloaded:
eigen_version='07105f7124f9';
Did you adjust the path to the location on your computer.
path_to_eigen=['C:\dev\eigen-eigen-' eigen_version];
path_to_libigl='C:\dev\libigl';
from gptoolbox.
I did all of that.
I downloaded both, so they came as eigen-eigen-5a0156e40feb and libigl-master. So changed names as libigl and eigen to be easier !
then I put eigen_version as:
eigen_version='5a0156e40feb';
I got eigen_version from the folder name before I change it, is that right?
then I put the path as:
path_to_eigen=['C:\Users\faa23\Desktop\MatlabCodes\eigen' eigen_version];
path_to_libigl='C:\Users\faa23\Desktop\MatlabCodes\libigl';
But still get this error:
Error using mex
signed_distance.cpp
C:\Users\faa23\Desktop\MatlabCodes\libigl\include\igl/per_vertex_normals.h(11) : fatal error C1083: Cannot open include file: 'Eigen/Core': No such file or directory
Error in Untitled (line 22)
mex( ...
Did i do anything wrong?
from gptoolbox.
path_to_eigen=['C:\Users\faa23\Desktop\MatlabCodes\eigen' eigen_version];
Most likely:
path_to_eigen=['C:\Users\faa23\Desktop\MatlabCodes\eigen-eigen-' eigen_version];
from gptoolbox.
Do you think the path to Core is the problem here?
maybe the Forward slash (Eigen/Core) should be a backslash(Eigen\Core) inside some function.
I tried to find that to change it and see, but couldn't!
from gptoolbox.
Try this code. If the assertion in line 7 fails, the path of eigen is wrong.
clearvars
eigen_version='5a0156e40feb';
path_to_eigen=['C:\Users\faa23\Desktop\MatlabCodes\eigen-eigen-' eigen_version];
% Check if the eigen path is correct
assert(exist([path_to_eigen '\Eigen\Core'],'file')==2)
path_to_libigl='C:\Users\faa23\Desktop\MatlabCodes\libigl';
%%
MEXOPTS={'-v','-largeArrayDims','-DMEX'};
EIGEN_INC= ['-I' path_to_eigen];
LIBIGL_INC=['-I' path_to_libigl '\include'];
LIBIGL_FLAGS='-DIGL_SKIP';
LIBIGL_LIB={'-DIGL_SKIP'};
LIBIGL_LIBMATLAB='-DIGL_SKIP';
LIBIGL_LIBCGAL='-DIGL_SKIP';
LIBIGL_LIBCORK='-DIGL_NO_CORK';
LIBIGL_BASE={LIBIGL_INC, LIBIGL_FLAGS,LIBIGL_LIB{:}, LIBIGL_LIBMATLAB};
mex( ...
MEXOPTS{:}, ...
LIBIGL_BASE{:},EIGEN_INC, ...
'signed_distance.cpp');
from gptoolbox.
Unfortunately it does fail, I got the following error. !!!
Error using assertion_check (line 7)
Assertion failed.
Is there any way to detect the mistake ? or fix it?
do you think I should delete all other Microsoft Visual C++ except Microsoft Visual C++ 2015 Professional?
from gptoolbox.
No, at the moment the problem is that the path of eigen is wrong.
Post the full path of the file .../Eigen/Core how it appears on your harddisk.
from gptoolbox.
Here it is:
C:\Users\faa23\Desktop\3D_DiskTop\MatlabCodes\iges (original)\eigen-eigen-\Eigen
I can't go inside Core, because its a file not a folder
so my code is
path_to_eigen=['C:\Users\faa23\Desktop\3D_DiskTop\MatlabCodes\iges (original)\eigen-eigen-',eigen_version];
from gptoolbox.
then edit the Matlab script:
path_to_eigen='C:\Users\faa23\Desktop\3D_DiskTop\MatlabCodes\iges (original)\eigen-eigen-';
and it should work
from gptoolbox.
the path does work !!! Thank you so much
and its started building with Microsoft Windows SDK 7.1.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
BUT, now i got the following error .
Error using mex
signed_distance.cpp
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\intrin.h(26) : fatal error C1083: Cannot open include file: 'ammintrin.h': No such file or directory
Error in Untitled (line 25)
mex( ...
Do you have an idea why is it happening ?
from gptoolbox.
Maybe try a different compiler first. Type in the command window in Matlab:
mex -setup:'C:\Program Files\MATLAB\R2017b\bin\win64\mexopts\msvcpp2015.xml' C++
from gptoolbox.
I get the following :
Error using mex
MEX cannot use compiler 'Microsoft Visual C++ 2015' because that compiler is not found.
so I will download it and see
from gptoolbox.
use:
mex -setup C++
to see, which compilers are available on your system
from gptoolbox.
Do you know where can i download Microsoft Visual C++ 2015 compiler ?
I run mex -setup C++
and got
MEX configured to use 'Microsoft Windows SDK 7.1 (C++)' for C++ language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. You will be required
to update your code to utilize the new API.
You can find more information about this at:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
Seems like I don't have Microsoft Visual C++ 2015!
from gptoolbox.
Yes, Microsoft Windows SDK 7.1 is not supported as of R2017b.
See: https://www.mathworks.com/support/compilers.html
from gptoolbox.
try this compiler, works for me:
https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c++-compiler
from gptoolbox.
the functions are runing now after installing Microsoft Visual C++ 2015 and I got the SF and SV which i was looking for in this example
http://www.alecjacobson.com/weblog/?p=4708
But when i run the second section of the script to plot the STL and see it
clf;
hold on;
t = tsurf(F,V,'EdgeColor','none',fsoft, 'FaceVertexCData',repmat(blue,size(V,1),1),'FaceAlpha',1+(iso<0)(0.35-1),fphong);
ts = tsurf(SF,SV,'EdgeAlpha',0.2+(iso<0)(0-0.2),fsoft,'FaceVertexCData',repmat(orange,size(SV,1),1),fphong,'FaceAlpha',1+(iso>0)(0.2-1));
apply_ambient_occlusion(ts);
hold off;
axis equal;
view(-20,20)
camlight;
t.SpecularStrength = 0.04;
l = light('Position',[5 -5 10],'Style','local');
add_shadow(t,l,'Color',0.8[1 1 1],'Fade','local','Ground',[0 0 -1 min([V(:,3);SV(:,3)])]);
set(gca,'pos',[0 0 1 1])
set(gca,'Visible','off');
set(gcf,'Color','w');
drawnow;
I get this error
Error using matlab.graphics.primitive.Patch/set
Error setting property 'FaceVertexCData' of class 'Patch':
Value must be an Nx1 or Nx3 array of numeric type
Error in tsurf (line 130)
set(t_copy,varargin{v:end});
Error in Untitled (line 29)
t = tsurf(F,V,'EdgeColor','none',fsoft, 'FaceVertexCData',repmat('blue',size(V,1),1),'FaceAlpha',1+(iso<0)*(0.35-1),fphong);
Thought V,F,SV and SF are all Nx3 array of type double
Do you have an idea what is going on???
And as usual i really appreciate your time
from gptoolbox.
You may open a new issue for that problem and close this issue.
from gptoolbox.
Thank you so much oqilipo for the help.
from gptoolbox.
Related Issues (20)
- A required library with BLAS API not found
- how to mex on mesh_boolean HOT 3
- Install this toolbox on win10 HOT 2
- Compiling mex on M1 Mac HOT 13
- Could NOT find Matlab HOT 8
- kharmonic on high-poly meshes HOT 1
- Qslim.exe file
- Unexpected Standard exception What() is:vector when calling mex principal_curvature HOT 2
- dependend .dlls wont be copied to `./mex` after successfull compilation.
- Looking for sgemm_ - not found HOT 5
- No find: meshgrid, Parameterization QuadCover, HOT 6
- error when building CXX object CMakeFiles/upper_envelope.dir/upper_envelope.cpp.o HOT 1
- ld.exe: cannot find /export:mexFunction: No such file or directory
- Invalid MEX-file 'C:\......\selfintersect.mexw64': The specified module could not be found. HOT 3
- Cannot find /export:mexFunction: No such file or directory HOT 7
- run GPtoolbox HOT 1
- Compile Mex for Octave
- Compile failed. Cannot find split_nonmanifold.cpp
- The function DUAL_LAPLACIAN can not be used
- Interpolationin Tetra mesh. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gptoolbox.