-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <gp_Cone.hxx>
#include <gp_Torus.hxx>
#include <gp_Pln.hxx>
+#include <gp_Hypr.hxx>
+#include <gp_Parab.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_BSplineCurve.hxx>
+#include <Geom_BezierCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
//function :
//purpose :
//=======================================================================
- GEOMAlgo_ShapeInfoFiller::GEOMAlgo_ShapeInfoFiller()
+GEOMAlgo_ShapeInfoFiller::GEOMAlgo_ShapeInfoFiller()
:
GEOMAlgo_Algo()
{
//function : ~
//purpose :
//=======================================================================
- GEOMAlgo_ShapeInfoFiller::~GEOMAlgo_ShapeInfoFiller()
+GEOMAlgo_ShapeInfoFiller::~GEOMAlgo_ShapeInfoFiller()
{
}
//=======================================================================
//function : SetTolerance
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::SetTolerance(const Standard_Real aT)
+void GEOMAlgo_ShapeInfoFiller::SetTolerance(const Standard_Real aT)
{
myTolerance=aT;
}
//function : Tolerance
//purpose :
//=======================================================================
- Standard_Real GEOMAlgo_ShapeInfoFiller::Tolerance()const
+Standard_Real GEOMAlgo_ShapeInfoFiller::Tolerance()const
{
return myTolerance;
}
//function : SetShape
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::SetShape(const TopoDS_Shape& aS)
+void GEOMAlgo_ShapeInfoFiller::SetShape(const TopoDS_Shape& aS)
{
myShape=aS;
}
//function : Shape
//purpose :
//=======================================================================
- const TopoDS_Shape& GEOMAlgo_ShapeInfoFiller::Shape() const
+const TopoDS_Shape& GEOMAlgo_ShapeInfoFiller::Shape() const
{
return myShape;
}
//function : Info
//purpose :
//=======================================================================
- const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info() const
+const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info() const
{
return Info(myShape);
}
//function : Info
//purpose :
//=======================================================================
- const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info(const TopoDS_Shape& aS) const
+const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info
+ (const TopoDS_Shape& aS) const
{
if (!aS.IsNull()) {
if (myMapInfo.Contains(aS)) {
//function : CheckData
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::CheckData()
+void GEOMAlgo_ShapeInfoFiller::CheckData()
{
myErrorStatus=0;
//
//function : Perform
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::Perform()
+void GEOMAlgo_ShapeInfoFiller::Perform()
{
myErrorStatus=0;
//
//function :FillShape
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillShape(const TopoDS_Shape& aS)
+void GEOMAlgo_ShapeInfoFiller::FillShape(const TopoDS_Shape& aS)
{
TopAbs_ShapeEnum aType;
//
//function :FillSubShapes
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillSubShapes(const TopoDS_Shape& aS)
+void GEOMAlgo_ShapeInfoFiller::FillSubShapes(const TopoDS_Shape& aS)
{
TopoDS_Iterator aIt;
//
//function : FillContainer
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillContainer(const TopoDS_Shape& aS)
+void GEOMAlgo_ShapeInfoFiller::FillContainer(const TopoDS_Shape& aS)
{
myErrorStatus=0;
//
//function : FillSolid
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillSolid(const TopoDS_Shape& aS)
+void GEOMAlgo_ShapeInfoFiller::FillSolid(const TopoDS_Shape& aS)
{
- Standard_Integer aNbShells;
TopoDS_Solid aSd;
//
myErrorStatus=0;
//
aSd=TopoDS::Solid(aS);
//
- aNbShells=GEOMAlgo_ShapeInfoFiller::NbShells(aSd);
- if (aNbShells>1) {
- return;
- }
- //
FillDetails(aSd);
}
//=======================================================================
//function :FillFace
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillFace(const TopoDS_Shape& aS)
+void GEOMAlgo_ShapeInfoFiller::FillFace(const TopoDS_Shape& aS)
{
myErrorStatus=0;
+ if (myMapInfo.Contains(aS)) {
+ return;
+ }
//
Standard_Boolean bIsAllowedType;
- Standard_Integer aNbWires;//, iRet
Standard_Boolean bInf, bInfU1, bInfU2, bInfV1, bInfV2;
- Standard_Real aUMin, aUMax, aVMin, aVMax, aR1, aR2;
+ Standard_Real aUMin, aUMax, aVMin, aVMax, aR1, aR2, dV;
gp_Pnt aP0;
gp_Dir aDN;
gp_Ax3 aAx3;
GeomAbs_SurfaceType aST;
Handle(Geom_Surface) aSurf;
TopoDS_Face aF;
- //GEOMAlgo_KindOfName aKindOfName;
//----------------------------------------------------
- if (myMapInfo.Contains(aS)) {
- return;
- }
- else {
- GEOMAlgo_ShapeInfo aInfoX;
- myMapInfo.Add(aS, aInfoX);
- }
+ GEOMAlgo_ShapeInfo aInfoX;
+ myMapInfo.Add(aS, aInfoX);
+ //
GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS);
//----------------------------------------------------
aInfo.SetType(TopAbs_FACE);
//
aF=TopoDS::Face(aS);
//
- aNbWires=GEOMAlgo_ShapeInfoFiller::NbWires(aF);
- //
aSurf=BRep_Tool::Surface(aF);
GeomAdaptor_Surface aGAS(aSurf);
aST=aGAS.GetType();
return;
}
//
+ //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// 1. Plane
if (aST==GeomAbs_Plane) {
gp_Pln aPln;
aAx3=aPln.Position();
//
aInfo.SetKindOfShape(GEOMAlgo_KS_PLANE);
+ aInfo.SetKindOfName(GEOMAlgo_KN_PLANE);
aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED);
aInfo.SetLocation(aP0);
aInfo.SetPosition(aAx3);
//
- if (aNbWires>1) {
- return;
- }
- //
- //aSurf->Bounds(aUMin, aUMax, aVMin, aVMax);
BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
bInfU1=Precision::IsNegativeInfinite(aUMin);
bInfU2=Precision::IsPositiveInfinite(aUMax);
bInf=(bInfU1 || bInfU2 || bInfV1 || bInfV2);
if (bInf) {
aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE);
+ return;
}
- else {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- }
+ //
+ aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
//
FillDetails(aF, aPln);
}// if (aCT==GeomAbs_Line) {
//
+ //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// 2. Sphere
else if (aST==GeomAbs_Sphere) {
gp_Sphere aSphere;
aR1=aSphere.Radius();
//
aInfo.SetKindOfShape(GEOMAlgo_KS_SPHERE);
+ aInfo.SetKindOfName(GEOMAlgo_KN_SPHERE);
aInfo.SetLocation(aP0);
aInfo.SetPosition(aAx3);
aInfo.SetRadius1(aR1);
//
- if (aNbWires>1) {
- return;
- }
- //
aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
aInfo.SetKindOfClosed(GEOMAlgo_KC_CLOSED);
//
FillDetails(aF, aSphere);
}// else if (aST==GeomAbs_Sphere) {
//
+ //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// 3. Cylinder
else if (aST==GeomAbs_Cylinder) {
gp_Cylinder aCyl;
aR1=aCyl.Radius();
//
aInfo.SetKindOfShape(GEOMAlgo_KS_CYLINDER);
+ aInfo.SetKindOfName(GEOMAlgo_KN_CYLINDER);
aInfo.SetLocation(aP0);
aInfo.SetPosition(aAx3);
aInfo.SetRadius1(aR1);
//
- if (aNbWires>1) {
- return;
- }
- //
BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
bInfU1=Precision::IsNegativeInfinite(aUMin);
bInfU2=Precision::IsPositiveInfinite(aUMax);
bInf=(bInfU1 || bInfU2 || bInfV1 || bInfV2);
if (bInf) {
aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE);
+ return;
}
- else {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- }
+ //
+ aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
+ //
+ dV=aVMax-aVMin;
+ aInfo.SetHeight(dV);
+ //
FillDetails(aF, aCyl);
}
//
+ //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// 4. Cone
else if (aST==GeomAbs_Cone) {
- gp_Cone aCone;
- //
- aCone=aGAS.Cone();
- aP0=aCone.Location();
- aAx3=aCone.Position();
- //aR1=aCyl.Radius();
+ const gp_Cone aCone=aGAS.Cone();
//
aInfo.SetKindOfShape(GEOMAlgo_KS_CONE);
- aInfo.SetLocation(aP0);
- aInfo.SetPosition(aAx3);
- //aInfo.SetRadius1(aR1);
- //
- if (aNbWires>1) {
- return;
- }
+ aInfo.SetKindOfName(GEOMAlgo_KN_CONE);
//
BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax);
+
bInfU1=Precision::IsNegativeInfinite(aUMin);
bInfU2=Precision::IsPositiveInfinite(aUMax);
bInfV1=Precision::IsNegativeInfinite(aVMin);
bInfV2=Precision::IsPositiveInfinite(aVMax);
//
- bInf=(bInfU1 || bInfU2 || bInfV1 || bInfV2);
+ bInf=bInfV1 || bInfV2;
if (bInf) {
+ aP0=aAx3.Location();
+ aAx3=aCone.Position();
+ aInfo.SetLocation(aP0);
+ aInfo.SetPosition(aAx3);
aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE);
+ return;
}
- else {
- aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- }
- FillDetails(aF, aCone);
+ //
+ aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
+ //
+ const Standard_Real aSemiAngle = aCone.SemiAngle();
+
+ dV = aVMax - aVMin;
+ Standard_Real H = dV * std::cos(aSemiAngle);
+
+ aAx3 = aCone.Position();
+ Standard_Real aShiftAlongAxisLength = aVMin * std::cos(aSemiAngle); // Required, because R1 does not equal to gp_Cone.RefRadius() in general case, and gp_Cone.Location() corresponds to the latter one.
+ auto aShiftAlongAxis = gp_Vec(aAx3.Direction().XYZ());
+ aShiftAlongAxis *= aShiftAlongAxisLength;
+ aAx3.Translate(aShiftAlongAxis);
+
+ aP0=aAx3.Location();
+ aInfo.SetLocation(aP0);
+ aInfo.SetPosition(aAx3);
+
+ aR1 = aCone.RefRadius() + aVMin * std::sin(aSemiAngle);
+ aR2 = aCone.RefRadius() + aVMax * std::sin(aSemiAngle);
+
+ aInfo.SetRadius1(aR1);
+ aInfo.SetRadius2(aR2);
+ aInfo.SetHeight(H);
+ aInfo.SetKindOfDef(GEOMAlgo_KD_SPECIFIED);
}
//
+ //||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// 5. Torus
else if (aST==GeomAbs_Torus) {
gp_Torus aTorus;
aR2=aTorus.MinorRadius();
//
aInfo.SetKindOfShape(GEOMAlgo_KS_TORUS);
+ aInfo.SetKindOfName(GEOMAlgo_KN_TORUS);
aInfo.SetLocation(aP0);
aInfo.SetPosition(aAx3);
aInfo.SetRadius1(aR1);
aInfo.SetRadius2(aR2);
//
- if (aNbWires>1) {
- return;
- }
- //
aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
//
FillDetails(aF, aTorus);
FillSubShapes(aS);
return;
}
- //modified by NIZNHY-PKV Tue Jul 03 10:19:03 2012f
// BSplineCurve
if (aCT==GeomAbs_BSplineCurve) {
- Standard_Integer aNbKnots, aNbPoles, aDegree;
+ Standard_Integer aNbKnots, aNbPoles, aNbWeights, aNbMultiplicities, aDegree, i;
Standard_Real aLength;
gp_XYZ aXYZ1, aXYZ2, aXYZc;
Handle(Geom_BSplineCurve) aBSp;
//
aBSp=aGAC.BSpline();
- aNbKnots=aBSp->NbKnots();
- aNbPoles=aBSp->NbPoles();
- aDegree =aBSp->Degree();
- if (!(aDegree==1 && aNbKnots==2 && aNbPoles==2)) {
- return; // unallowed B-Spline curve
+ aDegree = aBSp->Degree();
+ aNbPoles = aBSp->NbPoles();
+ aNbKnots = aBSp->NbKnots();
+ aNbWeights = (aBSp->IsRational() ? aNbPoles : 0);
+ aNbMultiplicities = (aBSp->KnotDistribution() == GeomAbs_Uniform ? 0 : aNbKnots);
+ if (aDegree==1 && aNbKnots==2 && aNbPoles==2) {
+ // This is a single line segment
+ aInfo.SetKindOfShape(GEOMAlgo_KS_BSPLINE);
+ aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED);
+ //
+ aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
+ aInfo.SetKindOfName(GEOMAlgo_KN_SEGMENT);
+ aGAC.D0(aT1, aP1);
+ aGAC.D0(aT2, aP2);
+ aInfo.SetPnt1(aP1);
+ aInfo.SetPnt2(aP2);
+ //
+ aLength=aP1.Distance(aP2);
+ aInfo.SetLength(aLength);
+ //
+ aXYZ1=aP1.XYZ();
+ aXYZ2=aP2.XYZ();
+ aXYZc=aXYZ1+aXYZ2;
+ aXYZc.Multiply(0.5);
+ aPc.SetXYZ(aXYZc);
+ aInfo.SetLocation(aPc);
+ //
+ if ( aLength >= gp::Resolution() ) {
+ gp_Vec aVec(aPc, aP2);
+ gp_Dir aDir(aVec);
+ aInfo.SetDirection(aDir);
+ }
}
- //
- aInfo.SetKindOfShape(GEOMAlgo_KS_BSPLINE);
- aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED);
- //
+ else {
+ // We have a higher degree B-Spline curve
+ aInfo.SetKindOfShape(GEOMAlgo_KS_BSPLINE);
+ aInfo.SetKindOfName(GEOMAlgo_KN_CURVEBSPLINE);
+ aInfo.SetKindOfPeriod(aBSp->IsPeriodic() ? GEOMAlgo_KP_PERIODIC : GEOMAlgo_KP_NONPERIODIC);
+ aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
+ aInfo.SetKindOfClosed(aBSp->IsClosed() ? GEOMAlgo_KC_CLOSED : GEOMAlgo_KC_NOTCLOSED);
+ aGAC.D0(aT1, aP1);
+ aGAC.D0(aT2, aP2);
+ aInfo.SetPnt1(aP1);
+ aInfo.SetPnt2(aP2);
+ //
+ aInfo.SetDegree(aDegree);
+ aInfo.SetNbKnots(aNbKnots);
+ aInfo.SetNbPoles(aNbPoles);
+ aInfo.SetNbWeights(aNbWeights);
+ aInfo.SetNbMultiplicities(aNbMultiplicities);
+ // Fill the poles
+ Handle(TColgp_HArray1OfPnt) poles = new TColgp_HArray1OfPnt(1, aNbPoles);
+ for (i=1; i<=aNbPoles; i++)
+ poles->SetValue(i, aBSp->Pole(i));
+ aInfo.SetPoles(poles);
+ // Fill the knots
+ Handle(TColStd_HArray1OfReal) knots = new TColStd_HArray1OfReal(1, aNbKnots);
+ for (i=1; i<=aNbKnots; i++)
+ knots->SetValue(i, aBSp->Knot(i));
+ aInfo.SetKnots(knots);
+ // Fill the weights
+ if (aNbWeights > 0) {
+ Handle(TColStd_HArray1OfReal) weights = new TColStd_HArray1OfReal(1, aNbWeights);
+ for (i=1; i<=aNbWeights; i++)
+ weights->SetValue(i, aBSp->Weight(i));
+ aInfo.SetWeights(weights);
+ }
+ // Fill the multiplicities
+ if (aNbMultiplicities > 0) {
+ Handle(TColStd_HArray1OfInteger) mults = new TColStd_HArray1OfInteger(1, aNbMultiplicities);
+ for (i=1; i<=aNbMultiplicities; i++)
+ mults->SetValue(i, aBSp->Multiplicity(i));
+ aInfo.SetMultiplicities(mults);
+ }
+ }
+ }//if (aCT==GeomAbs_BSplineCurve) {
+ // Bezier
+ else if (aCT==GeomAbs_BezierCurve) {
+ Standard_Integer aNbPoles, aNbWeights, aDegree, i;
+ Handle(Geom_BezierCurve) aBC;
+ aBC=aGAC.Bezier();
+ aNbPoles = aBC->NbPoles();
+ aNbWeights = (aBC->IsRational() ? aNbPoles : 0);
+ aDegree = aBC->Degree();
+ aInfo.SetKindOfShape(GEOMAlgo_KS_BEZIER);
+ aInfo.SetKindOfName(GEOMAlgo_KN_CURVEBEZIER);
+ aInfo.SetKindOfPeriod(aBC->IsPeriodic() ? GEOMAlgo_KP_PERIODIC : GEOMAlgo_KP_NONPERIODIC);
aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
- aInfo.SetKindOfName(GEOMAlgo_KN_SEGMENT);
+ aInfo.SetKindOfClosed(aBC->IsClosed() ? GEOMAlgo_KC_CLOSED : GEOMAlgo_KC_NOTCLOSED);
aGAC.D0(aT1, aP1);
aGAC.D0(aT2, aP2);
aInfo.SetPnt1(aP1);
aInfo.SetPnt2(aP2);
//
- aLength=aP1.Distance(aP2);
- aInfo.SetLength(aLength);
- //
- aXYZ1=aP1.XYZ();
- aXYZ2=aP2.XYZ();
- aXYZc=aXYZ1+aXYZ2;
- aXYZc.Multiply(0.5);
- aPc.SetXYZ(aXYZc);
- aInfo.SetLocation(aPc);
- //
- if ( aLength >= gp::Resolution() ) {
- gp_Vec aVec(aPc, aP2);
- gp_Dir aDir(aVec);
- aInfo.SetDirection(aDir);
+ aInfo.SetDegree(aDegree);
+ aInfo.SetNbPoles(aNbPoles);
+ aInfo.SetNbWeights(aNbWeights);
+ // Fill the poles
+ Handle(TColgp_HArray1OfPnt) poles = new TColgp_HArray1OfPnt(1, aNbPoles);
+ for (i=1; i<=aNbPoles; i++)
+ poles->SetValue(i, aBC->Pole(i));
+ aInfo.SetPoles(poles);
+ // Fill the weights
+ if (aNbWeights > 0) {
+ Handle(TColStd_HArray1OfReal) weights = new TColStd_HArray1OfReal(1, aNbWeights);
+ for (i=1; i<=aNbWeights; i++)
+ weights->SetValue(i, aBC->Weight(i));
+ aInfo.SetWeights(weights);
}
- }
- //modified by NIZNHY-PKV Tue Jul 03 10:19:06 2012t
+ }// if (aCT==GeomAbs_BezierCurve) {
// Line
else if (aCT==GeomAbs_Line) {
Standard_Boolean bInf1, bInf2;
else {
aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED);
aInfo.SetKindOfName(GEOMAlgo_KN_ARCELLIPSE);
- //
- gp_Vec aVecX(aP, aP1);
- gp_Dir aDirX(aVecX);
- gp_Ax2 aAx2new(aP, aAx2.Direction(), aDirX);
- aInfo.SetPosition(aAx2new);
}
}// else if (aCT==GeomAbs_Ellipse) {
+ // Hyperbola
+ else if (aCT==GeomAbs_Hyperbola) {
+ gp_Hypr aHyp;
+ aHyp=aGAC.Hyperbola();
+ aP=aHyp.Location();
+ aAx2=aHyp.Position();
+ aR1=aHyp.MajorRadius();
+ aR2=aHyp.MinorRadius();
+ aInfo.SetKindOfShape(GEOMAlgo_KS_HYPERBOLA);
+ aInfo.SetKindOfName(GEOMAlgo_KN_HYPERBOLA);
+ aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
+ aInfo.SetLocation(aP);
+ aInfo.SetPosition(aAx2);
+ aInfo.SetRadius1(aR1);
+ aInfo.SetRadius2(aR2);
+ //
+ aGAC.D0(aT1, aP1);
+ aGAC.D0(aT2, aP2);
+ aInfo.SetPnt1(aP1);
+ aInfo.SetPnt2(aP2);
+ //
+ }// if (aCT==GeomAbs_Hyperbola) {
+ // Parabola
+ else if (aCT==GeomAbs_Parabola) {
+ gp_Parab aPara;
+ aPara=aGAC.Parabola();
+ aP=aPara.Location();
+ aAx2=aPara.Position();
+ aR1=aPara.Focal();
+ aInfo.SetKindOfShape(GEOMAlgo_KS_PARABOLA);
+ aInfo.SetKindOfName(GEOMAlgo_KN_PARABOLA);
+ aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED);
+ aInfo.SetLocation(aP);
+ aInfo.SetPosition(aAx2);
+ aInfo.SetRadius1(aR1);
+ //
+ aGAC.D0(aT1, aP1);
+ aGAC.D0(aT2, aP2);
+ aInfo.SetPnt1(aP1);
+ aInfo.SetPnt2(aP2);
+ //
+ }// if (aCT==GeomAbs_Parabola) {
//
FillSubShapes(aS);
}
//function :FillVertex
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillVertex(const TopoDS_Shape& aS)
+void GEOMAlgo_ShapeInfoFiller::FillVertex(const TopoDS_Shape& aS)
{
myErrorStatus=0;
//
//function : FillNbSubshapes
//purpose :
//=======================================================================
- void GEOMAlgo_ShapeInfoFiller::FillNbSubShapes(const TopoDS_Shape& aS,
- GEOMAlgo_ShapeInfo& aInfo)
+void GEOMAlgo_ShapeInfoFiller::FillNbSubShapes(const TopoDS_Shape& aS,
+ GEOMAlgo_ShapeInfo& aInfo)
{
myErrorStatus=0;
//
//function :NbShells
//purpose :
//=======================================================================
-Standard_Integer GEOMAlgo_ShapeInfoFiller::NbShells(const TopoDS_Solid& aSd)
+Standard_Integer GEOMAlgo_ShapeInfoFiller::NbShells
+ (const TopoDS_Solid& aSd)
{
Standard_Integer iCnt;
TopoDS_Iterator aIt;
//
aIt.Initialize(aSd);
for (; aIt.More(); aIt.Next()) {
- //const TopoDS_Shape& aSh=aIt.Value();
++iCnt;
}
return iCnt;
//function : NbWires
//purpose :
//=======================================================================
-Standard_Integer GEOMAlgo_ShapeInfoFiller::NbWires(const TopoDS_Face& aF)
+Standard_Integer GEOMAlgo_ShapeInfoFiller::NbWires
+ (const TopoDS_Face& aF)
{
Standard_Integer iCnt;
TopoDS_Iterator aIt;
//
aIt.Initialize(aF);
for (; aIt.More(); aIt.Next()) {
- //const TopoDS_Shape& aW=aIt.Value();
++iCnt;
}
return iCnt;
//function : IsAllowedType
//purpose :
//=======================================================================
-Standard_Boolean GEOMAlgo_ShapeInfoFiller::IsAllowedType(const GeomAbs_CurveType aCT)
+Standard_Boolean GEOMAlgo_ShapeInfoFiller::IsAllowedType
+ (const GeomAbs_CurveType aCT)
{
Standard_Boolean bRet;
Standard_Integer i, aNb;
GeomAbs_Line,
GeomAbs_Circle,
GeomAbs_Ellipse,
- GeomAbs_BSplineCurve //modified by NIZNHY-PKV Tue Jul 03 10:18:01 2012ft
+ GeomAbs_BSplineCurve,
+ GeomAbs_BezierCurve,
+ GeomAbs_Hyperbola,
+ GeomAbs_Parabola
};
//
bRet=Standard_False;
//function : IsAllowedType
//purpose :
//=======================================================================
-Standard_Boolean GEOMAlgo_ShapeInfoFiller::IsAllowedType(const GeomAbs_SurfaceType aST)
+Standard_Boolean GEOMAlgo_ShapeInfoFiller::IsAllowedType
+ (const GeomAbs_SurfaceType aST)
{
Standard_Boolean bRet;
Standard_Integer i, aNb;