45SCENARIO(
"Shortcuts< K3 > pointel ordering",
"[shortcuts][pointel]" )
50 auto params = SH3::defaultParameters();
51 const double h = 0.25;
52 params(
"polynomial",
"goursat" )(
"gridstep", h );
53 auto implicit_shape = SH3::makeImplicitShape3D ( params );
54 auto digitized_shape = SH3::makeDigitizedImplicitShape3D( implicit_shape, params );
55 auto binary_image = SH3::makeBinaryImage ( digitized_shape, params );
56 auto K = SH3::getKSpace( params );
57 auto embedder = SH3::getCellEmbedder(
K );
60 GIVEN(
"A digital surface, its associated polygonal surface, and its pointel range" ) {
62 auto polySurf = SH3::makePrimalPolygonalSurface( c2i,
surface );
63 auto pointels = SH3::getPointelRange(
surface );
64 THEN(
"The polygonal surface and the pointel range have the same number of pointels" ) {
65 REQUIRE( pointels.size() == polySurf->nbVertices() );
67 THEN(
"The vertices of the polygonal surface are in the same order as the pointel range" ) {
68 unsigned int nb_ok = 0, nb_ko = 0;
69 for (
size_t i = 0; i < polySurf->nbVertices(); i++ )
71 auto p = pointels[ i ];
75 DGtal::trace.
error() <<
"Pointel " << p <<
" of primal polygonal surface has not the same index in the polygonal surface (" << idx <<
") and in the pointel range (" << i <<
")." << std::endl;