-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//Compute the point value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
//Compute the point value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
double theParam2,
double theParam3,
const PointLocation theLocation,
- Handle(GEOM_Object) theRefPoint)
+ Handle(GEOM_Object) theRefPoint)
{
SetErrorCode(KO);
switch( theLocation )
{
case PointOn_CurveByParam: fType = POINT_CURVE_PAR; break;
- case PointOn_CurveByLength: fType = POINT_CURVE_LENGTH; break;
+ case PointOn_CurveByLength: fType = POINT_CURVE_LENGTH; break;
case PointOn_CurveByCoord: fType = POINT_CURVE_COORD; break;
case PointOn_SurfaceByParam: fType = POINT_SURFACE_PAR; break;
case PointOn_SurfaceByCoord: fType = POINT_SURFACE_COORD; break;
+ case PointOn_Face: fType = POINT_FACE_ANY; break;
default: break;
}
Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), fType);
aPI.SetX(theParam1);
aPI.SetY(theParam2);
aPI.SetZ(theParam3);
+ break;
+ case PointOn_Face:
+ aPI.SetSurface(aRefFunction);
+ break;
default: break;
}
//Compute the point value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
<< theGeomObj << ", " << theParam1 << ", " << theRefPoint << ")";
break;
case PointOn_CurveByCoord:
- GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnCurveByCoord("
- << theGeomObj << ", " << theParam1
- << ", " << theParam2 << ", " << theParam3 << ")";
+ GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnCurveByCoord("
+ << theGeomObj << ", " << theParam1
+ << ", " << theParam2 << ", " << theParam3 << ")";
break;
case PointOn_SurfaceByParam:
- GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnSurface("
- << theGeomObj << ", " << theParam1
- << ", " << theParam2 << ")";
+ GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnSurface("
+ << theGeomObj << ", " << theParam1
+ << ", " << theParam2 << ")";
break;
case PointOn_SurfaceByCoord:
- GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnSurfaceByCoord("
- << theGeomObj << ", " << theParam1
- << ", " << theParam2 << ", " << theParam3 << ")";
+ GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexOnSurfaceByCoord("
+ << theGeomObj << ", " << theParam1
+ << ", " << theParam2 << ", " << theParam3 << ")";
+ break;
+ case PointOn_Face:
+ GEOM::TPythonDump(aFunction) << aPoint << " = geompy.MakeVertexInsideFace("
+ << theGeomObj << ")";
+ break;
default: break;
}
//=============================================================================
Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnCurveByLength
(Handle(GEOM_Object) theCurve,
- double theLength,
- Handle(GEOM_Object) theStartPoint)
+ double theLength,
+ Handle(GEOM_Object) theStartPoint)
{
return makePointOnGeom(theCurve, theLength, 0.0, 0.0, PointOn_CurveByLength, theStartPoint);
}
return makePointOnGeom(theSurface, theXParam, theYParam, theZParam, PointOn_SurfaceByCoord);
}
+//=============================================================================
+/*!
+ * MakePointOnFace
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnFace (Handle(GEOM_Object) theFace)
+{
+ return makePointOnGeom(theFace, 0., 0., 0., PointOn_Face);
+}
//=============================================================================
/*!
//Compute the point value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Point driver failed");
return NULL;
//Compute the vector value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
//Compute the Vector value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
//Compute the Vector value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Vector driver failed");
return NULL;
//Compute the Line value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Line driver failed");
return NULL;
//Compute the Line value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Line driver failed");
return NULL;
//Compute the Line value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Line driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;
//Compute the marker value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Marker driver failed");
return NULL;
//Compute the marker value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Marker driver failed");
return NULL;
//Compute the marker value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Marker driver failed");
return NULL;
//Compute the Plane value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Plane driver failed");
return NULL;