Cleanup dangling debug code
This commit is contained in:
@@ -284,7 +284,7 @@ App::DocumentObjectExecReturn *DrawViewPart::execute(void)
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
|
||||
rebuildCosmoVertex();
|
||||
// rebuildCosmoVertex();
|
||||
// rebuildCosmoEdge();
|
||||
|
||||
App::Document* doc = getDocument();
|
||||
@@ -1005,10 +1005,14 @@ void DrawViewPart::rebuildCosmoEdge(void)
|
||||
int DrawViewPart::addCosmeticVertex(Base::Vector3d pos)
|
||||
{
|
||||
// Base::Console().Message("DVP::addCosmeticVertex(%s)\n", DrawUtil::formatVector(pos).c_str());
|
||||
TechDraw::CosmeticVertex* rVert = new TechDraw::CosmeticVertex(pos);
|
||||
vertexCosmetic.push_back(rVert);
|
||||
TechDraw::CosmeticVertex* cv = new TechDraw::CosmeticVertex(pos);
|
||||
vertexCosmetic.push_back(cv);
|
||||
int newIdx = (int) (vertexCosmetic.size() - 1);
|
||||
stuffCosmeticVertexList();
|
||||
std::string csv = cv->toCSV();
|
||||
std::vector<std::string> vertexList = CosmeticVertexList.getValues();
|
||||
vertexList.push_back(csv);
|
||||
CosmeticVertexList.setValues(vertexList);
|
||||
|
||||
return newIdx;
|
||||
}
|
||||
|
||||
@@ -1217,6 +1221,17 @@ TechDraw::CosmeticEdge* DrawViewPart::getCosmeticEdgeByLink(int idx) const
|
||||
return result;
|
||||
}
|
||||
|
||||
void DrawViewPart::onDocumentRestored()
|
||||
{
|
||||
rebuildCosmoVertex();
|
||||
rebuildCosmoEdge();
|
||||
// requestPaint();
|
||||
//if execute has not run yet, there will be no GO, and paint will not do anything.
|
||||
execute();
|
||||
DrawView::onDocumentRestored();
|
||||
}
|
||||
|
||||
|
||||
PyObject *DrawViewPart::getPyObject(void)
|
||||
{
|
||||
if (PythonObject.is(Py::_None())) {
|
||||
|
||||
@@ -106,6 +106,14 @@ public:
|
||||
App::PropertyStringList CosmeticVertexList;
|
||||
App::PropertyStringList CosmeticEdgeList;
|
||||
|
||||
virtual short mustExecute() const;
|
||||
virtual void onDocumentRestored() override;
|
||||
virtual App::DocumentObjectExecReturn *execute(void);
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
return "TechDrawGui::ViewProviderViewPart";
|
||||
}
|
||||
virtual PyObject *getPyObject(void);
|
||||
|
||||
std::vector<TechDraw::DrawHatch*> getHatches(void) const;
|
||||
std::vector<TechDraw::DrawGeomHatch*> getGeomHatches(void) const;
|
||||
std::vector<TechDraw::DrawViewDimension*> getDimensions() const;
|
||||
@@ -140,24 +148,9 @@ public:
|
||||
const Base::Vector3d& direction,
|
||||
const bool flip=true) const;
|
||||
|
||||
virtual short mustExecute() const;
|
||||
// virtual void onDocumentRestored() override;
|
||||
|
||||
bool handleFaces(void);
|
||||
bool showSectionEdges(void);
|
||||
|
||||
/** @name methods override Feature */
|
||||
//@{
|
||||
/// recalculate the Feature
|
||||
virtual App::DocumentObjectExecReturn *execute(void);
|
||||
//@}
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
virtual const char* getViewProviderName(void) const {
|
||||
return "TechDrawGui::ViewProviderViewPart";
|
||||
}
|
||||
//return PyObject as DrawViewPartPy
|
||||
virtual PyObject *getPyObject(void);
|
||||
bool isUnsetting(void) { return nowUnsetting; }
|
||||
|
||||
gp_Pln getProjPlane(void) const;
|
||||
|
||||
@@ -1222,8 +1222,9 @@ BaseGeomPtrVector GeometryUtils::chainGeoms(BaseGeomPtrVector geoms)
|
||||
TopoDS_Edge GeometryUtils::edgeFromGeneric(TechDraw::Generic* g)
|
||||
{
|
||||
// Base::Console().Message("GU::edgeFromGeneric()\n");
|
||||
//note that this isn't quite right as g can be a polyline!
|
||||
//TODO: note that this isn't quite right as g can be a polyline!
|
||||
//sb points.first, points.last
|
||||
//and intermediates should be added to Point
|
||||
Base::Vector3d first = g->points.front();
|
||||
Base::Vector3d last = g->points.back();
|
||||
gp_Pnt gp1(first.x, first.y, first.z);
|
||||
@@ -1249,7 +1250,7 @@ TopoDS_Edge GeometryUtils::edgeFromCircle(TechDraw::Circle* c)
|
||||
|
||||
TopoDS_Edge GeometryUtils::edgeFromCircleArc(TechDraw::AOC* c)
|
||||
{
|
||||
Base::Console().Message("GU::edgeFromCircleArc()\n");
|
||||
// Base::Console().Message("GU::edgeFromCircleArc()\n");
|
||||
gp_Pnt loc(c->center.x, c->center.y, c->center.z);
|
||||
gp_Dir dir(0,0,1);
|
||||
gp_Ax1 axis(loc, dir);
|
||||
@@ -1257,9 +1258,6 @@ TopoDS_Edge GeometryUtils::edgeFromCircleArc(TechDraw::AOC* c)
|
||||
circle.SetAxis(axis);
|
||||
circle.SetRadius(c->radius);
|
||||
Handle(Geom_Circle) hCircle = new Geom_Circle (circle);
|
||||
Base::Console().Message("GU::edgeFromCircleArc - startAngle: %.3f endAngle: %.3f\n",c->startAngle,c->endAngle);
|
||||
// double startAngle = c->startAngle * M_PI / 180.0; //to radians
|
||||
// double endAngle = c->endAngle * M_PI / 180.0;
|
||||
double startAngle = c->startAngle;
|
||||
double endAngle = c->endAngle;
|
||||
BRepBuilderAPI_MakeEdge aMakeEdge(hCircle, startAngle, endAngle);
|
||||
|
||||
Reference in New Issue
Block a user