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

Method getCurrentCentroid

src/Mod/TechDraw/App/DrawViewPart.cpp:1169–1178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1167Base::Vector3d DrawViewPart::getOriginalCentroid() const { return m_saveCentroid; }
1168
1169Base::Vector3d DrawViewPart::getCurrentCentroid() const
1170{
1171 TopoDS_Shape shape = getSourceShape();
1172 if (shape.IsNull()) {
1173 return Base::Vector3d(0.0, 0.0, 0.0);
1174 }
1175 gp_Ax2 cs = getProjectionCS();
1176 gp_Pnt gCenter = ShapeUtils::findCentroid(shape, cs);
1177 return Base::convertTo<Base::Vector3d>(gCenter);
1178}
1179
1180std::vector<DrawViewSection*> DrawViewPart::getSectionRefs() const
1181{

Callers 15

makeSectionLineWireMethod · 0.80
getGeometricCenterMethod · 0.80
getPointsOneEdgeMethod · 0.80
getPointsTwoEdgesMethod · 0.80
getPointsTwoVertsMethod · 0.80
getPointsEdgeVertMethod · 0.80
getArcParametersMethod · 0.80
getAreaParametersMethod · 0.80
setUiPrimaryMethod · 0.80
createCosmeticCircleMethod · 0.80

Calls 2

Vector3dClass · 0.85
IsNullMethod · 0.45

Tested by

no test coverage detected