MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / involvesGeoId

Method involvesGeoId

src/Mod/Sketcher/App/Constraint.cpp:370–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370bool Constraint::involvesGeoId(int geoId) const
371{
372#if SKETCHER_CONSTRAINT_USE_LEGACY_ELEMENTS
373 auto elements = std::views::iota(size_t {0}, this->elements.size())
374 | std::views::transform([&](size_t i) { return getElement(i); });
375#endif
376 return std::ranges::any_of(elements, [geoId](const auto& element) {
377 return element.GeoId == geoId;
378 });
379}
380/// utility function to check if (`geoId`, `posId`) is one of the points/curves
381bool Constraint::involvesGeoIdAndPosId(int geoId, PointPos posId) const
382{

Calls 3

getElementFunction · 0.85
transformFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected