Parametric refinement feature

This commit is contained in:
wmayer
2019-07-08 14:37:00 +02:00
parent 6d02fa5409
commit 787f5184e8
7 changed files with 95 additions and 9 deletions

View File

@@ -673,3 +673,28 @@ App::DocumentObjectExecReturn *Thickness::execute(void)
this->Shape.setValue(shape);
return App::DocumentObject::StdReturn;
}
// ----------------------------------------------------------------------------
PROPERTY_SOURCE(Part::Refine, Part::Feature)
Refine::Refine()
{
ADD_PROPERTY_TYPE(Source,(0),"Refine",App::Prop_None,"Source shape");
}
App::DocumentObjectExecReturn *Refine::execute(void)
{
Part::Feature* source = Source.getValue<Part::Feature*>();
if (!source)
return new App::DocumentObjectExecReturn("No part object linked.");
try {
TopoShape myShape = source->Shape.getShape();
this->Shape.setValue(myShape.removeSplitter());
return App::DocumentObject::StdReturn;
}
catch (Standard_Failure& e) {
return new App::DocumentObjectExecReturn(e.GetMessageString());
}
}