//purpose : Inverses bytes in size_t type instance
//=======================================================================
+template<int size>
+inline Standard_Size InverseSizeSpecialized (const Standard_Size theValue, int);
+
+template<>
+inline Standard_Size InverseSizeSpecialized <4> (const Standard_Size theValue, int)
+{
+ return (0 | (( theValue & 0x000000ff ) << 24 )
+ | (( theValue & 0x0000ff00 ) << 8 )
+ | (( theValue & 0x00ff0000 ) >> 8 )
+ | (( theValue >> 24 ) & 0x000000ff ) );
+}
+
+template<>
+inline Standard_Size InverseSizeSpecialized <8> (const Standard_Size theValue, int)
+{
+ Standard_Size aResult;
+ Standard_Integer *i = (Standard_Integer*) &theValue;
+ Standard_Integer *j = (Standard_Integer*) &aResult;
+ j[1] = InverseInt (i[0]);
+ j[0] = InverseInt (i[1]);
+ return aResult;
+}
+
inline Standard_Size InverseSize (const Standard_Size theValue)
{
- if (sizeof(Standard_Size) == 4)
- return (0 | (( theValue & 0x000000ff ) << 24 )
- | (( theValue & 0x0000ff00 ) << 8 )
- | (( theValue & 0x00ff0000 ) >> 8 )
- | (( theValue >> 24 ) & 0x000000ff ) );
- else if (sizeof(Standard_Size) == 8) {
- Standard_Size aResult;
- Standard_Integer *i = (Standard_Integer*) &theValue;
- Standard_Integer *j = (Standard_Integer*) &aResult;
- j[1] = InverseInt (i[0]);
- j[0] = InverseInt (i[1]);
- return aResult;
- }
- else
- return 0;
+ return InverseSizeSpecialized <sizeof(Standard_Size)> (theValue, 0);
}
+
#endif
const Standard_Real Tol2d,
const Standard_Real Tol3d,
const Standard_Real TolAng,
- const Standard_Real TolCurv,
+ const Standard_Real /*TolCurv*/,
const Standard_Boolean Anisotropie ) :
mySurfInit(Surf),
myAnisotropie(Anisotropie),
GeomPlate_BuildPlateSurface::GeomPlate_BuildPlateSurface (
const Standard_Integer Degree,
const Standard_Integer NbPtsOnCur,
- const Standard_Integer NbIter,
- const Standard_Real Tol2d,
- const Standard_Real Tol3d,
- const Standard_Real TolAng,
- const Standard_Real TolCurv,
- const Standard_Boolean Anisotropie ) :
+ const Standard_Integer NbIter,
+ const Standard_Real Tol2d,
+ const Standard_Real Tol3d,
+ const Standard_Real TolAng,
+ const Standard_Real /*TolCurv*/,
+ const Standard_Boolean Anisotropie ) :
myAnisotropie(Anisotropie),
myDegree(Degree),
myNbPtsOnCur(NbPtsOnCur),
done = Standard_True;
Standard_Integer NbUOnS = TheSurfaceTool::NbUIntervals(surface,GeomAbs_C2);
Standard_Integer NbVOnS = TheSurfaceTool::NbVIntervals(surface,GeomAbs_C2);
-#ifdef ICS_DEB
- Standard_Integer NbOnC = TheCurveTool::NbIntervals(curve,GeomAbs_C2);
-#endif
Standard_Real U0,U1,V0,V1;
if(NbUOnS > 1) {
#define EPSX ParTool::EpsX(TheParCurve)
#define NB_ECHANTILLONS
-static Standard_Real PIpPI = M_PI + M_PI;
Standard_Integer i,Nbi,Nbp;
gp_Pnt ptdeb,ptfin;
- Standard_Real pardeb,parfin;
+ Standard_Real pardeb = 0., parfin = 0.;
Standard_Integer ideb,ifin,range,ranged,rangef;
Standard_Integer IntTools_EdgeFace::MakeType(IntTools_CommonPrt& aCommonPrt)
{
Standard_Real af1, al1;
- Standard_Real dt, df1, df2, tm;
+ Standard_Real df1, tm;
Standard_Boolean bAllNullFlag;
//
bAllNullFlag=aCommonPrt.AllNullFlag();
}
return 0;
}
- //
+
/*
dt=al1-af1;
if (dt<1.e-5) {
aCommonPrt.SetType(TopAbs_EDGE);
}
}
- */
-// return 0;
+
+ return 0;*/
}
const gp_Ax3 anAx3 (anEye, aProj, anXdir);
gp_Trsf aTrf;
aTrf.SetTransformation (anAx3);
- const gp_Trsf aTrfInv = aTrf.Inverted();
// Prepare list of 2d points of selection polygon.
NCollection_List<gp_XY> aPoints;
#ifdef WNT
#include <crtdbg.h>
+#if _MSC_VER == 1500 /* VS 2008 */
+
static long getRequestNum(void* pvData, long lRequest, size_t& theSize)
{
-#if _MSC_VER == 1500 /* VS 2008 */
-#ifdef _DEBUG /* in Release, _CrtIsValidHeapPointer is always 1 */
- if (_CrtIsValidHeapPointer(pvData))
+#ifdef _DEBUG /* protect against invalid pointer; in Release, _CrtIsValidHeapPointer is always 1 */
+ if (!_CrtIsValidHeapPointer(pvData))
+ return lRequest;
+#else
+ (void)lRequest; // avoid compiler warning on unused arg
#endif
- {
+
#define nNoMansLandSize 4
- // the header struct is taken from crt/src/dbgint.h
- struct _CrtMemBlockHeader
- {
+ // the header struct is taken from crt/src/dbgint.h
+ struct _CrtMemBlockHeader
+ {
#ifdef _WIN64
- int nBlockUse;
- size_t nDataSize;
+ int nBlockUse;
+ size_t nDataSize;
#else
- size_t nDataSize;
- int nBlockUse;
-#endif
- long lRequest;
- unsigned char gap[nNoMansLandSize];
- };
- _CrtMemBlockHeader* aHeader = ((_CrtMemBlockHeader*)pvData)-1;
- theSize = aHeader->nDataSize;
- return aHeader->lRequest;
- }
-#else
- (void)pvData; (void)theSize; // avoid compiler warning on unused arg
+ size_t nDataSize;
+ int nBlockUse;
#endif
+ long lRequest;
+ unsigned char gap[nNoMansLandSize];
+ };
+
+ _CrtMemBlockHeader* aHeader = ((_CrtMemBlockHeader*)pvData)-1;
+ theSize = aHeader->nDataSize;
+ return aHeader->lRequest;
+}
+
+#else /* _MSC_VER == 1500 */
+
+static long getRequestNum(void* /*pvData*/, long lRequest, size_t& /*theSize*/)
+{
return lRequest;
}
+#endif /* _MSC_VER == 1500 */
+
int __cdecl MyAllocHook(int nAllocType,
void * pvData,
size_t nSize,
ReleaseDC (aWindow, aWindowDC);
}
#else
- GLXDrawable aWindow = (GLXDrawable )myGlContext->myWindow;
Display* aDisplay = (Display* )myGlContext->myDisplay;
GLXContext aGContext = (GLXContext )myGlContext->myGContext;
myGlContext.Nullify();
}
-static Standard_Integer storage_divided = 0 ;
-static Standard_Real *divided_differences_array = NULL;
//=======================================================================
//function : This evaluates the lagrange polynomial and its derivatives
bsplc1->LastParameter() > l1 + Precision::PConfusion()) {
Handle(Geom_BSplineCurve) aBstmp = Handle(Geom_BSplineCurve)::DownCast(bsplc1->Copy());
aBstmp->Segment(f1,l1);
- gp_Pnt p1 = aBstmp->Pole(1);
- gp_Pnt p2 = aBstmp->Pole(aBstmp->NbPoles());
bsplc1 =aBstmp;
}
if(bsplc2->FirstParameter() < f2 - Precision::PConfusion() ||
bsplc2->LastParameter() > l2 + Precision::PConfusion()) {
Handle(Geom_BSplineCurve) aBstmp = Handle(Geom_BSplineCurve)::DownCast(bsplc2->Copy());
aBstmp->Segment(f2,l2);
- gp_Pnt p1 = aBstmp->Pole(1);
- gp_Pnt p2 = aBstmp->Pole(aBstmp->NbPoles());
bsplc2 =aBstmp;
}
gp_Pnt pmid = 0.5 * ( bsplc1->Pole(bsplc1->NbPoles()).XYZ() + bsplc2->Pole(1).XYZ() );
static Standard_Real tapp_angle = 1.e-2;
static GeomAbs_Shape blend_cont = GeomAbs_C1;
-static BRepFilletAPI_MakeFillet* Rakk = 0;
static BRepFilletAPI_MakeFillet* Rake = 0;
static char name[100];
// 2. find nearest group (aV1, aV3), reorganize ArI - nerest => top
gp_Pnt aDP1 = BRep_Tool::Pnt(TopoDS::Vertex(aV1));
- gp_Pnt aDP2 = BRep_Tool::Pnt(TopoDS::Vertex(aV2));
gp_Pnt aDP3 = BRep_Tool::Pnt(TopoDS::Vertex(aV3));
gp_Pnt aPnt = theAx.Location();
Standard_Real aD1 = aPnt.Distance(aDP1);//i1-i2-i3
if (apex) {
TopoDS_Vertex vf,vl; TopExp::Vertices(myEdge1,vf,vl);
gp_Pnt ptf = BRep_Tool::Pnt(vf); Standard_Real df = pt2.Distance(ptf);
- gp_Pnt ptl = BRep_Tool::Pnt(vl);
Standard_Real tolf = BRep_Tool::Tolerance(vf);
// Perspective
#include <OSD_Environment.hxx>
-static Standard_Boolean env_init = Standard_False;
static OSD_Environment env_walkthrow;
static Standard_Boolean Visual3dWalkthrow()
#define END_REF "END_REF"
#define REFERENCE_COUNTER "REFERENCE_COUNTER"
-static Standard_Integer myDocumentVersion = 0;
-
//#define TAKE_TIMES
static void take_time (const Standard_Integer, const char *,
const Handle(CDM_MessageDriver)&)