Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0022782: [CEA 1315] GetFirstVertex does not return the edge's starting point
[modules/geom.git]
/
src
/
GEOMImpl
/
GEOMImpl_PointDriver.cxx
diff --git
a/src/GEOMImpl/GEOMImpl_PointDriver.cxx
b/src/GEOMImpl/GEOMImpl_PointDriver.cxx
index 03edfc4c1bef3c6f2a85dc1724d017b8cbc41a0e..f80ba42b986d9cf384d24c537f849386a3c4b76c 100644
(file)
--- a/
src/GEOMImpl/GEOMImpl_PointDriver.cxx
+++ b/
src/GEOMImpl/GEOMImpl_PointDriver.cxx
@@
-145,7
+145,14
@@
Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const
Standard_Real aFP, aLP, aP;
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(TopoDS::Edge(aRefShape), aFP, aLP);
if ( !aCurve.IsNull() ) {
Standard_Real aFP, aLP, aP;
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(TopoDS::Edge(aRefShape), aFP, aLP);
if ( !aCurve.IsNull() ) {
- aP = aFP + (aLP - aFP) * aPI.GetParameter();
+ if (aPI.GetTakeOrientationIntoAccount() &&
+ aRefShape.Orientation() == TopAbs_REVERSED) {
+ aP = 1. - aPI.GetParameter();
+ } else {
+ aP = aPI.GetParameter();
+ }
+
+ aP = aFP + (aLP - aFP) * aP;
aPnt = aCurve->Value(aP);
}
else {
aPnt = aCurve->Value(aP);
}
else {
@@
-393,6
+400,7
@@
GetCreationInformation(std::string& theOperationName,
case POINT_CURVE_PAR:
AddParam( theParams, "Edge", aCI.GetCurve() );
AddParam( theParams, "Parameter", aCI.GetParameter() );
case POINT_CURVE_PAR:
AddParam( theParams, "Edge", aCI.GetCurve() );
AddParam( theParams, "Parameter", aCI.GetParameter() );
+ AddParam( theParams, "Use Orientation", aCI.GetTakeOrientationIntoAccount() );
break;
case POINT_CURVE_COORD:
AddParam( theParams, "X", aCI.GetX() );
break;
case POINT_CURVE_COORD:
AddParam( theParams, "X", aCI.GetX() );