Rename properties to fit PropertyEditor window
This commit is contained in:
parent
c8f4de5fbc
commit
6b4352f79f
|
@ -115,10 +115,10 @@ DrawViewPart::DrawViewPart(void) : geometryObject(0)
|
||||||
|
|
||||||
//properties that affect Appearance
|
//properties that affect Appearance
|
||||||
//visible outline
|
//visible outline
|
||||||
ADD_PROPERTY_TYPE(ShowSmoothLines ,(false),sgroup,App::Prop_None,"Visible Smooth lines on/off");
|
ADD_PROPERTY_TYPE(SmoothVisible ,(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(SeamVisible ,(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(IsoVisible ,(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(HardHidden ,(false),sgroup,App::Prop_None,"Hidden Hard lines on/off"); // and outline
|
||||||
//hidden outline
|
//hidden outline
|
||||||
ADD_PROPERTY_TYPE(SmoothHidden ,(false),sgroup,App::Prop_None,"Hidden Smooth lines on/off");
|
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");
|
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(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(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(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(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(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");
|
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);
|
true);
|
||||||
geometryObject->extractGeometry(TechDrawGeometry::ecOUTLINE,
|
geometryObject->extractGeometry(TechDrawGeometry::ecOUTLINE,
|
||||||
true);
|
true);
|
||||||
if (ShowSmoothLines.getValue()) {
|
if (SmoothVisible.getValue()) {
|
||||||
geometryObject->extractGeometry(TechDrawGeometry::ecSMOOTH,
|
geometryObject->extractGeometry(TechDrawGeometry::ecSMOOTH,
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
if (ShowSeamLines.getValue()) {
|
if (SeamVisible.getValue()) {
|
||||||
geometryObject->extractGeometry(TechDrawGeometry::ecSEAM,
|
geometryObject->extractGeometry(TechDrawGeometry::ecSEAM,
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
if ((ShowIsoLines.getValue()) && (IsoCount.getValue() > 0)) {
|
if ((IsoVisible.getValue()) && (IsoCount.getValue() > 0)) {
|
||||||
geometryObject->extractGeometry(TechDrawGeometry::ecUVISO,
|
geometryObject->extractGeometry(TechDrawGeometry::ecUVISO,
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
if (ShowHiddenLines.getValue()) {
|
if (HardHidden.getValue()) {
|
||||||
geometryObject->extractGeometry(TechDrawGeometry::ecHARD,
|
geometryObject->extractGeometry(TechDrawGeometry::ecHARD,
|
||||||
false);
|
false);
|
||||||
geometryObject->extractGeometry(TechDrawGeometry::ecOUTLINE,
|
geometryObject->extractGeometry(TechDrawGeometry::ecOUTLINE,
|
||||||
|
@ -299,14 +299,11 @@ void DrawViewPart::buildGeometryObject(TopoDS_Shape shape, gp_Pnt& inputCenter)
|
||||||
void DrawViewPart::extractFaces()
|
void DrawViewPart::extractFaces()
|
||||||
{
|
{
|
||||||
geometryObject->clearFaceGeom();
|
geometryObject->clearFaceGeom();
|
||||||
//const std::vector<TechDrawGeometry::BaseGeom*>& goEdges = geometryObject->getEdgeGeometry(); //TODO: get visible edge geom!
|
const std::vector<TechDrawGeometry::BaseGeom*>& goEdges = geometryObject->getVisibleFaceEdges();
|
||||||
const std::vector<TechDrawGeometry::BaseGeom*>& goEdges = geometryObject->getVisibleFaceEdges(); //visible but not iso
|
|
||||||
std::vector<TechDrawGeometry::BaseGeom*>::const_iterator itEdge = goEdges.begin();
|
std::vector<TechDrawGeometry::BaseGeom*>::const_iterator itEdge = goEdges.begin();
|
||||||
std::vector<TopoDS_Edge> origEdges;
|
std::vector<TopoDS_Edge> origEdges;
|
||||||
for (;itEdge != goEdges.end(); itEdge++) {
|
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);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -73,22 +73,22 @@ public:
|
||||||
App::PropertyLink Source; //Part Feature
|
App::PropertyLink Source; //Part Feature
|
||||||
App::PropertyVector Direction; //TODO: Rename to YAxisDirection or whatever this actually is (ProjectionDirection)
|
App::PropertyVector Direction; //TODO: Rename to YAxisDirection or whatever this actually is (ProjectionDirection)
|
||||||
App::PropertyVector XAxisDirection;
|
App::PropertyVector XAxisDirection;
|
||||||
App::PropertyBool ShowSeamLines;
|
App::PropertyBool SeamVisible;
|
||||||
App::PropertyBool ShowSmoothLines;
|
App::PropertyBool SmoothVisible;
|
||||||
//App::PropertyBool ShowOutLines;
|
//App::PropertyBool OutlinesVisible;
|
||||||
App::PropertyBool ShowIsoLines;
|
App::PropertyBool IsoVisible;
|
||||||
|
|
||||||
App::PropertyBool ShowHiddenLines;
|
App::PropertyBool HardHidden;
|
||||||
App::PropertyBool SmoothHidden;
|
App::PropertyBool SmoothHidden;
|
||||||
App::PropertyBool SeamHidden;
|
App::PropertyBool SeamHidden;
|
||||||
//App::PropertyBool OutLinesHidden;
|
//App::PropertyBool OutlinesHidden;
|
||||||
App::PropertyBool IsoHidden;
|
App::PropertyBool IsoHidden;
|
||||||
App::PropertyInteger IsoCount;
|
App::PropertyInteger IsoCount;
|
||||||
|
|
||||||
App::PropertyFloat LineWidth;
|
App::PropertyFloat LineWidth;
|
||||||
App::PropertyFloat HiddenWidth;
|
App::PropertyFloat HiddenWidth;
|
||||||
App::PropertyFloat IsoWidth;
|
App::PropertyFloat IsoWidth;
|
||||||
App::PropertyBool ShowCenters;
|
App::PropertyBool ArcCenterMarks;
|
||||||
App::PropertyFloat CenterScale;
|
App::PropertyFloat CenterScale;
|
||||||
App::PropertyFloatConstraint Tolerance;
|
App::PropertyFloatConstraint Tolerance;
|
||||||
App::PropertyBool HorizCenterLine;
|
App::PropertyBool HorizCenterLine;
|
||||||
|
|
|
@ -109,8 +109,8 @@ void GeometryObject::setScale(double value)
|
||||||
const std::vector<BaseGeom *> GeometryObject::getVisibleFaceEdges() const
|
const std::vector<BaseGeom *> GeometryObject::getVisibleFaceEdges() const
|
||||||
{
|
{
|
||||||
std::vector<BaseGeom *> result;
|
std::vector<BaseGeom *> result;
|
||||||
bool smoothOK = m_parent->ShowSmoothLines.getValue();
|
bool smoothOK = m_parent->SmoothVisible.getValue();
|
||||||
bool seamOK = m_parent->ShowSeamLines.getValue();
|
bool seamOK = m_parent->SeamVisible.getValue();
|
||||||
for (auto& e:edgeGeom) {
|
for (auto& e:edgeGeom) {
|
||||||
if (e->visible) {
|
if (e->visible) {
|
||||||
switch (e->classOfEdge) {
|
switch (e->classOfEdge) {
|
||||||
|
|
|
@ -253,10 +253,10 @@ void QGIViewPart::updateView(bool update)
|
||||||
viewPart->XAxisDirection.isTouched() ||
|
viewPart->XAxisDirection.isTouched() ||
|
||||||
viewPart->Tolerance.isTouched() ||
|
viewPart->Tolerance.isTouched() ||
|
||||||
viewPart->Scale.isTouched() ||
|
viewPart->Scale.isTouched() ||
|
||||||
viewPart->ShowHiddenLines.isTouched() ||
|
viewPart->HardHidden.isTouched() ||
|
||||||
viewPart->ShowSmoothLines.isTouched() ||
|
viewPart->SmoothVisible.isTouched() ||
|
||||||
viewPart->ShowSeamLines.isTouched() ||
|
viewPart->SeamVisible.isTouched() ||
|
||||||
viewPart->ShowIsoLines.isTouched() ||
|
viewPart->IsoVisible.isTouched() ||
|
||||||
viewPart->SmoothHidden.isTouched() ||
|
viewPart->SmoothHidden.isTouched() ||
|
||||||
viewPart->SeamHidden.isTouched() ||
|
viewPart->SeamHidden.isTouched() ||
|
||||||
viewPart->IsoHidden.isTouched() ||
|
viewPart->IsoHidden.isTouched() ||
|
||||||
|
@ -332,14 +332,14 @@ void QGIViewPart::drawViewPart()
|
||||||
if ((*itEdge)->visible) {
|
if ((*itEdge)->visible) {
|
||||||
if (((*itEdge)->classOfEdge == ecHARD) ||
|
if (((*itEdge)->classOfEdge == ecHARD) ||
|
||||||
((*itEdge)->classOfEdge == ecOUTLINE) ||
|
((*itEdge)->classOfEdge == ecOUTLINE) ||
|
||||||
(((*itEdge)->classOfEdge == ecSMOOTH) && viewPart->ShowSmoothLines.getValue()) ||
|
(((*itEdge)->classOfEdge == ecSMOOTH) && viewPart->SmoothVisible.getValue()) ||
|
||||||
(((*itEdge)->classOfEdge == ecSEAM) && viewPart->ShowSeamLines.getValue()) ||
|
(((*itEdge)->classOfEdge == ecSEAM) && viewPart->SeamVisible.getValue()) ||
|
||||||
(((*itEdge)->classOfEdge == ecUVISO) && viewPart->ShowIsoLines.getValue())) {
|
(((*itEdge)->classOfEdge == ecUVISO) && viewPart->IsoVisible.getValue())) {
|
||||||
showEdge = true;
|
showEdge = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( (((*itEdge)->classOfEdge == ecHARD) && (viewPart->ShowHiddenLines.getValue())) ||
|
if ( (((*itEdge)->classOfEdge == ecHARD) && (viewPart->HardHidden.getValue())) ||
|
||||||
(((*itEdge)->classOfEdge == ecOUTLINE) && (viewPart->ShowHiddenLines.getValue())) ||
|
(((*itEdge)->classOfEdge == ecOUTLINE) && (viewPart->HardHidden.getValue())) ||
|
||||||
(((*itEdge)->classOfEdge == ecSMOOTH) && (viewPart->SmoothHidden.getValue())) ||
|
(((*itEdge)->classOfEdge == ecSMOOTH) && (viewPart->SmoothHidden.getValue())) ||
|
||||||
(((*itEdge)->classOfEdge == ecSEAM) && (viewPart->SeamHidden.getValue())) ||
|
(((*itEdge)->classOfEdge == ecSEAM) && (viewPart->SeamHidden.getValue())) ||
|
||||||
(((*itEdge)->classOfEdge == ecUVISO) && (viewPart->IsoHidden.getValue())) ) {
|
(((*itEdge)->classOfEdge == ecUVISO) && (viewPart->IsoHidden.getValue())) ) {
|
||||||
|
@ -373,7 +373,7 @@ void QGIViewPart::drawViewPart()
|
||||||
// Draw Vertexs:
|
// Draw Vertexs:
|
||||||
const std::vector<TechDrawGeometry::Vertex *> &verts = viewPart->getVertexGeometry();
|
const std::vector<TechDrawGeometry::Vertex *> &verts = viewPart->getVertexGeometry();
|
||||||
std::vector<TechDrawGeometry::Vertex *>::const_iterator vert = verts.begin();
|
std::vector<TechDrawGeometry::Vertex *>::const_iterator vert = verts.begin();
|
||||||
bool showCenters = viewPart->ShowCenters.getValue();
|
bool showCenters = viewPart->ArcCenterMarks.getValue();
|
||||||
double cAdjust = viewPart->CenterScale.getValue();
|
double cAdjust = viewPart->CenterScale.getValue();
|
||||||
for(int i = 0 ; vert != verts.end(); ++vert, i++) {
|
for(int i = 0 ; vert != verts.end(); ++vert, i++) {
|
||||||
if ((*vert)->isCenter) {
|
if ((*vert)->isCenter) {
|
||||||
|
|
|
@ -63,7 +63,7 @@ void ViewProviderViewPart::updateData(const App::Property* prop)
|
||||||
{
|
{
|
||||||
if (prop == &(getViewObject()->LineWidth) ||
|
if (prop == &(getViewObject()->LineWidth) ||
|
||||||
prop == &(getViewObject()->HiddenWidth) ||
|
prop == &(getViewObject()->HiddenWidth) ||
|
||||||
prop == &(getViewObject()->ShowCenters) ||
|
prop == &(getViewObject()->ArcCenterMarks) ||
|
||||||
prop == &(getViewObject()->CenterScale) ||
|
prop == &(getViewObject()->CenterScale) ||
|
||||||
prop == &(getViewObject()->ShowSectionLine) ||
|
prop == &(getViewObject()->ShowSectionLine) ||
|
||||||
prop == &(getViewObject()->HorizSectionLine) ||
|
prop == &(getViewObject()->HorizSectionLine) ||
|
||||||
|
|
Loading…
Reference in New Issue
Block a user