From 80a3e9ec75240c27db8d1c7d8bef2d82d61673b4 Mon Sep 17 00:00:00 2001 From: bgbsww Date: Sat, 11 May 2024 22:09:35 -0400 Subject: [PATCH] Toponaming: bring in missing code fragments in App --- src/App/GeoFeature.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/App/GeoFeature.h b/src/App/GeoFeature.h index 025d5f969e..1efdec8004 100644 --- a/src/App/GeoFeature.h +++ b/src/App/GeoFeature.h @@ -141,6 +141,27 @@ public: * appearance from an App::Material object. */ virtual void setMaterialAppearance(const App::Material& material); + + /** Search sub element using internal cached geometry + * + * @param element: element name + * @param options: search options + * @param tol: coordinate tolerance + * @param atol: angle tolerance + * + * @return Returns a list of found element reference to the new goemetry. + * The returned value will be invalidated when the geometry is changed. + * + * Before changing the property of geometry, GeoFeature will internally + * make a snapshot of all referenced element geometry. After change, user + * code may call this function to search for the new element name that + * reference to the same geometry of the old element. + */ + virtual const std::vector& searchElementCache(const std::string &element, + Data::SearchOptions options = Data::SearchOptions::CheckGeometry, + double tol = 1e-7, + double atol = 1e-10) const; + #ifdef FC_USE_TNP_FIX /** Search sub element using internal cached geometry *