Comments (8)
Absolutely. Check out
p.inners().push_back
p.outer().push_back
from libnfporb.
Thank you for both replies.
I am trying to test simple setup when initial polygon is simple rectangle and other element is triangle.
The app builds corrections but it only outputs two points (-10,0) and (0,0). Which is not a polygon.
Probably I am making very simple mistake. Here is the code:
#include "pch.h"
#include <iostream>
#include "libnfporb.h"
int main()
{
using namespace libnfporb;
using namespace std;
polygon_t pA ;
polygon_t pB;
//polygon_t::ring_type outerRing;
//Quad
const point_t p0(0, 0);
const point_t p1(10, 0);
const point_t p2(10, 10);
const point_t p3(0, 10);
pA.outer().push_back(p0);
pA.outer().push_back(p1);
pA.outer().push_back(p2);
pA.outer().push_back(p3);
pA.outer().push_back(p0);
//Triangle
const point_t p4(0, 0);
const point_t p5(10, 0);
const point_t p6(10, 10);
pB.outer().push_back(p4);
pB.outer().push_back(p5);
pB.outer().push_back(p6);
pB.outer().push_back(p4);
nfp_t nfp = generateNFP(pA, pB, true);
for (auto v : nfp) {
for (auto vv : v) {
cout << vv.x_;
cout << " ";
cout << vv.y_ << endl;
}
}
}
from libnfporb.
Could you please try to add
#define LIBNFP_USE_RATIONAL
before including the header and try again?
from libnfporb.
I still have the same issue and output is the same:
Is there any possibility to get one fully working example file without wkt?
from libnfporb.
I am having the same issue! See: #19 for details.
Also when I add #define LIBNFP_USE_RATIONAL
, I get the following
error: fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
from libnfporb.
I still have the same issue and output is the same:
Is there any possibility to get one fully working example file without wkt?
Sorry for the long wait. I am on it
from libnfporb.
I am having the same issue! See: #19 for details.
Also when I add#define LIBNFP_USE_RATIONAL
, I get the following
error: fatal error C1083: Cannot open include file: 'gmp.h': No such file or directory
you need to install libgmp but i ruled out that LIBNFP_USE_RATIONAL does fix the problem.
from libnfporb.
I found the problem. In certain cases the translation vector was trimmed to zero. fixed: ea26404
from libnfporb.
Related Issues (20)
- Bad assumptions HOT 3
- Running nfp without boost and libgmp HOT 1
- How to rotate polygon_t using boost rotate_transformer?
- How to choose the reference point? HOT 1
- boost version HOT 1
- generateNFP only returns singular points HOT 3
- Runtime error: No touching points with certain simple geometry HOT 3
- Why some results seem to miss a part? HOT 7
- Edge case false positive degenerate case HOT 3
- numerical error prevents discovery of the next slide vector HOT 2
- history based loop prevention allows for oscillation HOT 1
- How to generate the inner fit polygon? HOT 1
- Big files cause a sever performance penalty HOT 24
- inner nfp without output HOT 2
- Please explain find_feasible.hpp HOT 8
- Cannot compile with boost 1.79 HOT 3
- The resulting polygon is shifted HOT 10
- Investigate libnfporb performance HOT 38
- it seems like there is a bug HOT 2
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 libnfporb.