Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for stable processing of mirror constraint (eliminating SolveSpace problems)
[modules/shaper.git]
/
src
/
SketcherPrs
/
SketcherPrs_Perpendicular.cpp
diff --git
a/src/SketcherPrs/SketcherPrs_Perpendicular.cpp
b/src/SketcherPrs/SketcherPrs_Perpendicular.cpp
index 0c9e45da273a071f60fa41c1ec420809a31dc720..d27cf03e57cb1b28e4876ec9d52b7c11ac05f67b 100644
(file)
--- a/
src/SketcherPrs/SketcherPrs_Perpendicular.cpp
+++ b/
src/SketcherPrs/SketcherPrs_Perpendicular.cpp
@@
-8,26
+8,10
@@
#include "SketcherPrs_Tools.h"
#include "SketcherPrs_PositionMgr.h"
#include "SketcherPrs_Tools.h"
#include "SketcherPrs_PositionMgr.h"
-#include <GeomAPI_Pnt.h>
-
#include <SketchPlugin_Constraint.h>
#include <SketchPlugin_Constraint.h>
-#include <AIS_Drawer.hxx>
-#include <gp_Pnt2d.hxx>
-
-#include <Prs3d_PointAspect.hxx>
-#include <Prs3d_Root.hxx>
-#include <Prs3d_LineAspect.hxx>
-
-#include <Graphic3d_MarkerImage.hxx>
-#include <Graphic3d_AspectMarker3d.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Graphic3d_AspectLine3d.hxx>
-#include <Graphic3d_ArrayOfSegments.hxx>
-
-
-// Function which is defined in SketchPlugin_ConstraintDistance.cpp
-extern std::shared_ptr<GeomAPI_Pnt2d> getFeaturePoint(DataPtr theData,
- const std::string& theAttribute);
+#include <Prs3d_Root.hxx>
@@
-42,7
+26,7
@@
SketcherPrs_Perpendicular::SketcherPrs_Perpendicular(SketchPlugin_Constraint* th
{
myPntArray = new Graphic3d_ArrayOfPoints(2);
myPntArray->AddVertex(0., 0., 0.);
{
myPntArray = new Graphic3d_ArrayOfPoints(2);
myPntArray->AddVertex(0., 0., 0.);
- myPntArray->AddVertex(0.
,
0., 0.);
+ myPntArray->AddVertex(0.
,
0., 0.);
}
void SketcherPrs_Perpendicular::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
}
void SketcherPrs_Perpendicular::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
@@
-51,17
+35,20
@@
void SketcherPrs_Perpendicular::Compute(const Handle(PrsMgr_PresentationManager3
{
prepareAspect();
{
prepareAspect();
- std::shared_ptr<GeomAPI_Shape> aLine1 = SketcherPrs_Tools::getLine(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+ ObjectPtr aObj1 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+ ObjectPtr aObj2 = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
+
+ std::shared_ptr<GeomAPI_Shape> aLine1 = SketcherPrs_Tools::getShape(aObj1);
if (aLine1.get() == NULL)
return;
if (aLine1.get() == NULL)
return;
- std::shared_ptr<GeomAPI_Shape> aLine2 = SketcherPrs_Tools::get
Line(myConstraint, SketchPlugin_Constraint::ENTITY_B()
);
+ std::shared_ptr<GeomAPI_Shape> aLine2 = SketcherPrs_Tools::get
Shape(aObj2
);
if (aLine2.get() == NULL)
return;
SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
if (aLine2.get() == NULL)
return;
SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get();
- gp_Pnt aP1 = aMgr->getPosition(a
Line
1, this);
- gp_Pnt aP2 = aMgr->getPosition(a
Line
2, this);
+ gp_Pnt aP1 = aMgr->getPosition(a
Obj
1, this);
+ gp_Pnt aP2 = aMgr->getPosition(a
Obj
2, this);
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation);
aGroup->SetPrimitivesAspect(myAspect);
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation);
aGroup->SetPrimitivesAspect(myAspect);