CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

libnurbs++

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By hannes
  • 1 Post By hannes
  • 1 Post By Bandfrosch

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2012, 03:51
Default libnurbs++
  #1
New Member
 
Paweł Kuczyński
Join Date: Feb 2011
Location: Warsaw, Poland
Posts: 19
Rep Power: 15
kuczmas is on a distinguished road
Dear forumers!

I want to create a NURBS surface from a cloud of points, using the least squares method. As far as I am concerned, such capabilities are available in libnurbs++ library, which I downloaded from:
http://libnurbs.sourceforge.net/old/index.shtml
Even I managed to compile it, after some manipulations.
I wanted to ask if anyone used this library to create and manipulate nurbs surfaces? Any help would be much appreciated!

Thanks in advance!
__________________
Best regards
P. Kuczynski.
kuczmas is offline   Reply With Quote

Old   April 24, 2012, 11:15
Default
  #2
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
hello,

I have not tested by myself, but you may take a look at MeshLab.

regards,
olivier
olivierG is offline   Reply With Quote

Old   April 25, 2012, 14:25
Default
  #3
Senior Member
 
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 123
Rep Power: 18
hannes is on a distinguished road
Hello,

I have used it in for creating surfaces from sample points.
For visualization and further processing I convert the resulting data into OpenCASCADE data structures.
Initially, I tried to do the job using OpenCASCADE interpolation functions, but nurbs++ work a lot better for this.

Regards, Hannes
kuczmas likes this.
hannes is offline   Reply With Quote

Old   May 8, 2012, 11:07
Default
  #4
New Member
 
Paweł Kuczyński
Join Date: Feb 2011
Location: Warsaw, Poland
Posts: 19
Rep Power: 15
kuczmas is on a distinguished road
Many thanks for quick reply!

Hannes, this is exactly what I intend to do, but I have got some problems just at the beginning during compilation of the library (I have gcc 4.4.3). The error message is the following:

Code:
d_surface.cpp:29: error: explicit instantiation of 'class  BasicList<PLib::InterPoint<double, 2> >' in namespace 'PLib'  (which does not enclose namespace '::')
d_surface.cpp:30: error: explicit instantiation of 'class  BasicList<PLib::InterPoint<double, 3> >' in namespace 'PLib'  (which does not enclose namespace '::')
When I erase those lines in the d_surface.cpp file, the compilation of the library goes fine. But then when I try to compile a simple program, which uses libnurbs, then I got the following error:

Code:
/home/pakuc/libnurbs/lib/libnurbsd.so: undefined reference to `BasicList<PLib::InterPoint<double, 2> >::add(PLib::InterPoint<double, 2> const&)'
/home/pakuc/libnurbs/lib/libnurbsd.so: undefined reference to `BasicList<PLib::InterPoint<double, 2> >::reset()'
/home/pakuc/libnurbs/lib/libnurbsd.so: undefined reference to `BasicList<PLib::InterPoint<double, 3> >::reset()'
/home/pakuc/libnurbs/lib/libnurbsd.so: undefined reference to `BasicList<PLib::InterPoint<double, 3> >::add(PLib::InterPoint<double, 3> const&)'
So it seems that lines which include BasicList<>::... functions can not be simply ommited. I've heard that there are some compilation issues of the libnurbs library with newer versions of gcc. Have you encountered simillar problems?
__________________
Best regards
P. Kuczynski.
kuczmas is offline   Reply With Quote

Old   May 8, 2012, 15:37
Default
  #5
Senior Member
 
Hannes Kröger
Join Date: Mar 2009
Location: Rostock, Germany
Posts: 123
Rep Power: 18
hannes is on a distinguished road
Hello Pawel,

If I remember right, I didn't compile it myself but installed a *.deb-Package from the "cae-team" ppa.

I guess, it was this: https://launchpad.net/~cae-team/+archive/ppa

Regards, Hannes
kuczmas likes this.
hannes is offline   Reply With Quote

Old   May 9, 2012, 18:47
Post
  #6
New Member
 
Join Date: Apr 2010
Posts: 10
Rep Power: 16
Bandfrosch is on a distinguished road
Hello Pawel,

you may also try this patch for nurbs++.
It makes gcc version 4.6.2 on OpenSUSE happy.
All is based on the Zip file found here:
http://libnurbs.sourceforge.net/old/index.shtml


* copy libnurbs++-3.0.11.patch.gz to the nurbs++ source directory
* gunzip it
* apply patch ( in terminal )

patch -p0 < libnurbs++-3.0.11.patch

* rebuild nurbs++ via make

Good luck !
Attached Files
File Type: gz libnurbs++-3.0.11.patch.gz (14.7 KB, 25 views)
kuczmas likes this.
Bandfrosch is offline   Reply With Quote

Old   May 10, 2012, 04:52
Default
  #7
New Member
 
Paweł Kuczyński
Join Date: Feb 2011
Location: Warsaw, Poland
Posts: 19
Rep Power: 15
kuczmas is on a distinguished road
Thanks for help!

I have successfully installed the libnurbs++ from ppa archive and it works fine :-).
__________________
Best regards
P. Kuczynski.
kuczmas is offline   Reply With Quote

Old   May 14, 2012, 06:33
Default
  #8
New Member
 
Paweł Kuczyński
Join Date: Feb 2011
Location: Warsaw, Poland
Posts: 19
Rep Power: 15
kuczmas is on a distinguished road
Dear All,

What now I intend to do is to visualize the geometry, created by libnurbs++. I know there is an openGL extension to that library. I have encountered a problem when compiling a sample program topengl (which is provided with the libnurbs++ library), which uses some functions from rnubsGL.h file. The error message is the following:
Code:
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-40 -I/usr/include/nurbs++ -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude   -fPIC Make/linux64GccDPDebug/my_topengl_v01.o -L/opt/openfoam171/lib/linux64GccDPDebug \
         -L/usr/lib     -lmatrix     -lmatrixI     -lmatrixN     -lnurbsd     -lnurbsf     -lGL     -lGLU     -lglut -lOpenFOAM -liberty -ldl  -ggdb3 -DFULLDEBUG -lm -o /home/pakuc/OpenFOAM/pakuc-1.7.1/applications/bin/linux64GccDPDebug/my_opengl_v01
Make/linux64GccDPDebug/my_topengl_v01.o: In function `NurbsViewer::initNurbsObjects(GLUnurbs*)':
/home/pakuc/OpenFOAM/pakuc-1.7.1/applications/my_tests/my_topengl_v01/my_topengl_v01.cpp:47: undefined reference to `PLib::NurbsCurveGL::read(std::basic_ifstream<char, std::char_traits<char> >&)'
/home/pakuc/OpenFOAM/pakuc-1.7.1/applications/my_tests/my_topengl_v01/my_topengl_v01.cpp:54: undefined reference to `PLib::NurbsCurveGL::read(std::basic_ifstream<char, std::char_traits<char> >&)'
Make/linux64GccDPDebug/my_topengl_v01.o: In function `NurbsViewer::display()':
/home/pakuc/OpenFOAM/pakuc-1.7.1/applications/my_tests/my_topengl_v01/my_topengl_v01.cpp:94: undefined reference to `PLib::NurbsSurfaceGL::gluNurbs() const'
Make/linux64GccDPDebug/my_topengl_v01.o: In function `NurbsCpolygonGL':
/usr/include/nurbs++/nurbsGL.h:691: undefined reference to `PLib::ObjectGL::ObjectGL()'
/usr/include/nurbs++/nurbsGL.h:691: undefined reference to `vtable for PLib::NurbsCpolygonGL'
/usr/include/nurbs++/nurbsGL.h:691: undefined reference to `PLib::cPolygonColorDefault'
Make/linux64GccDPDebug/my_topengl_v01.o: In function `NurbsSpolygonGL':
/usr/include/nurbs++/nurbsGL.h:707: undefined reference to `PLib::ObjectGL::ObjectGL()'
/usr/include/nurbs++/nurbsGL.h:707: undefined reference to `vtable for PLib::NurbsSpolygonGL'
/usr/include/nurbs++/nurbsGL.h:707: undefined reference to `PLib::cPolygonColorDefault'
Make/linux64GccDPDebug/my_topengl_v01.o: In function `~BoundingBoxGL':
/usr/include/nurbs++/nurbsGL.h:722: undefined reference to `vtable for PLib::BoundingBoxGL'
/usr/include/nurbs++/nurbsGL.h:722: undefined reference to `PLib::ObjectGL::~ObjectGL()'
Make/linux64GccDPDebug/my_topengl_v01.o: In function `~NurbsGL':
/usr/include/nurbs++/nurbsGL.h:747: undefined reference to `vtable for PLib::NurbsGL'
/usr/include/nurbs++/nurbsGL.h:747: undefined reference to `PLib::ObjectListGL::~ObjectListGL()'
/usr/include/nurbs++/nurbsGL.h:747: undefined reference to `PLib::ObjectListGL::~ObjectListGL()'
/usr/include/nurbs++/nurbsGL.h:747: undefined reference to `PLib::ObjectListGL::~ObjectListGL()'
/usr/include/nurbs++/nurbsGL.h:747: undefined reference to `PLib::ObjectListGL::~ObjectListGL()'
/usr/include/nurbs++/nurbsGL.h:747: undefined reference to `PLib::ObjectGL::~ObjectGL()'
/usr/include/nurbs++/nurbsGL.h:747: undefined reference to `PLib::ObjectGL::~ObjectGL()'
Make/linux64GccDPDebug/my_topengl_v01.o: In function `NurbsCurveGL':
/usr/include/nurbs++/nurbsGL.h:834: undefined reference to `PLib::NurbsGL::NurbsGL()'
/usr/include/nurbs++/nurbsGL.h:834: undefined reference to `vtable for PLib::NurbsCurveGL'
/usr/include/nurbs++/nurbsGL.h:834: undefined reference to `vtable for PLib::NurbsCurveGL'
Make/linux64GccDPDebug/my_topengl_v01.o: In function `NurbsSurfaceGL':
/usr/include/nurbs++/nurbsGL.h:872: undefined reference to `PLib::NurbsGL::NurbsGL()'
/usr/include/nurbs++/nurbsGL.h:872: undefined reference to `vtable for PLib::NurbsSurfaceGL'
/usr/include/nurbs++/nurbsGL.h:872: undefined reference to `vtable for PLib::NurbsSurfaceGL'
Make/linux64GccDPDebug/my_topengl_v01.o: In function `~NurbsSurfaceGL':
/usr/include/nurbs++/nurbsGL.h:877: undefined reference to `vtable for PLib::NurbsSurfaceGL'
/usr/include/nurbs++/nurbsGL.h:877: undefined reference to `vtable for PLib::NurbsSurfaceGL'
Make/linux64GccDPDebug/my_topengl_v01.o: In function `~NurbsCurveGL':
/usr/include/nurbs++/nurbsGL.h:832: undefined reference to `vtable for PLib::NurbsCurveGL'
/usr/include/nurbs++/nurbsGL.h:832: undefined reference to `vtable for PLib::NurbsCurveGL'
collect2: ld returned 1 exit status
make: *** [/home/pakuc/OpenFOAM/pakuc-1.7.1/applications/bin/linux64GccDPDebug/my_opengl_v01] Błąd 1
Has anyone used openGL together with libnurbs++? Hannes, have you used openGL, or exlusively openCASCADE for visualization?
__________________
Best regards
P. Kuczynski.
kuczmas is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 16:03.