Comments (3)
@vmora what's the state of this issue ?
from sfcgal.
not tested yet
what I had in mind is:
st_intersection(st_extrude('POLGON((0 0,1 0,1 1,0 1,0 0))'::geometry, 0, 0, 1), st_extrude('POLGON((.7 0,1.7 0,1.7 1,.7 1,1.5 .5, 0 0))'::geometry, 0, 0, 1));
from sfcgal.
@mhugo, @vmora this is duplicated by issue #200 which I created.
I adapted your example in to a unit test here (corrected a couple of typos and the non-closed Polygon):
BOOST_AUTO_TEST_CASE( testIssue62 )
{
std::unique_ptr< Geometry > poly1 = io::readWkt( "POLYGON((0 0,1 0,1 1,0 1,0 0))" );
std::unique_ptr< Geometry > solid1 = algorithm::extrude( *poly1, 0, 0, 1 );
std::unique_ptr< Geometry > poly2 = io::readWkt( "POLYGON((0.7 0,1.7 0,1.7 1,0.7 1,1.5 0.5,0.7 0))" );
std::unique_ptr< Geometry > solid2 = algorithm::extrude( *poly2, 0, 0, 1 );
std::unique_ptr< Geometry > inx = algorithm::intersection3D( *solid1, *solid2 );
std::cout << "inx: " << inx->asText() << std::endl;
}
with the Solid result:
SOLID((((1/1 3/16 0/1,1/1 0/1 0/1,7/10 0/1 0/1,1/1 3/16 0/1)),((7/10 0/1 0/1,7/10 0/1 3/10,1/1 3/16 0/1,7/10 0/1 0/1)),((1/1 0/1 0/1,7/10 0/1 3/10,7/10 0/1 0/1,1/1 0/1 0/1)),((1/1 3/16 0/1,1/1 3/16 5/8,1/1 0/1 0/1,1/1 3/16 0/1)),((7/10 0/1 3/10,1/1 3/16 5/8,1/1 3/16 0/1,7/10 0/1 3/10)),((1/1 0/1 0/1,1/1 0/1 7/10,7/10 0/1 3/10,1/1 0/1 0/1)),((1/1 3/16 5/8,1/1 0/1 7/10,1/1 0/1 0/1,1/1 3/16 5/8)),((7/10 0/1 3/10,7/10 0/1 1/1,1/1 3/16 5/8,7/10 0/1 3/10)),((1/1 0/1 7/10,7/10 0/1 1/1,7/10 0/1 3/10,1/1 0/1 7/10)),((1/1 3/16 5/8,1/1 3/16 13/16,1/1 0/1 7/10,1/1 3/16 5/8)),((7/10 0/1 1/1,1/1 3/16 13/16,1/1 3/16 5/8,7/10 0/1 1/1)),((1/1 0/1 7/10,1/1 0/1 1/1,7/10 0/1 1/1,1/1 0/1 7/10)),((1/1 3/16 13/16,1/1 0/1 1/1,1/1 0/1 7/10,1/1 3/16 13/16)),((7/10 0/1 1/1,23/26 3/26 1/1,1/1 3/16 13/16,7/10 0/1 1/1)),((1/1 0/1 1/1,23/26 3/26 1/1,7/10 0/1 1/1,1/1 0/1 1/1)),((1/1 3/16 13/16,1/1 3/16 1/1,1/1 0/1 1/1,1/1 3/16 13/16)),((23/26 3/26 1/1,1/1 3/16 1/1,1/1 3/16 13/16,23/26 3/26 1/1)),((1/1 0/1 1/1,1/1 3/16 1/1,23/26 3/26 1/1,1/1 0/1 1/1)),((1/1 1/1 1/1,7/10 1/1 7/10,7/10 1/1 1/1,1/1 1/1 1/1)),((7/10 1/1 1/1,1/1 13/16 1/1,1/1 1/1 1/1,7/10 1/1 1/1)),((7/10 1/1 7/10,1/1 13/16 1/1,7/10 1/1 1/1,7/10 1/1 7/10)),((1/1 1/1 1/1,1/1 1/1 3/10,7/10 1/1 7/10,1/1 1/1 1/1)),((1/1 13/16 1/1,1/1 13/16 3/8,1/1 1/1 1/1,1/1 13/16 1/1)),((7/10 1/1 7/10,1/1 13/16 3/8,1/1 13/16 1/1,7/10 1/1 7/10)),((1/1 1/1 3/10,7/10 1/1 0/1,7/10 1/1 7/10,1/1 1/1 3/10)),((1/1 1/1 1/1,1/1 13/16 3/8,1/1 1/1 3/10,1/1 1/1 1/1)),((7/10 1/1 7/10,7/10 1/1 0/1,1/1 13/16 3/8,7/10 1/1 7/10)),((1/1 1/1 3/10,1/1 1/1 0/1,7/10 1/1 0/1,1/1 1/1 3/10)),((1/1 13/16 3/8,1/1 13/16 3/16,1/1 1/1 3/10,1/1 13/16 3/8)),((7/10 1/1 0/1,1/1 13/16 3/16,1/1 13/16 3/8,7/10 1/1 0/1)),((1/1 1/1 0/1,23/26 23/26 0/1,7/10 1/1 0/1,1/1 1/1 0/1)),((1/1 1/1 3/10,1/1 13/16 3/16,1/1 1/1 0/1,1/1 1/1 3/10)),((7/10 1/1 0/1,23/26 23/26 0/1,1/1 13/16 3/16,7/10 1/1 0/1)),((1/1 1/1 0/1,1/1 13/16 0/1,23/26 23/26 0/1,1/1 1/1 0/1)),((1/1 13/16 3/16,1/1 13/16 0/1,1/1 1/1 0/1,1/1 13/16 3/16)),((23/26 23/26 0/1,1/1 13/16 0/1,1/1 13/16 3/16,23/26 23/26 0/1))))
whereas it should be the two part MultiSolid:
MULTISOLID(((((1/1 3/16 0/1,1/1 0/1 0/1,7/10 0/1 0/1,1/1 3/16 0/1)),((7/10 0/1 0/1,7/10 0/1 3/10,1/1 3/16 0/1,7/10 0/1 0/1)),((1/1 0/1 0/1,7/10 0/1 3/10,7/10 0/1 0/1,1/1 0/1 0/1)),((1/1 3/16 0/1,1/1 3/16 5/8,1/1 0/1 0/1,1/1 3/16 0/1)),((7/10 0/1 3/10,1/1 3/16 5/8,1/1 3/16 0/1,7/10 0/1 3/10)),((1/1 0/1 0/1,1/1 0/1 7/10,7/10 0/1 3/10,1/1 0/1 0/1)),((1/1 3/16 5/8,1/1 0/1 7/10,1/1 0/1 0/1,1/1 3/16 5/8)),((7/10 0/1 3/10,7/10 0/1 1/1,1/1 3/16 5/8,7/10 0/1 3/10)),((1/1 0/1 7/10,7/10 0/1 1/1,7/10 0/1 3/10,1/1 0/1 7/10)),((1/1 3/16 5/8,1/1 3/16 13/16,1/1 0/1 7/10,1/1 3/16 5/8)),((7/10 0/1 1/1,1/1 3/16 13/16,1/1 3/16 5/8,7/10 0/1 1/1)),((1/1 0/1 7/10,1/1 0/1 1/1,7/10 0/1 1/1,1/1 0/1 7/10)),((1/1 3/16 13/16,1/1 0/1 1/1,1/1 0/1 7/10,1/1 3/16 13/16)),((7/10 0/1 1/1,23/26 3/26 1/1,1/1 3/16 13/16,7/10 0/1 1/1)),((1/1 0/1 1/1,23/26 3/26 1/1,7/10 0/1 1/1,1/1 0/1 1/1)),((1/1 3/16 13/16,1/1 3/16 1/1,1/1 0/1 1/1,1/1 3/16 13/16)),((23/26 3/26 1/1,1/1 3/16 1/1,1/1 3/16 13/16,23/26 3/26 1/1)),((1/1 0/1 1/1,1/1 3/16 1/1,23/26 3/26 1/1,1/1 0/1 1/1)),((1/1 1/1 1/1,7/10 1/1 7/10,7/10 1/1 1/1,1/1 1/1 1/1)),((7/10 1/1 1/1,1/1 13/16 1/1,1/1 1/1 1/1,7/10 1/1 1/1)),((7/10 1/1 7/10,1/1 13/16 1/1,7/10 1/1 1/1,7/10 1/1 7/10)),((1/1 1/1 1/1,1/1 1/1 3/10,7/10 1/1 7/10,1/1 1/1 1/1)),((1/1 13/16 1/1,1/1 13/16 3/8,1/1 1/1 1/1,1/1 13/16 1/1)),((7/10 1/1 7/10,1/1 13/16 3/8,1/1 13/16 1/1,7/10 1/1 7/10)),((1/1 1/1 3/10,7/10 1/1 0/1,7/10 1/1 7/10,1/1 1/1 3/10)),((1/1 1/1 1/1,1/1 13/16 3/8,1/1 1/1 3/10,1/1 1/1 1/1)),((7/10 1/1 7/10,7/10 1/1 0/1,1/1 13/16 3/8,7/10 1/1 7/10)),((1/1 1/1 3/10,1/1 1/1 0/1,7/10 1/1 0/1,1/1 1/1 3/10)),((1/1 13/16 3/8,1/1 13/16 3/16,1/1 1/1 3/10,1/1 13/16 3/8)),((7/10 1/1 0/1,1/1 13/16 3/16,1/1 13/16 3/8,7/10 1/1 0/1)),((1/1 1/1 0/1,23/26 23/26 0/1,7/10 1/1 0/1,1/1 1/1 0/1)),((1/1 1/1 3/10,1/1 13/16 3/16,1/1 1/1 0/1,1/1 1/1 3/10)),((7/10 1/1 0/1,23/26 23/26 0/1,1/1 13/16 3/16,7/10 1/1 0/1)),((1/1 1/1 0/1,1/1 13/16 0/1,23/26 23/26 0/1,1/1 1/1 0/1)),((1/1 13/16 3/16,1/1 13/16 0/1,1/1 1/1 0/1,1/1 13/16 3/16)),((23/26 23/26 0/1,1/1 13/16 0/1,1/1 13/16 3/16,23/26 23/26 0/1)))))
the cause being the two disjoint 3-cells resulting from the polyline intersections between the two boundaries being collectively processed by the Volume_import_modifier resulting in the first generated output Polyhedron containing two disjoint components.
from sfcgal.
Related Issues (20)
- Bundled build HOT 2
- Replace auto_ptr by unique_ptr HOT 2
- Memory leak in extrude HOT 4
- PostGIS make error HOT 17
- unit-test & garden-test timeout with Boost 1.67 HOT 19
- Red warnings upon build of SFGCAL 1.3.6 HOT 1
- 1.3.6 build error on Fedora 30 (CGAL 4.14, gcc 9.0.1) HOT 19
- Undefined behaviour in CGAL when using difference3D HOT 2
- Crash under sfcgal_geometry_triangulate_2dz / SFCGAL::algorithm::isValid HOT 5
- "Geometry& operator= " is not implemented HOT 8
- CGAL 5.0 support HOT 6
- SFCGAL generates incorrect 3D intersection HOT 5
- Segfault on isValid HOT 6
- Installation creates both (prefix)/lib AND (prefix)/lib64 HOT 1
- Failing ApproximateMedialAxis and StraightSkeleton unit tests on Mac OS X HOT 2
- Broken libtoolize HOT 6
- Valid Solid shells cannot be converted to CGAL polyhedra HOT 16
- make is error HOT 4
- Could not find a configuration file for package "CGAL" on SFCGAL-1.3.7 HOT 2
- [IMPORTANT] Gitlab migration HOT 8
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 sfcgal.