mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0024708: Convertation of the generic classes to the non-generic. Part 2
Generic classes from "AppParCurves" package: "AppDef_SmoothCriterion", "AppDef_LinearCriteria" and "AppDef_Variational" moved to the corresponding non-generic classes "AppDef_SmoothCriterion", "AppDef_LinearCriteria" and "AppDef_Variational" to "AppDef" package. Also several "*.cxx" files of "AppDef_Variational" class merged to one ".cxx". Generic class from "IntImp" package: "IntImp_ZerCOnSSParFunc" moved to the corresponding non-generic class "IntPatch_CSFunction" to "IntPatch" package. Next unused generic classes were removed: - IntCurveSurface_SurfaceTool - Intf_InterferencePolygon3d And some other minor changes.
This commit is contained in:
@@ -32,8 +32,6 @@ is
|
||||
|
||||
generic class ZerCSParFunc; -- inherits FunctionSetWithDerivatives
|
||||
|
||||
generic class ZerCOnSSParFunc; -- inherits FunctionSetWithDerivatives
|
||||
|
||||
generic class Int2S,TheFunction;
|
||||
|
||||
generic class IntCS;
|
||||
|
@@ -1,92 +0,0 @@
|
||||
-- Created on: 1994-02-14
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- Copyright (c) 1994-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 ZerCOnSSParFunc from IntImp
|
||||
(ThePSurface as any;
|
||||
ThePSurfaceTool as any;
|
||||
TheCurveOnSurf as any;
|
||||
TheCurveTool as any
|
||||
)
|
||||
|
||||
inherits FunctionSetWithDerivatives from math
|
||||
|
||||
---Purpose: this function is associated to the intersection between
|
||||
-- a curve on surface and a surface .
|
||||
|
||||
|
||||
uses Vector from math,
|
||||
Matrix from math,
|
||||
Pnt from gp
|
||||
|
||||
is
|
||||
Create( S1 : ThePSurface;
|
||||
C : TheCurveOnSurf;
|
||||
S2 : ThePSurface )
|
||||
|
||||
---Purpose: S1 is the surface on which the intersection is searched.
|
||||
-- C is a curve on the surface S2.
|
||||
|
||||
returns ZerCOnSSParFunc from IntImp;
|
||||
|
||||
|
||||
NbVariables(me) returns Integer from Standard
|
||||
is static;
|
||||
|
||||
NbEquations(me) returns Integer from Standard
|
||||
is static;
|
||||
|
||||
Value(me : in out; X : in Vector from math;
|
||||
F : out Vector from math)
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
Derivatives(me : in out;X : in Vector from math;
|
||||
D : out Matrix from math)
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
Values(me : in out;
|
||||
X : in Vector from math;
|
||||
F : out Vector from math; D: out Matrix from math)
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
Point(me)
|
||||
---C++: return const&
|
||||
returns Pnt from gp
|
||||
is static;
|
||||
|
||||
Root(me) returns Real from Standard
|
||||
is static;
|
||||
|
||||
AuxillarSurface(me)
|
||||
---C++: return const&
|
||||
returns ThePSurface
|
||||
is static;
|
||||
|
||||
AuxillarCurve(me)
|
||||
---C++: return const&
|
||||
returns TheCurveOnSurf
|
||||
is static;
|
||||
|
||||
fields
|
||||
curve : Address from Standard; --- TheCurveOnSurf;
|
||||
surface1 : Address from Standard; --- ThePSurface;
|
||||
surface2 : Address from Standard; --- ThePSurface;
|
||||
p : Pnt from gp;
|
||||
f : Real from Standard;
|
||||
|
||||
end ZerCOnSSParFunc;
|
@@ -1,127 +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 <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
|
||||
#ifndef DEB
|
||||
#define No_Standard_RangeError
|
||||
#define No_Standard_OutOfRange
|
||||
#endif
|
||||
|
||||
|
||||
#define SURFACE1 (*((ThePSurface *)(surface1)))
|
||||
#define SURFACE2 (*((ThePSurface *)(surface2)))
|
||||
#define CURVE (*((TheCurveOnSurf *)(curve)))
|
||||
|
||||
IntImp_ZerCOnSSParFunc::IntImp_ZerCOnSSParFunc(const ThePSurface& S1,
|
||||
const TheCurveOnSurf& C,
|
||||
const ThePSurface& S2)
|
||||
{
|
||||
surface1 = (Standard_Address)(&S1);
|
||||
surface2 = (Standard_Address)(&S2);
|
||||
curve = (Standard_Address)(&C);
|
||||
}
|
||||
|
||||
Standard_Integer IntImp_ZerCOnSSParFunc::NbVariables()const { return 3;}
|
||||
|
||||
Standard_Integer IntImp_ZerCOnSSParFunc::NbEquations()const { return 3;}
|
||||
|
||||
Standard_Boolean IntImp_ZerCOnSSParFunc::Value(const math_Vector& X,
|
||||
math_Vector& F){
|
||||
|
||||
gp_Pnt Psurf(ThePSurfaceTool::Value(SURFACE1,X(1),X(2)));
|
||||
gp_Pnt2d p2d(TheCurveTool::Value(CURVE,X(3)));
|
||||
gp_Pnt Pcurv(ThePSurfaceTool::Value(SURFACE2,p2d.X(),p2d.Y()));
|
||||
|
||||
F(1) = Psurf.X()-Pcurv.X();
|
||||
F(2) = Psurf.Y()-Pcurv.Y();
|
||||
F(3) = Psurf.Z()-Pcurv.Z();
|
||||
f = F(1)*F(1)+ F(2)*F(2)+ F(3)*F(3);
|
||||
p = gp_Pnt((Psurf.XYZ()+Pcurv.XYZ())/2.);
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
Standard_Boolean IntImp_ZerCOnSSParFunc::Derivatives ( const math_Vector& X,
|
||||
math_Matrix& D) {
|
||||
gp_Pnt Psurf,Pcurv;
|
||||
gp_Vec D1u,D1v,D1w;
|
||||
gp_Pnt2d p2d;
|
||||
gp_Vec2d d2d;
|
||||
gp_Vec d1u,d1v;
|
||||
|
||||
ThePSurfaceTool::D1(SURFACE1,X(1),X(2),Psurf,D1u,D1v);
|
||||
TheCurveTool::D1(CURVE,X(3),p2d,d2d);
|
||||
ThePSurfaceTool::D1(SURFACE2,p2d.X(),p2d.Y(),Pcurv,d1u,d1v);
|
||||
D1w.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v);
|
||||
|
||||
D(1,1) = D1u.X();
|
||||
D(1,2) = D1v.X();
|
||||
D(1,3) = -D1w.X();
|
||||
D(2,1) = D1u.Y();
|
||||
D(2,2) = D1v.Y();
|
||||
D(2,3) = -D1w.Y();
|
||||
D(3,1) = D1u.Z();
|
||||
D(3,2) = D1v.Z();
|
||||
D(3,3) = -D1w.Z();
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
Standard_Boolean IntImp_ZerCOnSSParFunc::Values( const math_Vector& X,
|
||||
math_Vector& F,
|
||||
math_Matrix& D) {
|
||||
gp_Pnt Psurf,Pcurv;
|
||||
gp_Vec D1u,D1v,D1w;
|
||||
|
||||
gp_Pnt2d p2d;
|
||||
gp_Vec2d d2d;
|
||||
gp_Vec d1u,d1v;
|
||||
|
||||
ThePSurfaceTool::D1(SURFACE1,X(1),X(2),Psurf,D1u,D1v);
|
||||
TheCurveTool::D1(CURVE,X(3),p2d,d2d);
|
||||
ThePSurfaceTool::D1(SURFACE2,p2d.X(),p2d.Y(),Pcurv,d1u,d1v);
|
||||
D1w.SetLinearForm(d2d.X(),d1u,d2d.Y(),d1v);
|
||||
|
||||
D(1,1) = D1u.X();
|
||||
D(1,2) = D1v.X();
|
||||
D(1,3) = -D1w.X();
|
||||
D(2,1) = D1u.Y();
|
||||
D(2,2) = D1v.Y();
|
||||
D(2,3) = -D1w.Y();
|
||||
D(3,1) = D1u.Z();
|
||||
D(3,2) = D1v.Z();
|
||||
D(3,3) = -D1w.Z();
|
||||
F(1) = Psurf.X()-Pcurv.X();
|
||||
F(2) = Psurf.Y()-Pcurv.Y();
|
||||
F(3) = Psurf.Z()-Pcurv.Z();
|
||||
f = F(1)*F(1)+ F(2)*F(2)+ F(3)*F(3);
|
||||
p = gp_Pnt((Psurf.XYZ()+Pcurv.XYZ())/2.);
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
const gp_Pnt& IntImp_ZerCOnSSParFunc::Point() const { return p;}
|
||||
|
||||
Standard_Real IntImp_ZerCOnSSParFunc::Root() const { return f;}
|
||||
|
||||
const ThePSurface& IntImp_ZerCOnSSParFunc::AuxillarSurface() const {
|
||||
return SURFACE1;}
|
||||
|
||||
const TheCurveOnSurf& IntImp_ZerCOnSSParFunc::AuxillarCurve() const {
|
||||
return CURVE;}
|
||||
|
||||
#undef SURFACE1
|
||||
#undef SURFACE2
|
||||
#undef CURVE
|
Reference in New Issue
Block a user