Skip to content

Commit

Permalink
+ fixes: #1369: Part::TopoShape::getMemSize fails for Bezier Curves
Browse files Browse the repository at this point in the history
  • Loading branch information
wmayer committed Jan 28, 2014
1 parent 36bcc58 commit 5de7738
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Part/App/TopoShape.cpp
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 5de7738

Please sign in to comment.