Fix Decoration positions on Views derived from DPG Base
- Section faces, detail highlights, center and section lines were wrong when the BaseView was a DPGI
This commit is contained in:
@@ -246,8 +246,11 @@ App::DocumentObjectExecReturn *DrawViewPart::execute(void)
|
||||
}
|
||||
|
||||
gp_Pnt inputCenter;
|
||||
Base::Vector3d stdOrg(0.0,0.0,0.0);
|
||||
|
||||
inputCenter = TechDrawGeometry::findCentroid(shape,
|
||||
Direction.getValue());
|
||||
getViewAxis(stdOrg,Direction.getValue()));
|
||||
|
||||
shapeCentroid = Base::Vector3d(inputCenter.X(),inputCenter.Y(),inputCenter.Z());
|
||||
TopoDS_Shape mirroredShape;
|
||||
mirroredShape = TechDrawGeometry::mirrorShape(shape,
|
||||
@@ -332,6 +335,7 @@ TechDrawGeometry::GeometryObject* DrawViewPart::buildGeometryObject(TopoDS_Shape
|
||||
go->projectShape(shape,
|
||||
viewAxis);
|
||||
}
|
||||
|
||||
go->extractGeometry(TechDrawGeometry::ecHARD, //always show the hard&outline visible lines
|
||||
true);
|
||||
go->extractGeometry(TechDrawGeometry::ecOUTLINE,
|
||||
@@ -472,7 +476,7 @@ void DrawViewPart::extractFaces()
|
||||
ew.loadEdges(newEdges);
|
||||
bool success = ew.perform();
|
||||
if (!success) {
|
||||
Base::Console().Warning("DVP::extractFaces - input is not planar graph. No face detection\n");
|
||||
Base::Console().Warning("DVP::extractFaces - %s -Can't make faces from projected edges\n", getNameInDocument());
|
||||
return;
|
||||
}
|
||||
std::vector<TopoDS_Wire> fw = ew.getResultNoDups();
|
||||
@@ -692,13 +696,7 @@ gp_Ax2 DrawViewPart::getViewAxis(const Base::Vector3d& pt,
|
||||
{
|
||||
gp_Ax2 viewAxis = TechDrawGeometry::getViewAxis(pt,axis,flip);
|
||||
|
||||
//put X dir of viewAxis on other side to get view right side up
|
||||
gp_Ax1 rotAxis(viewAxis.Location(),viewAxis.Direction());
|
||||
gp_Dir xDir = viewAxis.XDirection();
|
||||
gp_Dir newX = xDir.Rotated(rotAxis, M_PI);
|
||||
viewAxis.SetXDirection(newX);
|
||||
|
||||
return viewAxis;
|
||||
return viewAxis;
|
||||
}
|
||||
|
||||
void DrawViewPart::saveParamSpace(const Base::Vector3d& direction, const Base::Vector3d& xAxis)
|
||||
|
||||
Reference in New Issue
Block a user