Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Point2DEmbedderIn3D edit origin #1520

Merged
merged 6 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,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 @@ -178,6 +177,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 @@ -217,8 +221,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 @@ -249,11 +253,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