Part/Toponaming: Modify constructors to set owner of ShapeProtector

This commit is contained in:
Chris Hennes
2024-01-11 12:50:31 -06:00
parent 97c0dedabe
commit 67e533826f
2 changed files with 335 additions and 206 deletions

View File

@@ -278,19 +278,27 @@ std::string ShapeSegment::getName() const
TYPESYSTEM_SOURCE(Part::TopoShape , Data::ComplexGeoData)
TopoShape::TopoShape() = default;
TopoShape::~TopoShape() = default;
TopoShape::TopoShape(const TopoDS_Shape& shape)
: _Shape(shape)
TopoShape::TopoShape(long tag,App::StringHasherRef hasher, const TopoDS_Shape &shape)
:_Shape(*this, shape)
{
Tag = tag;
Hasher = hasher;
}
TopoShape::TopoShape(const TopoDS_Shape &shape, long tag, App::StringHasherRef hasher)
: _Shape(*this, shape)
{
Tag = tag;
Hasher = hasher;
}
TopoShape::TopoShape(const TopoShape& shape)
: _Shape(shape._Shape)
: _Shape(*this)
{
Tag = shape.Tag;
*this = shape;
}
std::pair<std::string, unsigned long> TopoShape::getElementTypeAndIndex(const char* Name)