From 6b4352f79f198ba115b2874f73e103e6466f1ba7 Mon Sep 17 00:00:00 2001 From: WandererFan Date: Wed, 5 Oct 2016 08:30:16 -0400 Subject: [PATCH] Rename properties to fit PropertyEditor window --- src/Mod/TechDraw/App/DrawViewPart.cpp | 25 ++++++++----------- src/Mod/TechDraw/App/DrawViewPart.h | 14 +++++------ src/Mod/TechDraw/App/GeometryObject.cpp | 4 +-- src/Mod/TechDraw/Gui/QGIViewPart.cpp | 20 +++++++-------- src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp | 2 +- 5 files changed, 31 insertions(+), 34 deletions(-) diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index 1380587db..7a474f0aa 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.cpp +++ b/src/Mod/TechDraw/App/DrawViewPart.cpp @@ -115,10 +115,10 @@ DrawViewPart::DrawViewPart(void) : geometryObject(0) //properties that affect Appearance //visible outline - ADD_PROPERTY_TYPE(ShowSmoothLines ,(false),sgroup,App::Prop_None,"Visible Smooth lines on/off"); - ADD_PROPERTY_TYPE(ShowSeamLines ,(false),sgroup,App::Prop_None,"Visible Seam lines on/off"); - ADD_PROPERTY_TYPE(ShowIsoLines ,(false),sgroup,App::Prop_None,"Visible Iso u,v lines on/off"); - ADD_PROPERTY_TYPE(ShowHiddenLines ,(false),sgroup,App::Prop_None,"Hidden Hard lines on/off"); // and outline + ADD_PROPERTY_TYPE(SmoothVisible ,(false),sgroup,App::Prop_None,"Visible Smooth lines on/off"); + ADD_PROPERTY_TYPE(SeamVisible ,(false),sgroup,App::Prop_None,"Visible Seam lines on/off"); + ADD_PROPERTY_TYPE(IsoVisible ,(false),sgroup,App::Prop_None,"Visible Iso u,v lines on/off"); + ADD_PROPERTY_TYPE(HardHidden ,(false),sgroup,App::Prop_None,"Hidden Hard lines on/off"); // and outline //hidden outline ADD_PROPERTY_TYPE(SmoothHidden ,(false),sgroup,App::Prop_None,"Hidden Smooth lines on/off"); ADD_PROPERTY_TYPE(SeamHidden ,(false),sgroup,App::Prop_None,"Hidden Seam lines on/off"); @@ -128,7 +128,7 @@ DrawViewPart::DrawViewPart(void) : geometryObject(0) ADD_PROPERTY_TYPE(LineWidth,(0.7f),fgroup,App::Prop_None,"The thickness of visible lines"); ADD_PROPERTY_TYPE(HiddenWidth,(0.15),fgroup,App::Prop_None,"The thickness of hidden lines, if enabled"); ADD_PROPERTY_TYPE(IsoWidth,(0.30),fgroup,App::Prop_None,"The thickness of UV isoparameter lines, if enabled"); - ADD_PROPERTY_TYPE(ShowCenters ,(true),sgroup,App::Prop_None,"Center marks on/off"); + ADD_PROPERTY_TYPE(ArcCenterMarks ,(true),sgroup,App::Prop_None,"Center marks on/off"); ADD_PROPERTY_TYPE(CenterScale,(2.0),fgroup,App::Prop_None,"Center mark size adjustment, if enabled"); ADD_PROPERTY_TYPE(HorizCenterLine ,(false),sgroup,App::Prop_None,"Show a horizontal centerline through view"); ADD_PROPERTY_TYPE(VertCenterLine ,(false),sgroup,App::Prop_None,"Show a vertical centerline through view"); @@ -262,19 +262,19 @@ void DrawViewPart::buildGeometryObject(TopoDS_Shape shape, gp_Pnt& inputCenter) true); geometryObject->extractGeometry(TechDrawGeometry::ecOUTLINE, true); - if (ShowSmoothLines.getValue()) { + if (SmoothVisible.getValue()) { geometryObject->extractGeometry(TechDrawGeometry::ecSMOOTH, true); } - if (ShowSeamLines.getValue()) { + if (SeamVisible.getValue()) { geometryObject->extractGeometry(TechDrawGeometry::ecSEAM, true); } - if ((ShowIsoLines.getValue()) && (IsoCount.getValue() > 0)) { + if ((IsoVisible.getValue()) && (IsoCount.getValue() > 0)) { geometryObject->extractGeometry(TechDrawGeometry::ecUVISO, true); } - if (ShowHiddenLines.getValue()) { + if (HardHidden.getValue()) { geometryObject->extractGeometry(TechDrawGeometry::ecHARD, false); geometryObject->extractGeometry(TechDrawGeometry::ecOUTLINE, @@ -299,14 +299,11 @@ void DrawViewPart::buildGeometryObject(TopoDS_Shape shape, gp_Pnt& inputCenter) void DrawViewPart::extractFaces() { geometryObject->clearFaceGeom(); - //const std::vector& goEdges = geometryObject->getEdgeGeometry(); //TODO: get visible edge geom! - const std::vector& goEdges = geometryObject->getVisibleFaceEdges(); //visible but not iso + const std::vector& goEdges = geometryObject->getVisibleFaceEdges(); std::vector::const_iterator itEdge = goEdges.begin(); std::vector origEdges; for (;itEdge != goEdges.end(); itEdge++) { -// if ((*itEdge)->visible) { //don't make invisible faces! //TODO: only use Seam/Smooth if checked - origEdges.push_back((*itEdge)->occEdge); -// } + origEdges.push_back((*itEdge)->occEdge); } diff --git a/src/Mod/TechDraw/App/DrawViewPart.h b/src/Mod/TechDraw/App/DrawViewPart.h index 88a83e9ce..92c3efb9b 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.h +++ b/src/Mod/TechDraw/App/DrawViewPart.h @@ -73,22 +73,22 @@ public: App::PropertyLink Source; //Part Feature App::PropertyVector Direction; //TODO: Rename to YAxisDirection or whatever this actually is (ProjectionDirection) App::PropertyVector XAxisDirection; - App::PropertyBool ShowSeamLines; - App::PropertyBool ShowSmoothLines; - //App::PropertyBool ShowOutLines; - App::PropertyBool ShowIsoLines; + App::PropertyBool SeamVisible; + App::PropertyBool SmoothVisible; + //App::PropertyBool OutlinesVisible; + App::PropertyBool IsoVisible; - App::PropertyBool ShowHiddenLines; + App::PropertyBool HardHidden; App::PropertyBool SmoothHidden; App::PropertyBool SeamHidden; - //App::PropertyBool OutLinesHidden; + //App::PropertyBool OutlinesHidden; App::PropertyBool IsoHidden; App::PropertyInteger IsoCount; App::PropertyFloat LineWidth; App::PropertyFloat HiddenWidth; App::PropertyFloat IsoWidth; - App::PropertyBool ShowCenters; + App::PropertyBool ArcCenterMarks; App::PropertyFloat CenterScale; App::PropertyFloatConstraint Tolerance; App::PropertyBool HorizCenterLine; diff --git a/src/Mod/TechDraw/App/GeometryObject.cpp b/src/Mod/TechDraw/App/GeometryObject.cpp index b3fb6561d..76b5b1662 100644 --- a/src/Mod/TechDraw/App/GeometryObject.cpp +++ b/src/Mod/TechDraw/App/GeometryObject.cpp @@ -109,8 +109,8 @@ void GeometryObject::setScale(double value) const std::vector GeometryObject::getVisibleFaceEdges() const { std::vector result; - bool smoothOK = m_parent->ShowSmoothLines.getValue(); - bool seamOK = m_parent->ShowSeamLines.getValue(); + bool smoothOK = m_parent->SmoothVisible.getValue(); + bool seamOK = m_parent->SeamVisible.getValue(); for (auto& e:edgeGeom) { if (e->visible) { switch (e->classOfEdge) { diff --git a/src/Mod/TechDraw/Gui/QGIViewPart.cpp b/src/Mod/TechDraw/Gui/QGIViewPart.cpp index 2dd7fa394..bcf6379b2 100644 --- a/src/Mod/TechDraw/Gui/QGIViewPart.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewPart.cpp @@ -253,10 +253,10 @@ void QGIViewPart::updateView(bool update) viewPart->XAxisDirection.isTouched() || viewPart->Tolerance.isTouched() || viewPart->Scale.isTouched() || - viewPart->ShowHiddenLines.isTouched() || - viewPart->ShowSmoothLines.isTouched() || - viewPart->ShowSeamLines.isTouched() || - viewPart->ShowIsoLines.isTouched() || + viewPart->HardHidden.isTouched() || + viewPart->SmoothVisible.isTouched() || + viewPart->SeamVisible.isTouched() || + viewPart->IsoVisible.isTouched() || viewPart->SmoothHidden.isTouched() || viewPart->SeamHidden.isTouched() || viewPart->IsoHidden.isTouched() || @@ -332,14 +332,14 @@ void QGIViewPart::drawViewPart() if ((*itEdge)->visible) { if (((*itEdge)->classOfEdge == ecHARD) || ((*itEdge)->classOfEdge == ecOUTLINE) || - (((*itEdge)->classOfEdge == ecSMOOTH) && viewPart->ShowSmoothLines.getValue()) || - (((*itEdge)->classOfEdge == ecSEAM) && viewPart->ShowSeamLines.getValue()) || - (((*itEdge)->classOfEdge == ecUVISO) && viewPart->ShowIsoLines.getValue())) { + (((*itEdge)->classOfEdge == ecSMOOTH) && viewPart->SmoothVisible.getValue()) || + (((*itEdge)->classOfEdge == ecSEAM) && viewPart->SeamVisible.getValue()) || + (((*itEdge)->classOfEdge == ecUVISO) && viewPart->IsoVisible.getValue())) { showEdge = true; } } else { - if ( (((*itEdge)->classOfEdge == ecHARD) && (viewPart->ShowHiddenLines.getValue())) || - (((*itEdge)->classOfEdge == ecOUTLINE) && (viewPart->ShowHiddenLines.getValue())) || + if ( (((*itEdge)->classOfEdge == ecHARD) && (viewPart->HardHidden.getValue())) || + (((*itEdge)->classOfEdge == ecOUTLINE) && (viewPart->HardHidden.getValue())) || (((*itEdge)->classOfEdge == ecSMOOTH) && (viewPart->SmoothHidden.getValue())) || (((*itEdge)->classOfEdge == ecSEAM) && (viewPart->SeamHidden.getValue())) || (((*itEdge)->classOfEdge == ecUVISO) && (viewPart->IsoHidden.getValue())) ) { @@ -373,7 +373,7 @@ void QGIViewPart::drawViewPart() // Draw Vertexs: const std::vector &verts = viewPart->getVertexGeometry(); std::vector::const_iterator vert = verts.begin(); - bool showCenters = viewPart->ShowCenters.getValue(); + bool showCenters = viewPart->ArcCenterMarks.getValue(); double cAdjust = viewPart->CenterScale.getValue(); for(int i = 0 ; vert != verts.end(); ++vert, i++) { if ((*vert)->isCenter) { diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp index cced922ad..04922e85f 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp @@ -63,7 +63,7 @@ void ViewProviderViewPart::updateData(const App::Property* prop) { if (prop == &(getViewObject()->LineWidth) || prop == &(getViewObject()->HiddenWidth) || - prop == &(getViewObject()->ShowCenters) || + prop == &(getViewObject()->ArcCenterMarks) || prop == &(getViewObject()->CenterScale) || prop == &(getViewObject()->ShowSectionLine) || prop == &(getViewObject()->HorizSectionLine) ||