aCnew->D1(aTnew, aP, aVnew);
aVnew.Normalize();
//
- aCtx->ProjectPointOnEdge(aP, aEold, aTold);
+ if (!aCtx->ProjectPointOnEdge(aP, aEold, aTold))
+ return Standard_False;
aCold->D1(aTold, aP, aVold);
aVold.Normalize();
//
Handle(Geom_TrimmedCurve) curve;
curve = new Geom_TrimmedCurve(Cur, f, l, Standard_True);
#ifdef OCCT_DEBUG
- gp_Pnt P1 =
+ gp_Pnt P1 = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True)); (void)P1;
#endif
- BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True));
gp_Pnt P2 = BRep_Tool::Pnt(TopExp::LastVertex(E,Standard_True));
ex1.Init(mySbase, TopAbs_FACE);
TopoDS_Vertex theVertex;
if (DSS.IsDone()) {
// choose the solution closest to P2
Standard_Integer isol = 1;
- Standard_Real dss = P2.Distance(DSS.PointOnShape2(isol));
+ gp_Pnt Psol = DSS.PointOnShape2(isol);
+ Standard_Real dss = P2.Distance(Psol);
for (Standard_Integer iss=2; iss<=DSS.NbSolution(); iss++) {
- if (dss>P2.Distance(DSS.PointOnShape2(iss))) {
- dss = P2.Distance(DSS.PointOnShape2(iss));
- isol = iss;
- }
- }
+ gp_Pnt Pss = DSS.PointOnShape2(iss);
+ Standard_Real aDist = P2.Distance(Pss);
+ if (dss > aDist) {
+ dss = aDist;
+ isol = iss;
#ifdef OCCT_DEBUG
- gp_Pnt Psol =
+ Psol = Pss;
#endif
- DSS.PointOnShape2(isol);
+ }
+ }
+
// is the solution a new vertex ?
NewVertex = (DSS.SupportTypeShape2(isol) != BRepExtrema_IsVertex);
if (NewVertex) {
//-- Try to remote the first point of the current edge
//-- from the last saved point
#ifdef OCCT_DEBUG
- gp_Pnt2d Pnt2dDebutEdgeCourant=
+ gp_Pnt2d Pnt2dDebutEdgeCourant = C.Value(u); (void)Pnt2dDebutEdgeCourant;
#endif
- C.Value(u);
//Standard_Real Baillement2dU=0;
//Standard_Real Baillement2dV=0;
BinTools::GetReal(IS, X);
BinTools::GetReal(IS, Y);
BinTools::GetReal(IS, Z);
- myBuilder.MakeVertex(V,gp_Pnt(X,Y,Z),tol);
+ gp_Pnt aPnt (X, Y, Z);
+ myBuilder.MakeVertex (V, aPnt, tol);
Handle(BRep_TVertex) TV = Handle(BRep_TVertex)::DownCast(V.TShape());
BRep_ListOfPointRepresentation& lpr = TV->ChangePoints();
TopLoc_Location L;
Standard_Boolean aNewF = (myFormatNb > 2) ? Standard_True : Standard_False;
-#ifdef OCCT_DEBUG
- gp_Pnt aPnt = gp_Pnt(X,Y,Z);
-#endif
do {
if(aNewF) {
val = (Standard_Integer)IS.get();//case {0|1|2|3}
// Change guiedline on Bis2.
BisTemp = Bis2->ChangeGuide();
Guide = Bis2->Curve(2);
-#ifdef OCCT_DEBUG
+
+ // note: returned points are not used in the code, but can be useful for consulting in debugger
gp_Pnt2d P2S = Bis2->ValueAndDist(D2.FirstParameter(),U1,UMax,Dist);
gp_Pnt2d P2E = Bis2->ValueAndDist(D2.LastParameter() ,U1,UMin,Dist);
-#else
- Bis2->ValueAndDist(D2.FirstParameter(),U1,UMax,Dist);
- Bis2->ValueAndDist(D2.LastParameter() ,U1,UMin,Dist);
-#endif
+ (void)P2S;
+ (void)P2E;
+
// Calculate the domain of intersection on the guideline.
UMin = Max (D1.FirstParameter(),UMin);
UMax = Min (D1.LastParameter() ,UMax);
Arrive = Standard_True;
}
break;
-#ifndef OCCT_DEBUG
default:
break;
-#endif
}
if (Arrive) {
if (sens > 0.) {
// Define Environment Variable
- char *plugin, *casroot, *standard;
+ const char *plugin, *casroot, *standard;
plugin = getenv("CSF_PluginDefaults");
standard = getenv("CSF_StandardDefaults");
casroot = getenv("CASROOT");
TopTools_MapIteratorOfMapOfShape itm(MapOfE);
for ( ; itm.More(); itm.Next())
{
- Standard_Integer IndToReplace = myEMap.FindIndex(TopoDS::Edge(itm.Key()));
+ IndToReplace = myEMap.FindIndex(TopoDS::Edge(itm.Key()));
if ( IndToReplace )
{
Standard_Integer LInd = myEMap.Extent();
D1U.SquareMagnitude() + D1V.SquareMagnitude() > MagTol * MagTol)
{
// Use non-null derivative as normal direction in degenerated case.
- gp_Vec aNorm = D1U.SquareMagnitude() > MagTol * MagTol ? D1U : D1V;
+ aNorm = D1U.SquareMagnitude() > MagTol * MagTol ? D1U : D1V;
aNorm.Normalize();
P.SetXYZ(P.XYZ() + offsetValue * signe * aNorm.XYZ());
//derivee seconde du triedre
#ifdef OCCT_DEBUG
- gp_Vec DTDN = DTo.Crossed(DNormal);
-#else
- DTo.Crossed(DNormal);
+ gp_Vec DTDN = DTo.Crossed(DNormal); (void)DTDN;
#endif
Standard_Real TN2 = TN.SquareMagnitude();
myCoef->ChangeValue(1,1) = coeff;
}
-Plate_LinearScalarConstraint::Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& PPC,const TColgp_Array1OfXYZ& coeff)
+Plate_LinearScalarConstraint::Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& thePPC,const TColgp_Array1OfXYZ& theCoeff)
{
- if(coeff.Length()!= PPC.Length()) Standard_DimensionMismatch::Raise();
- myPPC = new Plate_HArray1OfPinpointConstraint(1,PPC.Length());
- myCoef = new TColgp_HArray2OfXYZ(1,1,1,coeff.Length());
+ if(theCoeff.Length()!= thePPC.Length()) Standard_DimensionMismatch::Raise();
+ myPPC = new Plate_HArray1OfPinpointConstraint(1, thePPC.Length());
+ myCoef = new TColgp_HArray2OfXYZ(1,1,1, theCoeff.Length());
- myPPC->ChangeArray1() = PPC;
- for(Standard_Integer i = 1; i<= coeff.Length(); i++) {
- myCoef->ChangeValue(1,i) = coeff(i+coeff.Lower()-1);
+ myPPC->ChangeArray1() = thePPC;
+ for(Standard_Integer i = 1; i<= theCoeff.Length(); i++) {
+ myCoef->ChangeValue(1,i) = theCoeff(i+ theCoeff.Lower()-1);
}
}
Plate_LinearScalarConstraint::Plate_LinearScalarConstraint
- (const Plate_Array1OfPinpointConstraint& PPC,const TColgp_Array2OfXYZ& coeff)
+ (const Plate_Array1OfPinpointConstraint& thePPC,const TColgp_Array2OfXYZ& theCoeff)
{
- if(coeff.RowLength()!= PPC.Length()) Standard_DimensionMismatch::Raise();
- myPPC = new Plate_HArray1OfPinpointConstraint(1,PPC.Length());
- myCoef = new TColgp_HArray2OfXYZ(1,coeff.ColLength(),1,coeff.RowLength());
+ if(theCoeff.RowLength()!= thePPC.Length()) Standard_DimensionMismatch::Raise();
+ myPPC = new Plate_HArray1OfPinpointConstraint(1, thePPC.Length());
+ myCoef = new TColgp_HArray2OfXYZ(1, theCoeff.ColLength(),1, theCoeff.RowLength());
- myPPC->ChangeArray1() = PPC;
- myCoef->ChangeArray2() = coeff;
+ myPPC->ChangeArray1() = thePPC;
+ myCoef->ChangeArray2() = theCoeff;
}
Standard_EXPORT Plate_LinearScalarConstraint();
- Standard_EXPORT Plate_LinearScalarConstraint(const Plate_PinpointConstraint& PPC1, const gp_XYZ& coeff);
+ Standard_EXPORT Plate_LinearScalarConstraint(const Plate_PinpointConstraint& thePPC1, const gp_XYZ& theCoeff);
- Standard_EXPORT Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& PPC, const TColgp_Array1OfXYZ& coeff);
+ Standard_EXPORT Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& thePPC, const TColgp_Array1OfXYZ& theCoeff);
- Standard_EXPORT Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& PPC, const TColgp_Array2OfXYZ& coeff);
+ Standard_EXPORT Plate_LinearScalarConstraint(const Plate_Array1OfPinpointConstraint& thePPC, const TColgp_Array2OfXYZ& theCoeff);
Standard_EXPORT Plate_LinearScalarConstraint(const Standard_Integer ColLen, const Standard_Integer RowLen);
Plate_LinearXYZConstraint::Plate_LinearXYZConstraint() {}
-Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& PPC,const TColStd_Array1OfReal& coeff)
+Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& thePPC,const TColStd_Array1OfReal& theCoeff)
{
- if(coeff.Length()!= PPC.Length()) Standard_DimensionMismatch::Raise();
- myPPC = new Plate_HArray1OfPinpointConstraint(1,PPC.Length());
- myCoef = new TColStd_HArray2OfReal(1,1,1,coeff.Length());
+ if(theCoeff.Length()!= thePPC.Length()) Standard_DimensionMismatch::Raise();
+ myPPC = new Plate_HArray1OfPinpointConstraint(1, thePPC.Length());
+ myCoef = new TColStd_HArray2OfReal(1,1,1, theCoeff.Length());
- myPPC->ChangeArray1() = PPC;
- for(Standard_Integer i = 1; i<= coeff.Length(); i++)
- myCoef->ChangeValue(1,i) = coeff(i+coeff.Lower()-1);
+ myPPC->ChangeArray1() = thePPC;
+ for(Standard_Integer i = 1; i<= theCoeff.Length(); i++)
+ myCoef->ChangeValue(1,i) = theCoeff(i+ theCoeff.Lower()-1);
}
-Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& PPC,const TColStd_Array2OfReal& coeff)
+Plate_LinearXYZConstraint::Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& thePPC,const TColStd_Array2OfReal& theCoeff)
{
- if(coeff.RowLength()!= PPC.Length()) Standard_DimensionMismatch::Raise();
- myPPC = new Plate_HArray1OfPinpointConstraint(1,PPC.Length());
- myCoef = new TColStd_HArray2OfReal(1,coeff.ColLength(),1,coeff.RowLength());
+ if(theCoeff.RowLength()!= thePPC.Length()) Standard_DimensionMismatch::Raise();
+ myPPC = new Plate_HArray1OfPinpointConstraint(1, thePPC.Length());
+ myCoef = new TColStd_HArray2OfReal(1, theCoeff.ColLength(),1, theCoeff.RowLength());
- myPPC->ChangeArray1() = PPC;
- myCoef->ChangeArray2() = coeff;
+ myPPC->ChangeArray1() = thePPC;
+ myCoef->ChangeArray2() = theCoeff;
}
Standard_EXPORT Plate_LinearXYZConstraint();
- Standard_EXPORT Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& PPC, const TColStd_Array1OfReal& coeff);
+ Standard_EXPORT Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& thePPC, const TColStd_Array1OfReal& theCoeff);
- Standard_EXPORT Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& PPC, const TColStd_Array2OfReal& coeff);
+ Standard_EXPORT Plate_LinearXYZConstraint(const Plate_Array1OfPinpointConstraint& thePPC, const TColStd_Array2OfReal& theCoeff);
Standard_EXPORT Plate_LinearXYZConstraint(const Standard_Integer ColLen, const Standard_Integer RowLen);
#include <DrawTrSurf.hxx>
#endif
#ifdef OCCT_DEBUG
-static Standard_Boolean AffichValue = Standard_False;
+//static Standard_Boolean AffichValue = Standard_False;
#endif
//=======================================================================
return 0;
}
-
-// normals ..
-static Standard_Integer normal(Draw_Interpretor& di, Standard_Integer n, const char** a)
-{
- if (n < 3) return 1;
- TopoDS_Shape aLocalShape = DBRep::Get(a[1]);
- TopoDS_Face f = TopoDS::Face(aLocalShape);
-// TopoDS_Face f = TopoDS::Face(DBRep::Get(a[1]));
- if (f.IsNull()) {di<<"null shape"<<"\n";return 1;}
- gp_Pnt p; DrawTrSurf::GetPoint(a[2], p);
-
- Standard_Real dist=0.; gp_Pnt2d uv; Standard_Boolean ok = FUN_tool_projPonF(p,f,uv,dist);
- if (!ok) {di<<"projection failed"<<"\n"; return 1;}
-#ifdef OCCT_DEBUG
- gp_Vec ngf =
-#endif
- FUN_tool_nggeomF(uv,f);
- TCollection_AsciiString aa("ngS");
-#ifdef DRAW
- FUN_tool_draw(aa,p,ngf,length);
-#endif
- return 0;
-}
-
static Standard_Integer curvature(Draw_Interpretor& di, Standard_Integer n, const char** a)
{
if (n < 5) return 1;
theCommands.Add("projponf",
"projponf f pnt [extrema flag: -min/-max/-minmax] [extrema algo: -g(grad)/-t(tree)]",
__FILE__, projponf, g);
- theCommands.Add("normal", "normal f p3d length", __FILE__, normal, g);
- theCommands.Add("curvature", "curvature f x y z", __FILE__, curvature , g);
-
+ theCommands.Add("curvature", "curvature f x y z", __FILE__, curvature , g);
}
TopOpeBRep_ShapeScanner.cxx
TopOpeBRep_ShapeScanner.hxx
TopOpeBRep_sort.cxx
-TopOpeBRep_tools.hxx
TopOpeBRep_trace.cxx
TopOpeBRep_traceALWL.cxx
TopOpeBRep_traceBOOPNINT.cxx
TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
TopAbs_Orientation FFori = FF.Orientation();
- TopAbs_Orientation EEori = EE.Orientation();
// --- Add <FF,EE> in BDS
Standard_Integer FFindex = BDS.AddShape(FF,1);
Standard_Real parE = FEINT.Parameter();
#ifdef OCCT_DEBUG
- TopOpeBRepDS_Transition TFF =
+ TopAbs_Orientation EEori = EE.Orientation();
+ TopOpeBRepDS_Transition TFF = FEINT.Transition(1,EEori); (void)TFF;
#endif
- FEINT.Transition(1,EEori); // EEori bidon = EXTERNAL
TopOpeBRepDS_Transition TEE = FEINT.Transition(2,FFori);
TEE.Index(FFindex);
+++ /dev/null
-// Created on: 1997-11-28
-// Created by: Jean Yves LEBEY
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _TopOpeBRep_tools_HeaderFile
-#define _TopOpeBRep_tools_HeaderFile
-
-#include <TopOpeBRepDS_tools.hxx>
-#endif
}
// step 2 : wait for the selection...
-// Standard_Boolean IsGood (Standard_False);
-// Standard_Integer NbPick(0);
- Standard_Boolean NbPickGood (0),NbToReach(arr->Length());
+ Standard_Integer NbPickGood (0),NbToReach(arr->Length());
Standard_Integer NbPickFail(0);
Standard_Integer argccc = 5;
const char *bufff[] = { "A", "B", "C","D", "E" };
while(NbPickGood<NbToReach && NbPickFail <= MaxPick){
while(ViewerMainLoop(argccc,argvvv)){}
Standard_Integer NbStored = TheAISContext()->NbSelected();
- if((unsigned int ) NbStored != NbPickGood)
+ if(NbStored != NbPickGood)
NbPickGood= NbStored;
else
NbPickFail++;
// step3 get result.
- if((unsigned int ) NbPickFail >= NbToReach) return Standard_False;
+ if (NbPickFail >= NbToReach)
+ return Standard_False;
Standard_Integer i(0);
for(TheAISContext()->InitSelected();
}
// step 2 : wait for the selection...
-
- Standard_Boolean NbPickGood (0),NbToReach(thearr->Length());
+ Standard_Integer NbPickGood (0),NbToReach(thearr->Length());
Standard_Integer NbPickFail(0);
Standard_Integer argccc = 5;
const char *bufff[] = { "A", "B", "C","D", "E" };
while(NbPickGood<NbToReach && NbPickFail <= MaxPick){
while(ViewerMainLoop(argccc,argvvv)){}
Standard_Integer NbStored = TheAISContext()->NbSelected();
- if((unsigned int ) NbStored != NbPickGood)
+ if (NbStored != NbPickGood)
NbPickGood= NbStored;
else
NbPickFail++;
// step3 get result.
- if((unsigned int ) NbPickFail >= NbToReach) return Standard_False;
+ if (NbPickFail >= NbToReach)
+ return Standard_False;
Standard_Integer i(0);
for(TheAISContext()->InitSelected();TheAISContext()->MoreSelected();TheAISContext()->NextSelected()){
gp_Pnt A=BRep_Tool::Pnt(aVertex1);
#ifdef OCCT_DEBUG
- gp_Pnt C = BRep_Tool::Pnt(aVertex2);
+ gp_Pnt C = BRep_Tool::Pnt(aVertex2); (void)C;
#endif
gp_Pnt aProjB = aDeltaVertexFace.Point(1);