Part: Geometry assignTag function

This commit is contained in:
Abdullah Tahiri
2017-04-09 08:42:22 +02:00
committed by wmayer
parent 19565c3270
commit 52a0ad6e04
2 changed files with 16 additions and 2 deletions

View File

@@ -230,6 +230,14 @@ void Geometry::createNewTag()
tag = gen();
}
void Geometry::assignTag(const Part::Geometry * geo)
{
if(geo->getTypeId() == this->getTypeId())
this->tag = geo->tag;
else
throw Base::TypeError("Geometry tag can not be assigned as geometry types do not match.");
}
// -------------------------------------------------
TYPESYSTEM_SOURCE(Part::GeomPoint,Part::Geometry)