diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index c9d80a7ff7bd..48d972f36a55 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.cpp +++ b/src/Mod/TechDraw/App/DrawViewPart.cpp @@ -518,9 +518,16 @@ void DrawViewPart::extractFaces() std::vector sortedWires = ew.sortStrip(fw,true); +// int idb = 0; std::vector::iterator itWire = sortedWires.begin(); for (; itWire != sortedWires.end(); itWire++) { //version 1: 1 wire/face - no voids in face +//debug +// std::stringstream ss; +// ss << "DVPSWire" << idb << ".brep"; +// std::string wireName = ss.str(); +// BRepTools::Write((*itWire), wireName.c_str()); //debug +//debug idb++; TechDraw::Face* f = new TechDraw::Face(); const TopoDS_Wire& wire = (*itWire); TechDraw::Wire* w = new TechDraw::Wire(wire); @@ -926,7 +933,7 @@ bool DrawViewPart::checkXDirection(void) const Base::Vector3d origin(0.0,0.0,0.0); Base::Vector3d xDir = getLegacyX(origin, dir); - Base::Console().Warning("DVP - %s - XDirection property not set. Trying %s\n", + Base::Console().Log("DVP - %s - XDirection property not set. Trying %s\n", getNameInDocument(), DrawUtil::formatVector(xDir).c_str()); return false; diff --git a/src/Mod/TechDraw/App/DrawViewSection.cpp b/src/Mod/TechDraw/App/DrawViewSection.cpp index 7d4236cd0f4c..55fb39f072b8 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.cpp +++ b/src/Mod/TechDraw/App/DrawViewSection.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -371,14 +372,18 @@ App::DocumentObjectExecReturn *DrawViewSection::execute(void) ss << "DVSScaledFace" << idb << ".brep" ; std::string faceName = ss.str(); BRepTools::Write(pFace, faceName.c_str()); //debug + std::stringstream ss2; + ss2 << "DVSOuter" << idb << ".brep" ; + TopoDS_Wire owdb = ShapeAnalysis::OuterWire(pFace); + std::string wireName = ss2.str(); + BRepTools::Write(owdb, wireName.c_str()); //debug } TopoDS_Wire ow = ShapeAnalysis::OuterWire(pFace); -// BRepTools::Write(ow, "outerwire.brep"); //debug //this check helps prevent "ghost" faces BRepCheck_Wire chkWire(ow); TopoDS_Edge e1, e2; BRepCheck_Status status = chkWire.SelfIntersect(pFace, e1, e2); - if (status == BRepCheck_NoError) { + if (status == BRepCheck_NoError) { builder.Add(newFaces,pFace); sectionFaceWires.push_back(ShapeAnalysis::OuterWire(pFace)); } diff --git a/src/Mod/TechDraw/App/DrawViewSection.h b/src/Mod/TechDraw/App/DrawViewSection.h index 298814193d04..e9b7ce9899c9 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.h +++ b/src/Mod/TechDraw/App/DrawViewSection.h @@ -39,6 +39,7 @@ class Bnd_Box; class gp_Pln; class gp_Pnt; class TopoDS_Face; +class TopoDS_Wire; class gp_Ax2; namespace TechDraw diff --git a/src/Mod/TechDraw/App/Geometry.cpp b/src/Mod/TechDraw/App/Geometry.cpp index 9fcc65ae1045..463654d2e568 100644 --- a/src/Mod/TechDraw/App/Geometry.cpp +++ b/src/Mod/TechDraw/App/Geometry.cpp @@ -426,6 +426,10 @@ BaseGeom* BaseGeom::baseFactory(TopoDS_Edge edge) Handle(Geom_BezierCurve) bez = adapt.Bezier(); //if (bez->Degree() < 4) { result = new BezierSegment(edge); + if (edge.Orientation() == TopAbs_REVERSED) { + result->reversed = true; + } + //} // OCC is quite happy with Degree > 3 but QtGui handles only 2,3 } break; @@ -456,7 +460,7 @@ BaseGeom* BaseGeom::baseFactory(TopoDS_Edge edge) delete bspline; bspline = nullptr; } - }else { + } else { result = bspline; } } @@ -524,6 +528,9 @@ AOE::AOE(const TopoDS_Edge &e) : Ellipse(e) startPnt = Base::Vector3d(s.X(), s.Y(), s.Z()); endPnt = Base::Vector3d(ePt.X(), ePt.Y(), ePt.Z()); midPnt = Base::Vector3d(m.X(), m.Y(), m.Z()); + if (e.Orientation() == TopAbs_REVERSED) { + reversed = true; + } } @@ -634,6 +641,9 @@ AOC::AOC(const TopoDS_Edge &e) : Circle(e) startPnt = Base::Vector3d(s.X(), s.Y(), s.Z()); endPnt = Base::Vector3d(ePt.X(), ePt.Y(), s.Z()); midPnt = Base::Vector3d(m.X(), m.Y(), s.Z()); + if (e.Orientation() == TopAbs_REVERSED) { + reversed = true; + } } AOC::AOC(void) : Circle() @@ -837,6 +847,9 @@ Generic::Generic(const TopoDS_Edge &e) p = BRep_Tool::Pnt(TopExp::LastVertex(occEdge)); points.emplace_back(p.X(), p.Y(), p.Z()); } + if (e.Orientation() == TopAbs_REVERSED) { + reversed = true; + } } @@ -1040,6 +1053,9 @@ BSpline::BSpline(const TopoDS_Edge &e) } segments.push_back(tempSegment); } + if (e.Orientation() == TopAbs_REVERSED) { + reversed = true; + } } @@ -1265,6 +1281,7 @@ TopoDS_Edge BSpline::asCircle(bool& arc) result = newEdge; } } + return result; } @@ -1308,6 +1325,9 @@ BezierSegment::BezierSegment(const TopoDS_Edge &e) gp_Pnt controlPoint = bez->Pole(i); pnts.emplace_back(controlPoint.X(), controlPoint.Y(), controlPoint.Z()); } + if (e.Orientation() == TopAbs_REVERSED) { + reversed = true; + } } diff --git a/src/Mod/TechDraw/App/GeometryObject.cpp b/src/Mod/TechDraw/App/GeometryObject.cpp index 2d7828c1c8b0..145bd6204520 100644 --- a/src/Mod/TechDraw/App/GeometryObject.cpp +++ b/src/Mod/TechDraw/App/GeometryObject.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -131,6 +132,16 @@ const std::vector GeometryObject::getVisibleFaceEdges(const bool smo } } } + //debug + //make compound of edges and save as brep file +// BRep_Builder builder; +// TopoDS_Compound comp; +// builder.MakeCompound(comp); +// for (auto& r: result) { +// builder.Add(comp, r->occEdge); +// } +// BRepTools::Write(comp, "GOVizFaceEdges.brep"); //debug + return result; } diff --git a/src/Mod/TechDraw/Gui/QGIViewPart.cpp b/src/Mod/TechDraw/Gui/QGIViewPart.cpp index d994586f65fb..023949b5f16e 100644 --- a/src/Mod/TechDraw/Gui/QGIViewPart.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewPart.cpp @@ -149,146 +149,243 @@ QPainterPath QGIViewPart::geomToPainterPath(TechDraw::BaseGeom *baseGeom, double QPainterPath path; switch(baseGeom->geomType) { - case TechDraw::CIRCLE: { - TechDraw::Circle *geom = static_cast(baseGeom); - - double x = geom->center.x - geom->radius; - double y = geom->center.y - geom->radius; - - path.addEllipse(Rez::guiX(x), - Rez::guiX(y), - Rez::guiX(geom->radius * 2), - Rez::guiX(geom->radius * 2)); //topleft@(x,y) radx,rady - } break; - case TechDraw::ARCOFCIRCLE: { - TechDraw::AOC *geom = static_cast(baseGeom); - - pathArc(path, - Rez::guiX(geom->radius), - Rez::guiX(geom->radius), - 0., - geom->largeArc, - geom->cw, - Rez::guiX(geom->endPnt.x), - Rez::guiX(geom->endPnt.y), - Rez::guiX(geom->startPnt.x), - Rez::guiX(geom->startPnt.y)); - } break; + case CIRCLE: { + TechDraw::Circle *geom = static_cast(baseGeom); + + double x = geom->center.x - geom->radius; + double y = geom->center.y - geom->radius; + + path.addEllipse(Rez::guiX(x), + Rez::guiX(y), + Rez::guiX(geom->radius * 2), + Rez::guiX(geom->radius * 2)); //topleft@(x,y) radx,rady + } + break; + case ARCOFCIRCLE: { + TechDraw::AOC *geom = static_cast(baseGeom); + if (baseGeom->reversed) { + path.moveTo(Rez::guiX(geom->endPnt.x), + Rez::guiX(geom->endPnt.y)); + pathArc(path, + Rez::guiX(geom->radius), + Rez::guiX(geom->radius), + 0., + geom->largeArc, + !geom->cw, + Rez::guiX(geom->startPnt.x), + Rez::guiX(geom->startPnt.y), + Rez::guiX(geom->endPnt.x), + Rez::guiX(geom->endPnt.y)); + } else { + path.moveTo(Rez::guiX(geom->startPnt.x), + Rez::guiX(geom->startPnt.y)); + pathArc(path, + Rez::guiX(geom->radius), + Rez::guiX(geom->radius), + 0., + geom->largeArc, + geom->cw, + Rez::guiX(geom->endPnt.x), + Rez::guiX(geom->endPnt.y), + Rez::guiX(geom->startPnt.x), + Rez::guiX(geom->startPnt.y)); + } + } + break; case TechDraw::ELLIPSE: { - TechDraw::Ellipse *geom = static_cast(baseGeom); - - // Calculate start and end points as ellipse with theta = 0 and pi - double startX = geom->center.x + geom->major * cos(geom->angle), - startY = geom->center.y + geom->major * sin(geom->angle), - endX = geom->center.x - geom->major * cos(geom->angle), - endY = geom->center.y - geom->major * sin(geom->angle); - - pathArc(path, - Rez::guiX(geom->major), - Rez::guiX(geom->minor), - geom->angle, - false, - false, - Rez::guiX(endX), - Rez::guiX(endY), - Rez::guiX(startX), - Rez::guiX(startY)); - - pathArc(path, - Rez::guiX(geom->major), - Rez::guiX(geom->minor), - geom->angle, - false, - false, - Rez::guiX(startX), - Rez::guiX(startY), - Rez::guiX(endX), - Rez::guiX(endY)); - - } break; + TechDraw::Ellipse *geom = static_cast(baseGeom); + + // Calculate start and end points as ellipse with theta = 0 and pi + double startX = geom->center.x + geom->major * cos(geom->angle), + startY = geom->center.y + geom->major * sin(geom->angle), + endX = geom->center.x - geom->major * cos(geom->angle), + endY = geom->center.y - geom->major * sin(geom->angle); + + pathArc(path, + Rez::guiX(geom->major), + Rez::guiX(geom->minor), + geom->angle, + false, + false, + Rez::guiX(endX), + Rez::guiX(endY), + Rez::guiX(startX), + Rez::guiX(startY)); + + pathArc(path, + Rez::guiX(geom->major), + Rez::guiX(geom->minor), + geom->angle, + false, + false, + Rez::guiX(startX), + Rez::guiX(startY), + Rez::guiX(endX), + Rez::guiX(endY)); + } + break; case TechDraw::ARCOFELLIPSE: { - TechDraw::AOE *geom = static_cast(baseGeom); - - pathArc(path, - Rez::guiX(geom->major), - Rez::guiX(geom->minor), - geom->angle, - geom->largeArc, - geom->cw, - Rez::guiX(geom->endPnt.x), - Rez::guiX(geom->endPnt.y), - Rez::guiX(geom->startPnt.x), - Rez::guiX(geom->startPnt.y)); - - } break; + TechDraw::AOE *geom = static_cast(baseGeom); + if (baseGeom->reversed) { + path.moveTo(Rez::guiX(geom->endPnt.x), + Rez::guiX(geom->endPnt.y)); + pathArc(path, + Rez::guiX(geom->major), + Rez::guiX(geom->minor), + geom->angle, + geom->largeArc, + !geom->cw, + Rez::guiX(geom->startPnt.x), + Rez::guiX(geom->startPnt.y), + Rez::guiX(geom->endPnt.x), + Rez::guiX(geom->endPnt.y)); + } else { + path.moveTo(Rez::guiX(geom->startPnt.x), + Rez::guiX(geom->startPnt.y)); + pathArc(path, + Rez::guiX(geom->major), + Rez::guiX(geom->minor), + geom->angle, + geom->largeArc, + geom->cw, + Rez::guiX(geom->endPnt.x), + Rez::guiX(geom->endPnt.y), + Rez::guiX(geom->startPnt.x), + Rez::guiX(geom->startPnt.y)); + } + } + break; case TechDraw::BEZIER: { - TechDraw::BezierSegment *geom = static_cast(baseGeom); - - // Move painter to the beginning - path.moveTo(Rez::guiX(geom->pnts[0].x), Rez::guiX(geom->pnts[0].y)); - - if ( geom->poles == 2 ) { - // Degree 1 bezier = straight line... - path.lineTo(Rez::guiX(geom->pnts[1].x), Rez::guiX(geom->pnts[1].y)); - - } else if ( geom->poles == 3 ) { - path.quadTo(Rez::guiX(geom->pnts[1].x), Rez::guiX(geom->pnts[1].y), - Rez::guiX(geom->pnts[2].x), Rez::guiX(geom->pnts[2].y)); - - } else if ( geom->poles == 4 ) { - path.cubicTo(Rez::guiX(geom->pnts[1].x), Rez::guiX(geom->pnts[1].y), - Rez::guiX(geom->pnts[2].x), Rez::guiX(geom->pnts[2].y), - Rez::guiX(geom->pnts[3].x), Rez::guiX(geom->pnts[3].y)); - } else { //can only handle lines,quads,cubes - Base::Console().Error("Bad pole count (%d) for BezierSegment\n",geom->poles); - auto itBez = geom->pnts.begin() + 1; - for (; itBez != geom->pnts.end();itBez++) { - path.lineTo(Rez::guiX((*itBez).x), Rez::guiX((*itBez).y)); //show something for debugging - } - } - } break; + TechDraw::BezierSegment *geom = static_cast(baseGeom); + if (baseGeom->reversed) { + if (!geom->pnts.empty()) { + Base::Vector3d rStart = geom->pnts.back(); + path.moveTo(Rez::guiX(rStart.x), Rez::guiX(rStart.y)); + } + if ( geom->poles == 2 ) { + // Degree 1 bezier = straight line... + path.lineTo(Rez::guiX(geom->pnts[0].x), Rez::guiX(geom->pnts[0].y)); + + } else if ( geom->poles == 3 ) { + path.quadTo(Rez::guiX(geom->pnts[1].x), Rez::guiX(geom->pnts[1].y), + Rez::guiX(geom->pnts[0].x), Rez::guiX(geom->pnts[0].y)); + } else if ( geom->poles == 4 ) { + path.cubicTo(Rez::guiX(geom->pnts[2].x), Rez::guiX(geom->pnts[2].y), + Rez::guiX(geom->pnts[1].x), Rez::guiX(geom->pnts[1].y), + Rez::guiX(geom->pnts[0].x), Rez::guiX(geom->pnts[0].y)); + } else { //can only handle lines,quads,cubes + Base::Console().Error("Bad pole count (%d) for BezierSegment\n",geom->poles); + auto itBez = geom->pnts.begin() + 1; + for (; itBez != geom->pnts.end();itBez++) { + path.lineTo(Rez::guiX((*itBez).x), Rez::guiX((*itBez).y)); //show something for debugging + } + } + } else { + // Move painter to the beginning + path.moveTo(Rez::guiX(geom->pnts[0].x), Rez::guiX(geom->pnts[0].y)); + + if ( geom->poles == 2 ) { + // Degree 1 bezier = straight line... + path.lineTo(Rez::guiX(geom->pnts[1].x), Rez::guiX(geom->pnts[1].y)); + + } else if ( geom->poles == 3 ) { + path.quadTo(Rez::guiX(geom->pnts[1].x), Rez::guiX(geom->pnts[1].y), + Rez::guiX(geom->pnts[2].x), Rez::guiX(geom->pnts[2].y)); + + } else if ( geom->poles == 4 ) { + path.cubicTo(Rez::guiX(geom->pnts[1].x), Rez::guiX(geom->pnts[1].y), + Rez::guiX(geom->pnts[2].x), Rez::guiX(geom->pnts[2].y), + Rez::guiX(geom->pnts[3].x), Rez::guiX(geom->pnts[3].y)); + } else { //can only handle lines,quads,cubes + Base::Console().Error("Bad pole count (%d) for BezierSegment\n",geom->poles); + auto itBez = geom->pnts.begin() + 1; + for (; itBez != geom->pnts.end();itBez++) { + path.lineTo(Rez::guiX((*itBez).x), Rez::guiX((*itBez).y)); //show something for debugging + } + } + } + } + break; case TechDraw::BSPLINE: { - TechDraw::BSpline *geom = static_cast(baseGeom); - - std::vector::const_iterator it = geom->segments.begin(); - - // Move painter to the beginning of our first segment - path.moveTo(Rez::guiX(it->pnts[0].x), Rez::guiX(it->pnts[0].y)); - - for ( ; it != geom->segments.end(); ++it) { - // At this point, the painter is either at the beginning - // of the first segment, or end of the last - if ( it->poles == 2 ) { - // Degree 1 bezier = straight line... - path.lineTo(Rez::guiX(it->pnts[1].x), Rez::guiX(it->pnts[1].y)); - - } else if ( it->poles == 3 ) { - path.quadTo(Rez::guiX(it->pnts[1].x), Rez::guiX(it->pnts[1].y), - Rez::guiX(it->pnts[2].x), Rez::guiX(it->pnts[2].y)); - - } else if ( it->poles == 4 ) { - path.cubicTo(Rez::guiX(it->pnts[1].x), Rez::guiX(it->pnts[1].y), - Rez::guiX(it->pnts[2].x), Rez::guiX(it->pnts[2].y), - Rez::guiX(it->pnts[3].x), Rez::guiX(it->pnts[3].y)); - } else { //can only handle lines,quads,cubes - Base::Console().Error("Bad pole count (%d) for BezierSegment of B-spline geometry\n",it->poles); - path.lineTo(it->pnts[1].x, it->pnts[1].y); //show something for debugging - } - } - } break; + TechDraw::BSpline *geom = static_cast(baseGeom); + if (baseGeom->reversed) { + // Move painter to the end of our last segment + std::vector::const_reverse_iterator it = geom->segments.rbegin(); + Base::Vector3d rStart = it->pnts.back(); + path.moveTo(Rez::guiX(rStart.x), Rez::guiX(rStart.y)); + + for ( ; it != geom->segments.rend(); ++it) { + // At this point, the painter is either at the beginning + // of the first segment, or end of the last + if ( it->poles == 2 ) { + // Degree 1 bezier = straight line... + path.lineTo(Rez::guiX(it->pnts[0].x), Rez::guiX(it->pnts[0].y)); + + } else if ( it->poles == 3 ) { + path.quadTo(Rez::guiX(it->pnts[1].x), Rez::guiX(it->pnts[1].y), + Rez::guiX(it->pnts[0].x), Rez::guiX(it->pnts[0].y)); + } else if ( it->poles == 4 ) { + path.cubicTo(Rez::guiX(it->pnts[2].x), Rez::guiX(it->pnts[2].y), + Rez::guiX(it->pnts[1].x), Rez::guiX(it->pnts[1].y), + Rez::guiX(it->pnts[0].x), Rez::guiX(it->pnts[0].y)); + } else { //can only handle lines,quads,cubes + Base::Console().Error("Bad pole count (%d) for BezierSegment of B-spline geometry\n", + it->poles); + path.lineTo(it->pnts[1].x, it->pnts[1].y); //show something for debugging + } + } + } else { + // Move painter to the beginning of our first segment + std::vector::const_iterator it = geom->segments.begin(); + path.moveTo(Rez::guiX(it->pnts[0].x), Rez::guiX(it->pnts[0].y)); + + for ( ; it != geom->segments.end(); ++it) { + // At this point, the painter is either at the beginning + // of the first segment, or end of the last + if ( it->poles == 2 ) { + // Degree 1 bezier = straight line... + path.lineTo(Rez::guiX(it->pnts[1].x), Rez::guiX(it->pnts[1].y)); + } else if ( it->poles == 3 ) { + path.quadTo(Rez::guiX(it->pnts[1].x), Rez::guiX(it->pnts[1].y), + Rez::guiX(it->pnts[2].x), Rez::guiX(it->pnts[2].y)); + } else if ( it->poles == 4 ) { + path.cubicTo(Rez::guiX(it->pnts[1].x), Rez::guiX(it->pnts[1].y), + Rez::guiX(it->pnts[2].x), Rez::guiX(it->pnts[2].y), + Rez::guiX(it->pnts[3].x), Rez::guiX(it->pnts[3].y)); + } else { + Base::Console().Error("Bad pole count (%d) for BezierSegment of B-spline geometry\n", + it->poles); + path.lineTo(it->pnts[1].x, it->pnts[1].y); //show something for debugging + } + } + } + } + break; case TechDraw::GENERIC: { - TechDraw::Generic *geom = static_cast(baseGeom); - - path.moveTo(Rez::guiX(geom->points[0].x), Rez::guiX(geom->points[0].y)); - std::vector::const_iterator it = geom->points.begin(); - for(++it; it != geom->points.end(); ++it) { - path.lineTo(Rez::guiX((*it).x), Rez::guiX((*it).y)); - } - } break; - default: - Base::Console().Error("Error - geomToPainterPath - UNKNOWN geomType: %d\n",baseGeom->geomType); - break; - } + TechDraw::Generic *geom = static_cast(baseGeom); + if (baseGeom->reversed) { + if (!geom->points.empty()) { + Base::Vector3d rStart = geom->points.back(); + path.moveTo(Rez::guiX(rStart.x), Rez::guiX(rStart.y)); + } + std::vector::const_reverse_iterator it = geom->points.rbegin(); + for(++it; it != geom->points.rend(); ++it) { + path.lineTo(Rez::guiX((*it).x), Rez::guiX((*it).y)); + } + } else { + path.moveTo(Rez::guiX(geom->points[0].x), Rez::guiX(geom->points[0].y)); + std::vector::const_iterator it = geom->points.begin(); + for(++it; it != geom->points.end(); ++it) { + path.lineTo(Rez::guiX((*it).x), Rez::guiX((*it).y)); + } + } + } + break; + default: { + Base::Console().Error("Error - geomToPainterPath - UNKNOWN geomType: %d\n",baseGeom->geomType); + } + break; + } //sb end of switch //old rotate path logic. now done on App side. // if (rot != 0.0) { @@ -633,21 +730,26 @@ bool QGIViewPart::formatGeomFromCenterLine(int sourceIndex, QGIEdge* item) QGIFace* QGIViewPart::drawFace(TechDraw::Face* f, int idx) { +// Base::Console().Message("QGIVP::drawFace - %d\n", idx); std::vector fWires = f->wires; QPainterPath facePath; for(std::vector::iterator wire = fWires.begin(); wire != fWires.end(); ++wire) { QPainterPath wirePath; + std::vector geoms = (*wire)->geoms; for(std::vector::iterator edge = (*wire)->geoms.begin(); edge != (*wire)->geoms.end(); ++edge) { //Save the start Position QPainterPath edgePath = drawPainterPath(*edge); // If the current end point matches the shape end point the new edge path needs reversing - QPointF shapePos = (wirePath.currentPosition()- edgePath.currentPosition()); - if(sqrt(shapePos.x() * shapePos.x() + shapePos.y()*shapePos.y()) < 0.05) { //magic tolerance - edgePath = edgePath.toReversed(); - } + // wf: this check isn't good enough. + //if ((*edge)->reversed) { + // path = ??? +// QPointF shapePos = (wirePath.currentPosition()- edgePath.currentPosition()); +// if(sqrt(shapePos.x() * shapePos.x() + shapePos.y()*shapePos.y()) < 0.05) { //magic tolerance +// edgePath = edgePath.toReversed(); +// } wirePath.connectPath(edgePath); } - //dumpPath("wirePath:",wirePath); +// dumpPath("wirePath:",wirePath); facePath.addPath(wirePath); } facePath.setFillRule(Qt::OddEvenFill); @@ -795,6 +897,9 @@ void QGIViewPart::drawSectionLine(TechDraw::DrawViewSection* viewSection, bool b Base::Vector3d offset = pAdjOrg + displace; // makeMark(0.0, 0.0); //red +// makeMark(Rez::guiX(offset.x), +// Rez::guiX(offset.y), +// Qt::green); sectionLine->setPos(Rez::guiX(offset.x),Rez::guiX(offset.y)); double sectionSpan; @@ -1143,8 +1248,9 @@ void QGIViewPart::dumpPath(const char* text,QPainterPath path) } else { typeName = "CurveData"; } - Base::Console().Message(">>>>> element %d: type:%d/%s pos(%.3f,%.3f) M:%d L:%d C:%d\n",iElem, - elem.type,typeName,elem.x,elem.y,elem.isMoveTo(),elem.isLineTo(),elem.isCurveTo()); + Base::Console().Message(">>>>> element %d: type:%d/%s pos(%.3f,%.3f) M:%d L:%d C:%d\n", + iElem, elem.type, typeName, elem.x, elem.y, elem.isMoveTo(), elem.isLineTo(), + elem.isCurveTo()); } } diff --git a/src/Mod/TechDraw/Gui/QGIViewSection.cpp b/src/Mod/TechDraw/Gui/QGIViewSection.cpp index 5aa0051ca856..4fd899f724a3 100644 --- a/src/Mod/TechDraw/Gui/QGIViewSection.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewSection.cpp @@ -82,7 +82,8 @@ void QGIViewSection::drawSectionFace() float lineWidth = sectionVp->LineWidth.getValue(); - + std::vector sectionWires = section->getSectionFaceWires(); + auto sectionFaces( section->getFaceGeometry() ); if (sectionFaces.empty()) { Base::Console(). diff --git a/src/Mod/TechDraw/Gui/TaskSectionView.ui b/src/Mod/TechDraw/Gui/TaskSectionView.ui index f0081882bc94..95cf59f30e76 100644 --- a/src/Mod/TechDraw/Gui/TaskSectionView.ui +++ b/src/Mod/TechDraw/Gui/TaskSectionView.ui @@ -75,36 +75,29 @@ + + + 0 + 32 + + Identifier for this section - - - - Scale - - - - - - 0 - 0 - - - 249 - 33 + 0 + 32 - 249 - 33 + 0 + 0 @@ -121,6 +114,13 @@ + + + + Scale + + + @@ -298,7 +298,7 @@ 150 - 24 + 32 @@ -342,7 +342,7 @@ 150 - 24 + 32 @@ -386,7 +386,7 @@ 150 - 24 + 32