Fix #56 ViewSection

- too many edges in result
This commit is contained in:
WandererFan
2016-07-08 19:59:20 -04:00
committed by wmayer
parent 8d859c91e1
commit fc9c4d2bf5
7 changed files with 128 additions and 103 deletions

View File

@@ -61,8 +61,6 @@
using namespace TechDrawGui;
using namespace TechDrawGeometry;
void _dumpPath(const char* text,QPainterPath path);
const float lineScaleFactor = 1.; // temp fiddle for devel
const float vertexScaleFactor = 2.; // temp fiddle for devel
@@ -365,7 +363,7 @@ void QGIViewPart::drawViewPart()
//QPainterPath edgePath=drawPainterPath(*itEdge);
//std::stringstream edgeId;
//edgeId << "QGIVP.edgePath" << i;
//_dumpPath(edgeId.str().c_str(),edgePath);
//dumpPath(edgeId.str().c_str(),edgePath);
}
}
@@ -407,7 +405,7 @@ QGIFace* QGIViewPart::drawFace(TechDrawGeometry::Face* f, int idx)
//debug a path
//std::stringstream faceId;
//faceId << "facePath " << idx;
//_dumpPath(faceId.str().c_str(),facePath);
//dumpPath(faceId.str().c_str(),facePath);
return gFace;
}
@@ -586,7 +584,7 @@ QRectF QGIViewPart::boundingRect() const
return childrenBoundingRect();
}
void _dumpPath(const char* text,QPainterPath path)
void QGIViewPart::dumpPath(const char* text,QPainterPath path)
{
QPainterPath::Element elem;
Base::Console().Message(">>>%s has %d elements\n",text,path.elementCount());

View File

@@ -86,6 +86,7 @@ protected:
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
TechDraw::DrawHatch* faceIsHatched(int i,std::vector<TechDraw::DrawHatch*> hatchObjs) const;
void dumpPath(const char* text,QPainterPath path);
QColor m_colHid;

View File

@@ -74,8 +74,8 @@ void QGIViewSection::drawSectionFace()
return;
}
std::vector<TechDrawGeometry::Face *>::iterator fit = sectionFaces.begin();
//QColor faceColor(0,0,255,40); //temp. sb preference or property. transparency allows bleed through/colour mix.
QColor faceColor(170,170,255); //temp. sb preference or property.
QColor faceColor(0,0,255,40); //temp. sb preference or property. transparency allows bleed through/colour mix.
//QColor faceColor(170,170,255); //temp. sb preference or property.
for(; fit != sectionFaces.end(); fit++) {
QGIFace* newFace = drawFace(*fit,-1); //TODO: do we need to know which sectionFace this QGIFace came from?
newFace->setZValue(ZVALUE::SECTIONFACE);