* \brief Returns the vertex from theWhere shape that is coincident with
* theVertex.
*
- * \param theWhere the shape where the coinsident vertex is searched.
+ * \param theWhere the shape where the coincident vertex is searched.
* \param theVertex the vertex to be searched.
* \return the coincident vertex if it is found. Otherwise null object.
*/
aFinder.SetState(theState);
aFinder.Perform();
- // Interprete results
+ // Interpret results
Standard_Integer iErr = aFinder.ErrorStatus();
// the detailed description of error codes is in GEOMAlgo_FinderShapeOn2.cxx
if (iErr) {
aFinder.SetState(theState);
aFinder.Perform();
- // Interprete results
+ // Interpret results
Standard_Integer iErr = aFinder.ErrorStatus();
// the detailed description of error codes is in GEOMAlgo_FinderShapeOn2.cxx
if (iErr) {
aFinder.Perform();
- // Interprete results
+ // Interpret results
Standard_Integer iErr = aFinder.ErrorStatus();
// the detailed description of error codes is in GEOMAlgo_FinderShapeOn2.cxx
if (iErr) {
aFinder.Perform();
- // Interprete results
+ // Interpret results
Standard_Integer iErr = aFinder.ErrorStatus();
// the detailed description of error codes is in GEOMAlgo_FinderShapeOn2.cxx
if (iErr) {
return aResult;
}
+//=======================================================================
+//function : GetInPlaceMap
+//purpose :
+//=======================================================================
+void GEOMImpl_IShapesOperations::GetInPlaceMap (Handle(GEOM_Object) theShapeWhere,
+ Handle(GEOM_Object) theShapeWhat,
+ std::vector< std::vector< int > > & theResVec)
+{
+ SetErrorCode(KO);
+
+ if (theShapeWhere.IsNull() || theShapeWhat.IsNull()) return;
+
+ TopoDS_Shape aWhere = theShapeWhere->GetValue();
+ TopoDS_Shape aWhat = theShapeWhat->GetValue();
+
+ if (aWhere.IsNull() || aWhat.IsNull()) return;
+
+ Handle(GEOM_Function) aWhereFunction = theShapeWhere->GetLastFunction();
+ if (aWhereFunction.IsNull()) return;
+
+ bool isFound = GEOMAlgo_GetInPlaceAPI::GetInPlaceMap( aWhereFunction, aWhat, theResVec );
+
+ if ( isFound )
+ SetErrorCode(OK);
+
+ Handle(GEOM_Function) aFunction =
+ GEOM::GetCreatedLast(theShapeWhere,theShapeWhat)->GetLastFunction();
+
+ GEOM::TPythonDump(aFunction, /*append=*/true)
+ << "resultList = geompy.GetInPlaceMap( "
+ << theShapeWhere << ", "
+ << theShapeWhat << ")";
+
+ return;
+}
+
//=======================================================================
//function : isSameEdge
//purpose : Returns True if two edges coincide
gp_Pnt P2 = C1->Value(U); //Compute a point on two thirds of the edge's length
C2 = new Geom_TrimmedCurve(C2, U21, U22);
+ // vsr 04/10/2018: 0023312 - As curve may be periodic, its parameters may be normalized
+ // so, we re-take them from trimmed curve
+ U21 = C2->FirstParameter();
+ U22 = C2->LastParameter();
if(!GeomLib_Tool::Parameter(C2, P1, MAX_TOLERANCE, U) || U < U21 || U > U22)
return false;