Skip to content

Commit

Permalink
+ make argument of multiFuse const reference
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Feb 21, 2015
1 parent c2ce8f5 commit 153e988
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Mod/Part/App/TopoShape.cpp
Expand Up @@ -1331,7 +1331,7 @@ TopoDS_Shape TopoShape::fuse(TopoDS_Shape shape) const
return mkFuse.Shape();
}

TopoDS_Shape TopoShape::multiFuse(std::vector<TopoDS_Shape> shapes, Standard_Real tolerance) const
TopoDS_Shape TopoShape::multiFuse(const std::vector<TopoDS_Shape>& shapes, Standard_Real tolerance) const
{
if (this->_Shape.IsNull())
Standard_Failure::Raise("Base shape is null");
Expand All @@ -1341,7 +1341,7 @@ TopoDS_Shape TopoShape::multiFuse(std::vector<TopoDS_Shape> shapes, Standard_Rea
TopoDS_Shape resShape = this->_Shape;
if (resShape.IsNull())
throw Base::Exception("Object shape is null");
for (std::vector<TopoDS_Shape>::iterator it = shapes.begin(); it != shapes.end(); ++it) {
for (std::vector<TopoDS_Shape>::const_iterator it = shapes.begin(); it != shapes.end(); ++it) {
if (it->IsNull())
throw Base::Exception("Input shape is null");
// Let's call algorithm computing a fuse operation:
Expand All @@ -1355,7 +1355,7 @@ TopoDS_Shape TopoShape::multiFuse(std::vector<TopoDS_Shape> shapes, Standard_Rea
BRepAlgoAPI_Fuse mkFuse;
TopTools_ListOfShape shapeArguments,shapeTools;
shapeArguments.Append(this->_Shape);
for (std::vector<TopoDS_Shape>::iterator it = shapes.begin(); it != shapes.end(); ++it) {
for (std::vector<TopoDS_Shape>::const_iterator it = shapes.begin(); it != shapes.end(); ++it) {
if (it->IsNull())
throw Base::Exception("Tool shape is null");
if (tolerance > 0.0)
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Part/App/TopoShape.h
Expand Up @@ -146,7 +146,7 @@ class PartExport TopoShape : public Data::ComplexGeoData
TopoDS_Shape cut(TopoDS_Shape) const;
TopoDS_Shape common(TopoDS_Shape) const;
TopoDS_Shape fuse(TopoDS_Shape) const;
TopoDS_Shape multiFuse(std::vector<TopoDS_Shape>, Standard_Real tolerance = 0.0) const;
TopoDS_Shape multiFuse(const std::vector<TopoDS_Shape>&, Standard_Real tolerance = 0.0) const;
TopoDS_Shape oldFuse(TopoDS_Shape) const;
TopoDS_Shape section(TopoDS_Shape) const;
std::list<TopoDS_Wire> slice(const Base::Vector3d&, double) const;
Expand Down

0 comments on commit 153e988

Please sign in to comment.