1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0024660: Removing unused "generic" classes. Part 1

In scope of this issue next unused generic classes will be removed:

1) AppBlend_Line

2) AppBlend_SectionGenerator

3) AppCont_SurfLeastSquare

4) AppCont_TheLineTool

5) AppCont_TheSurfTool

6) AppParCurves_MLineToo

7) AppParCurves_Projection

8) ApproxInt_WLine

9) Approx_ComputeCSurface

10) Approx_TheLineTool

11) Blend_Iterator

12) Contap_ArcTool

13) Contap_SurfaceTool

14) Contap_TopolTool

15) Dynamic_EnumerationParameter

16) Dynamic_MethodInstance

17) Extrema_ExtPSOfRev

18) GProp_CurveTool

19) GProp_DomainTool

20) GProp_FaceTool
This commit is contained in:
dln
2014-02-18 12:44:54 +04:00
committed by apn
parent 67e1d45b60
commit 89f18cb939
64 changed files with 22 additions and 3522 deletions

View File

@@ -52,13 +52,7 @@ enumeration Status is
PointsAdded,
NoPointsAdded,
NoApproximation
end;
deferred generic class TheLineTool; ---Template
---Purpose: This template is different from the one of AppParCurves.
-- In this case, it is possible to insert new points
-- during the approximation with ComputeLine.
end;
---------------------------------------------
@@ -73,14 +67,6 @@ end;
---Purpose: Approximate a continous MultiLine with a cutting.
-- The Tool of the line is the tool from AppCont.
generic class ComputeCSurface, MySLeastSquare;
---Purpose: Approximate a continous Surface with or without cutting.
-- The tool is the tool of AppCont.
----------------------------------------------
---Algorithms for BSpline curves construction:
----------------------------------------------

View File

@@ -16,7 +16,7 @@
generic class BSplComputeLine from Approx
(MultiLine as any;
LineTool as any) --as TheLineTool(MultiLine)
LineTool as any)

View File

@@ -16,7 +16,7 @@
generic class ComputeCLine from Approx
(MultiLine as any;
LineTool as any) --as TheLineTool from AppCont(MultiLine)
LineTool as any)
uses ParametrizationType from Approx,

View File

@@ -1,162 +0,0 @@
-- Created on: 1993-09-09
-- Created by: Modelistation
-- Copyright (c) 1993-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.
generic class ComputeCSurface from Approx
(Surface as any;
SurfaceTool as any) --as TheLineTool from AppCont(MultiLine)
uses SequenceOfReal from TColStd,
HArray1OfReal from TColStd,
SequenceOfSurface from TColGeom,
BezierSurface from Geom,
Constraint from AppParCurves
private class MySLeastSquare instantiates SurfLeastSquare from AppCont
(Surface,
SurfaceTool);
is
Create(Surf: Surface;
degreemin: Integer = 4;
degreemax: Integer = 8;
Tolerance3d: Real = 1.0e-3;
FirstCons: Constraint = AppParCurves_TangencyPoint;
LastUCons: Constraint = AppParCurves_TangencyPoint;
LastVCons: Constraint = AppParCurves_TangencyPoint;
LastCons: Constraint = AppParCurves_TangencyPoint;
cutting: Boolean = Standard_False)
---Purpose: The Surface <Surface> will be approximated until tolerances
-- will be reached.
-- The approximation will be done from degreemin to degreemax
-- with a cutting if the corresponding boolean is True.
returns ComputeCSurface;
Create(degreemin: Integer = 3;
degreemax: Integer = 8;
Tolerance3d: Real = 1.0e-03;
FirstCons: Constraint = AppParCurves_TangencyPoint;
LastUCons: Constraint = AppParCurves_TangencyPoint;
LastVCons: Constraint = AppParCurves_TangencyPoint;
LastCons: Constraint = AppParCurves_TangencyPoint;
cutting: Boolean = Standard_False)
---Purpose: Initializes the fields of the algorithm.
returns ComputeCSurface;
Perform(me: in out; Surf: Surface)
---Purpose: runs the algorithm after having initialized the fields.
is static;
Compute(me: in out; Surf: Surface; Ufirst, Ulast, Vfirst, Vlast: Real;
TheTol3d: in out Real)
---Purpose: is internally used by the algorithms.
returns Boolean
is static private;
SetDegrees(me: in out; degreemin, degreemax: Integer)
---Purpose: changes the degrees of the approximation.
is static;
SetTolerance(me: in out; Tolerance3d: Real)
---Purpose: Changes the tolerances of the approximation.
is static;
IsAllApproximated(me)
---Purpose: returns False if at a moment of the approximation,
-- NotDone was sent.
returns Boolean
is static;
IsToleranceReached(me)
---Purpose: returns False if the status no cut has been done
-- if necessary.
returns Boolean
is static;
Error(me; Index: Integer)
---Purpose: returns the tolerance of the <Index> approximated Surface.
returns Real
is static;
NbSurfaces(me)
---Purpose: Returns the number of Bezier Surfaces doing the
-- approximation of the Surface.
returns Integer
is static;
Value(me; Index: Integer = 1)
---Purpose: returns the approximation Surface of range <Index>.
returns BezierSurface from Geom;
Parameters(me; Index: Integer; firstU, lastU, firstV, lastV: in out Real)
---purpose: returns the first and last parameters of the
-- <Index> Surface.
is static;
fields
mySurfaces: SequenceOfSurface from TColGeom;
myfirstUparam: SequenceOfReal from TColStd;
mylastUparam: SequenceOfReal from TColStd;
myfirstVparam: SequenceOfReal from TColStd;
mylastVparam: SequenceOfReal from TColStd;
TheSurface: BezierSurface from Geom;
alldone: Boolean;
tolreached: Boolean;
Tolers3d: SequenceOfReal from TColStd;
mydegremin: Integer;
mydegremax: Integer;
mytol3d: Real;
currenttol3d: Real;
mycut: Boolean;
myfirstUCons: Constraint;
mylastUCons: Constraint;
mylastVCons: Constraint;
mylastCons: Constraint;
end ComputeCSurface;

View File

@@ -1,245 +0,0 @@
// Copyright (c) 1995-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.
#include <Precision.hxx>
#include <TColStd_Array2OfReal.hxx>
Approx_ComputeCSurface::Approx_ComputeCSurface(
const Surface& Surf,
const Standard_Integer degreemin,
const Standard_Integer degreemax,
const Standard_Real Tolerance3d,
const AppParCurves_Constraint FirstCons,
const AppParCurves_Constraint LastUCons,
const AppParCurves_Constraint LastVCons,
const AppParCurves_Constraint LastCons,
const Standard_Boolean cutting)
{
mydegremin = degreemin;
mydegremax = degreemax;
mytol3d = Tolerance3d;
myfirstUCons = FirstCons;
mylastUCons = LastUCons;
mylastVCons = LastVCons;
mylastCons = LastCons;
mycut = cutting;
Perform(Surf);
}
Approx_ComputeCSurface::Approx_ComputeCSurface(
const Standard_Integer degreemin,
const Standard_Integer degreemax,
const Standard_Real Tolerance3d,
const AppParCurves_Constraint FirstCons,
const AppParCurves_Constraint LastUCons,
const AppParCurves_Constraint LastVCons,
const AppParCurves_Constraint LastCons,
const Standard_Boolean cutting)
{
mydegremin = degreemin;
mydegremax = degreemax;
mytol3d = Tolerance3d;
myfirstUCons = FirstCons;
mylastUCons = LastUCons;
mylastVCons = LastVCons;
mylastCons = LastCons;
mycut = cutting;
}
void Approx_ComputeCSurface::Perform(const Surface& Surf)
{
Standard_Real UFirst, ULast, VFirst, VLast;
UFirst = SurfaceTool::FirstUParameter(Surf);
ULast = SurfaceTool::LastUParameter(Surf);
VFirst = SurfaceTool::FirstVParameter(Surf);
VLast = SurfaceTool::LastVParameter(Surf);
Standard_Boolean Finish = Standard_False,
begin = Standard_True, Ok = Standard_False;
Standard_Real thetol3d;
Standard_Real myfirstU = UFirst, mylastU = ULast;
Standard_Real myfirstV = VFirst, mylastV = VLast;
Standard_Integer i;
TColStd_Array2OfReal Error(1, 50, 1, 50); // pour l instant
if (!mycut) {
alldone = Compute(Surf, UFirst, ULast, VFirst, VLast, thetol3d);
if (!alldone) {
tolreached = Standard_False;
mySurfaces.Append(TheSurface);
Tolers3d.Append(thetol3d);
myfirstUparam.Append(UFirst);
mylastUparam.Append(ULast);
myfirstVparam.Append(VFirst);
mylastVparam.Append(VLast);
}
}
else { // gestion du decoupage:
TColStd_SequenceOfReal TheU, TheV;
TheU.Append(UFirst);
TheU.Append(ULast);
TheV.Append(VFirst);
TheV.Append(VLast);
while (!Finish) {
Ok = Compute(Surf, myfirstU, mylastU, myfirstV, mylastV, thetol3d);
if (Ok) {
if (Abs(ULast-mylastU) <= Precision::PConfusion() &&
Abs(VLast-mylastV) <= Precision::PConfusion()) {
Finish = Standard_True;
alldone = Standard_True;
return;
}
myfirstU = mylastU;
mylastU = ULast;
}
else {
// choix du decoupage en u ou en v:
// si debut, en u:
if (begin) {
begin = Standard_False;
mylastU = (myfirstU + mylastU)/2.;
TheU.InsertAfter(1, mylastU);
Error.SetValue(1, 1, currenttol3d);
}
else {
Standard_Real tolu, tolv;
for (i = 1; i <= TheU.Length(); i++) {
}
}
}
}
}
}
Standard_Boolean Approx_ComputeCSurface::Compute(const Surface& Surf,
const Standard_Real Ufirst,
const Standard_Real Ulast,
const Standard_Real Vfirst,
const Standard_Real Vlast,
Standard_Real& TheTol3d)
{
Standard_Integer NbPoints = 12; // 12 * 12 sur la surface.
Standard_Integer degu, degv;
Standard_Real Fv;
for (degu = mydegremin; degu <= mydegremax; degu++) {
for (degv = mydegremin; degv <= mydegremax; degv++) {
Approx_MySLeastSquare LSQ(Surf, Ufirst, Ulast, Vfirst, Vlast,
myfirstUCons, mylastUCons,
mylastVCons, mylastCons,
degu, degv, NbPoints);
LSQ.Error(Fv, TheTol3d);
if (TheTol3d <= mytol3d) {
TheSurface = LSQ.Value();
mySurfaces.Append(TheSurface);
tolreached = Standard_True;
Tolers3d.Append(TheTol3d);
currenttol3d = TheTol3d;
myfirstUparam.Append(Ufirst);
mylastUparam.Append(Ulast);
myfirstVparam.Append(Vfirst);
mylastVparam.Append(Vlast);
return Standard_True;
}
if (degu == mydegremax && degv == mydegremax) {
TheSurface = LSQ.Value();
tolreached = Standard_False;
currenttol3d = TheTol3d;
}
}
}
return Standard_False;
}
Standard_Real Approx_ComputeCSurface::Error(const Standard_Integer Index)const
{
return Tolers3d.Value(Index);
}
Handle(Geom_BezierSurface) Approx_ComputeCSurface::Value(const Standard_Integer Index)const
{
return Handle(Geom_BezierSurface)::DownCast(mySurfaces.Value(Index));
}
Standard_Integer Approx_ComputeCSurface::NbSurfaces() const
{
return mySurfaces.Length();
}
void Approx_ComputeCSurface::Parameters(const Standard_Integer Index,
Standard_Real& firstU,
Standard_Real& lastU,
Standard_Real& firstV,
Standard_Real& lastV)const
{
firstU = myfirstUparam.Value(Index);
lastU = mylastUparam.Value(Index);
firstV = myfirstVparam.Value(Index);
lastV = mylastVparam.Value(Index);
}
Standard_Boolean Approx_ComputeCSurface::IsToleranceReached() const
{
return tolreached;
}
Standard_Boolean Approx_ComputeCSurface::IsAllApproximated() const
{
return alldone;
}
void Approx_ComputeCSurface::SetDegrees(const Standard_Integer degreemin,
const Standard_Integer degreemax)
{
mydegremin = degreemin;
mydegremax = degreemax;
}
void Approx_ComputeCSurface::SetTolerance(const Standard_Real Tolerance3d)
{
mytol3d = Tolerance3d;
}

View File

@@ -16,7 +16,7 @@
generic class ComputeLine from Approx
(MultiLine as any;
LineTool as any) --as TheLineTool(MultiLine)
LineTool as any)
uses ParametrizationType from Approx,

View File

@@ -1,106 +0,0 @@
-- Created on: 1993-01-26
-- Created by: Laurent PAINNOT
-- Copyright (c) 1993-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.
deferred generic class TheLineTool from Approx (MLine as any;
MPoint as any)
---Purpose: Template which defines all the services relative to
-- a MultiLine for approximation algorithms.
uses Status from Approx,
Pnt from gp,
Pnt2d from gp,
Vec from gp,
Vec2d from gp,
Array1OfPnt from TColgp,
Array1OfPnt2d from TColgp,
Array1OfVec from TColgp,
Array1OfVec2d from TColgp
is
FirstPoint(myclass; ML: MLine) returns Integer;
---Purpose: Returns the first index of multipoints of the MLine.
LastPoint(myclass; ML: MLine) returns Integer;
---Purpose: Returns the last index of multipoints of the MLine.
NbP2d(myclass; ML: MLine) returns Integer;
---Purpose: Returns the number of 2d points of a MLine.
NbP3d(myclass; ML: MLine) returns Integer;
---Purpose: Returns the number of 3d points of a MLine.
Value(myclass; ML: MLine; MPointIndex: Integer; tabPt: out Array1OfPnt);
---Purpose: returns the 3d points of the multipoint <MPointIndex>
-- when only 3d points exist.
Value(myclass; ML: MLine; MPointIndex: Integer;
tabPt2d: out Array1OfPnt2d);
---Purpose: returns the 2d points of the multipoint <MPointIndex>
-- when only 2d points exist.
Value(myclass; ML: MLine; MPointIndex: Integer;
tabPt: out Array1OfPnt; tabPt2d: out Array1OfPnt2d);
---Purpose: returns the 3d and 2d points of the multipoint
-- <MPointIndex>.
Tangency(myclass; ML: MLine; MPointIndex: Integer; tabV: out Array1OfVec)
returns Boolean;
---Purpose: returns the 3d derivative values of the multipoint
-- <MPointIndex> when only 3d points exist.
Tangency(myclass; ML: MLine; MPointIndex: Integer;
tabV2d: out Array1OfVec2d)
returns Boolean;
---Purpose: returns the 2d derivative values of the multipoint
-- <MPointIndex> only when 2d points exist.
Tangency(myclass; ML: MLine; MPointIndex: Integer;
tabV: out Array1OfVec; tabV2d: out Array1OfVec2d)
returns Boolean;
---Purpose: returns the 3d and 2d derivative values of the multipoint
-- <MPointIndex>.
WhatStatus(myclass; ML: MLine; I1, I2: Integer)
returns Status from Approx;
---Purpose: . if Status = PointsAdded, a new MLine is created between
-- the two MPoints <I1> and <I2> of ML by MakeMLBetween.
-- . if Status = NoPointsAdded, no MLine will be created.
-- The algorithm will return the best approximation done.
-- . if Status = NoApproximation, nothing will be
-- done between <I1> and <I2>.
MakeMLBetween(myclass; ML: MLine; I1, I2: Integer;
NbPMin: Integer)
returns MLine;
---Purpose: Is called if WhatStatus returned "PointsAdded".
end TheLineTool;

View File

@@ -1,13 +0,0 @@
// Copyright (c) 1995-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.