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

Method GetNormal

src/Mod/Mesh/App/Core/Algorithm.cpp:1912–1924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1910}
1911
1912Base::Vector3f MeshRefPointToFacets::GetNormal(PointIndex pos) const
1913{
1914 const std::set<FacetIndex>& n = _map[pos];
1915 Base::Vector3f normal;
1916 MeshGeomFacet f;
1917 for (FacetIndex it : n) {
1918 f = _rclMesh.GetFacet(it);
1919 normal += f.Area() * f.GetNormal();
1920 }
1921
1922 normal.Normalize();
1923 return normal;
1924}
1925
1926std::set<PointIndex> MeshRefPointToFacets::NeighbourPoints(
1927 const std::vector<PointIndex>& pt,

Callers 2

FillupHoleMethod · 0.45
RebuildMethod · 0.45

Calls 6

NormalizeMethod · 0.80
GetFacetMethod · 0.45
AreaMethod · 0.45
GetPointsMethod · 0.45
AddPointMethod · 0.45
FitMethod · 0.45

Tested by

no test coverage detected