From 4195232b6685d5b4663b34fed300c575d56baa5e Mon Sep 17 00:00:00 2001 From: Nicolas Mellado Date: Wed, 16 Sep 2026 16:51:52 +0200 Subject: [PATCH 1/2] Update Ponca to add_hrbf branch --- external/ponca | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/ponca b/external/ponca index 7b3f8ad..5b07f9a 160000 --- a/external/ponca +++ b/external/ponca @@ -1 +1 @@ -Subproject commit 7b3f8ad3fde25a027e6452783ccee143798a71b8 +Subproject commit 5b07f9a21481b53eb3c39eb3cd18f86e790ab02b From e72f62fe267c1802722562585f092e5f790f9c45 Mon Sep 17 00:00:00 2001 From: Nicolas Mellado Date: Wed, 16 Sep 2026 16:52:23 +0200 Subject: [PATCH 2/2] Add HRBF fit in codebase --- src/dataManager.cpp | 15 ++++++++------- src/dataManager.h | 32 +++++++++++++++++--------------- src/drawingPasses/bestFieldFit.h | 2 ++ src/poncaTypes.h | 2 +- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/dataManager.cpp b/src/dataManager.cpp index 30676a7..5715cb3 100644 --- a/src/dataManager.cpp +++ b/src/dataManager.cpp @@ -138,13 +138,14 @@ DataManager::getDrawingPass(size_t index){ WRITE_NEW_FIT_CASE(2,SphereFitField) WRITE_NEW_FIT_CASE(3,OrientedSphereFitField) WRITE_NEW_FIT_CASE(4,UnorientedSphereFitField) - WRITE_NEW_FIT_CASE(5,BestPlaneFitField) - WRITE_NEW_FIT_CASE(6,BestSphereFitField) - WRITE_NEW_FIT_CASE(7,BestOrientedSphereFitField) - WRITE_NEW_FIT_CASE(8,OnePlaneFitField) - WRITE_NEW_FIT_CASE(9,OneSphereFitField) - WRITE_NEW_FIT_CASE(10,OneOrientedSphereFitField) - WRITE_NEW_FIT_CASE(11,DistanceFieldFromOnePoint) + WRITE_NEW_FIT_CASE(5,HRBFFitField) + WRITE_NEW_FIT_CASE(6,BestPlaneFitField) + WRITE_NEW_FIT_CASE(7,BestSphereFitField) + WRITE_NEW_FIT_CASE(8,BestOrientedSphereFitField) + WRITE_NEW_FIT_CASE(9,OnePlaneFitField) + WRITE_NEW_FIT_CASE(10,OneSphereFitField) + WRITE_NEW_FIT_CASE(11,OneOrientedSphereFitField) + WRITE_NEW_FIT_CASE(12,DistanceFieldFromOnePoint) default: throw std::runtime_error("Unknown Field type!"); } diff --git a/src/dataManager.h b/src/dataManager.h index d049b8c..4d30e86 100644 --- a/src/dataManager.h +++ b/src/dataManager.h @@ -71,20 +71,21 @@ struct DataManager { void computeNormals(int k = 3); /// Names of the supported drawing passes - static constexpr size_t nbSupportedDrawingPasses = 12; + static constexpr size_t nbSupportedDrawingPasses = 13; const std::map supportedDrawingPasses { {"Distance Field", 0}, {"MLS - Plane", 1}, {"MLS - Sphere", 2}, {"MLS - Oriented Sphere", 3}, {"MLS - Unoriented Sphere", 4}, - {"Best Fit - Plane", 5}, - {"Best Fit - Sphere", 6}, - {"Best Fit - Oriented Sphere", 7}, - {"One Fit - Plane", 8}, - {"One Fit - Sphere", 9}, - {"One Fit - Oriented Sphere", 10}, - {"One Point - Scale", 11} + {"Global - HRBF", 5}, + {"Best Fit - Plane", 6}, + {"Best Fit - Sphere", 7}, + {"Best Fit - Oriented Sphere", 8}, + {"One Fit - Plane", 9}, + {"One Fit - Sphere", 10}, + {"One Fit - Oriented Sphere", 11}, + {"One Point - Scale", 12} }; DrawingPass* getDrawingPass(const std::string& name); @@ -106,13 +107,14 @@ struct DataManager { WRITE_FIT_CASE(2,SphereFitField) WRITE_FIT_CASE(3,OrientedSphereFitField) WRITE_FIT_CASE(4,UnorientedSphereFitField) - WRITE_FIT_CASE(5,BestPlaneFitField) - WRITE_FIT_CASE(6,BestSphereFitField) - WRITE_FIT_CASE(7,BestOrientedSphereFitField) - WRITE_FIT_CASE(8,OnePlaneFitField) - WRITE_FIT_CASE(9,OneSphereFitField) - WRITE_FIT_CASE(10,OneOrientedSphereFitField) - WRITE_FIT_CASE(11,DistanceFieldFromOnePoint) + WRITE_FIT_CASE(5,HRBFFitField) + WRITE_FIT_CASE(6,BestPlaneFitField) + WRITE_FIT_CASE(7,BestSphereFitField) + WRITE_FIT_CASE(8,BestOrientedSphereFitField) + WRITE_FIT_CASE(9,OnePlaneFitField) + WRITE_FIT_CASE(10,OneSphereFitField) + WRITE_FIT_CASE(11,OneOrientedSphereFitField) + WRITE_FIT_CASE(12,DistanceFieldFromOnePoint) default: return false; } return true; diff --git a/src/drawingPasses/bestFieldFit.h b/src/drawingPasses/bestFieldFit.h index 7bc2aa3..645ac7d 100644 --- a/src/drawingPasses/bestFieldFit.h +++ b/src/drawingPasses/bestFieldFit.h @@ -139,3 +139,5 @@ struct OneSphereFitField : public OnePointFitField{ struct OneOrientedSphereFitField : public OnePointFitField{ void postProcess(typename OnePointFitField::FitType& fit) override { fit.applyPrattNorm(); }; }; + +using HRBFFitField = OnePointFitField; diff --git a/src/poncaTypes.h b/src/poncaTypes.h index c722afe..04ab2fd 100644 --- a/src/poncaTypes.h +++ b/src/poncaTypes.h @@ -30,7 +30,7 @@ using ConstSphereFit = Ponca::Basket; using ConstOrientedSphereFit= Ponca::Basket; using UnorientedSphereFit = Ponca::Basket; - +using HRBFFit = Ponca::HRBF;