Standard_Real myPres3d = 1.e-06;
Standard_Integer i,j,jdeb=1,jfin=mySections.Length();
+ if (jfin <= jdeb)
+ {
+ //We will not be able to create surface from single curve.
+ return;
+ }
+
GeomFill_SectionGenerator section;
Handle(Geom_BSplineSurface) surface;
Standard_Integer& NbKnots,
Standard_Integer& Degree) const
{
- NbPoles = mySurface->NbUPoles();
- NbKnots = mySurface->NbUKnots();
- Degree = mySurface->UDegree();
+ if (mySurface.IsNull())
+ return;
+
+ NbPoles = mySurface->NbUPoles();
+ NbKnots = mySurface->NbUKnots();
+ Degree = mySurface->UDegree();
}
//=======================================================
//=======================================================
void GeomFill_NSections::Knots(TColStd_Array1OfReal& TKnots) const
{
- mySurface->UKnots(TKnots);
+ if (!mySurface.IsNull())
+ mySurface->UKnots(TKnots);
}
//=======================================================
//=======================================================
void GeomFill_NSections::Mults(TColStd_Array1OfInteger& TMults) const
{
- mySurface->UMultiplicities(TMults);
+ if (!mySurface.IsNull())
+ mySurface->UMultiplicities(TMults);
}
//=======================================================
Standard_Boolean GeomFill_NSections::IsRational() const
{
- return mySurface->IsURational();
+ if (!mySurface.IsNull())
+ return mySurface->IsURational();
+
+ return Standard_False;
}
//=======================================================
//=======================================================
Standard_Boolean GeomFill_NSections::IsUPeriodic() const
{
- return mySurface->IsUPeriodic();
+ if (!mySurface.IsNull())
+ return mySurface->IsUPeriodic();
+
+ return Standard_False;
}
//=======================================================
//=======================================================
Standard_Boolean GeomFill_NSections::IsVPeriodic() const
{
- return mySurface->IsVPeriodic();
+ if (!mySurface.IsNull())
+ return mySurface->IsVPeriodic();
+
+ return Standard_False;
}
//=======================================================
//=======================================================
Standard_Integer GeomFill_NSections::NbIntervals(const GeomAbs_Shape S) const
{
+ if (mySurface.IsNull())
+ return 0;
+
GeomAdaptor_Surface AdS(mySurface);
return AdS.NbVIntervals(S);
}
void GeomFill_NSections::Intervals(TColStd_Array1OfReal& T,
const GeomAbs_Shape S) const
{
+ if (mySurface.IsNull())
+ return;
+
GeomAdaptor_Surface AdS(mySurface);
AdS.VIntervals(T,S);
}
gp_Pnt P, Bary;
Bary.SetCoord(0., 0., 0.);
+ if (mySurface.IsNull())
+ return Bary;
+
Standard_Integer ii,jj;
Standard_Real U0, U1, V0, V1;
mySurface->Bounds(U0,U1,V0,V1);
//=======================================================
void GeomFill_NSections::GetMinimalWeight(TColStd_Array1OfReal& Weights) const
{
+ if (mySurface.IsNull())
+ return;
+
if (mySurface->IsURational()) {
Standard_Integer NbU = mySurface->NbUPoles(),
NbV = mySurface->NbVPoles();
return 0;
}
+#include <NCollection_IncAllocator.hxx>
+static Standard_Integer OCC27875(Draw_Interpretor& theDI,
+ Standard_Integer theNArg,
+ const char ** theArgVal)
+{
+ if (theNArg < 2)
+ {
+ theDI << "Use: OCC27875 curve\n";
+ }
+
+ TColGeom_SequenceOfCurve aNC(new NCollection_IncAllocator());
+
+ const Handle(Geom_Curve) aC = Handle(Geom_Curve)::DownCast(DrawTrSurf::Get(theArgVal[1]));
+
+ aNC.Append(aC);
+
+ GeomFill_NSections aNS(aNC);
+
+ if (aNS.BSplineSurface().IsNull())
+ {
+ theDI << "GeomFill_NSections is not done.\n";
+ }
+
+ return 0;
+}
+
+
void QABugs::Commands_20(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
theCommands.Add ("OCC27357", "OCC27357", __FILE__, OCC27357, group);
theCommands.Add("OCC26270", "OCC26270 shape result", __FILE__, OCC26270, group);
theCommands.Add ("OCC27552", "OCC27552", __FILE__, OCC27552, group);
+ theCommands.Add("OCC27875", "OCC27875 curve", __FILE__, OCC27875, group);
+
return;
}