Got rid of most of warnings of C4702 type: unreachable code.
Returned some #ifdef DEB
Fixed tabs formatting
Fixed some mistakes in code
S->myresult.Append( anObject, aListIter );
S->myResultMap.Bind( anObject, aListIter );
return AIS_SS_Added;
-#endif //USE_MAP
- return AIS_SS_Removed;
-
+#endif //USE_MAP
}
//=======================================================================
case 4 : if (uncar < '0' || uncar > '9') return Standard_False; break;
case 5 : if (uncar != '-') return Standard_False;
case 6 : if (uncar != '0' && uncar != '1') return Standard_False; break;
- case 7 : if (uncar < '0' || uncar > '9') return Standard_False; break;
- if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False;
- break;
+ case 7 : if (uncar < '0' || uncar > '9') return Standard_False;
+ if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False; break;
case 8 : if (uncar != '-') return Standard_False;
case 9 : if (uncar < '0' || uncar > '3') return Standard_False; break;
case 10 : if (uncar < '0' || uncar > '9') return Standard_False;
- if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False;
- break;
+ if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False; break;
case 11 : if (uncar != 'T') return Standard_False;
case 12 : if (uncar < '0' || uncar > '2') return Standard_False; break;
case 13 : if (uncar < '0' || uncar > '9') return Standard_False;
if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False; break;
- break;
case 14 : if (uncar != ':') return Standard_False;
case 15 : if (uncar < '0' || uncar > '5') return Standard_False; break;
case 16 : if (uncar < '0' || uncar > '9') return Standard_False; break;
default:
{
Standard_NoSuchObject::Raise("Adaptor3d_IsoCurve:Ellipse");
- }
-
+ }
}
- // portage WNT
- return gp_Elips();
}
//=======================================================================
const Standard_Real Tol) const
{
Handle(Adaptor3d_HCurve) newBasisCurve =
- myBasisCurve->Trim(First,
- Last,
- Tol) ;
+ myBasisCurve->Trim(First, Last, Tol);
+
Adaptor3d_SurfaceOfLinearExtrusion * SurfacePtr =
new Adaptor3d_SurfaceOfLinearExtrusion(newBasisCurve, myDirection) ;
//=======================================================================
gp_Pnt Adaptor3d_SurfaceOfLinearExtrusion::Value(const Standard_Real U,
- const Standard_Real V)
+ const Standard_Real V)
const
{
gp_Pnt P;
//=======================================================================
void Adaptor3d_SurfaceOfLinearExtrusion::D0(const Standard_Real U,
- const Standard_Real V,
- gp_Pnt& P) const
+ const Standard_Real V,
+ gp_Pnt& P) const
{
myBasisCurve->D0(U,P);
P.Translate( V * gp_Vec(myDirection));
//=======================================================================
void Adaptor3d_SurfaceOfLinearExtrusion::D1(const Standard_Real U,
- const Standard_Real V,
- gp_Pnt& P,
- gp_Vec& D1U,
- gp_Vec& D1V) const
+ const Standard_Real V,
+ gp_Pnt& P,
+ gp_Vec& D1U,
+ gp_Vec& D1V) const
{
myBasisCurve->D1(U,P,D1U);
D0(U,V,P);
//=======================================================================
void Adaptor3d_SurfaceOfLinearExtrusion::D2(const Standard_Real U,
- const Standard_Real V,
- gp_Pnt& P,
- gp_Vec& D1U, gp_Vec& D1V,
- gp_Vec& D2U, gp_Vec& D2V,
- gp_Vec& D2UV) const
+ const Standard_Real V,
+ gp_Pnt& P,
+ gp_Vec& D1U, gp_Vec& D1V,
+ gp_Vec& D2U, gp_Vec& D2V,
+ gp_Vec& D2UV) const
{
- myBasisCurve->D2(U,P,D1U,D2U);
+ myBasisCurve->D2(U,P,D1U,D2U);
D1V = gp_Vec(myDirection);
D2V.SetCoord( 0., 0., 0.);
D2UV.SetCoord( 0., 0., 0.);
//=======================================================================
void Adaptor3d_SurfaceOfLinearExtrusion::D3(const Standard_Real U,
- const Standard_Real V,
- gp_Pnt& P,
- gp_Vec& D1U, gp_Vec& D1V,
- gp_Vec& D2U, gp_Vec& D2V,
- gp_Vec& D2UV,
- gp_Vec& D3U, gp_Vec& D3V,
- gp_Vec& D3UUV, gp_Vec& D3UVV) const
+ const Standard_Real V,
+ gp_Pnt& P,
+ gp_Vec& D1U, gp_Vec& D1V,
+ gp_Vec& D2U, gp_Vec& D2V,
+ gp_Vec& D2UV,
+ gp_Vec& D3U, gp_Vec& D3V,
+ gp_Vec& D3UUV, gp_Vec& D3UVV) const
{
myBasisCurve->D3(U,P,D1U,D2U,D3U);
D1V = gp_Vec(myDirection);
{
gp_Dir D = myBasisCurve->Line().Direction();
if (myDirection.IsParallel( D, Precision::Angular())) {
- return GeomAbs_SurfaceOfExtrusion;
+ return GeomAbs_SurfaceOfExtrusion;
}
else {
- return GeomAbs_Plane;
+ return GeomAbs_Plane;
}
break;
}
{
gp_Dir D = (myBasisCurve->Circle()).Axis().Direction();
if ( myDirection.IsParallel( D, Precision::Angular())) {
- return GeomAbs_Cylinder;
+ return GeomAbs_Cylinder;
}
// JAG 10.11.95
else if (myDirection.IsNormal(D, Precision::Angular())) {
- return GeomAbs_Plane;
+ return GeomAbs_Plane;
}
else {
- return GeomAbs_SurfaceOfExtrusion;
+ return GeomAbs_SurfaceOfExtrusion;
}
break;
}
{
gp_Dir D = (myBasisCurve->Ellipse()).Axis().Direction();
if (myDirection.IsNormal(D, Precision::Angular())) {
- return GeomAbs_Plane;
+ return GeomAbs_Plane;
}
else {
- return GeomAbs_SurfaceOfExtrusion;
+ return GeomAbs_SurfaceOfExtrusion;
}
break;
}
{
gp_Dir D = (myBasisCurve->Parabola()).Axis().Direction();
if (myDirection.IsNormal(D, Precision::Angular())) {
- return GeomAbs_Plane;
+ return GeomAbs_Plane;
}
else {
- return GeomAbs_SurfaceOfExtrusion;
+ return GeomAbs_SurfaceOfExtrusion;
}
break;
}
{
gp_Dir D = (myBasisCurve->Hyperbola()).Axis().Direction();
if (myDirection.IsNormal(D, Precision::Angular())) {
- return GeomAbs_Plane;
+ return GeomAbs_Plane;
}
else {
- return GeomAbs_SurfaceOfExtrusion;
+ return GeomAbs_SurfaceOfExtrusion;
}
break;
}
gp_Pln Adaptor3d_SurfaceOfLinearExtrusion::Plane() const
{
Standard_NoSuchObject_Raise_if (GetType() != GeomAbs_Plane,
- "Adaptor3d_SurfaceOfLinearExtrusion::Plane");
+ "Adaptor3d_SurfaceOfLinearExtrusion::Plane");
/*
gp_Pnt P;
gp_Vec Ox, Oy;
di << usage;
return 1;
}
- return 0;
}
//=======================================================================
//function : bsmt
GeomAbs_SurfaceType aType;
//
const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aFx);
- //BRepAdaptor_Surface aBAS (aFx, Standard_False);
GeomAdaptor_Surface aGAS (aS);
aType=aGAS.GetType();
if (aType!=GeomAbs_Cylinder) {
aT=BRep_Tool::Parameter(aV, aE);
const Handle(Geom2d_Curve)& aC2D=BRep_Tool::CurveOnSurface(aE, aF, aT1, aT2);
aC2D->D0(aT, aP2D);
- //aP=aBAS.Value(aP2D.X(), aP2D.Y());
aS->D0(aP2D.X(), aP2D.Y(), aP);
aD2=aPV.SquareDistance(aP);
if (aD2>aD2max) {
Standard_Boolean SameRange = TE->SameRange();
Standard_Real First = myHCurve->FirstParameter();
Standard_Real Last = myHCurve->LastParameter();
- //Standard_Real Delta =1.e-14;
Standard_Real Delta =1.e-12;
Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &S.TShape());
const TopLoc_Location& TFloc = TF->Location();
const Handle(Geom_Surface)& Su = TF->Surface();
TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
- // Standard_Boolean checkclosed = Standard_False;
Standard_Boolean pcurvefound = Standard_False;
BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
Standard_Real f,l;
GC->Range(f,l);
if (SameRange && (f != First || l != Last)) {
- return ;//BRepCheck_InvalidSameRangeFlag);
- if (SameParameter) {
- return; //BRepCheck_InvalidSameParameterFlag);
- }
+ return ;//BRepCheck_InvalidSameRangeFlag;
}
Handle(Geom_Surface) Sb = cr->Surface();
//=======================================================================
void BRepAlgo_FaceRestrictor::Init(const TopoDS_Face& F,
- const Standard_Boolean Proj,
- const Standard_Boolean CorrectionOrientation)
+ const Standard_Boolean Proj,
+ const Standard_Boolean CorrectionOrientation)
{
myFace = F; modeProj = Proj; myCorrection = CorrectionOrientation;
}
//=======================================================================
static Standard_Boolean ChangePCurve (TopoDS_Edge& E,
- const Handle(Geom_Surface)& S,
- TopLoc_Location& L)
+ const Handle(Geom_Surface)& S,
+ TopLoc_Location& L)
{
BRep_Builder BB;
Handle(Geom_Surface) SE;
//=======================================================================
static void ProjCurve3d (TopoDS_Edge& E,
- const Handle(Geom_Surface)& S,
- TopLoc_Location& L)
+ const Handle(Geom_Surface)& S,
+ TopLoc_Location& L)
{
BRep_Builder BB;
TopLoc_Location LE;
Handle(Geom2d_Curve) C2 = GeomProjLib::Curve2d (CT,S);
BB.UpdateEdge(E,C2,S,L,Precision::Confusion());
-}
+}
//=======================================================================
//function : Perform
Handle(Geom2d_Curve) C2 = BRep_Tool::CurveOnSurface(E,S,L,f,l);
if (C2.IsNull()) {
- // no pcurve on the reference surface.
- if (modeProj) {
- // Projection of the 3D curve on surface.
- ProjCurve3d ( E, S, L);
- }
- else {
- // return the first pcurve glued on <S>
- Standard_Boolean YaPCurve = ChangePCurve (E, S, L);
- if (!YaPCurve) {
- ProjCurve3d (E, S, L);
- }
-
- }
+ // no pcurve on the reference surface.
+ if (modeProj) {
+ // Projection of the 3D curve on surface.
+ ProjCurve3d ( E, S, L);
+ }
+ else {
+ // return the first pcurve glued on <S>
+ Standard_Boolean YaPCurve = ChangePCurve (E, S, L);
+ if (!YaPCurve) {
+ ProjCurve3d (E, S, L);
+ }
+ }
}
}
WTF.AddWire(W);
//=======================================================================
static Standard_Boolean IsInside(const TopoDS_Wire& wir,
- const TopoDS_Face& F,
- BRepTopAdaptor_FClass2d& /*FClass2d*/)
+ const TopoDS_Face& F,
+ BRepTopAdaptor_FClass2d& /*FClass2d*/)
{
-
-//Standard_Real U,V;
TopExp_Explorer exp;
for (exp.Init(wir,TopAbs_EDGE);
exp.More();
Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(edg,F,f,l);
Standard_Real prm;
- if (!Precision::IsNegativeInfinite(f) &&
- !Precision::IsPositiveInfinite(l)) {
+ if (!Precision::IsNegativeInfinite(f) && !Precision::IsPositiveInfinite(l)) {
prm = (f+l)/2.;
}
else {
- if (Precision::IsNegativeInfinite(f) &&
- Precision::IsPositiveInfinite(l)){
- prm = 0.;
+ if (Precision::IsNegativeInfinite(f) && Precision::IsPositiveInfinite(l)){
+ prm = 0.;
}
else if (Precision::IsNegativeInfinite(f)) {
- prm = l-1.;
+ prm = l-1.;
}
else {
- prm = f+1.;
+ prm = f+1.;
}
}
//=======================================================================
static void Store (const TopoDS_Wire& W2,
- const TopoDS_Wire& W1,
- TopTools_DataMapOfShapeListOfShape& keyIsIn,
- TopTools_DataMapOfShapeListOfShape& keyContains)
+ const TopoDS_Wire& W1,
+ TopTools_DataMapOfShapeListOfShape& keyIsIn,
+ TopTools_DataMapOfShapeListOfShape& keyContains)
{
if (!keyIsIn.IsBound(W2)) {
TopTools_ListOfShape empty;
//purpose :
//=======================================================================
-static void BuildFaceIn( TopoDS_Face& F,
- const TopoDS_Wire& W,
- TopTools_DataMapOfShapeListOfShape& KeyContains,
- TopTools_DataMapOfShapeListOfShape& KeyIsIn,
- TopAbs_Orientation Orientation,
- TopTools_ListOfShape& Faces)
+static void BuildFaceIn( TopoDS_Face& F,
+ const TopoDS_Wire& W,
+ TopTools_DataMapOfShapeListOfShape& KeyContains,
+ TopTools_DataMapOfShapeListOfShape& KeyIsIn,
+ TopAbs_Orientation Orientation,
+ TopTools_ListOfShape& Faces)
{
BRep_Builder B;
TopTools_ListIteratorOfListOfShape it2;
for (it2.Initialize(L2); it2.More(); it2.Next()) {
if (it2.Value().IsSame(W)) {
- L2.Remove(it2);
- break;
+ L2.Remove(it2);
+ break;
}
}
}
TopTools_ListOfShape& L2 = KeyIsIn(WI);
if (L2.IsEmpty()) {
if (Orientation == TopAbs_FORWARD) {
- TopoDS_Wire NWI(WI);
- NWI.Reverse();
-// TopoDS_Wire NWI = TopoDS::Wire(WI.Reversed());
- B.Add(F,NWI);
- BuildFaceIn (F,WI,KeyContains, KeyIsIn,TopAbs_REVERSED,Faces);
+ TopoDS_Wire NWI(WI);
+ NWI.Reverse();
+ // TopoDS_Wire NWI = TopoDS::Wire(WI.Reversed());
+ B.Add(F,NWI);
+ BuildFaceIn (F,WI,KeyContains, KeyIsIn,TopAbs_REVERSED,Faces);
}
else {
- TopoDS_Shape aLocalShape = Faces.First().EmptyCopied();
- TopoDS_Face NF = TopoDS::Face(aLocalShape);
-// TopoDS_Face NF = TopoDS::Face(Faces.First().EmptyCopied());;
- B.Add (NF,WI);
- Faces.Append (NF);
- BuildFaceIn (NF, WI, KeyContains, KeyIsIn, TopAbs_FORWARD,Faces);
+ TopoDS_Shape aLocalShape = Faces.First().EmptyCopied();
+ TopoDS_Face NF = TopoDS::Face(aLocalShape);
+ // TopoDS_Face NF = TopoDS::Face(Faces.First().EmptyCopied());;
+ B.Add (NF,WI);
+ Faces.Append (NF);
+ BuildFaceIn (NF, WI, KeyContains, KeyIsIn, TopAbs_FORWARD,Faces);
}
}
}
if (IsClosed(W)) {
BRepTopAdaptor_FClass2d FClass2d(NF,Precision::PConfusion());
if(FClass2d.PerformInfinitePoint() != TopAbs_OUT) {
- W.Reverse();
+ W.Reverse();
}
}
}
BRepTopAdaptor_FClass2d FClass2d(NF,Precision::PConfusion());
while (it2.More()) {
- const TopoDS_Wire& W2 = TopoDS::Wire(it2.Value());
- if (!W1.IsSame(W2) && IsInside (W2,NF,FClass2d)) {
- Store (W2,W1,keyIsIn,keyContains);
- }
- it2.Next();
- j++;
+ const TopoDS_Wire& W2 = TopoDS::Wire(it2.Value());
+ if (!W1.IsSame(W2) && IsInside (W2,NF,FClass2d)) {
+ Store (W2,W1,keyIsIn,keyContains);
+ }
+ it2.Next();
+ j++;
}
}
i++;
else {
return result;
}
- return result;
}
//============================================================================
default :
return 10;
}
- //POP WE should return something : -> Default
- return 10;
}
gp_Pnt BRepGProp_EdgeTool::Value(const BRepAdaptor_Curve& C, const Standard_Real U)
#include <TopOpeBRep_Point2d.hxx>
#include <TopOpeBRepDS_Transition.hxx>
-//#ifdef WNT
#include <stdio.h>
#ifdef WNT
Standard_IMPORT Draw_Viewer dout;
DBRep::Set(a[1],S);
return 0;
-
-#ifdef DEB
- di << "profile : bad number of arguments";
- return 1;
-#endif
}
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
static void GeomLib_ChangeUBounds(Handle(Geom_BSplineSurface)& aSurface,
- const Standard_Real newU1,
- const Standard_Real newU2)
+ const Standard_Real newU1,
+ const Standard_Real newU2)
{
TColStd_Array1OfReal knots(1,aSurface->NbUKnots()) ;
aSurface->UKnots(knots) ;
BSplCLib::Reparametrize(newU1,
- newU2,
- knots) ;
+ newU2,
+ knots) ;
aSurface->SetUKnots(knots) ;
}
static void GeomLib_ChangeVBounds(Handle(Geom_BSplineSurface)& aSurface,
- const Standard_Real newV1,
- const Standard_Real newV2)
+ const Standard_Real newV1,
+ const Standard_Real newV2)
{
TColStd_Array1OfReal knots(1,aSurface->NbVKnots()) ;
aSurface->VKnots(knots) ;
BSplCLib::Reparametrize(newV1,
- newV2,
- knots) ;
+ newV2,
+ knots) ;
aSurface->SetVKnots(knots) ;
}
Handle(Standard_Type) myT = S->DynamicType();
if(myT != STANDARD_TYPE(Geom_Plane)) {
if(newF.IsNull()) {
- Handle(Standard_Type) st = C2d->DynamicType();
- if ((st == STANDARD_TYPE(Geom2d_BSplineCurve)) ||
- (st == STANDARD_TYPE(Geom2d_BezierCurve))) {
- if(isConvert2d) {
- Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy());
- return Standard_True;
- }
- return Standard_False;
- }
- }
- else {
- S = BRep_Tool::Surface(newF);
-
+ Handle(Standard_Type) st = C2d->DynamicType();
+ if ((st == STANDARD_TYPE(Geom2d_BSplineCurve)) ||
+ (st == STANDARD_TYPE(Geom2d_BezierCurve))) {
+ if(isConvert2d) {
+ Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy());
+ return Standard_True;
+ }
+ return Standard_False;
+ }
+ }
+ else {
+ S = BRep_Tool::Surface(newF);
+
}
S->Bounds(Uinf, Usup, Vinf, Vsup);
//Uinf -= 1e-9; Usup += 1e-9; Vinf -= 1e-9; Vsup += 1e-9;
u = (Usup - Uinf)*0.1;
v = (Vsup - Vinf)*0.1;
if(S->IsUPeriodic()) {
- Standard_Real uperiod = S->UPeriod();
- if(uperiod < (Usup+2*u-Uinf)) {
- if(uperiod <= (Usup-Uinf)) {
- u = 0;
- }
- else {
- u = (uperiod-(Usup-Uinf))*0.5;
- }
- }
+ Standard_Real uperiod = S->UPeriod();
+ if(uperiod < (Usup+2*u-Uinf)) {
+ if(uperiod <= (Usup-Uinf)) {
+ u = 0;
+ }
+ else {
+ u = (uperiod-(Usup-Uinf))*0.5;
+ }
+ }
}
if(S->IsVPeriodic()) {
- Standard_Real vperiod = S->VPeriod();
- if(vperiod < (Vsup+2*v-Vinf)) {
- if(vperiod <= (Vsup-Vinf)) {
- v = 0;
- }
- else {
- v = (vperiod-(Vsup-Vinf))*0.5;
- }
- }
+ Standard_Real vperiod = S->VPeriod();
+ if(vperiod < (Vsup+2*v-Vinf)) {
+ if(vperiod <= (Vsup-Vinf)) {
+ v = 0;
+ }
+ else {
+ v = (vperiod-(Vsup-Vinf))*0.5;
+ }
+ }
}
}
else {
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
ProjLib_ComputeApprox ProjOnCurve(G3dAHC,GAHS,Tol);
if(ProjOnCurve.BSpline().IsNull()) {
- Curve2d = Geom2dConvert::CurveToBSplineCurve(ProjOnCurve.Bezier());
- return Standard_True;
+ Curve2d = Geom2dConvert::CurveToBSplineCurve(ProjOnCurve.Bezier());
+ return Standard_True;
}
Curve2d = ProjOnCurve.BSpline();
return Standard_True;
TColStd_ListIteratorOfListOfTransient itlcu;
for (itled.Initialize(myled), itlcu.Initialize(mylcu);
- itled.More(); // itlcu.More()
- itled.Next(),itlcu.Next()) {
+ itled.More(); // itlcu.More()
+ itled.Next(),itlcu.Next())
+ {
if (itled.Value().IsSame(E)) {
- // deja traitee
- break;
+ // deja traitee
+ break;
}
}
if (!itled.More()) { // on stocke l`edge et la curve2d
return Standard_True;
}
- return Standard_False;
+ return Standard_False;
}
if(!newE.IsNull()) {
- C3d = BRep_Tool::Curve(newE, f3d,l3d);
+ C3d = BRep_Tool::Curve(newE, f3d,l3d);
}
GeomAdaptor_Curve G3dAC(C3d, f3d, l3d);
Handle(GeomAdaptor_HCurve) G3dAHC = new GeomAdaptor_HCurve(G3dAC);
Handle(Geom_Surface) S = BRep_Tool::Surface(F);
Handle(Standard_Type) myT = S->DynamicType();
if(newF.IsNull()) {
- mylcu.Append(C2dBis);
- Handle(Standard_Type) st = C2d->DynamicType();
- if ((st == STANDARD_TYPE(Geom2d_BSplineCurve)) ||
- (st == STANDARD_TYPE(Geom2d_BezierCurve))) {
- if(isConvert2d) {
- Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy());
- return Standard_True;
- }
- return Standard_False;
- }
+ mylcu.Append(C2dBis);
+ Handle(Standard_Type) st = C2d->DynamicType();
+ if ((st == STANDARD_TYPE(Geom2d_BSplineCurve)) ||
+ (st == STANDARD_TYPE(Geom2d_BezierCurve))) {
+ if(isConvert2d) {
+ Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy());
+ return Standard_True;
+ }
+ return Standard_False;
+ }
}
else {
- S = BRep_Tool::Surface(newF);// S est une BSplineSurface : pas besoin de la trimmed
+ S = BRep_Tool::Surface(newF);// S est une BSplineSurface : pas besoin de la trimmed
}
Standard_Real Uinf, Usup, Vinf, Vsup, u = 0, v = 0;
S->Bounds(Uinf, Usup, Vinf, Vsup);
u = (Usup - Uinf)*0.1;
v = (Vsup - Vinf)*0.1;
if(S->IsUPeriodic()) {
- Standard_Real uperiod = S->UPeriod();
- if(uperiod < (Usup+2*u-Uinf))
- if(uperiod <= (Usup-Uinf))
- u = 0;
- else
- u = (uperiod-(Usup-Uinf))*0.5;
+ Standard_Real uperiod = S->UPeriod();
+ if(uperiod < (Usup+2*u-Uinf))
+ if(uperiod <= (Usup-Uinf))
+ u = 0;
+ else
+ u = (uperiod-(Usup-Uinf))*0.5;
}
if(S->IsVPeriodic()) {
- Standard_Real vperiod = S->VPeriod();
- if(vperiod < (Vsup+2*v-Vinf))
- if(vperiod <= (Vsup-Vinf))
- v = 0;
- else
- v = (vperiod-(Vsup-Vinf))*0.5;
+ Standard_Real vperiod = S->VPeriod();
+ if(vperiod < (Vsup+2*v-Vinf))
+ if(vperiod <= (Vsup-Vinf))
+ v = 0;
+ else
+ v = (vperiod-(Vsup-Vinf))*0.5;
}
GeomAdaptor_Surface GAS(S, Uinf-u,Usup+u,Vinf-v,Vsup+v);
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(GAS);
myled.Append(E);
ProjLib_ComputeApproxOnPolarSurface
- ProjOnCurve(G2dAHC,G2dAHCBis,G3dAHC,GAHS,Tol);
+ ProjOnCurve(G2dAHC,G2dAHCBis,G3dAHC,GAHS,Tol);
if(ProjOnCurve.IsDone()) {
- Curve2d = ProjOnCurve.BSpline();
- mylcu.Append(ProjOnCurve.Curve2d());
- return Standard_True;
+ Curve2d = ProjOnCurve.BSpline();
+ mylcu.Append(ProjOnCurve.Curve2d());
+ return Standard_True;
}
else {
- Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d);
- mylcu.Append(C2dBis);
- return Standard_True;
+ Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d);
+ mylcu.Append(C2dBis);
+ return Standard_True;
}
}
else { // on est au 2ieme tour
C2d = Handle(Geom2d_Curve)::DownCast(itlcu.Value());
Handle(Standard_Type) st = C2d->DynamicType();
if (!(st == STANDARD_TYPE(Geom2d_BSplineCurve)) &&
- !(st == STANDARD_TYPE(Geom2d_BezierCurve))) {
- return Standard_False;
+ !(st == STANDARD_TYPE(Geom2d_BezierCurve))) {
+ return Standard_False;
}
Curve2d = Geom2dConvert::CurveToBSplineCurve(C2d);
return Standard_True;
}
}
- Curve2d = C2d;
- return Standard_True;
}
//=======================================================================
if(proj.IsDone()) {
Standard_Real Dist2Min = proj.SquareDistance();
if (Dist2Min < Tol*Tol) {
-// Standard_Real U_final_point,V_final_point;
+ // Standard_Real U_final_point,V_final_point;
P = proj.Point().Parameter();
return Standard_True;
}
thePoint = cc.Value(Param);
return thePoint;
} // else ...
- return thePoint;
} // ComputePoint
case FACE2: return aSurfData->IndexOfS2();
default: return -1;
}
- return -1;
}
//=======================================================================
default:
return 0;
}
- Standard_NotImplemented::Raise("calculate abscisse non-processed");
- return 0.;
}
//=======================================================================
case TDataXtd_RADIUS:
{
if (A->IsPlanar()) {
- D = new DrawDim_PlanarRadius (TNaming_Tool::GetShape(A->GetGeometry(1)));
+ D = new DrawDim_PlanarRadius (TNaming_Tool::GetShape(A->GetGeometry(1)));
}
else {
- TopoDS_Shape aLocalShape = Geometry(A,1,TopAbs_FACE);
- TopoDS_Face F1 = TopoDS::Face(aLocalShape);
-// TopoDS_Face F1 = TopoDS::Face(Geometry(A,1,TopAbs_FACE));
- if (!F1.IsNull()) D = new DrawDim_Radius(F1);
+ TopoDS_Shape aLocalShape = Geometry(A,1,TopAbs_FACE);
+ TopoDS_Face F1 = TopoDS::Face(aLocalShape);
+ // TopoDS_Face F1 = TopoDS::Face(Geometry(A,1,TopAbs_FACE));
+ if (!F1.IsNull()) D = new DrawDim_Radius(F1);
}
}
break;
case TDataXtd_DISTANCE:
{
if (A->IsPlanar()) {
- D = new DrawDim_PlanarDistance (TNaming_Tool::GetShape(A->GetGeometry(1)),
- TNaming_Tool::GetShape(A->GetGeometry(2)));
- }
- else {
- break;
- TopoDS_Shape aLocalShape = (Geometry (A, 1, TopAbs_FACE));
- TopoDS_Face F1 = TopoDS::Face (aLocalShape);
-// TopoDS_Face F1 = TopoDS::Face (Geometry (A, 1, TopAbs_FACE));
- if (A->NbGeometries() == 1) D = new DrawDim_Distance (F1);
- else {
- TopoDS_Shape aLocalShape = Geometry(A,2,TopAbs_FACE);
- TopoDS_Face F2 = TopoDS::Face(aLocalShape);
-// TopoDS_Face F2 = TopoDS::Face(Geometry(A,2,TopAbs_FACE));
- D = new DrawDim_Distance(F1,F2);
- }
+ D = new DrawDim_PlanarDistance (TNaming_Tool::GetShape(A->GetGeometry(1)),
+ TNaming_Tool::GetShape(A->GetGeometry(2)));
}
+ break;
}
- break;
-
case TDataXtd_ANGLE:
{
if (A->IsPlanar()) {
TPrsStd_AISViewer::Update(L);
return 0;
}
- di << "DPrsStd_AISDisplay : Error" << "\n";
- return 1;
}
//=======================================================================
{
cout << "Process killed by CPU limit (" << CPU_LIMIT << " sec)" << endl;
ExitProcess (2);
- return 0;
+// return 0;
}
}
- return 0;
}
#else
static void CpuFunc (int)
else
return(DefMDIChildProc(hWnd, wMsg, wParam, lParam));
}
- return (0l);
}
Ua = Ub;
}
- return Standard_True;
}
Ua = Ub;
}
- return Standard_True;
}
if (TheSame1(Index) == 0) { return Standard_False; }
else { return Standard_True; }
}
- return Standard_False;
}
Standard_Boolean Geom2dGcc_Circ2d2TanOn::
if (TheSame1(Index) == 0) { return Standard_False; }
else { return Standard_True; }
}
- return Standard_True;
+// return Standard_True;
}
if (TheSame1(Index) == 0) { return Standard_False; }
else { return Standard_True; }
}
- return Standard_True;
}
Standard_Boolean Geom2dGcc_Circ2d2TanRad::
if (TheSame1(Index) == 0) { return Standard_False; }
else { return Standard_True; }
}
- return Standard_True;
+// return Standard_True;
}
}
return Standard_True;
}
- return Standard_False;
+// return Standard_False;
}
Standard_Boolean GeomFill::GetCircle(const Convert_ParameterisationType TConv,
}
return Standard_True;
}
- return Standard_False;
}
}
else {
- // R-C-R
- di << "Radius - Curve - Radius ??"<<"\n";
- return 1;
+ // R-C-R
+ di << "Radius - Curve - Radius ??"<<"\n";
+ return 1;
}
}
else if (ip2) {
// R-P-..
if (!C3.IsNull()) {
- // R-P-C
- Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C3),
- new Geom2d_CartesianPoint(P2),
- Draw::Atof(a[2]),
- tol);
- return solutions(di,ct3,a[1]);
- }
-
- else if (ip3) {
- // R-P-P
- Geom2dGcc_Circ2d2TanRad ct3(new Geom2d_CartesianPoint(P2),
- new Geom2d_CartesianPoint(P3),
- Draw::Atof(a[2]),
- tol);
- return solutions(di,ct3,a[1]);
+ // R-P-C
+ Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C3),
+ new Geom2d_CartesianPoint(P2),
+ Draw::Atof(a[2]),
+ tol);
+ return solutions(di,ct3,a[1]);
}
+ else if (ip3)
+ {
+ // R-P-P
+ Geom2dGcc_Circ2d2TanRad ct3(new Geom2d_CartesianPoint(P2),
+ new Geom2d_CartesianPoint(P3),
+ Draw::Atof(a[2]),
+ tol);
+ return solutions(di,ct3,a[1]);
+ }
else {
- // R-P-R
- di << "Radius - Point - Radius ??"<<"\n";
- return 1;
+ // R-P-R
+ di << "Radius - Point - Radius ??"<<"\n";
+ return 1;
}
}
-
else {
// R-R-..
di << "radius, radius ???"<<"\n";
return 1;
}
}
- return 0;
}
return firstp;
}
}
- return firstp;
+// return firstp;
}
//=======================================================================
return lastp;
}
}
- return lastp;
}
TempOtherP = OtherP;
return(0); //-- BUG NON CORRIGE ( a revoir le role de nbdeltaU et nbdeltaV)
-
- return(TriConnex(TempTri,Pivot,TempOtherP,TriCon,OtherP));
+// return(TriConnex(TempTri,Pivot,TempOtherP,TriCon,OtherP));
}
return TriCon;
}
gp_Pnt p(0,0,0);
return(p);
}
- break;
+ //break;
}
// pop : pour NT
- return gp_Pnt(0,0,0);
+// return gp_Pnt(0,0,0);
}
// ============================================================
void IntSurf_Quadric::D1(const Standard_Real U,
gp_Vec v(0,0,0);
return(v);
}
- break;
+ //break;
}
// pop : pour NT
- return gp_Vec(0,0,0);
+// return gp_Vec(0,0,0);
}
// ============================================================
gp_Vec IntSurf_Quadric::Normale(const Standard_Real U,
gp_Vec v(0,0,0);
return(v);
}
- break;
+ // break;
}
// pop : pour NT
- return gp_Vec(0,0,0);
+// return gp_Vec(0,0,0);
}
// ============================================================
gp_Vec IntSurf_Quadric::Normale (const gp_Pnt& P) const
{
gp_Vec v(0,0,0);
return(v);
- } break;
+ } // break;
}
-// pop : pour NT
- return gp_Vec(0,0,0);
}
// ============================================================
void IntSurf_Quadric::Parameters (const gp_Pnt& P,
}
}
*/
- return 0;
+// return 0;
}
else {
return Standard_True;
}
- return Standard_False;
}
case 5 : return TopAbs_WIRE;
case 6 : return TopAbs_EDGE;
case 7 : return TopAbs_VERTEX;
- default :
- return TopAbs_SHAPE;
+ default :
+ return TopAbs_SHAPE;
}
- return TopAbs_SHAPE;
}
//=======================================================================
case 5 : return TopAbs_WIRE;
case 6 : return TopAbs_EDGE;
case 7 : return TopAbs_VERTEX;
- default :
- return TopAbs_SHAPE;
+ default :
+ return TopAbs_SHAPE;
}
- return TopAbs_SHAPE;
}
//=======================================================================
case 9 : return TNaming_ORIENTATION;
case 10 : return TNaming_WIREIN;
default :
- Standard_DomainError::Raise("TNaming_NameType; enum term unknown ");
+ Standard_DomainError::Raise("TNaming_NameType; enum term unknown ");
}
return TNaming_INTERSECTION;
}
// Purpose :
//================================================================
void MeshVS_MeshOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
- const Quantity_NameOfColor theColor,
- const Standard_Integer /*theMode*/)
+ const Quantity_NameOfColor theColor,
+ const Standard_Integer /*theMode*/)
{
Handle( SelectMgr_SelectableObject ) aSelObj;
if ( HasSelectable() )
if( !aNodes.IsNull() && aNodes->Map().Extent() == 1 )
{
TColStd_MapIteratorOfPackedMapOfInteger anIt( aNodes->Map() );
- for( ; anIt.More(); anIt.Next() )
+ if( myLastID != anIt.Key() )
{
- if( myLastID != anIt.Key() )
- myLastID = anIt.Key();
- break;
+ myLastID = anIt.Key();
}
- }
+ }
else if( !aElems.IsNull() && aElems->Map().Extent() == 1 )
{
TColStd_MapIteratorOfPackedMapOfInteger anIt( aElems->Map() );
- for( ; anIt.More(); anIt.Next() )
+ if( myLastID != anIt.Key() )
{
- if( myLastID != anIt.Key() )
- myLastID = anIt.Key();
- break;
+ myLastID = anIt.Key();
}
}
if( !aNodes.IsNull() && aNodes->Map().Extent() == 1 )
{
TColStd_MapIteratorOfPackedMapOfInteger anIt( aNodes->Map() );
- for( ; anIt.More(); anIt.Next() )
- {
- aKey = anIt.Key();
- if( myLastID == aKey )
- aHilight = Standard_False;
- break;
+ aKey = anIt.Key();
+ if( myLastID == aKey )
+ {
+ aHilight = Standard_False;
}
}
Handle(TColStd_HPackedMapOfInteger) aElems = GetDetectedElements();
if( !aElems.IsNull() && aElems->Map().Extent() == 1 )
{
TColStd_MapIteratorOfPackedMapOfInteger anIt( aElems->Map() );
- for( ; anIt.More(); anIt.Next() )
+ aKey = anIt.Key();
+ if( myLastID == aKey )
{
- aKey = anIt.Key();
- if( myLastID == aKey )
- aHilight = Standard_False;
- break;
+ aHilight = Standard_False;
}
}
}
{
const OpenGl_CView* aCView = (const OpenGl_CView* )theCView.ptrView;
return (aCView != NULL) && aCView->WS->BufferDump ((OpenGl_FrameBuffer* )theCView.ptrFBO, theImage, theBufferType);
- return Standard_False;
}
Standard_Boolean OpenGl_Workspace::BufferDump (OpenGl_FrameBuffer* theFBOPtr,
// Modified by Sergey KHROMOV - Thu Apr 18 10:57:51 2002 End
return Handle(Adaptor2d_HCurve2d)();
}
- myProjIsDone = Standard_False;
+// myProjIsDone = Standard_False;
// Modified by Sergey KHROMOV - Thu Apr 18 10:58:01 2002 Begin
// Standard_NoSuchObject_Raise_if(1,"ProjLib_ComputeOnPS: build echec");
// Modified by Sergey KHROMOV - Thu Apr 18 10:58:02 2002 End
- return Handle(Adaptor2d_HCurve2d)();
}
TopLoc_Location loc;
Handle(Poly_Triangulation) facing = BRep_Tool::Triangulation(TopologicalFace, loc);
if (facing.IsNull())
- {
- di << "Triangulation FAILED for this face" << "\n";
- continue;
- }
+ {
+ di << "Triangulation FAILED for this face" << "\n";
+ continue;
+ }
di << "No of Triangles = " << facing->NbTriangles() << "\n";
}
di<<"Triangulation of all Faces Completed. "<< "\n" << "\n";
Standard_Integer nPSurf = ( myExtPS.IsDone() ? myExtPS.NbExt() : 0 );
if ( nPSurf > 0 )
- {
-
- //Standard_Real distMin = myExtPS.Value ( 1 );
- Standard_Real distMin = myExtPS.SquareDistance ( 1 );
- Standard_Integer indMin=1;
- for (Standard_Integer sol = 2; sol <= nPSurf ; sol++)
- {
- //Standard_Real dist = myExtPS.Value(sol);
- Standard_Real dist = myExtPS.SquareDistance(sol);
- if ( distMin > dist )
- {
- distMin = dist;
- indMin = sol;
- }
- }
-//
- distMin = sqrt(distMin);
- Standard_Real S, T;
- myExtPS.Point(indMin).Parameter ( S, T );
- gp_Pnt aCheckPnt = aSurf.Value( S, T );
- Standard_Real aCheckDist = P3D.Distance(aCheckPnt);
- di << "Solution is : U = "<< S << "\t V = "<< T << "\n";
- di << "Solution is : X = "<< aCheckPnt.X() << "\t Y = "<< aCheckPnt.Y() << "\t Z = "<< aCheckPnt.Z() << "\n";
- di << "ExtremaDistance = " << distMin << "\n";
- di << "CheckDistance = " << aCheckDist << "\n";
-
- if(fabs(distMin - aCheckDist) < Precision::Confusion()) return 0;
- else return 1;
- }
+ {
+ //Standard_Real distMin = myExtPS.Value ( 1 );
+ Standard_Real distMin = myExtPS.SquareDistance ( 1 );
+ Standard_Integer indMin=1;
+ for (Standard_Integer sol = 2; sol <= nPSurf ; sol++)
+ {
+ //Standard_Real dist = myExtPS.Value(sol);
+ Standard_Real dist = myExtPS.SquareDistance(sol);
+ if ( distMin > dist )
+ {
+ distMin = dist;
+ indMin = sol;
+ }
+ }
+ distMin = sqrt(distMin);
+ Standard_Real S, T;
+ myExtPS.Point(indMin).Parameter ( S, T );
+ gp_Pnt aCheckPnt = aSurf.Value( S, T );
+ Standard_Real aCheckDist = P3D.Distance(aCheckPnt);
+ di << "Solution is : U = "<< S << "\t V = "<< T << "\n";
+ di << "Solution is : X = "<< aCheckPnt.X() << "\t Y = "<< aCheckPnt.Y() << "\t Z = "<< aCheckPnt.Z() << "\n";
+ di << "ExtremaDistance = " << distMin << "\n";
+ di << "CheckDistance = " << aCheckDist << "\n";
+
+ if(fabs(distMin - aCheckDist) < Precision::Confusion()) return 0;
+ else return 1;
+ }
else return 1;
}
catch (Standard_Failure) {di << "OCC486 Exception \n" ;return 1;}
-
- return 0;
}
#include <GC_MakeArcOfCircle.hxx>
//display mode = Shading
theAISShape->SetDisplayMode(1);
-
+
//get the drawer
Handle_AIS_Drawer theDrawer = theAISShape->Attributes();
Handle_Prs3d_ShadingAspect theShadingAspect = theDrawer->ShadingAspect();
Handle_Graphic3d_AspectFillArea3d theAspectFillArea3d = theShadingAspect->Aspect();
-
+
//allow to display the edges
theAspectFillArea3d->SetEdgeOn();
//set the style to Dash
return 0;
}
-static int BUC60606(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
-
- di << "Use satread command instead of " << argv[0] << "\n";
- return -1;
-
- if(argc!=3) {
- di << "Usage : " << argv[0] << "name filename" << "\n";
- return -1;
- }
-// Handle_AcisData_AcisModel satModel = new AcisData_AcisModel();
-// Standard_Character *DD = Tcl_GetVar(di.Interp(),"Draw_DataDir",TCL_GLOBAL_ONLY);
-
-// Standard_Character *filename = new Standard_Character [strlen(DD)+strlen(argv[2])+1];
-// Sprintf(filename,"%s/%s",DD,argv[2]);
-
-// satModel->ReadSaveFile(filename);
-
-// Standard_Boolean success = !satModel.IsNull();
-// cout << "n<-- SAT model read : " << (success?"true":"false") << endl << flush;
-// if ( success ) {
-// Standard_Character *Ch=new Standard_Character [strlen(argv[1])+3];
-// Handle_TopTools_HSequenceOfShape satShapes = satModel->GetShapes();
-// Standard_Integer nbs=satShapes->Length();
-// for(Standard_Integer i=1;i<=nbs;i++) {
-// TopoDS_Shape xShape = satShapes->Value(i);
-// if(!xShape.IsNull()) {
-// Sprintf(Ch,"%s_%i",argv[1],i);
-// DBRep::Set(Ch,xShape);
-// } else cout << "The shape " << argv[1] << "_" << i << " is NULL !" << endl;
-// }
-// }
-
-
- return 0;
-}
-
-static int BUC60627(Draw_Interpretor& di, Standard_Integer argc, const char ** argv) {
- di << "Use satread command instead of " << argv[0] << "\n";
- return -1;
-
- // perform the conversion
- // as in AcisData.cdl --- that's alright
-// if(argc!=3) {
-// cerr << "Usage : " << argv[0] << " BREP file" << endl;
-// return -1;
-// }
-// TopoDS_Shape shapeModel=DBRep::Get(argv[1]);
-// Handle(AcisData_AcisModel) satModel = new AcisData_AcisModel();
-// satModel->AddShape( shapeModel ); // memorizes "kegel2.brep"
-// Standard_CString stringData;
-// Standard_Integer nbChar; // write intermediate stringin order to compute ACIS data
-// satModel->WriteStringData( stringData, nbChar );
-// if ( satModel->IsDone() ) {
-// satModel = new AcisData_AcisModel();
-// satModel->ReadStringData( stringData );
-// if ( satModel->IsDone() ) {
-// // write into file
-// satModel->WriteSaveFile( argv[2] );
-// if ( ! satModel->IsDone() ) {
-// cout << "The SAT madel does not wroute." << endl;
-// }
-// } else cout << "The SAT model does not read from a string." << endl;
-// // satModel->ReadStringData( stringData );
-// } else cout << "The SAT model does not wroute into a string." << endl;
-// // satModel->WriteStringData( stringData, nbChar );
- return 1;
-}
-
void QABugs::Commands_4(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
theCommands.Add("BUC60738","BUC60738",__FILE__,BUC60738,group);
- theCommands.Add("BUC60606","BUC60606 name",__FILE__,BUC60606,group);
- theCommands.Add("BUC60627","BUC60627 name",__FILE__,BUC60627,group);
-
+
return;
}
const TDF_Label& ModifiedFacesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(ModifiedFacesLabel, "ModifiedFaces");
return ModifiedFacesLabel;
-#endif
+#else
return ResultLabel().NewChild();
+#endif
}
//=======================================================================
const TDF_Label& ModifiedEdgesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(ModifiedEdgesLabel, "ModifiedEdges");
return ModifiedEdgesLabel;
-#endif
+#else
return ResultLabel().NewChild();
+#endif
}
//=======================================================================
const TDF_Label& DeletedFacesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(DeletedFacesLabel, "DeletedFaces");
return DeletedFacesLabel;
-#endif
+#else
return ResultLabel().NewChild();
+#endif
}
//=======================================================================
const TDF_Label& DeletedEdgesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(DeletedEdgesLabel, "DeletedEdges");
return DeletedEdgesLabel;
-#endif
+#else
return ResultLabel().NewChild();
+#endif
}
//=======================================================================
const TDF_Label& DeletedVerticesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(DeletedVerticesLabel, "DeletedVertices");
return DeletedVerticesLabel;
-#endif
+#else
return ResultLabel().NewChild();
+#endif
}
//=======================================================================
const TDF_Label& NewShapesLabel = ResultLabel().NewChild();
TDataStd_Name::Set(NewShapesLabel, "NewShapes");
return NewShapesLabel;
-#endif
+#else
return ResultLabel().NewChild();
+#endif
}
//=======================================================================
const TDF_Label& ContentLabel = ResultLabel().NewChild();
TDataStd_Name::Set(ContentLabel, "Content");
return ContentLabel;
-#endif
+#else
return ResultLabel().NewChild();
+#endif
}
//=======================================================================
const TDF_Label& DegeneratedLabel = ResultLabel().NewChild();
TDataStd_Name::Set(DegeneratedLabel, "DeletedDegeneratedEdges");
return DegeneratedLabel;
-#endif
+#else
return ResultLabel().NewChild();
+#endif
}
//=======================================================================
const TDF_Label& ContentLabel = ResultLabel().NewChild();
TDataStd_Name::Set(ContentLabel, "Content");
return ContentLabel;
-#endif
+#else
return ResultLabel().NewChild();
+#endif
}
//=======================================================================
//=======================================================================
static void SplitEdge(const TopoDS_Edge &theEdge,
- const TopTools_IndexedMapOfShape &theVertices,
- TopTools_ListOfShape &theSplits)
+ const TopTools_IndexedMapOfShape &theVertices,
+ TopTools_ListOfShape &theSplits)
{
//const TopoDS_Edge aNewEdge;
TopoDS_Vertex aV1;
Standard_Integer i;
- for (i = 1; i <= theVertices.Extent(); i++) {
+ for (i = 1; i <= theVertices.Extent(); i++)
+ {
const TopoDS_Shape &theVtx = theVertices.FindKey(i);
if (!aV1.IsSame(theVtx) && !aV2.IsSame(theVtx))
theSplits.Clear();
-// Splitting of the new edge.
+ // Splitting of the new edge.
if (!TopOpeBRepTool_TOOL::SplitE(aNewEdge, theSplits)) {
theSplits.Clear();
theSplits.Append(theEdge);
return;
}
-// Addition of the other internal vertices into the corresponding splits.
+ // Addition of the other internal vertices into the corresponding splits.
TopoDS_Iterator anIter(theEdge, Standard_False);
- for (; anIter.More(); anIter.Next()) {
+ for (; anIter.More(); anIter.Next())
+ {
TopoDS_Vertex aCurVtx = TopoDS::Vertex(anIter.Value());
-// for each vertex which is not the same as aV1, aV2, theIntV1 or theIntV2.
- if (!aCurVtx.IsSame(aV1) && !aCurVtx.IsSame(aV2) &&
- !theVertices.Contains(aCurVtx)) {
+ // for each vertex which is not the same as aV1, aV2, theIntV1 or theIntV2.
+ if (!aCurVtx.IsSame(aV1) && !aCurVtx.IsSame(aV2) && !theVertices.Contains(aCurVtx))
+ {
TopTools_ListIteratorOfListOfShape anEdgeIter(theSplits);
- Standard_Real aCurPar;
-
- aCurPar = BRep_Tool::Parameter(aCurVtx, theEdge);
+ Standard_Real aCurPar = BRep_Tool::Parameter(aCurVtx, theEdge);
-// Search for the split the current vertex belongs to.
- for (; anEdgeIter.More(); anEdgeIter.Next()) {
- TopoDS_Edge anEdge = TopoDS::Edge(anEdgeIter.Value());
- Standard_Real aFPar;
- Standard_Real aLPar;
+ // Search for the split the current vertex belongs to.
+ for (; anEdgeIter.More(); anEdgeIter.Next())
+ {
+ TopoDS_Edge anEdge = TopoDS::Edge(anEdgeIter.Value());
+ Standard_Real aFPar;
+ Standard_Real aLPar;
- BRep_Tool::Range(anEdge, aFPar, aLPar);
+ BRep_Tool::Range(anEdge, aFPar, aLPar);
- if (aCurPar > aFPar && aCurPar < aLPar) {
- aBuilder.Add(anEdge, aCurVtx);
- }
- break;
+ if (aCurPar > aFPar && aCurPar < aLPar)
+ {
+ aBuilder.Add(anEdge, aCurVtx);
+ }
+ break;
}
}
}
TopTools_ListIteratorOfListOfShape anEdgeIter(theSplits);
TopAbs_Orientation anOri = theEdge.Orientation();
- for (; anEdgeIter.More(); anEdgeIter.Next()) {
+ for (; anEdgeIter.More(); anEdgeIter.Next())
+ {
TopoDS_Shape &anEdge = anEdgeIter.Value();
-
anEdge.Orientation(anOri);
}
}
Standard_Boolean rescl = (fcl.PerformInfinitePoint () == TopAbs_OUT);
return rescl;
}
- return Standard_True;
}
//=======================================================================
}
return aBSpline2d;
}
- return result;
}
//=======================================================================
#endif
return Standard_False;
}
- return Standard_False; // ramasse-miette
}
/* S4135 : BestExtremum is commented after IsAnIsoparametric works with Precision::Confusion()
//else
//Surface is not BSpline or Bezier
// return Standard_False;
- return Standard_True;
}
//=======================================================================
#endif
return Standard_False;
}
- return Standard_False; // normalement, on n y passe jamais
}
//=======================================================================
#endif
return ReplaceFirst;
}
- return ReplaceFirst;
}
//=======================================================================
TopoDS_Iterator aIt;
bInternal = Standard_False;
aIt.Initialize(aSx);
- for (; aIt.More(); aIt.Next()) {
+ for (; aIt.More(); aIt.Next())
+ {
const TopoDS_Shape& aSy=aIt.Value();
aOr=aSy.Orientation();
bInternal = (aOr == TopAbs_INTERNAL || aOr == TopAbs_EXTERNAL);
FindFeaturesInAncestors (S, Sol, AncInFeature);
TopTools_MapIteratorOfMapOfShape itF(AncInFeature);
for ( ; itF.More(); itF.Next()) {
- const TopoDS_Shape& AncOfS = itF.Key();
- LBS .Append(AncOfS);
- LBNS.Append(TNaming_Tool::NamedShape(AncOfS,Lab));
+ const TopoDS_Shape& AncOfS = itF.Key();
+ LBS .Append(AncOfS);
+ LBNS.Append(TNaming_Tool::NamedShape(AncOfS,Lab));
}
}
}
else {
for ( ; it.More(); it.Next()) {
-// if (it.NamedShape()->Evolution() != TNaming_SELECTED) {
+ // if (it.NamedShape()->Evolution() != TNaming_SELECTED) {
if (it.NamedShape()->Evolution() == Evol) {
- Handle(TNaming_NamedShape) NS = TNaming_Tool::NamedShape(it.Shape(),Lab);
- if (!NS.IsNull()) {
- LBS.Append (it.Shape());
- LBNS.Append (TNaming_Tool::NamedShape(it.Shape(),Lab));
- }
- else {
+ Handle(TNaming_NamedShape) NS = TNaming_Tool::NamedShape(it.Shape(),Lab);
+ if (!NS.IsNull()) {
+ LBS.Append (it.Shape());
+ LBNS.Append (TNaming_Tool::NamedShape(it.Shape(),Lab));
+ }
+ else {
#ifdef DEB
- cout <<"TNaming_Localizer: Shape modifie sans avoir ete cree"<<endl;
+ cout <<"TNaming_Localizer: Shape modifie sans avoir ete cree"<<endl;
#endif
- }
+ }
}
}
}
Standard_Boolean isCand(Standard_True); // aS is a Candidate
TNaming_DataMapIteratorOfDataMapOfShapeMapOfShape it2(DM);
for (;it2.More();it2.Next()) {
- const TopoDS_Shape& aKey2 = it2.Key();
- if(aKey2 == aKey1) continue;
- const TNaming_MapOfShape& aMap2 = it2.Value();
- if(!aMap2.Contains(aS)) isCand = Standard_False;
+ const TopoDS_Shape& aKey2 = it2.Key();
+ if(aKey2 == aKey1) continue;
+ const TNaming_MapOfShape& aMap2 = it2.Value();
+ if(!aMap2.Contains(aS)) isCand = Standard_False;
}
- if(isCand)
- List.Append(aS);
+ if(isCand)
+ List.Append(aS);
}
break;
}
#ifndef DEB
Standard_Integer TopOpeBRep_FFDumper::ExploreIndex(const TopoDS_Shape& , const Standard_Integer ) const
{
+ return 0;
+}
#else
Standard_Integer TopOpeBRep_FFDumper::ExploreIndex(const TopoDS_Shape& S, const Standard_Integer ISI) const
{
if (ISI == 1) r = myEM1.Find(S);
if (ISI == 2) r = myEM2.Find(S);
return r;
-#endif
- return 0;
}
+#endif
//=======================================================================
//function : DumpDSP
if (p1 < p2) return (-1);
else if (p1 > p2) return (1);
else return (0);
- return (0);
}
Standard_EXPORT void BREP_sortonparameter2(TopOpeBRepDS_ListOfInterference& LOI)
else {
return 1;
}
- return 0;
}
Standard_Boolean BOOPNINTL::Get(Standard_Integer n,char**a){
// case IV !RevSense && DifOriented
if (!IsEdgesRevSense && IsFacesDifOriented) {
if (Opefus()) {// Fusion
- if (aStateObj==TopAbs_OUT && aStateTool==TopAbs_OUT) {
- Rejected1=Standard_False;
- Rejected2=Standard_False;
- }
- else if (aStateObj==TopAbs_OUT && aStateTool==TopAbs_IN) {
- Rejected2=Standard_False;
- }
- else if (aStateObj==TopAbs_IN && aStateTool==TopAbs_OUT) {
- Rejected1=Standard_False;
- }
- else if (aStateObj==TopAbs_IN && aStateTool==TopAbs_IN) {
- if(!myProcessedPartsON2d.Contains(aPieceObj)) {//we proceed IsSame only if we didn't it before
- myProcessedPartsON2d.Add(aPieceObj);
- IsSame2d (aSeq, aListOfPiecesOut2d); //Perform IsSame 2d and keep periodic parts
- }
- }
+ if (aStateObj==TopAbs_OUT && aStateTool==TopAbs_OUT) {
+ Rejected1=Standard_False;
+ Rejected2=Standard_False;
+ }
+ else if (aStateObj==TopAbs_OUT && aStateTool==TopAbs_IN) {
+ Rejected2=Standard_False;
+ }
+ else if (aStateObj==TopAbs_IN && aStateTool==TopAbs_OUT) {
+ Rejected1=Standard_False;
+ }
+ else if (aStateObj==TopAbs_IN && aStateTool==TopAbs_IN) {
+ if(!myProcessedPartsON2d.Contains(aPieceObj)) {//we proceed IsSame only if we didn't it before
+ myProcessedPartsON2d.Add(aPieceObj);
+ IsSame2d (aSeq, aListOfPiecesOut2d); //Perform IsSame 2d and keep periodic parts
+ }
+ }
}
if (Opecom()) {// Common
- if (aStateObj==TopAbs_IN && aStateTool==TopAbs_IN) {
- Rejected1=Standard_False;
- Rejected2=Standard_False;
- }
- else if (aStateObj==TopAbs_OUT && aStateTool==TopAbs_IN) {
- Rejected1=Standard_False;
- }
- else if (aStateObj==TopAbs_IN && aStateTool==TopAbs_OUT) {
- Rejected2=Standard_False;
- }
+ if (aStateObj==TopAbs_IN && aStateTool==TopAbs_IN) {
+ Rejected1=Standard_False;
+ Rejected2=Standard_False;
+ }
+ else if (aStateObj==TopAbs_OUT && aStateTool==TopAbs_IN) {
+ Rejected1=Standard_False;
+ }
+ else if (aStateObj==TopAbs_IN && aStateTool==TopAbs_OUT) {
+ Rejected2=Standard_False;
+ }
}
if (Opec12()) { //Cut
- if (aStateObj==TopAbs_OUT && aStateTool==TopAbs_OUT) {
- Rejected1=Standard_False;
- }
- else if (aStateObj==TopAbs_IN && aStateTool==TopAbs_IN) {
- Rejected2=Standard_False;
- }
+ if (aStateObj==TopAbs_OUT && aStateTool==TopAbs_OUT) {
+ Rejected1=Standard_False;
+ }
+ else if (aStateObj==TopAbs_IN && aStateTool==TopAbs_IN) {
+ Rejected2=Standard_False;
+ }
}
if (!Rejected1) {
- aListOfPieces.Append(aPieceObj);
- aListOfFaces.Append (aFaceObj);
+ aListOfPieces.Append(aPieceObj);
+ aListOfFaces.Append (aFaceObj);
}
if (!Rejected2) {
- aListOfPieces.Append(aPieceTool);
- aListOfFaces.Append (aFaceTool);
+ aListOfPieces.Append(aPieceTool);
+ aListOfFaces.Append (aFaceTool);
}
return 4;
}
// Unknowm case for existing adjacents
return 0;
}
- return -1;
}
//=======================================================================
else IsToRev = (s1 == TopAbs_IN);
return IsToRev;
}
- Standard_ProgramError::Raise("GTopo::IsToReverse1");
- return Standard_False; // dummy
+// Standard_ProgramError::Raise("GTopo::IsToReverse1");
+// return Standard_False; // dummy
}
else IsToRev = (s2 == TopAbs_IN);
return IsToRev;
}
- Standard_ProgramError::Raise("GTopo::IsToReverse2");
- return Standard_False; // dummy
}
//=======================================================================
// purpose : Correct tolerances for Edge
//=======================================================================
void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
- const TopoDS_Face& S,
- const Standard_Real aMaxTol)
+ const TopoDS_Face& S,
+ const Standard_Real aMaxTol)
{
//
// 1. Minimum of conditions to Perform
if (cr->IsCurve3D()) {
unique++;
if (myCref.IsNull() && !cr->Curve3D().IsNull()) {
- myCref = cr;
+ myCref = cr;
}
}
itcr.Next();
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface()) {
- myCref = cr;
- break;
+ myCref = cr;
+ break;
}
itcr.Next();
}
else {
if (myCref->IsCurve3D()) {
- Handle(Geom_Curve) C3d = Handle(Geom_Curve)::DownCast
- (myCref->Curve3D()->Transformed (myCref->Location().Transformation()));
- GeomAdaptor_Curve GAC3d(C3d,First,Last);
- myHCurve = new GeomAdaptor_HCurve(GAC3d);
+ Handle(Geom_Curve) C3d = Handle(Geom_Curve)::DownCast
+ (myCref->Curve3D()->Transformed (myCref->Location().Transformation()));
+ GeomAdaptor_Curve GAC3d(C3d,First,Last);
+ myHCurve = new GeomAdaptor_HCurve(GAC3d);
}
else { // curve on surface
- Handle(Geom_Surface) Sref = myCref->Surface();
- Sref = Handle(Geom_Surface)::DownCast(Sref->Transformed(myCref->Location().Transformation()));
- const Handle(Geom2d_Curve)& PCref = myCref->PCurve();
- Handle(GeomAdaptor_HSurface) GAHSref = new GeomAdaptor_HSurface(Sref);
- Handle(Geom2dAdaptor_HCurve) GHPCref = new Geom2dAdaptor_HCurve(PCref, First, Last);
- Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref);
- myHCurve = new Adaptor3d_HCurveOnSurface(ACSref);
+ Handle(Geom_Surface) Sref = myCref->Surface();
+ Sref = Handle(Geom_Surface)::DownCast(Sref->Transformed(myCref->Location().Transformation()));
+ const Handle(Geom2d_Curve)& PCref = myCref->PCurve();
+ Handle(GeomAdaptor_HSurface) GAHSref = new GeomAdaptor_HSurface(Sref);
+ Handle(Geom2dAdaptor_HCurve) GHPCref = new Geom2dAdaptor_HCurve(PCref, First, Last);
+ Adaptor3d_CurveOnSurface ACSref(GHPCref,GAHSref);
+ myHCurve = new Adaptor3d_HCurveOnSurface(ACSref);
}
}
}
const TopLoc_Location& TFloc = TF->Location();
const Handle(Geom_Surface)& Su = TF->Surface();
TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
- // Standard_Boolean checkclosed = Standard_False;
Standard_Boolean pcurvefound = Standard_False;
itcr.Initialize(TE->Curves());
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr != myCref && cr->IsCurveOnSurface(Su,L)) {
- pcurvefound = Standard_True;
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
- Standard_Real f,l;
- GC->Range(f,l);
- if (SameRange && (f != First || l != Last)) {
- return ;//BRepCheck_InvalidSameRangeFlag);
- if (SameParameter) {
- return; //BRepCheck_InvalidSameParameterFlag);
- }
+ pcurvefound = Standard_True;
+ const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+ Standard_Real f,l;
+ GC->Range(f,l);
+ if (SameRange && (f != First || l != Last)) {
+ return ;//BRepCheck_InvalidSameRangeFlag;
+ }
+
+ Handle(Geom_Surface) Sb = cr->Surface();
+ Sb = Handle(Geom_Surface)::DownCast (Su->Transformed(L.Transformation()));
+ Handle(Geom2d_Curve) PC = cr->PCurve();
+ Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(Sb);
+ Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(PC,f,l);
+ Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
+ ok = Validate(myHCurve->Curve(), ACS, Tol, SameParameter, aNewTol);
+ if (ok) {
+ // printf("(Edge,1) Tolerance=%15.10lg\n", aNewTol);
+ if (aNewTol<aMaxTol)
+ TE->UpdateTolerance(aNewTol);
+ }
+ if (cr->IsCurveOnClosedSurface()) {
+ // checkclosed = Standard_True;
+ GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
+ ACS.Load(GAHS); // sans doute inutile
+ ACS.Load(GHPC); // meme remarque...
+ ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol);
+ if (ok) {
+ if (aNewTol<aMaxTol)
+ TE->UpdateTolerance(aNewTol);
+ }
}
-
- Handle(Geom_Surface) Sb = cr->Surface();
- Sb = Handle(Geom_Surface)::DownCast (Su->Transformed(L.Transformation()));
- Handle(Geom2d_Curve) PC = cr->PCurve();
- Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(Sb);
- Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(PC,f,l);
- Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
- ok = Validate(myHCurve->Curve(), ACS, Tol, SameParameter, aNewTol);
- if (ok) {
- if (cr->IsCurveOnClosedSurface()) {
- //return ;// BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
- }
- else {
- //return;//BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface);
- }
- if (SameParameter) {
- //return;//BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
- }
-// printf("(Edge,1) Tolerance=%15.10lg\n", aNewTol);
- if (aNewTol<aMaxTol)
- TE->UpdateTolerance(aNewTol);
- }
-
- if (cr->IsCurveOnClosedSurface()) {
- // checkclosed = Standard_True;
- GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
- ACS.Load(GAHS); // sans doute inutile
- ACS.Load(GHPC); // meme remarque...
- ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol);
- if (ok) {
- //return;//BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
- if (SameParameter) {
- //return;//BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
- }
-// printf("(Edge,2) Tolerance=%15.10lg\n", aNewTol);
- if (aNewTol<aMaxTol)
- TE->UpdateTolerance(aNewTol);
- }
- }
}
itcr.Next();
}
Handle(Geom_Plane) P;
Handle(Standard_Type) styp = Su->DynamicType();
if (styp == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
- P = Handle(Geom_Plane)::DownCast(Handle(Geom_RectangularTrimmedSurface)::
- DownCast(Su)->BasisSurface());
+ P = Handle(Geom_Plane)::DownCast(Handle(Geom_RectangularTrimmedSurface)::
+ DownCast(Su)->BasisSurface());
}
else {
- P = Handle(Geom_Plane)::DownCast(Su);
+ P = Handle(Geom_Plane)::DownCast(Su);
}
if (P.IsNull()) { // not a plane
- return;//BRepCheck::Add(lst,BRepCheck_NoCurveOnSurface);
+ return;//BRepCheck::Add(lst,BRepCheck_NoCurveOnSurface);
}
-
- else {// on fait la projection a la volee, comme BRep_Tool
- P = Handle(Geom_Plane)::DownCast(P->Transformed(L.Transformation()));
- //on projette Cref sur ce plan
- Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P);
-
- // Dub - Normalement myHCurve est une GeomAdaptor_HCurve
- GeomAdaptor_Curve& Gac = Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve();
- Handle(Geom_Curve) C3d = Gac.Curve();
- Handle(Geom_Curve) ProjOnPlane = GeomProjLib::ProjectOnPlane
- (new Geom_TrimmedCurve(C3d,First,Last), P, P->Position().Direction(), Standard_True);
-
- Handle(GeomAdaptor_HCurve) aHCurve = new GeomAdaptor_HCurve(ProjOnPlane);
-
- ProjLib_ProjectedCurve proj(GAHS,aHCurve);
- Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj);
- Handle(Geom2dAdaptor_HCurve) GHPC =
- new Geom2dAdaptor_HCurve(PC, myHCurve->FirstParameter(), myHCurve->LastParameter());
-
- Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
-
- ok = Validate(myHCurve->Curve(),ACS,
- Tol,Standard_True, aNewTol); // voir dub...
- if (ok) {
- //return;//BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface);
-// printf("(Edge,3) Tolerance=%15.10lg\n", aNewTol);
- if (aNewTol<aMaxTol)
- TE->UpdateTolerance(aNewTol);
- }
+ else
+ { // on fait la projection a la volee, comme BRep_Tool
+ P = Handle(Geom_Plane)::DownCast(P->Transformed(L.Transformation()));
+ //on projette Cref sur ce plan
+ Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P);
+
+ // Dub - Normalement myHCurve est une GeomAdaptor_HCurve
+ GeomAdaptor_Curve& Gac = Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve();
+ Handle(Geom_Curve) C3d = Gac.Curve();
+ Handle(Geom_Curve) ProjOnPlane = GeomProjLib::ProjectOnPlane
+ (new Geom_TrimmedCurve(C3d,First,Last), P, P->Position().Direction(), Standard_True);
+
+ Handle(GeomAdaptor_HCurve) aHCurve = new GeomAdaptor_HCurve(ProjOnPlane);
+
+ ProjLib_ProjectedCurve proj(GAHS,aHCurve);
+ Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj);
+ Handle(Geom2dAdaptor_HCurve) GHPC =
+ new Geom2dAdaptor_HCurve(PC, myHCurve->FirstParameter(), myHCurve->LastParameter());
+
+ Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
+
+ ok = Validate(myHCurve->Curve(),ACS,
+ Tol,Standard_True, aNewTol); // voir dub...
+ if (ok)
+ {
+ if (aNewTol<aMaxTol)
+ TE->UpdateTolerance(aNewTol);
+ }
}
-
}//end of if (!pcurvefound) {
} // end of 2. Tolerances in InContext
TopLoc_Location L = (Eloc * loc).Predivided(aVertex.Location());
if (cr->IsCurve3D()) {
- const Handle(Geom_Curve)& C = cr->Curve3D();
- if (!C.IsNull()) {
- itpr.Initialize(TV->Points());
- while (itpr.More()) {
- const Handle(BRep_PointRepresentation)& pr = itpr.Value();
- if (pr->IsPointOnCurve(C,L)) {
- Controlp = C->Value(pr->Parameter());
- Controlp.Transform(L.Transformation());
- aD2=prep.SquareDistance(Controlp);
- if (aD2 > Tol) {
- aNewTolerance=sqrt(aD2)+dd;
-// printf("(Vert,1) Tolerance=%15.10lg\n", aNewTolerance);
- if (aNewTolerance<aMaxTol)
- TV->UpdateTolerance(aNewTolerance);
- }
- }
- itpr.Next();
- }
-
- TopAbs_Orientation orv = aVertex.Orientation();
- if (orv == TopAbs_FORWARD || orv == TopAbs_REVERSED) {
- const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
-
- if (orv==TopAbs_FORWARD)
- Controlp = C->Value(GC->First());
- else
- Controlp = C->Value(GC->Last());
-
- Controlp.Transform(L.Transformation());
- aD2=prep.SquareDistance(Controlp);
-
- if (aD2 > Tol) {
- aNewTolerance=sqrt(aD2)+dd;
-// printf("(Vert,2) Tolerance=%15.10lg\n", aNewTolerance);
- if (aNewTolerance<aMaxTol)
- TV->UpdateTolerance(aNewTolerance);
- }
- }
- }
+ const Handle(Geom_Curve)& C = cr->Curve3D();
+ if (!C.IsNull()) {
+ itpr.Initialize(TV->Points());
+ while (itpr.More()) {
+ const Handle(BRep_PointRepresentation)& pr = itpr.Value();
+ if (pr->IsPointOnCurve(C,L)) {
+ Controlp = C->Value(pr->Parameter());
+ Controlp.Transform(L.Transformation());
+ aD2=prep.SquareDistance(Controlp);
+ if (aD2 > Tol) {
+ aNewTolerance=sqrt(aD2)+dd;
+ if (aNewTolerance<aMaxTol)
+ TV->UpdateTolerance(aNewTolerance);
+ }
+ }
+ itpr.Next();
+ }
+
+ TopAbs_Orientation orv = aVertex.Orientation();
+ if (orv == TopAbs_FORWARD || orv == TopAbs_REVERSED) {
+ const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
+
+ if (orv==TopAbs_FORWARD)
+ Controlp = C->Value(GC->First());
+ else
+ Controlp = C->Value(GC->Last());
+
+ Controlp.Transform(L.Transformation());
+ aD2=prep.SquareDistance(Controlp);
+
+ if (aD2 > Tol) {
+ aNewTolerance=sqrt(aD2)+dd;
+ if (aNewTolerance<aMaxTol)
+ TV->UpdateTolerance(aNewTolerance);
+ }
+ }
+ }
}
itcr.Next();
}
case TopOpeBRepDS_VERTEX : return Standard_True; break;
default : return Standard_False;
}
- return Standard_False;
}
//=======================================================================
else {
return Standard_False;
}
- return Standard_False;
+// return Standard_False;
}
#endif
else {
return Standard_False;
}
- return Standard_False;
}
#endif
Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::Parameter()");
return 0.; // windowsNT
}
- return 0.; // windowsNT
+// return 0.; // windowsNT
}
//=======================================================================
Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::DiffOriented()");
return Standard_False; // windowsNT
}
- return Standard_False; // windowsNT
+// return Standard_False; // windowsNT
}
//=======================================================================
Standard_ProgramError::Raise("TopOpeBRepDS_PointIterator::SameOriented()");
return Standard_False; // windowsNT
}
- return Standard_False; // windowsNT
}
//=======================================================================
if (samec) return isON2ifss;//is ON if curves are on same side/tg line
if (curvC1 > curvC2) return isIN2ifss;//is IN if curves are on same side/tg line
else return isOU2ifss;//is OU if curves are on same side/tg line
- return 0;
+// return 0;
}
static Standard_Boolean FUN_getnearpar(const TopoDS_Edge& e,const Standard_Real par,const Standard_Real f,const Standard_Real l,
sta = TopAbs_ON;
return Standard_True;
}
- return Standard_False;
}
static Standard_Boolean FUN_mkT2dquad(const TopoDS_Edge& e1,const Standard_Real par1,const Standard_Real f1,const Standard_Real l1,
const TopoDS_Edge& e2,const Standard_Real par2,
IFSelect_Activator::SetCurrentAlias (WS->SelectedNorm(Standard_True));
return IFSelect_RetDone;
}
- return IFSelect_RetVoid;
}