+ Handle(GEOM_Object) anObject = GetOperations()->MakeFilling
+ (aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter,
+ aMethod, theApprox);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ * MakeThruSections
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeThruSections(const GEOM::ListOfGO& theSeqSections,
+ CORBA::Boolean theModeSolid,
+ CORBA::Double thePreci,
+ CORBA::Boolean theRuled)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+ Handle(TColStd_HSequenceOfTransient) aSeqSections = new TColStd_HSequenceOfTransient;
+ int ind, aLen;
+
+ //Get the shapes
+ aLen = theSeqSections.length();
+ for (ind = 0; ind < aLen; ind++) {
+ Handle(GEOM_Object) aSh = GetObjectImpl(theSeqSections[ind]);
+ if (!aSh.IsNull())
+ aSeqSections->Append(aSh);
+ }
+ if (!aSeqSections->Length())
+ return aGEOMObject._retn();
+
+ // Make shell or solid
+ Handle(GEOM_Object) anObject =
+ GetOperations()->MakeThruSections(aSeqSections,theModeSolid,thePreci,theRuled);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
+//=============================================================================
+/*!
+ * MakePipeWithDifferentSections
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeWithDifferentSections
+ (const GEOM::ListOfGO& theBases,
+ const GEOM::ListOfGO& theLocations,
+ GEOM::GEOM_Object_ptr thePath,
+ CORBA::Boolean theWithContact,
+ CORBA::Boolean theWithCorrections)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+ Handle(TColStd_HSequenceOfTransient) aSeqBases = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) aSeqLocations = new TColStd_HSequenceOfTransient;
+ int ind=0, aNbBases =0,aNbLocs=0;
+
+ //Get the shapes
+ aNbBases = theBases.length();
+ aNbLocs = theLocations.length();
+
+ if (aNbLocs && aNbBases != aNbLocs)
+ return aGEOMObject._retn();
+
+ Handle(GEOM_Object) aPath = GetObjectImpl(thePath);
+ if (aPath.IsNull())
+ return aGEOMObject._retn();
+
+ for (ind = 0; ind < aNbBases; ind++) {
+ Handle(GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
+ if (aBase.IsNull())
+ continue;
+ if (aNbLocs)
+ {
+ Handle(GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
+ if (aLoc.IsNull())
+ continue;
+ aSeqLocations->Append(aLoc);
+ }
+ aSeqBases->Append(aBase);
+ }
+ if (!aSeqBases->Length())
+ return aGEOMObject._retn();
+
+ // Make pipe
+ Handle(GEOM_Object) anObject =
+ GetOperations()->MakePipeWithDifferentSections(aSeqBases,aSeqLocations ,aPath,
+ theWithContact,theWithCorrections);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
+
+//=============================================================================
+/*!
+ * MakePipeWithShellSections
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeWithShellSections
+ (const GEOM::ListOfGO& theBases,
+ const GEOM::ListOfGO& theSubBases,
+ const GEOM::ListOfGO& theLocations,
+ GEOM::GEOM_Object_ptr thePath,
+ CORBA::Boolean theWithContact,
+ CORBA::Boolean theWithCorrections)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+ Handle(TColStd_HSequenceOfTransient) aSeqBases = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) aSeqSubBases = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) aSeqLocations = new TColStd_HSequenceOfTransient;
+ int ind=0, aNbBases=0, aNbSubBases=0, aNbLocs=0;
+
+ //Get the shapes
+ aNbBases = theBases.length();
+ aNbSubBases = theSubBases.length();
+ aNbLocs = theLocations.length();
+
+ if (aNbLocs && aNbBases != aNbLocs)
+ return aGEOMObject._retn();
+
+ Handle(GEOM_Object) aPath = GetObjectImpl(thePath);
+ if (aPath.IsNull())
+ return aGEOMObject._retn();
+
+ for (ind = 0; ind < aNbBases; ind++) {
+ Handle(GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
+ if (aBase.IsNull())
+ continue;
+ if (aNbLocs) {
+ Handle(GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
+ if (aLoc.IsNull())
+ continue;
+ aSeqLocations->Append(aLoc);
+ }
+ aSeqBases->Append(aBase);
+
+ if (aNbSubBases >= aNbBases) {
+ Handle(GEOM_Object) aSubBase = GetObjectImpl(theSubBases[ind]);
+ if (aSubBase.IsNull()) {
+ aSeqSubBases->Clear();
+ aNbSubBases = 0;
+ continue;
+ }
+ aSeqSubBases->Append(aSubBase);
+ }
+ }
+ if (!aSeqBases->Length())
+ return aGEOMObject._retn();
+
+ // Make pipe
+ Handle(GEOM_Object) anObject =
+ GetOperations()->MakePipeWithShellSections(aSeqBases, aSeqSubBases,
+ aSeqLocations, aPath,
+ theWithContact, theWithCorrections);
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
+
+//=============================================================================
+/*!
+ * MakePipeShellsWithoutPath
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeShellsWithoutPath
+ (const GEOM::ListOfGO& theBases,
+ const GEOM::ListOfGO& theLocations)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+ Handle(TColStd_HSequenceOfTransient) aSeqBases = new TColStd_HSequenceOfTransient;
+ Handle(TColStd_HSequenceOfTransient) aSeqLocations = new TColStd_HSequenceOfTransient;
+ int ind=0, aNbBases=0, aNbLocs=0;
+
+ //Get the shapes
+ aNbBases = theBases.length();
+ aNbLocs = theLocations.length();
+
+ if (aNbLocs && aNbBases != aNbLocs)
+ return aGEOMObject._retn();
+
+ for (ind = 0; ind < aNbBases; ind++) {
+ Handle(GEOM_Object) aBase = GetObjectImpl(theBases[ind]);
+ if (aBase.IsNull())
+ continue;
+ if (aNbLocs) {
+ Handle(GEOM_Object) aLoc = GetObjectImpl(theLocations[ind]);
+ if (aLoc.IsNull())
+ continue;
+ aSeqLocations->Append(aLoc);
+ }
+ aSeqBases->Append(aBase);
+ }
+
+ if (!aSeqBases->Length())
+ return aGEOMObject._retn();
+
+ // Make pipe
+ Handle(GEOM_Object) anObject =
+ GetOperations()->MakePipeShellsWithoutPath(aSeqBases,aSeqLocations);
+
+ if (!GetOperations()->IsDone() || anObject.IsNull())
+ return aGEOMObject._retn();
+
+ return GetObject(anObject);
+}
+
+
+//=============================================================================
+/*!
+ * MakePipeBiNormalAlongVector
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeBiNormalAlongVector
+ (GEOM::GEOM_Object_ptr theBase,
+ GEOM::GEOM_Object_ptr thePath,
+ GEOM::GEOM_Object_ptr theVec)
+{
+ GEOM::GEOM_Object_var aGEOMObject;
+
+ //Set a not done flag
+ GetOperations()->SetNotDone();
+
+ //Get the reference objects
+ Handle(GEOM_Object) aBase = GetObjectImpl(theBase);
+ Handle(GEOM_Object) aPath = GetObjectImpl(thePath);
+ Handle(GEOM_Object) aVec = GetObjectImpl(theVec);
+
+ if (aBase.IsNull() || aPath.IsNull() || aVec.IsNull()) return aGEOMObject._retn();
+
+ //Create the Pipe
+ Handle(GEOM_Object) anObject =
+ GetOperations()->MakePipeBiNormalAlongVector(aBase, aPath, aVec);