Skip to content

Commit

Permalink
Merge pull request #1520 from kerautret/EditPtEmbedder3D
Browse files Browse the repository at this point in the history
Point2DEmbedderIn3D edit origin
  • Loading branch information
dcoeurjo authored Oct 9, 2020
2 parents e11b04e + 1b0ea30 commit 977b399
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
16 changes: 10 additions & 6 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
- Add const directives to some curve estimators on shapes.
(Adrien Krähenbühl [#1429](https://github.com/DGtal-team/DGtal/pull/1429))


- *IO*
- When the 3D built-in viewer is enabled (libqglviewer), the default
required Qt version is now Qt5 instead of Qt4. You can revert to
Expand Down Expand Up @@ -180,6 +179,11 @@
dimensional simplices in 3D (segments, triangles). (Jacques-Olivier Lachaud,
[#1502](https://github.com/DGtal-team/DGtal/pull/1502))

- *Kernel*
- Point2DEmbedderIn3D edit to recover behavior of version 0.9.4 in
the origin point placement. (Florian Delconte and Bertrand Kerautret
[#1520](https://github.com/DGtal-team/DGtal/pull/1520))

- *Helpers*
- Fix Metric problem due to implicit RealPoint toward Point conversion when computing
convolved trivial normals in ShortcutsGeometry (Jacques-Olivier Lachaud,
Expand Down Expand Up @@ -219,8 +223,8 @@

- *Shapes*
- Fix bug in Astroid parameter() method : orientation correction
(Adrien Krähenbühl,
[#1325](https://github.com/DGtal-team/DGtal/pull/1426))
(Adrien Krähenbühl,
[#1325](https://github.com/DGtal-team/DGtal/pull/1426))
- Add missing constraint to flips in TriangulatedSurface
(Jacques-Olivier Lachaud,[#1498](https://github.com/DGtal-team/DGtal/pull/1498))

Expand Down Expand Up @@ -251,11 +255,11 @@
- Fix issue (https://github.com/DGtal-team/DGtal/issues/1478),
that is a Visual Studio 2019 build error related to befriend
template specializations
(Jacques-Olivier Lachaud [#1481](https://github.com/DGtal-team/DGtal/pull/1481))
(Jacques-Olivier Lachaud [#1481](https://github.com/DGtal-team/DGtal/pull/1481))
- Removing the homemade CPP11 checks, using cmake macro instead
(David Coeurjolly, [#1446](https://github.com/DGtal-team/DGtal/pull/1446))
(David Coeurjolly, [#1446](https://github.com/DGtal-team/DGtal/pull/1446))
- Removes the check for CPP11 when building WITH_ITK
(Pablo Hernandez-Cerdan, [#1453](https://github.com/DGtal-team/DGtal/pull/1453))
(Pablo Hernandez-Cerdan, [#1453](https://github.com/DGtal-team/DGtal/pull/1453))
- Fix apple clang compilation issue with a workaround to the
ConstIteratorAdapter class that does not satisfy the _is_forward concept of the STL:
using boost::first_max_element instead std::max_element.
Expand Down
4 changes: 2 additions & 2 deletions src/DGtal/kernel/BasicPointFunctors.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ namespace functors
uDir2[2] = uDir1[0]*anNormalVector[1]-uDir1[1]*anNormalVector[0];

uDir2/=uDir2.norm();

myOriginPointEmbeddedIn3D = Point(anOriginPoint + uDir1*anWidth/2 + uDir2*anWidth/2, functors::Round<>());
myOriginPointEmbeddedIn3D = anOriginPoint + Point(uDir1*anWidth/2) + Point(uDir2*anWidth/2);
myFirstAxisEmbeddedDirection = -uDir1;
mySecondAxisEmbeddedDirection = -uDir2;
}
Expand Down
12 changes: 4 additions & 8 deletions tests/kernel/testBasicPointFunctors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,12 @@ bool testProjector()
4);
PointVector<2, int> pt2b(0, 0);
PointVector<2, int> pt2_2b(2, 2);
//trace.info() << "pt " << pt2b << " => " << embedder2(pt2b) << " == " << PointVector<3,int>(3,5,3) << std::endl;
//nbok += ( embedder2(pt2b) == PointVector<3,int>(3,5,3) ) ? 1 : 0;
trace.info() << "pt " << pt2b << " => " << embedder2(pt2b) << " == " << PointVector<3,int>(2,5,3) << std::endl;
nbok += ( embedder2(pt2b) == PointVector<3,int>(2,5,3) ) ? 1 : 0; // TODO: check expected result
trace.info() << "pt " << pt2b << " => " << embedder2(pt2b) << " == " << PointVector<3,int>(3,5,3) << std::endl;
nbok += ( embedder2(pt2b) == PointVector<3,int>(3,5,3) ) ? 1 : 0;
nb++;

//trace.info() << "pt " << pt2_2b << " => " << embedder2(pt2_2b) << " == " << PointVector<3,int>(5,4,3) << std::endl;
//nbok += ( embedder2(pt2_2b) == PointVector<3,int>(5,4,3) ) ? 1 : 0;
trace.info() << "pt " << pt2_2b << " => " << embedder2(pt2_2b) << " == " << PointVector<3,int>(4,4,3) << std::endl;
nbok += ( embedder2(pt2_2b) == PointVector<3,int>(4,4,3) ) ? 1 : 0; // TODO: check expected result
trace.info() << "pt " << pt2_2b << " => " << embedder2(pt2_2b) << " == " << PointVector<3,int>(5,4,3) << std::endl;
nbok += ( embedder2(pt2_2b) == PointVector<3,int>(5,4,3) ) ? 1 : 0;
nb++;


Expand Down

0 comments on commit 977b399

Please sign in to comment.