From 5de7738709132c60208064ce9ea2d560d2d31e01 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 28 Jan 2014 11:29:21 +0100 Subject: [PATCH] + fixes: #0001369: Part::TopoShape::getMemSize fails for Bezier Curves --- src/Mod/Part/App/TopoShape.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 9f732a5b917e..8a2003cf158c 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -998,12 +998,13 @@ unsigned int TopoShape::getMemSize (void) const break; case GeomAbs_BezierSurface: memsize += sizeof(Geom_BezierSurface); - memsize += (surface.NbUKnots()+surface.NbVKnots()) * sizeof(Standard_Real); + memsize += (surface.NbUPoles()+surface.NbUPoles()) * sizeof(Standard_Real); memsize += (surface.NbUPoles()*surface.NbVPoles()) * sizeof(Geom_CartesianPoint); break; case GeomAbs_BSplineSurface: memsize += sizeof(Geom_BSplineSurface); memsize += (surface.NbUKnots()+surface.NbVKnots()) * sizeof(Standard_Real); + memsize += (surface.NbUPoles()*surface.NbVPoles()) * sizeof(Standard_Real); memsize += (surface.NbUPoles()*surface.NbVPoles()) * sizeof(Geom_CartesianPoint); break; case GeomAbs_SurfaceOfRevolution: @@ -1045,12 +1046,13 @@ unsigned int TopoShape::getMemSize (void) const break; case GeomAbs_BezierCurve: memsize += sizeof(Geom_BezierCurve); - memsize += curve.NbKnots() * sizeof(Standard_Real); + memsize += curve.NbPoles() * sizeof(Standard_Real); memsize += curve.NbPoles() * sizeof(Geom_CartesianPoint); break; case GeomAbs_BSplineCurve: memsize += sizeof(Geom_BSplineCurve); memsize += curve.NbKnots() * sizeof(Standard_Real); + memsize += curve.NbPoles() * sizeof(Standard_Real); memsize += curve.NbPoles() * sizeof(Geom_CartesianPoint); break; case GeomAbs_OtherCurve: