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

Vector Graphics on Surfaces #8679

Draft
wants to merge 122 commits into
base: master
Choose a base branch
from
Draft

Vector Graphics on Surfaces #8679

wants to merge 122 commits into from

Conversation

sloriot
Copy link
Member

@sloriot sloriot commented Jan 7, 2025

Summary of Changes

New package adding the possibility to draw curves on surfaces. Based on the research results from C. Mancinelli, G. Nazzaro, F. Pellacini, and E. Puppo.

Release Management

Screenshot from 2024-07-13 15-59-03
Writing a text along a space filling curve on surface of the elephant

sloriot and others added 30 commits September 25, 2023 17:52
still using euclidean weigths in the input
version from CB:AUS:marking_sample@a80cd964d0
Eigen is only needed for one function but for now
they are all in the same header
@sloriot sloriot added the TODO label Jan 7, 2025
@sloriot

This comment was marked as outdated.

This comment was marked as outdated.

@afabri
Copy link
Member

afabri commented Jan 13, 2025

/force-build:v0

Copy link

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/8679/v0/Manual/index.html


/*!
* \ingroup VGSFunctions
* computes an approximated geodesic shortest path between two locations on a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The definition of geodesic on the wikipedia says that it is the shortewst path.

@@ -0,0 +1,6 @@
if(NanoSVG_FOUND AND NOT TARGET CGAL::NanoSVG_support)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During configuration I had to lib/cmake/NanoSVG inside the build directory for the Nanosvg_dir instead of just giving the build directory.

@@ -0,0 +1,68 @@
/// \defgroup PkgVGoS_Ref Vector Graphics on Triangulated Surface Meshes Reference
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should find another name for the package. It is not about Vector Graphics, but about geodesic paths.

*/
template <class K, class TriangleMesh>
std::vector< std::vector<CGAL::Polygon_mesh_processing::Face_location<TriangleMesh, typename K::FT>> >
trace_bezier_curves(const CGAL::Polygon_mesh_processing::Face_location<TriangleMesh, typename K::FT> &center,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest that Bezier should be capitalized just as Delaunay and Hausdorff are.

*/
template <class K, class TriangleMesh>
std::vector<CGAL::Polygon_mesh_processing::Face_location<TriangleMesh,typename K::FT>>
trace_geodesic_polygon(const CGAL::Polygon_mesh_processing::Face_location<TriangleMesh, typename K::FT> &center,
Copy link
Member

@afabri afabri Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if trace is the appropriate verb. I have the feeling that it just comes from the French verb tracer and the Italian verb tracciare, but is that what we want here?


/*!
* \ingroup VGSFunctions
* computes for each vertex of each polygon in `polygons` a face location on `tmesh`, `center` representing the center of the 2D bounding box of the polygons.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the axis aligned or the oriented bounding box? I guess it is the latter, but as Bbox_2 does not have axis aligned in the name, lets be more explicit here.


/*!
* \ingroup VGSFunctions
* computes a path representing a Bézier polyline (a sequence of Bézier curves having an identical control points,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it just one (what the "an" suggests)? Then point must be singular. Or are there two (endpoint/startpoint)?

* \ingroup VGSFunctions
* computes a path representing a Bézier polyline (a sequence of Bézier curves having an identical control points,
* that is the fourth control point of the nth curve is the first control point of the (n+1)th curve).
* Control points are defined by the endpoints of straightest geodesic curves starting from `center` along given directions and distances.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean with straightest. Is just straight good enough?


/*!
* \ingroup VGSFunctions
* computes for each vertex of each polygon in `polygons` a face location on `tmesh`, `center` representing the center of the 2D bounding box of the polygons.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rephrase this in a meeting.

@afabri
Copy link
Member

afabri commented Jan 14, 2025

/force-build:v0

Copy link

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/8679/v0/Manual/index.html

namespace VGoS = CGAL::Vector_graphics_on_surfaces;
namespace PMP = CGAL::Polygon_mesh_processing;

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is a new package I suggest to switch to using

* Control points are defined by the endpoints of straightest geodesic curves starting from `center` along given directions and distances.
* The iterative de Casteljau subdivision algorithm is applied to create more control points that are then connected with locally shortest paths.
* The output path is such that for two consecutive face locations, there must exist a face in `tmesh` containing the two corresponding points.
* The first portion of the curve is defined by the 4 first values in `directions` and `lengths`. The second portion is defined by the 4'th value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 -> four

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Not yet approved The feature or pull-request has not yet been approved. TODO
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants