Cosmetic CL for Section and Detail

This commit is contained in:
wandererfan
2019-06-05 16:03:57 -04:00
committed by WandererFan
parent 9f3a61aec5
commit 5eb7145d97
10 changed files with 119 additions and 63 deletions

View File

@@ -76,6 +76,7 @@
#include "Geometry.h"
#include "GeometryObject.h"
#include "Cosmetic.h"
#include "HatchLine.h"
#include "EdgeWalker.h"
#include "DrawUtil.h"
@@ -192,6 +193,9 @@ App::DocumentObjectExecReturn *DrawViewSection::execute(void)
return App::DocumentObject::StdReturn;
}
rebuildCosmoVertex();
rebuildCosmoEdge();
App::DocumentObject* base = BaseView.getValue();
if (!base->getTypeId().isDerivedFrom(TechDraw::DrawViewPart::getClassTypeId()))
return new App::DocumentObjectExecReturn("BaseView object is not a DrawViewPart object");
@@ -324,6 +328,18 @@ App::DocumentObjectExecReturn *DrawViewSection::execute(void)
Base::Console().Log("LOG - DVS::execute - failed building section faces for %s - %s **\n",getNameInDocument(),e2.GetMessageString());
return new App::DocumentObjectExecReturn(e2.GetMessageString());
}
//add back the cosmetic vertices
for (auto& v: cosmoVertex) {
int idx = geometryObject->addRandomVertex(v->pageLocation * getScale());
v->linkGeom = idx;
}
//add the cosmetic Edges to geometry Edges list
for (auto& e: cosmoEdge) {
TechDrawGeometry::BaseGeom* scaledGeom = e->scaledGeometry(getScale());
int idx = geometryObject->addRandomEdge(scaledGeom);
e->linkGeom = idx;
}
requestPaint();
return App::DocumentObject::StdReturn;