GithubHelp home page GithubHelp logo

acd2d's People

Contributors

jmlien avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

acd2d's Issues

Segmentation fault

Got two kinds of "segmentation fault" when running the code. Here are the procedures for reproducing the errors:
My environment: Ubuntu 16.04 x86-64
Repo head: b32d695 (current master)
Compile:

$ git clone https://github.com/jmlien/acd2d.git
$ cd acd2d
$ make

Run for segmentation fault 1:

$ ./acd2d_gui ./test_env/hole2.poly

Console output:

 - Input: ./test_env/hole2.poly
           concavity tolerance=0
      concavity weight (alpha)=0
        distance weight (beta)=1
 GUI Usage:
 d:                  decompose once
 D:                  decompose all
 n:                  show/hide normal direction 
 h:                  show/hide convex hulls
 r:                  reset camera
 space bar:          reload polygon
 s:                  save decomposition
 p:                  save rendering to PS file
 +/-:                zoom in/out
 arrow keys:         translate

Gdb output:

 0x00000000000001a1 in ?? ()
 (gdb) bt
 #0  0x00000000000001a1 in ?? ()
 #1  0x000000000040cdde in acd2d::cd_2d::decompose_OUT(double, acd2d::cd_polygon&, cd2d::cd_poly&)
     ()
 #2  0x000000000040f1df in acd2d::cd_2d::decompose(double, acd2d::IConcavityMeasure*) ()
 #3  0x000000000040f4c1 in acd2d::cd_2d::decomposeAll(double, acd2d::IConcavityMeasure*) ()
 #4  0x0000000000419874 in decomposeAll () at gui/acd2d_main_gui.cpp:186
 #5  0x0000000000419fa9 in Keyboard (key=68 'D', x=169, y=282) at gui/acd2d_main_gui.cpp:294
 #6  0x00007fb4f12d7d1f in glutMainLoopEvent () from /usr/lib/x86_64-linux-gnu/libglut.so.3
 #7  0x00007fb4f12d8145 in glutMainLoop () from /usr/lib/x86_64-linux-gnu/libglut.so.3
 #8  0x000000000041aa19 in gli::gliMainLoop () at gui/GL/gli.h:39
 #9  0x000000000041926a in main (argc=2, argv=0x7ffda5663ff8) at gui/acd2d_main_gui.cpp:106

Run for segmentation fault 2:

$ ./acd2d_gui ./test_env/my_test.poly

Console output:

- Input: ./test_env/ocsc.poly
          concavity tolerance=0
     concavity weight (alpha)=0
       distance weight (beta)=1
GUI Usage:
d:                  decompose once
D:                  decompose all
n:                  show/hide normal direction 
h:                  show/hide convex hulls
r:                  reset camera
space bar:          reload polygon
s:                  save decomposition
p:                  save rendering to PS file
+/-:                zoom in/out
arrow keys:         translate
! ERROR: FindCut_Out Error
! ERROR Info: U=-nan
! ERROR Info: U=-nan
! ERROR Info: U=-nan
! ERROR Info: U=-nan
! ERROR Info: U=-nan
! ERROR Info: U=-nan
! ERROR Info: U=-nan
! ERROR Info: Cut line O=(0.975589,-0.430997)
! ERROR Info: Cut line V=(-nan,-nan)
! ERROR Info: Polygon=
8 out
0.981055 -0.241068
0.975589 -0.430997
0.981055 -0.241068
0.674894 -0.147007
0.390904 -0.149679
0.388231 -0.111591
0.674894 -0.120278
0.674894 -0.147007
1 2 3 4 5 6 7 8 

Gdb output:

0x0000000000000080 in ?? ()
(gdb) bt
#0  0x0000000000000080 in ?? ()
#1  0x000000000044a5ce in acd2d::setBridge (e=0xa84970, s=<optimized out>, b=0x0)
#2  acd2d::removeBridge (v=0xa84af0)
#3  acd2d::cd_vertex::~cd_vertex (this=0xa84af0, __in_chrg=<optimized out>)
#4  acd2d::cd_poly::destroy (this=0xa84b80)
#5  acd2d::cd_polygon::destroy (this=this@entry=0xa85350)
#6  0x000000000044cfd9 in acd2d::cd_2d::destroy (this=this@entry=0x7ffff76ed628)

Please check the attachment "my_test.txt" for "my_test.poly".

Thank you!
Luke

Attachments:
my_test.txt

libFIST : recompile with -fPIC

While trying to make the repo, I get the following error with the FIST library.

g++ -std=c++11 -MMD -W -O3 -Wno-deprecated -Wno-unused-parameter -I. -Isrc -Isrc/mathtool -Isrc/hull -Isrc/edge_visibility -Igui -Igui/GL -I./libs/FIST -fPIC  -o acd2d_gui src/acd2d_data.o src/acd2d_concavity.o src/acd2d_core.o src/mathtool/acd2d_Basic.o src/hull/acd2d_hull_use_qhull.o src/hull/acd2d_hull.o src/edge_visibility/acd2d_edge_visibility.o src/edge_visibility/acd2d_ev_function.o gui/acd2d_drawPS.o gui/acd2d_main_gui.o gui/acd2d_stat.o gui/GL/gliTexture.o gui/GL/gliFont.o gui/GL/gli.o gui/GL/gliDump.o gui/GL/gl2ps.o -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -L/usr/local/lib -lXext -lX11 -lXt  -lglut -lGLU -lGL -lm  -L./libs/FIST -lFIST.linux64 
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(api_functions.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(compute.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(data.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(desperate.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(ear_clip.o): relocation R_X86_64_32 against symbol `numerics_h_p' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(elapsed.o): relocation R_X86_64_32 against symbol `__gxx_personality_v0@@CXXABI_1.3' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(grid.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(heap.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(io.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(list.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(memory.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(misc.o): relocation R_X86_64_32 against symbol `__gxx_personality_v0@@CXXABI_1.3' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(numerics.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(orientation.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(quads.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(sgo.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(simple.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(statistics.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(triangulate.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(vertex.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(write_ipe.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(bottleneck.o): relocation R_X86_64_32 against symbol `numerics_h_p' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(bridge.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(clean_data.o): relocation R_X86_64_32 against symbol `_Z6p_compPKvS0_' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(degenerate.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(ipe_io.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libs/FIST/libFIST.linux64.a(project.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:90: recipe for target 'acd2d_gui' failed
make: *** [acd2d_gui] Error 1

From what I understand, the compilation requires the shared object for the FIST library. How can I generate the shared object for FIST?

Decomposition inside holes

I tried running approximate convex decomposition algorithm on my input dataset with 1 out polygonal chain and 1 in polygonal chain(hole) , but the output doesn't respects the holes and also partitions inside the holes.
sample output:
poly_in

I have checked the order of all polygonal chains to be counterclockwise.I have also tried experimenting with all the command line options (-t, -m, -a, -b). What can be the possible reason for this??
I am using Ubuntu 16.04LTS 64 bit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.