Interim commit
This commit is contained in:
@@ -3160,7 +3160,7 @@ bool TopoShape::fix()
|
||||
// BTW, the file attached in the issue also shows that ShapeFix_Shape may
|
||||
// actually make a valid input shape invalid). So, it actually change the
|
||||
// underlying shape data. Therefore, we try with a copy first.
|
||||
auto copy = makECopy();
|
||||
auto copy = makeElementCopy();
|
||||
ShapeFix_Shape fix(copy._Shape);
|
||||
fix.Perform();
|
||||
|
||||
|
||||
@@ -771,7 +771,7 @@ public:
|
||||
* TopoShape itself as a self reference so that multiple operations
|
||||
* can be carried out for the same shape in the same line of code.
|
||||
*/
|
||||
TopoShape &makECopy(const TopoShape &source, const char *op=nullptr, bool copyGeom=true, bool copyMesh=false);
|
||||
TopoShape &makeElementCopy(const TopoShape &source, const char *op=nullptr, bool copyGeom=true, bool copyMesh=false);
|
||||
|
||||
/** Make a deep copy of the shape
|
||||
*
|
||||
@@ -783,8 +783,8 @@ public:
|
||||
* @return Return a deep copy of the shape. The shape itself is not
|
||||
* modified
|
||||
*/
|
||||
TopoShape makECopy(const char *op=nullptr, bool copyGeom=true, bool copyMesh=false) const {
|
||||
return TopoShape(Tag,Hasher).makECopy(*this,op,copyGeom,copyMesh);
|
||||
TopoShape makeElementCopy(const char *op=nullptr, bool copyGeom=true, bool copyMesh=false) const {
|
||||
return TopoShape(Tag,Hasher).makeElementCopy(*this,op,copyGeom,copyMesh);
|
||||
}
|
||||
|
||||
friend class TopoShapeCache;
|
||||
@@ -978,6 +978,20 @@ struct ShapeHasher {
|
||||
}
|
||||
};
|
||||
|
||||
/** Shape mapper for generic BRepBuilderAPI_MakeShape derived class
|
||||
*
|
||||
* Uses BRepBuilderAPI_MakeShape::Modified/Generated() function to extract
|
||||
* shape history for generating mapped element names
|
||||
*/
|
||||
struct PartExport MapperMaker: TopoShape::Mapper {
|
||||
BRepBuilderAPI_MakeShape &maker;
|
||||
MapperMaker(BRepBuilderAPI_MakeShape &maker)
|
||||
:maker(maker)
|
||||
{}
|
||||
virtual const std::vector<TopoDS_Shape> &modified(const TopoDS_Shape &s) const override;
|
||||
virtual const std::vector<TopoDS_Shape> &generated(const TopoDS_Shape &s) const override;
|
||||
};
|
||||
|
||||
} // namespace Part
|
||||
|
||||
|
||||
|
||||
@@ -862,7 +862,7 @@ TopoShape& TopoShape::makeElementOrderedWires(const std::vector<TopoShape>& shap
|
||||
}
|
||||
|
||||
|
||||
TopoShape &TopoShape::makECopy(const TopoShape &shape, const char *op, bool copyGeom, bool copyMesh)
|
||||
TopoShape &TopoShape::makeElementCopy(const TopoShape &shape, const char *op, bool copyGeom, bool copyMesh)
|
||||
{
|
||||
if(shape.isNull())
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user