Skip to content

Commit

Permalink
Rename properties to fit PropertyEditor window
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan authored and yorikvanhavre committed Oct 6, 2016
1 parent c8f4de5 commit 6b4352f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 34 deletions.
25 changes: 11 additions & 14 deletions src/Mod/TechDraw/App/DrawViewPart.cpp
Expand Up @@ -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");
Expand All @@ -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");
Expand Down Expand Up @@ -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,
Expand All @@ -299,14 +299,11 @@ void DrawViewPart::buildGeometryObject(TopoDS_Shape shape, gp_Pnt& inputCenter)
void DrawViewPart::extractFaces()
{
geometryObject->clearFaceGeom();
//const std::vector<TechDrawGeometry::BaseGeom*>& goEdges = geometryObject->getEdgeGeometry(); //TODO: get visible edge geom!
const std::vector<TechDrawGeometry::BaseGeom*>& goEdges = geometryObject->getVisibleFaceEdges(); //visible but not iso
const std::vector<TechDrawGeometry::BaseGeom*>& goEdges = geometryObject->getVisibleFaceEdges();
std::vector<TechDrawGeometry::BaseGeom*>::const_iterator itEdge = goEdges.begin();
std::vector<TopoDS_Edge> 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);
}


Expand Down
14 changes: 7 additions & 7 deletions src/Mod/TechDraw/App/DrawViewPart.h
Expand Up @@ -73,22 +73,22 @@ class TechDrawExport DrawViewPart : public DrawView
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;
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/TechDraw/App/GeometryObject.cpp
Expand Up @@ -109,8 +109,8 @@ void GeometryObject::setScale(double value)
const std::vector<BaseGeom *> GeometryObject::getVisibleFaceEdges() const
{
std::vector<BaseGeom *> 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) {
Expand Down
20 changes: 10 additions & 10 deletions src/Mod/TechDraw/Gui/QGIViewPart.cpp
Expand Up @@ -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() ||
Expand Down Expand Up @@ -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())) ) {
Expand Down Expand Up @@ -373,7 +373,7 @@ void QGIViewPart::drawViewPart()
// Draw Vertexs:
const std::vector<TechDrawGeometry::Vertex *> &verts = viewPart->getVertexGeometry();
std::vector<TechDrawGeometry::Vertex *>::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) {
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp
Expand Up @@ -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) ||
Expand Down

0 comments on commit 6b4352f

Please sign in to comment.