Fixed two bugs, thanks to wmayer

This commit is contained in:
jrheinlaender 2012-11-30 13:34:02 +04:30 committed by wmayer
parent ac6f7a434b
commit d763053925
2 changed files with 3 additions and 4 deletions

View File

@ -161,12 +161,11 @@ App::DocumentObjectExecReturn *Draft::execute(void)
// Edge is linear
// Find midpoint of edge and create auxiliary plane through midpoint normal to edge
gp_Pnt pm = c.Value((c.FirstParameter() + c.LastParameter()) / 2.0);
Geom_Plane aux(pm, gp_Dir(p2.X() - p1.X(), p2.Y() - p1.Y(), p2.Z() - p1.Z()));
Handle_Geom_Plane aux = new Geom_Plane(pm, gp_Dir(p2.X() - p1.X(), p2.Y() - p1.Y(), p2.Z() - p1.Z()));
// Intersect plane with face. Is there no easier way?
BRepAdaptor_Surface adapt(TopoDS::Face(face), Standard_False);
Handle_Geom_Surface sf = adapt.Surface().Surface();
//Handle_Geom_Surface auxsf(&aux);
GeomAPI_IntSS intersector(&aux, sf, Precision::Confusion());
GeomAPI_IntSS intersector(aux, sf, Precision::Confusion());
if (!intersector.IsDone())
continue;
Handle_Geom_Curve icurve = intersector.Line(1);

View File

@ -48,7 +48,7 @@ using namespace Gui;
/* TRANSLATOR PartDesignGui::TaskDraftParameters */
TaskDraftParameters::TaskDraftParameters(ViewProviderDraft *DraftView,QWidget *parent)
: TaskBox(Gui::BitmapFactory().pixmap("Part_Draft"),tr("Draft parameters"),true, parent),DraftView(DraftView)
: TaskBox(Gui::BitmapFactory().pixmap("PartDesign_Draft"),tr("Draft parameters"),true, parent),DraftView(DraftView)
{
selectionMode = none;