-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 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
//Compute the box value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Box driver failed");
return NULL;
//Compute the Box value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Box driver failed");
return NULL;
//Compute the Face
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Face driver failed");
return NULL;
//Compute the Face
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Face driver failed");
return NULL;
//Compute the Disk value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Disk driver failed");
return NULL;
//Compute the Disk value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Disk driver failed");
return NULL;
//Compute the Disk
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Disk driver failed");
return NULL;
//Compute the Cylinder value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cylinder driver failed");
return NULL;
//Compute the Cylinder value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cylinder driver failed");
return NULL;
//Compute the Cylinder value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cylinder driver failed");
return NULL;
*/
//=============================================================================
Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRHA (Handle(GEOM_Object) thePnt,
- Handle(GEOM_Object) theVec,
- double theR, double theH, double theA)
+ Handle(GEOM_Object) theVec,
+ double theR, double theH, double theA)
{
SetErrorCode(KO);
//Compute the Cylinder value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cylinder driver failed");
return NULL;
//Compute the Cone value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cone driver failed");
return NULL;
//Compute the Cone value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Cone driver failed");
return NULL;
//Compute the Sphere value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sphere driver failed");
return NULL;
//Compute the Sphere value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Sphere driver failed");
return NULL;
//Compute the Torus value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Torus driver failed");
return NULL;
//Compute the Torus value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Torus driver failed");
return NULL;
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
//SetErrorCode("Prism driver failed");
SetErrorCode("Extrusion can not be created, check input data");
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Extrusion can not be created, check input data");
return NULL;
//Compute the Prism value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Extrusion can not be created, check input data");
return NULL;
//Compute the Draft Prism Feature value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Extrusion can not be created, check input data");
return NULL;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe driver failed");
return NULL;
//Compute the Revolution value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Revolution driver failed");
return NULL;
//Compute the Revolution value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Revolution driver failed");
return NULL;
* MakeFilling
*/
//=============================================================================
-Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
- (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg,
- double theTol2D, double theTol3D, int theNbIter,
- int theMethod, bool isApprox)
+Handle(GEOM_Object)
+GEOMImpl_I3DPrimOperations::MakeFilling (std::list< Handle(GEOM_Object)> & theContours,
+ int theMinDeg, int theMaxDeg,
+ double theTol2D, double theTol3D, int theNbIter,
+ int theMethod, bool isApprox)
{
SetErrorCode(KO);
- if (theShape.IsNull()) return NULL;
-
+ Handle(TColStd_HSequenceOfTransient) contours = GEOM_Object::GetLastFunctions( theContours );
+ if ( contours.IsNull() || contours->IsEmpty() ) {
+ SetErrorCode("NULL argument shape");
+ return NULL;
+ }
//Add a new Filling object
Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
if (aFunction->GetDriverGUID() != GEOMImpl_FillingDriver::GetID()) return NULL;
GEOMImpl_IFilling aFI (aFunction);
-
- Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
-
- if (aRefShape.IsNull()) return NULL;
-
- aFI.SetShape(aRefShape);
+ aFI.SetShapes(contours);
aFI.SetMinDeg(theMinDeg);
aFI.SetMaxDeg(theMaxDeg);
aFI.SetTol2D(theTol2D);
//Compute the Solid value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Filling driver failed");
return NULL;
//Make a Python command
GEOM::TPythonDump pd (aFunction);
- pd << aFilling << " = geompy.MakeFilling(" << theShape ;
+ pd << aFilling << " = geompy.MakeFilling(" << theContours ;
if ( theMinDeg != 2 ) pd << ", theMinDeg=" << theMinDeg ;
if ( theMaxDeg != 5 ) pd << ", theMaxDeg=" << theMaxDeg ;
if ( fabs(theTol2D-0.0001) > Precision::Confusion() )
- pd << ", theTol2D=" << theTol2D ;
+ { pd << ", theTol2D=" << theTol2D ; }
if ( fabs(theTol3D-0.0001) > Precision::Confusion() )
- pd << ", theTol3D=" << theTol3D ;
+ { pd << ", theTol3D=" << theTol3D ; }
if ( theNbIter != 0 ) pd << ", theNbIter=" << theNbIter ;
if ( theMethod==1 ) pd << ", theMethod=GEOM.FOM_UseOri";
else if( theMethod==2 ) pd << ", theMethod=GEOM.FOM_AutoCorrect";
- if(isApprox) pd << ", isApprox=" << isApprox ;
+ if ( isApprox ) pd << ", isApprox=" << isApprox ;
pd << ")";
SetErrorCode(OK);
//Compute the ThruSections value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("ThruSections driver failed");
return anObj;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe with defferent section driver failed");
return anObj;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe with shell sections driver failed");
return anObj;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe with shell sections without path driver failed");
return anObj;
//Compute the Pipe value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Pipe driver failed");
return NULL;
//Compute the offset
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("Offset driver failed");
return NULL;
// Compute the Path value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("PipePath driver failed");
return NULL;
// Compute the Path value
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if (!GetSolver()->ComputeFunction(aFunction)) {
SetErrorCode("PipePath driver failed");
return NULL;