mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
@@ -1,86 +0,0 @@
|
||||
-- Created on: 1993-12-02
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- 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.
|
||||
|
||||
package Blend
|
||||
|
||||
uses IntSurf,
|
||||
TColgp,
|
||||
TColStd,
|
||||
Adaptor2d,
|
||||
gp,
|
||||
TopAbs,
|
||||
math,
|
||||
TCollection,
|
||||
MMgt,
|
||||
StdFail,
|
||||
GeomAbs
|
||||
|
||||
is
|
||||
|
||||
-- deferred generic class SurfaceTool;
|
||||
|
||||
|
||||
deferred class AppFunction; -- inherits FunctionSetWithDerivatives from math
|
||||
|
||||
deferred class Function; -- inherits AppFunction from Blend
|
||||
|
||||
deferred class FuncInv; -- inherits FunctionSetWithDerivatives from math
|
||||
|
||||
deferred class CSFunction; -- inherits AppFunction from Blend
|
||||
|
||||
deferred class SurfRstFunction; -- inherits AppFunction from Blend
|
||||
|
||||
deferred class SurfPointFuncInv; -- inherits FunctionSetWithDerivatives from math
|
||||
|
||||
deferred class SurfCurvFuncInv; -- inherits FunctionSetWithDerivatives from math
|
||||
|
||||
deferred class RstRstFunction; -- inherits AppFunction from Blend
|
||||
|
||||
deferred class CurvPointFuncInv; -- inherits FunctionSetWithDerivatives from math
|
||||
|
||||
|
||||
|
||||
class Point;
|
||||
|
||||
generic class Walking;
|
||||
|
||||
generic class CSWalking;
|
||||
|
||||
|
||||
imported SequenceOfPoint;
|
||||
|
||||
enumeration Status is
|
||||
StepTooLarge,
|
||||
StepTooSmall,
|
||||
Backward,
|
||||
SamePoints,
|
||||
OnRst1,
|
||||
OnRst2,
|
||||
OnRst12,
|
||||
OK
|
||||
end Status;
|
||||
|
||||
|
||||
enumeration DecrochStatus is
|
||||
NoDecroch,
|
||||
DecrochRst1,
|
||||
DecrochRst2,
|
||||
DecrochBoth
|
||||
end Status;
|
||||
|
||||
|
||||
|
||||
end Blend;
|
@@ -1,266 +0,0 @@
|
||||
-- Created on: 1993-09-13
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- 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 class AppFunction from Blend
|
||||
|
||||
inherits FunctionSetWithDerivatives from math
|
||||
|
||||
---Purpose: Deferred class for a function used to compute a blending
|
||||
-- surface between two surfaces, using a guide line.
|
||||
-- The vector <X> used in Value, Values and Derivatives methods
|
||||
-- has to be the vector of the parametric coordinates U1,V1,
|
||||
-- U2,V2, of the extremities of a section on the first and
|
||||
-- second surface.
|
||||
|
||||
uses Vector from math,
|
||||
Matrix from math,
|
||||
Pnt from gp,
|
||||
Shape from GeomAbs,
|
||||
Point from Blend,
|
||||
Array1OfPnt from TColgp,
|
||||
Array1OfVec from TColgp,
|
||||
Array1OfPnt2d from TColgp,
|
||||
Array1OfVec2d from TColgp,
|
||||
Array1OfReal from TColStd,
|
||||
Array1OfInteger from TColStd
|
||||
|
||||
|
||||
|
||||
raises DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: returns the number of variables of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns the number of equations of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Set(me: in out; Param: Real from Standard)
|
||||
|
||||
---Purpose: Sets the value of the parameter along the guide line.
|
||||
-- This determines the plane in which the solution has
|
||||
-- to be found.
|
||||
|
||||
is deferred;
|
||||
|
||||
Set(me: in out; First, Last: Real from Standard)
|
||||
|
||||
---Purpose: Sets the bounds of the parametric interval on
|
||||
-- the guide line.
|
||||
-- This determines the derivatives in these values if the
|
||||
-- function is not Cn.
|
||||
is deferred;
|
||||
|
||||
|
||||
GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
|
||||
|
||||
---Purpose: Returns in the vector Tolerance the parametric tolerance
|
||||
-- for each of the 4 variables;
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
GetBounds(me; InfBound,SupBound: out Vector from math)
|
||||
|
||||
---Purpose: Returns in the vector InfBound the lowest values allowed
|
||||
-- for each of the 4 variables.
|
||||
-- Returns in the vector SupBound the greatest values allowed
|
||||
-- for each of the 4 variables.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns Standard_True if Sol is a zero of the function.
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
-- The computation is made at the current value of
|
||||
-- the parameter on the guide line.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
GetMinimalDistance(me)
|
||||
---Purpose: Returns the minimal Distance beetween two
|
||||
-- extremitys of calculed sections.
|
||||
returns Real from Standard
|
||||
is deferred;
|
||||
|
||||
Pnt1(me)
|
||||
---Purpose: Returns the point on the first support.
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is deferred;
|
||||
|
||||
Pnt2(me)
|
||||
---Purpose: Returns the point on the first support.
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is deferred;
|
||||
|
||||
-- Methods for the approximation
|
||||
--
|
||||
IsRational(me) returns Boolean
|
||||
---Purpose: Returns if the section is rationnal
|
||||
is deferred;
|
||||
|
||||
GetSectionSize(me) returns Real
|
||||
---Purpose: Returns the length of the maximum section
|
||||
is deferred;
|
||||
|
||||
GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
|
||||
---Purpose: Compute the minimal value of weight for each poles
|
||||
-- of all sections.
|
||||
is deferred;
|
||||
|
||||
NbIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of intervals for continuity
|
||||
-- <S>. May be one if Continuity(me) >= <S>
|
||||
is deferred;
|
||||
|
||||
Intervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
--
|
||||
-- The array must provide enough room to accomodate
|
||||
-- for the parameters. i.e. T.Length() > NbIntervals()
|
||||
-- raises
|
||||
-- OutOfRange from Standard
|
||||
is deferred;
|
||||
|
||||
GetShape(me: in out;
|
||||
NbPoles : out Integer from Standard;
|
||||
NbKnots : out Integer from Standard;
|
||||
Degree : out Integer from Standard;
|
||||
NbPoles2d : out Integer from Standard)
|
||||
|
||||
is deferred;
|
||||
|
||||
GetTolerance(me;
|
||||
BoundTol, SurfTol, AngleTol : Real;
|
||||
Tol3d : out Vector;
|
||||
Tol1D : out Vector )
|
||||
---Purpose: Returns the tolerance to reach in approximation
|
||||
-- to respecte
|
||||
-- BoundTol error at the Boundary
|
||||
-- AngleTol tangent error at the Boundary
|
||||
-- SurfTol error inside the surface.
|
||||
is deferred;
|
||||
|
||||
Knots(me: in out; TKnots: out Array1OfReal from TColStd)
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Mults(me: in out; TMults: out Array1OfInteger from TColStd)
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd)
|
||||
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False.
|
||||
|
||||
returns Boolean from Standard
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd)
|
||||
is deferred;
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
D2Poles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
D2Poles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd;
|
||||
D2Weigths : out Array1OfReal from TColStd)
|
||||
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False.
|
||||
|
||||
returns Boolean from Standard
|
||||
|
||||
is deferred;
|
||||
|
||||
Resolution(me;
|
||||
IC2d : Integer from Standard;
|
||||
Tol : Real from Standard;
|
||||
TolU, TolV : out Real from Standard)
|
||||
is deferred;
|
||||
|
||||
-- Static function for approx
|
||||
Parameter(me; P: Point from Blend)
|
||||
---Purpose: Returns the parameter of the point P. Used to
|
||||
-- impose the parameters in the approximation.
|
||||
returns Real from Standard
|
||||
is static;
|
||||
|
||||
|
||||
end AppFunction;
|
@@ -12,14 +12,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_AppFunction.ixx>
|
||||
|
||||
#include <Blend_AppFunction.hxx>
|
||||
#include <Blend_Point.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Parameter
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Real Blend_AppFunction::Parameter(const Blend_Point& P) const
|
||||
{
|
||||
return P.Parameter();
|
||||
|
194
src/Blend/Blend_AppFunction.hxx
Normal file
194
src/Blend/Blend_AppFunction.hxx
Normal file
@@ -0,0 +1,194 @@
|
||||
// Created on: 1993-09-13
|
||||
// Created by: Jacques GOUSSARD
|
||||
// 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.
|
||||
|
||||
#ifndef _Blend_AppFunction_HeaderFile
|
||||
#define _Blend_AppFunction_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <math_FunctionSetWithDerivatives.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfVec.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_Array1OfVec2d.hxx>
|
||||
class Standard_DomainError;
|
||||
class math_Matrix;
|
||||
class gp_Pnt;
|
||||
class Blend_Point;
|
||||
|
||||
|
||||
//! Deferred class for a function used to compute a blending
|
||||
//! surface between two surfaces, using a guide line.
|
||||
//! The vector <X> used in Value, Values and Derivatives methods
|
||||
//! has to be the vector of the parametric coordinates U1,V1,
|
||||
//! U2,V2, of the extremities of a section on the first and
|
||||
//! second surface.
|
||||
class Blend_AppFunction : public math_FunctionSetWithDerivatives
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! returns the number of variables of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbVariables() const = 0;
|
||||
|
||||
//! returns the number of equations of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbEquations() const = 0;
|
||||
|
||||
//! computes the values <F> of the Functions for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) = 0;
|
||||
|
||||
//! returns the values <D> of the derivatives for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) = 0;
|
||||
|
||||
//! returns the values <F> of the functions and the derivatives
|
||||
//! <D> for the variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0;
|
||||
|
||||
//! Sets the value of the parameter along the guide line.
|
||||
//! This determines the plane in which the solution has
|
||||
//! to be found.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real Param) = 0;
|
||||
|
||||
//! Sets the bounds of the parametric interval on
|
||||
//! the guide line.
|
||||
//! This determines the derivatives in these values if the
|
||||
//! function is not Cn.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real First, const Standard_Real Last) = 0;
|
||||
|
||||
//! Returns in the vector Tolerance the parametric tolerance
|
||||
//! for each of the 4 variables;
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const = 0;
|
||||
|
||||
//! Returns in the vector InfBound the lowest values allowed
|
||||
//! for each of the 4 variables.
|
||||
//! Returns in the vector SupBound the greatest values allowed
|
||||
//! for each of the 4 variables.
|
||||
Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const = 0;
|
||||
|
||||
//! Returns Standard_True if Sol is a zero of the function.
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
//! The computation is made at the current value of
|
||||
//! the parameter on the guide line.
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) = 0;
|
||||
|
||||
//! Returns the minimal Distance beetween two
|
||||
//! extremitys of calculed sections.
|
||||
Standard_EXPORT virtual Standard_Real GetMinimalDistance() const = 0;
|
||||
|
||||
//! Returns the point on the first support.
|
||||
Standard_EXPORT virtual const gp_Pnt& Pnt1() const = 0;
|
||||
|
||||
//! Returns the point on the first support.
|
||||
Standard_EXPORT virtual const gp_Pnt& Pnt2() const = 0;
|
||||
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const = 0;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
Standard_EXPORT virtual Standard_Real GetSectionSize() const = 0;
|
||||
|
||||
//! Compute the minimal value of weight for each poles
|
||||
//! of all sections.
|
||||
Standard_EXPORT virtual void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const = 0;
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
//! <S>. May be one if Continuity(me) >= <S>
|
||||
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const = 0;
|
||||
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! of continuity <S>.
|
||||
//!
|
||||
//! The array must provide enough room to accomodate
|
||||
//! for the parameters. i.e. T.Length() > NbIntervals()
|
||||
//! raises
|
||||
//! OutOfRange from Standard
|
||||
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) = 0;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False.
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False.
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Resolution (const Standard_Integer IC2d, const Standard_Real Tol, Standard_Real& TolU, Standard_Real& TolV) const = 0;
|
||||
|
||||
//! Returns the parameter of the point P. Used to
|
||||
//! impose the parameters in the approximation.
|
||||
Standard_EXPORT Standard_Real Parameter (const Blend_Point& P) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_AppFunction_HeaderFile
|
@@ -1,336 +0,0 @@
|
||||
-- Created on: 1993-09-13
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- 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 class CSFunction from Blend
|
||||
|
||||
inherits AppFunction from Blend
|
||||
|
||||
|
||||
---Purpose: Deferred class for a function used to compute a blending
|
||||
-- surface between a surface and a curve, using a guide line.
|
||||
-- The vector <X> used in Value, Values and Derivatives methods
|
||||
-- may be the vector of the parametric coordinates U,V,
|
||||
-- W of the extremities of a section on the surface and
|
||||
-- the curve.
|
||||
|
||||
|
||||
uses Vector from math,
|
||||
Matrix from math,
|
||||
Vec from gp,
|
||||
Vec2d from gp,
|
||||
Pnt from gp,
|
||||
Pnt2d from gp,
|
||||
Point from Blend,
|
||||
Array1OfPnt from TColgp,
|
||||
Array1OfVec from TColgp,
|
||||
Array1OfPnt2d from TColgp,
|
||||
Array1OfVec2d from TColgp,
|
||||
Array1OfReal from TColStd,
|
||||
Array1OfInteger from TColStd
|
||||
|
||||
|
||||
raises DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: Returns 3 (default value). Can be redefined.
|
||||
returns Integer from Standard
|
||||
is virtual;
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns the number of equations of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Set(me: in out; Param: Real from Standard)
|
||||
|
||||
---Purpose: Sets the value of the parameter along the guide line.
|
||||
-- This determines the plane in which the solution has
|
||||
-- to be found.
|
||||
|
||||
is deferred;
|
||||
|
||||
Set(me: in out; First, Last: Real from Standard)
|
||||
|
||||
---Purpose: Sets the bounds of the parametric interval on
|
||||
-- the guide line.
|
||||
-- This determines the derivatives in these values if the
|
||||
-- function is not Cn.
|
||||
is deferred;
|
||||
|
||||
|
||||
GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
|
||||
|
||||
---Purpose: Returns in the vector Tolerance the parametric tolerance
|
||||
-- for each of the 3 variables;
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
GetBounds(me; InfBound,SupBound: out Vector from math)
|
||||
|
||||
---Purpose: Returns in the vector InfBound the lowest values allowed
|
||||
-- for each of the 3 variables.
|
||||
-- Returns in the vector SupBound the greatest values allowed
|
||||
-- for each of the 3 variables.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
|
||||
|
||||
---Purpose: Returns Standard_True if Sol is a zero of the function.
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
-- The computation is made at the current value of
|
||||
-- the parameter on the guide line.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
GetMinimalDistance(me)
|
||||
---Purpose: Returns the minimal Distance beetween two
|
||||
-- extremitys of calculed sections.
|
||||
returns Real from Standard
|
||||
is redefined;
|
||||
|
||||
--- TheFollowing methods are called only when
|
||||
-- IsSolution returns Standard_True.
|
||||
|
||||
Pnt1(me)
|
||||
---Purpose: Returns the point on the first support.
|
||||
---See Also: PointOnC
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is redefined static;
|
||||
|
||||
Pnt2(me)
|
||||
---Purpose: Returns the point on the seconde support.
|
||||
---See Also: PointOnS
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is redefined static;
|
||||
|
||||
PointOnS(me)
|
||||
|
||||
---Purpose: Returns the point on the surface.
|
||||
|
||||
returns Pnt from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
|
||||
PointOnC(me)
|
||||
|
||||
---Purpose: Returns the point on the curve.
|
||||
|
||||
returns Pnt from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
|
||||
Pnt2d(me)
|
||||
|
||||
---Purpose: Returns U,V coordinates of the point on the surface.
|
||||
|
||||
returns Pnt2d from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
|
||||
ParameterOnC(me)
|
||||
|
||||
---Purpose: Returns parameter of the point on the curve.
|
||||
|
||||
returns Real from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
IsTangencyPoint(me)
|
||||
|
||||
---Purpose: Returns True when it is not possible to compute
|
||||
-- the tangent vectors at PointOnS and/or PointOnC.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
TangentOnS(me)
|
||||
|
||||
---Purpose: Returns the tangent vector at PointOnS, in 3d space.
|
||||
|
||||
returns Vec from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
|
||||
is deferred;
|
||||
|
||||
Tangent2d(me)
|
||||
|
||||
---Purpose: Returns the tangent vector at PointOnS, in the
|
||||
-- parametric space of the first surface.
|
||||
|
||||
returns Vec2d from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
TangentOnC(me)
|
||||
|
||||
---Purpose: Returns the tangent vector at PointOnC, in 3d space.
|
||||
|
||||
returns Vec from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Tangent(me; U,V: Real from Standard;
|
||||
TgS,NormS: out Vec from gp)
|
||||
|
||||
---Purpose: Returns the tangent vector at the section,
|
||||
-- at the beginning and the end of the section, and
|
||||
-- returns the normal (of the surfaces) at
|
||||
-- these points.
|
||||
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- Methods for the approximation
|
||||
--
|
||||
|
||||
GetShape(me: in out;
|
||||
NbPoles : out Integer from Standard;
|
||||
NbKnots : out Integer from Standard;
|
||||
Degree : out Integer from Standard;
|
||||
NbPoles2d : out Integer from Standard)
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
GetTolerance(me;
|
||||
BoundTol, SurfTol, AngleTol : Real;
|
||||
Tol3d : out Vector;
|
||||
Tol1D : out Vector )
|
||||
---Purpose: Returns the tolerance to reach in approximation
|
||||
-- to respecte
|
||||
-- BoundTol error at the Boundary
|
||||
-- AngleTol tangent error at the Boundary
|
||||
-- SurfTol error inside the surface.
|
||||
is deferred;
|
||||
|
||||
Knots(me: in out; TKnots: out Array1OfReal from TColStd)
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Mults(me: in out; TMults: out Array1OfInteger from TColStd)
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd)
|
||||
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False.
|
||||
|
||||
returns Boolean from Standard
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd)
|
||||
is deferred;
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
D2Poles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
D2Poles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd;
|
||||
D2Weigths : out Array1OfReal from TColStd)
|
||||
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False.
|
||||
|
||||
returns Boolean from Standard
|
||||
|
||||
is redefined;
|
||||
|
||||
end CSFunction;
|
@@ -12,7 +12,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_CSFunction.ixx>
|
||||
|
||||
#include <Blend_CSFunction.hxx>
|
||||
#include <Blend_Point.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
|
||||
Standard_Integer Blend_CSFunction::NbVariables () const
|
||||
|
199
src/Blend/Blend_CSFunction.hxx
Normal file
199
src/Blend/Blend_CSFunction.hxx
Normal file
@@ -0,0 +1,199 @@
|
||||
// Created on: 1993-09-13
|
||||
// Created by: Jacques GOUSSARD
|
||||
// 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.
|
||||
|
||||
#ifndef _Blend_CSFunction_HeaderFile
|
||||
#define _Blend_CSFunction_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Blend_AppFunction.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfVec.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_Array1OfVec2d.hxx>
|
||||
class Standard_DomainError;
|
||||
class math_Matrix;
|
||||
class gp_Pnt;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec;
|
||||
class gp_Vec2d;
|
||||
class Blend_Point;
|
||||
|
||||
|
||||
//! Deferred class for a function used to compute a blending
|
||||
//! surface between a surface and a curve, using a guide line.
|
||||
//! The vector <X> used in Value, Values and Derivatives methods
|
||||
//! may be the vector of the parametric coordinates U,V,
|
||||
//! W of the extremities of a section on the surface and
|
||||
//! the curve.
|
||||
class Blend_CSFunction : public Blend_AppFunction
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns 3 (default value). Can be redefined.
|
||||
Standard_EXPORT virtual Standard_Integer NbVariables() const;
|
||||
|
||||
//! returns the number of equations of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbEquations() const = 0;
|
||||
|
||||
//! computes the values <F> of the Functions for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) = 0;
|
||||
|
||||
//! returns the values <D> of the derivatives for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) = 0;
|
||||
|
||||
//! returns the values <F> of the functions and the derivatives
|
||||
//! <D> for the variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0;
|
||||
|
||||
//! Sets the value of the parameter along the guide line.
|
||||
//! This determines the plane in which the solution has
|
||||
//! to be found.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real Param) = 0;
|
||||
|
||||
//! Sets the bounds of the parametric interval on
|
||||
//! the guide line.
|
||||
//! This determines the derivatives in these values if the
|
||||
//! function is not Cn.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real First, const Standard_Real Last) = 0;
|
||||
|
||||
//! Returns in the vector Tolerance the parametric tolerance
|
||||
//! for each of the 3 variables;
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const = 0;
|
||||
|
||||
//! Returns in the vector InfBound the lowest values allowed
|
||||
//! for each of the 3 variables.
|
||||
//! Returns in the vector SupBound the greatest values allowed
|
||||
//! for each of the 3 variables.
|
||||
Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const = 0;
|
||||
|
||||
//! Returns Standard_True if Sol is a zero of the function.
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
//! The computation is made at the current value of
|
||||
//! the parameter on the guide line.
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) = 0;
|
||||
|
||||
//! Returns the minimal Distance beetween two
|
||||
//! extremitys of calculed sections.
|
||||
Standard_EXPORT virtual Standard_Real GetMinimalDistance() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the point on the first support.
|
||||
Standard_EXPORT const gp_Pnt& Pnt1() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the point on the seconde support.
|
||||
Standard_EXPORT const gp_Pnt& Pnt2() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the point on the surface.
|
||||
Standard_EXPORT virtual const gp_Pnt& PointOnS() const = 0;
|
||||
|
||||
//! Returns the point on the curve.
|
||||
Standard_EXPORT virtual const gp_Pnt& PointOnC() const = 0;
|
||||
|
||||
//! Returns U,V coordinates of the point on the surface.
|
||||
Standard_EXPORT virtual const gp_Pnt2d& Pnt2d() const = 0;
|
||||
|
||||
//! Returns parameter of the point on the curve.
|
||||
Standard_EXPORT virtual Standard_Real ParameterOnC() const = 0;
|
||||
|
||||
//! Returns True when it is not possible to compute
|
||||
//! the tangent vectors at PointOnS and/or PointOnC.
|
||||
Standard_EXPORT virtual Standard_Boolean IsTangencyPoint() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS, in 3d space.
|
||||
Standard_EXPORT virtual const gp_Vec& TangentOnS() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS, in the
|
||||
//! parametric space of the first surface.
|
||||
Standard_EXPORT virtual const gp_Vec2d& Tangent2d() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnC, in 3d space.
|
||||
Standard_EXPORT virtual const gp_Vec& TangentOnC() const = 0;
|
||||
|
||||
//! Returns the tangent vector at the section,
|
||||
//! at the beginning and the end of the section, and
|
||||
//! returns the normal (of the surfaces) at
|
||||
//! these points.
|
||||
Standard_EXPORT virtual void Tangent (const Standard_Real U, const Standard_Real V, gp_Vec& TgS, gp_Vec& NormS) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) = 0;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False.
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False.
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_CSFunction_HeaderFile
|
@@ -1,191 +0,0 @@
|
||||
-- Created on: 1993-12-02
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- 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 CSWalking from Blend
|
||||
(TheVertex as any;
|
||||
TheArc as any;
|
||||
TheSurface as any;
|
||||
TheCurve as any;
|
||||
TheVertexTool as any;
|
||||
TheArcTool as any;
|
||||
TheSurfaceTool as any;
|
||||
TheCurveTool as any;
|
||||
TheTopolTool as Transient;
|
||||
TheBlendTool as any;
|
||||
ThePointOnRst as any;
|
||||
TheSeqPointOnRst as any;
|
||||
TheExtremity as any;
|
||||
TheLine as Transient)
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses Point from Blend,
|
||||
Status from Blend,
|
||||
Vector from math,
|
||||
Matrix from math,
|
||||
Pnt from gp,
|
||||
Pnt2d from gp,
|
||||
Vec from gp,
|
||||
Vec2d from gp,
|
||||
HArray1OfReal from TColStd,
|
||||
Transition from IntSurf,
|
||||
CSFunction from Blend
|
||||
-- CSFuncInv from Blend
|
||||
|
||||
|
||||
raises NotDone from StdFail
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create(Curv : TheCurve; Surf: TheSurface; Domain: TheTopolTool)
|
||||
|
||||
returns CSWalking from Blend;
|
||||
|
||||
|
||||
Perform(me: in out; F : in out CSFunction from Blend;
|
||||
-- FInv : in out CSFuncInv from Blend;
|
||||
Pdep : Real from Standard;
|
||||
Pmax : Real from Standard;
|
||||
MaxStep : Real from Standard;
|
||||
TolGuide: Real from Standard;
|
||||
Soldep : Vector from math;
|
||||
Tolesp : Real from Standard;
|
||||
Fleche : Real from Standard;
|
||||
Appro : Boolean from Standard = Standard_False)
|
||||
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Complete(me: in out;F : in out CSFunction from Blend;
|
||||
-- FInv : in out FuncInv from Blend;
|
||||
Pmin : Real from Standard)
|
||||
|
||||
returns Boolean from Standard
|
||||
raises NotDone from StdFail
|
||||
is static;
|
||||
|
||||
|
||||
InternalPerform (me: in out;F : in out CSFunction from Blend;
|
||||
-- FInv : in out CSFuncInv from Blend;
|
||||
Sol : in out Vector from math;
|
||||
Bound : Real from Standard)
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
IsDone(me)
|
||||
|
||||
returns Boolean from Standard
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
|
||||
Line(me)
|
||||
|
||||
returns TheLine
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
raises NotDone from StdFail
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- Recadre(me: in out; FInv : in out CSFuncInv from Blend;
|
||||
-- Sol: Vector from math;
|
||||
-- Solrst : out Vector from math;
|
||||
-- Indexsol: out Integer from Standard;
|
||||
-- IsVtx: out Boolean from Standard;
|
||||
-- Vtx: out TheVertex)
|
||||
|
||||
-- returns Boolean from Standard
|
||||
-- is static private;
|
||||
|
||||
|
||||
Transition(me:in out; A: TheArc; Param: Real from Standard;
|
||||
TLine,TArc: out Transition from IntSurf)
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
MakeExtremity(me:in out; Extrem : in out TheExtremity;
|
||||
Index : Integer from Standard;
|
||||
Param : Real from Standard;
|
||||
IsVtx : Boolean from Standard;
|
||||
Vtx : TheVertex)
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
CheckDeflectionOnSurf(me: in out; Psurf : Pnt from gp;
|
||||
Ponsurf : Pnt2d from gp;
|
||||
Tgsurf : Vec from gp;
|
||||
Tgonsurf: Vec2d from gp)
|
||||
|
||||
|
||||
returns Status from Blend
|
||||
is static private;
|
||||
|
||||
|
||||
CheckDeflectionOnCurv(me: in out; Pcurv : Pnt from gp;
|
||||
Poncurv : Real from Standard;
|
||||
Tgcurv : Vec from gp)
|
||||
|
||||
|
||||
returns Status from Blend
|
||||
is static private;
|
||||
|
||||
|
||||
TestArret(me: in out; F : in out CSFunction from Blend;
|
||||
Sol : Vector from math;
|
||||
TestDeflection : Boolean from Standard;
|
||||
State: Status from Blend)
|
||||
|
||||
returns Status from Blend
|
||||
is static private;
|
||||
|
||||
|
||||
|
||||
fields
|
||||
|
||||
done : Boolean from Standard;
|
||||
line : TheLine;
|
||||
surf : TheSurface;
|
||||
curv : TheCurve;
|
||||
domain : TheTopolTool;
|
||||
|
||||
tolesp : Real from Standard;
|
||||
tolgui : Real from Standard;
|
||||
pasmax : Real from Standard;
|
||||
fleche : Real from Standard;
|
||||
param : Real from Standard;
|
||||
firstparam : Real from Standard;
|
||||
firstsol : HArray1OfReal from TColStd;
|
||||
previousP : Point from Blend;
|
||||
rebrou : Boolean from Standard;
|
||||
iscomplete : Boolean from Standard;
|
||||
comptra : Boolean from Standard;
|
||||
sens : Real from Standard;
|
||||
|
||||
end CSWalking;
|
@@ -1,100 +0,0 @@
|
||||
-- Created on: 1997-02-12
|
||||
-- Created by: Laurent BOURESCHE
|
||||
-- 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.
|
||||
|
||||
deferred class CurvPointFuncInv from Blend
|
||||
|
||||
|
||||
---Purpose: Deferred class for a function used to compute a
|
||||
-- blending surface between a surface and a curve, using
|
||||
-- a guide line. This function is used to find a
|
||||
-- solution on a done point of the curve.
|
||||
-- The vector <X> used in Value, Values and Derivatives
|
||||
-- methods has to be the vector of the parametric
|
||||
-- coordinates w, U, V where w is the parameter on the
|
||||
-- guide line, U,V are the parametric coordinates of a
|
||||
-- point on the partner surface.
|
||||
|
||||
|
||||
|
||||
inherits FunctionSetWithDerivatives from math
|
||||
|
||||
uses
|
||||
Pnt from gp,
|
||||
Vector from math,
|
||||
Matrix from math
|
||||
|
||||
is
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: Returns 3.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns the number of equations of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Set(me: in out; P : Pnt from gp)
|
||||
---Purpose: Set the Point on which a solution has to be found.
|
||||
is deferred;
|
||||
|
||||
GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns in the vector Tolerance the parametric tolerance
|
||||
-- for each of the 3 variables;
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
is deferred;
|
||||
|
||||
GetBounds(me; InfBound,SupBound: out Vector from math)
|
||||
---Purpose: Returns in the vector InfBound the lowest values allowed
|
||||
-- for each of the 3 variables.
|
||||
-- Returns in the vector SupBound the greatest values allowed
|
||||
-- for each of the 3 variables.
|
||||
is deferred;
|
||||
|
||||
|
||||
IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns Standard_True if Sol is a zero of the function.
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
end CurvPointFuncInv;
|
@@ -14,13 +14,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_CurvPointFuncInv.ixx>
|
||||
|
||||
#include <Blend_CurvPointFuncInv.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : NbVariables
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer Blend_CurvPointFuncInv::NbVariables() const
|
||||
{
|
||||
return 2;
|
||||
|
114
src/Blend/Blend_CurvPointFuncInv.hxx
Normal file
114
src/Blend/Blend_CurvPointFuncInv.hxx
Normal file
@@ -0,0 +1,114 @@
|
||||
// Created on: 1997-02-12
|
||||
// Created by: Laurent BOURESCHE
|
||||
// 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 _Blend_CurvPointFuncInv_HeaderFile
|
||||
#define _Blend_CurvPointFuncInv_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <math_FunctionSetWithDerivatives.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class math_Matrix;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
//! Deferred class for a function used to compute a
|
||||
//! blending surface between a surface and a curve, using
|
||||
//! a guide line. This function is used to find a
|
||||
//! solution on a done point of the curve.
|
||||
//! The vector <X> used in Value, Values and Derivatives
|
||||
//! methods has to be the vector of the parametric
|
||||
//! coordinates w, U, V where w is the parameter on the
|
||||
//! guide line, U,V are the parametric coordinates of a
|
||||
//! point on the partner surface.
|
||||
class Blend_CurvPointFuncInv : public math_FunctionSetWithDerivatives
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns 3.
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
//! returns the number of equations of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbEquations() const = 0;
|
||||
|
||||
//! computes the values <F> of the Functions for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) = 0;
|
||||
|
||||
//! returns the values <D> of the derivatives for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) = 0;
|
||||
|
||||
//! returns the values <F> of the functions and the derivatives
|
||||
//! <D> for the variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0;
|
||||
|
||||
//! Set the Point on which a solution has to be found.
|
||||
Standard_EXPORT virtual void Set (const gp_Pnt& P) = 0;
|
||||
|
||||
//! Returns in the vector Tolerance the parametric tolerance
|
||||
//! for each of the 3 variables;
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const = 0;
|
||||
|
||||
//! Returns in the vector InfBound the lowest values allowed
|
||||
//! for each of the 3 variables.
|
||||
//! Returns in the vector SupBound the greatest values allowed
|
||||
//! for each of the 3 variables.
|
||||
Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const = 0;
|
||||
|
||||
//! Returns Standard_True if Sol is a zero of the function.
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_CurvPointFuncInv_HeaderFile
|
29
src/Blend/Blend_DecrochStatus.hxx
Normal file
29
src/Blend/Blend_DecrochStatus.hxx
Normal file
@@ -0,0 +1,29 @@
|
||||
// Created on: 1993-12-02
|
||||
// Created by: Jacques GOUSSARD
|
||||
// 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.
|
||||
|
||||
#ifndef _Blend_DecrochStatus_HeaderFile
|
||||
#define _Blend_DecrochStatus_HeaderFile
|
||||
|
||||
|
||||
enum Blend_DecrochStatus
|
||||
{
|
||||
Blend_NoDecroch,
|
||||
Blend_DecrochRst1,
|
||||
Blend_DecrochRst2,
|
||||
Blend_DecrochBoth
|
||||
};
|
||||
|
||||
#endif // _Blend_DecrochStatus_HeaderFile
|
@@ -1,120 +0,0 @@
|
||||
-- Created on: 1993-12-02
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- 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 class FuncInv from Blend
|
||||
|
||||
|
||||
inherits FunctionSetWithDerivatives from math
|
||||
|
||||
|
||||
---Purpose: Deferred class for a function used to compute a blending
|
||||
-- surface between two surfaces, using a guide line.
|
||||
-- This function is used to find a solution on a restriction
|
||||
-- of one of the surface.
|
||||
-- The vector <X> used in Value, Values and Derivatives methods
|
||||
-- has to be the vector of the parametric coordinates t,w,U,V
|
||||
-- where t is the parameter on the curve on surface,
|
||||
-- w is the parameter on the guide line,
|
||||
-- U,V are the parametric coordinates of a point on the
|
||||
-- partner surface.
|
||||
|
||||
uses Vector from math,
|
||||
Matrix from math,
|
||||
HCurve2d from Adaptor2d
|
||||
|
||||
is
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: Returns 4.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns the number of equations of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Set(me: in out; OnFirst: Boolean from Standard;
|
||||
COnSurf: HCurve2d from Adaptor2d)
|
||||
|
||||
---Purpose: Sets the CurveOnSurface on which a solution has
|
||||
-- to be found. If <OnFirst> is set to Standard_True,
|
||||
-- the curve will be on the first surface, otherwise the
|
||||
-- curve is on the second one.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
|
||||
|
||||
---Purpose: Returns in the vector Tolerance the parametric tolerance
|
||||
-- for each of the 4 variables;
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
GetBounds(me; InfBound,SupBound: out Vector from math)
|
||||
|
||||
---Purpose: Returns in the vector InfBound the lowest values allowed
|
||||
-- for each of the 4 variables.
|
||||
-- Returns in the vector SupBound the greatest values allowed
|
||||
-- for each of the 4 variables.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
|
||||
|
||||
---Purpose: Returns Standard_True if Sol is a zero of the function.
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
|
||||
returns Boolean from Standard
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
end FuncInv;
|
@@ -12,7 +12,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_FuncInv.ixx>
|
||||
|
||||
#include <Adaptor2d_HCurve2d.hxx>
|
||||
#include <Blend_FuncInv.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
Standard_Integer Blend_FuncInv::NbVariables () const
|
||||
{
|
||||
|
118
src/Blend/Blend_FuncInv.hxx
Normal file
118
src/Blend/Blend_FuncInv.hxx
Normal file
@@ -0,0 +1,118 @@
|
||||
// Created on: 1993-12-02
|
||||
// Created by: Jacques GOUSSARD
|
||||
// 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.
|
||||
|
||||
#ifndef _Blend_FuncInv_HeaderFile
|
||||
#define _Blend_FuncInv_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <math_FunctionSetWithDerivatives.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class math_Matrix;
|
||||
class Adaptor2d_HCurve2d;
|
||||
|
||||
|
||||
//! Deferred class for a function used to compute a blending
|
||||
//! surface between two surfaces, using a guide line.
|
||||
//! This function is used to find a solution on a restriction
|
||||
//! of one of the surface.
|
||||
//! The vector <X> used in Value, Values and Derivatives methods
|
||||
//! has to be the vector of the parametric coordinates t,w,U,V
|
||||
//! where t is the parameter on the curve on surface,
|
||||
//! w is the parameter on the guide line,
|
||||
//! U,V are the parametric coordinates of a point on the
|
||||
//! partner surface.
|
||||
class Blend_FuncInv : public math_FunctionSetWithDerivatives
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns 4.
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
//! returns the number of equations of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbEquations() const = 0;
|
||||
|
||||
//! computes the values <F> of the Functions for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) = 0;
|
||||
|
||||
//! returns the values <D> of the derivatives for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) = 0;
|
||||
|
||||
//! returns the values <F> of the functions and the derivatives
|
||||
//! <D> for the variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0;
|
||||
|
||||
//! Sets the CurveOnSurface on which a solution has
|
||||
//! to be found. If <OnFirst> is set to Standard_True,
|
||||
//! the curve will be on the first surface, otherwise the
|
||||
//! curve is on the second one.
|
||||
Standard_EXPORT virtual void Set (const Standard_Boolean OnFirst, const Handle(Adaptor2d_HCurve2d)& COnSurf) = 0;
|
||||
|
||||
//! Returns in the vector Tolerance the parametric tolerance
|
||||
//! for each of the 4 variables;
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const = 0;
|
||||
|
||||
//! Returns in the vector InfBound the lowest values allowed
|
||||
//! for each of the 4 variables.
|
||||
//! Returns in the vector SupBound the greatest values allowed
|
||||
//! for each of the 4 variables.
|
||||
Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const = 0;
|
||||
|
||||
//! Returns Standard_True if Sol is a zero of the function.
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_FuncInv_HeaderFile
|
@@ -1,333 +0,0 @@
|
||||
-- Created on: 1993-09-13
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- 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 class Function from Blend
|
||||
|
||||
inherits AppFunction from Blend
|
||||
|
||||
|
||||
|
||||
---Purpose: Deferred class for a function used to compute a blending
|
||||
-- surface between two surfaces, using a guide line.
|
||||
-- The vector <X> used in Value, Values and Derivatives methods
|
||||
-- has to be the vector of the parametric coordinates U1,V1,
|
||||
-- U2,V2, of the extremities of a section on the first and
|
||||
-- second surface.
|
||||
|
||||
|
||||
uses Vector from math,
|
||||
Matrix from math,
|
||||
Vec from gp,
|
||||
Vec2d from gp,
|
||||
Pnt from gp,
|
||||
Point from Blend,
|
||||
Array1OfPnt from TColgp,
|
||||
Array1OfVec from TColgp,
|
||||
Array1OfPnt2d from TColgp,
|
||||
Array1OfVec2d from TColgp,
|
||||
Array1OfReal from TColStd,
|
||||
Array1OfInteger from TColStd
|
||||
|
||||
raises DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: Returns 4.
|
||||
returns Integer from Standard ;
|
||||
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns the number of equations of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Set(me: in out; Param: Real from Standard)
|
||||
|
||||
---Purpose: Sets the value of the parameter along the guide line.
|
||||
-- This determines the plane in which the solution has
|
||||
-- to be found.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Set(me: in out; First, Last: Real from Standard)
|
||||
|
||||
---Purpose: Sets the bounds of the parametric interval on
|
||||
-- the guide line.
|
||||
-- This determines the derivatives in these values if the
|
||||
-- function is not Cn.
|
||||
is deferred;
|
||||
|
||||
|
||||
GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
|
||||
|
||||
---Purpose: Returns in the vector Tolerance the parametric tolerance
|
||||
-- for each of the 4 variables;
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
GetBounds(me; InfBound,SupBound: out Vector from math)
|
||||
|
||||
---Purpose: Returns in the vector InfBound the lowest values allowed
|
||||
-- for each of the 4 variables.
|
||||
-- Returns in the vector SupBound the greatest values allowed
|
||||
-- for each of the 4 variables.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
|
||||
|
||||
---Purpose: Returns Standard_True if Sol is a zero of the function.
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
-- The computation is made at the current value of
|
||||
-- the parameter on the guide line.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
--- TheFollowing methods are called only when
|
||||
-- IsSolution returns Standard_True.
|
||||
|
||||
Pnt1(me)
|
||||
---Purpose: Returns the point on the first support.
|
||||
---See Also: PointOnS1
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is redefined static;
|
||||
|
||||
Pnt2(me)
|
||||
---Purpose: Returns the point on the seconde support.
|
||||
---See Also: PointOnS2
|
||||
---C++: return const &
|
||||
returns Pnt from gp
|
||||
is redefined static;
|
||||
|
||||
PointOnS1(me)
|
||||
|
||||
---Purpose: Returns the point on the first surface, at parameter
|
||||
-- Sol(1),Sol(2) (Sol is the vector used in the call of
|
||||
-- IsSolution.
|
||||
|
||||
returns Pnt from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
|
||||
PointOnS2(me)
|
||||
|
||||
---Purpose: Returns the point on the second surface, at parameter
|
||||
-- Sol(3),Sol(4) (Sol is the vector used in the call of
|
||||
-- IsSolution.
|
||||
|
||||
returns Pnt from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
|
||||
IsTangencyPoint(me)
|
||||
|
||||
---Purpose: Returns True when it is not possible to compute
|
||||
-- the tangent vectors at PointOnS1 and/or PointOnS2.
|
||||
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
TangentOnS1(me)
|
||||
|
||||
---Purpose: Returns the tangent vector at PointOnS1, in 3d space.
|
||||
|
||||
returns Vec from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
|
||||
is deferred;
|
||||
|
||||
Tangent2dOnS1(me)
|
||||
|
||||
---Purpose: Returns the tangent vector at PointOnS1, in the
|
||||
-- parametric space of the first surface.
|
||||
|
||||
returns Vec2d from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
TangentOnS2(me)
|
||||
|
||||
---Purpose: Returns the tangent vector at PointOnS2, in 3d space.
|
||||
|
||||
returns Vec from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Tangent2dOnS2(me)
|
||||
|
||||
---Purpose: Returns the tangent vector at PointOnS2, in the
|
||||
-- parametric space of the second surface.
|
||||
|
||||
returns Vec2d from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Tangent(me; U1,V1,U2,V2: Real from Standard;
|
||||
TgFirst,TgLast,NormFirst,NormLast: out Vec from gp)
|
||||
|
||||
---Purpose: Returns the tangent vector at the section,
|
||||
-- at the beginning and the end of the section, and
|
||||
-- returns the normal (of the surfaces) at
|
||||
-- these points.
|
||||
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
|
||||
is deferred;
|
||||
|
||||
TwistOnS1(me)
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
TwistOnS2(me)
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
-- Methods for the approximation
|
||||
--
|
||||
|
||||
GetShape(me: in out;
|
||||
NbPoles : out Integer from Standard;
|
||||
NbKnots : out Integer from Standard;
|
||||
Degree : out Integer from Standard;
|
||||
NbPoles2d : out Integer from Standard)
|
||||
is deferred;
|
||||
|
||||
|
||||
GetTolerance(me;
|
||||
BoundTol, SurfTol, AngleTol : Real;
|
||||
Tol3d : out Vector;
|
||||
Tol1D : out Vector )
|
||||
---Purpose: Returns the tolerance to reach in approximation
|
||||
-- to respecte
|
||||
-- BoundTol error at the Boundary
|
||||
-- AngleTol tangent error at the Boundary
|
||||
-- SurfTol error inside the surface.
|
||||
is deferred;
|
||||
|
||||
Knots(me: in out; TKnots: out Array1OfReal from TColStd)
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Mults(me: in out; TMults: out Array1OfInteger from TColStd)
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd)
|
||||
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False.
|
||||
|
||||
returns Boolean from Standard
|
||||
|
||||
is deferred;
|
||||
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd)
|
||||
is deferred;
|
||||
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
D2Poles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
D2Poles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd;
|
||||
D2Weigths : out Array1OfReal from TColStd)
|
||||
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False
|
||||
|
||||
returns Boolean from Standard
|
||||
|
||||
is redefined;
|
||||
end Function;
|
@@ -12,7 +12,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_Function.ixx>
|
||||
|
||||
#include <Blend_Function.hxx>
|
||||
#include <Blend_Point.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
Standard_Integer Blend_Function::NbVariables () const
|
||||
{
|
||||
|
200
src/Blend/Blend_Function.hxx
Normal file
200
src/Blend/Blend_Function.hxx
Normal file
@@ -0,0 +1,200 @@
|
||||
// Created on: 1993-09-13
|
||||
// Created by: Jacques GOUSSARD
|
||||
// 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.
|
||||
|
||||
#ifndef _Blend_Function_HeaderFile
|
||||
#define _Blend_Function_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Blend_AppFunction.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfVec.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_Array1OfVec2d.hxx>
|
||||
class Standard_DomainError;
|
||||
class math_Matrix;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class gp_Vec2d;
|
||||
class Blend_Point;
|
||||
|
||||
|
||||
//! Deferred class for a function used to compute a blending
|
||||
//! surface between two surfaces, using a guide line.
|
||||
//! The vector <X> used in Value, Values and Derivatives methods
|
||||
//! has to be the vector of the parametric coordinates U1,V1,
|
||||
//! U2,V2, of the extremities of a section on the first and
|
||||
//! second surface.
|
||||
class Blend_Function : public Blend_AppFunction
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns 4.
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
//! returns the number of equations of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbEquations() const = 0;
|
||||
|
||||
//! computes the values <F> of the Functions for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) = 0;
|
||||
|
||||
//! returns the values <D> of the derivatives for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) = 0;
|
||||
|
||||
//! returns the values <F> of the functions and the derivatives
|
||||
//! <D> for the variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0;
|
||||
|
||||
//! Sets the value of the parameter along the guide line.
|
||||
//! This determines the plane in which the solution has
|
||||
//! to be found.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real Param) = 0;
|
||||
|
||||
//! Sets the bounds of the parametric interval on
|
||||
//! the guide line.
|
||||
//! This determines the derivatives in these values if the
|
||||
//! function is not Cn.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real First, const Standard_Real Last) = 0;
|
||||
|
||||
//! Returns in the vector Tolerance the parametric tolerance
|
||||
//! for each of the 4 variables;
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const = 0;
|
||||
|
||||
//! Returns in the vector InfBound the lowest values allowed
|
||||
//! for each of the 4 variables.
|
||||
//! Returns in the vector SupBound the greatest values allowed
|
||||
//! for each of the 4 variables.
|
||||
Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const = 0;
|
||||
|
||||
//! Returns Standard_True if Sol is a zero of the function.
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
//! The computation is made at the current value of
|
||||
//! the parameter on the guide line.
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) = 0;
|
||||
|
||||
//! Returns the point on the first support.
|
||||
Standard_EXPORT const gp_Pnt& Pnt1() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the point on the seconde support.
|
||||
Standard_EXPORT const gp_Pnt& Pnt2() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the point on the first surface, at parameter
|
||||
//! Sol(1),Sol(2) (Sol is the vector used in the call of
|
||||
//! IsSolution.
|
||||
Standard_EXPORT virtual const gp_Pnt& PointOnS1() const = 0;
|
||||
|
||||
//! Returns the point on the second surface, at parameter
|
||||
//! Sol(3),Sol(4) (Sol is the vector used in the call of
|
||||
//! IsSolution.
|
||||
Standard_EXPORT virtual const gp_Pnt& PointOnS2() const = 0;
|
||||
|
||||
//! Returns True when it is not possible to compute
|
||||
//! the tangent vectors at PointOnS1 and/or PointOnS2.
|
||||
Standard_EXPORT virtual Standard_Boolean IsTangencyPoint() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS1, in 3d space.
|
||||
Standard_EXPORT virtual const gp_Vec& TangentOnS1() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS1, in the
|
||||
//! parametric space of the first surface.
|
||||
Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnS1() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS2, in 3d space.
|
||||
Standard_EXPORT virtual const gp_Vec& TangentOnS2() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS2, in the
|
||||
//! parametric space of the second surface.
|
||||
Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnS2() const = 0;
|
||||
|
||||
//! Returns the tangent vector at the section,
|
||||
//! at the beginning and the end of the section, and
|
||||
//! returns the normal (of the surfaces) at
|
||||
//! these points.
|
||||
Standard_EXPORT virtual void Tangent (const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, gp_Vec& TgFirst, gp_Vec& TgLast, gp_Vec& NormFirst, gp_Vec& NormLast) const = 0;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean TwistOnS1() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean TwistOnS2() const;
|
||||
|
||||
Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) = 0;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False.
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_Function_HeaderFile
|
@@ -1,354 +0,0 @@
|
||||
-- Created on: 1993-12-02
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- 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.
|
||||
|
||||
class Point from Blend
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses Pnt from gp,
|
||||
Vec from gp,
|
||||
Vec2d from gp
|
||||
|
||||
raises DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
Create returns Point from Blend;
|
||||
|
||||
Create(Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
Tg1,Tg2 : Vec from gp;
|
||||
Tg12d,Tg22d : Vec2d from gp)
|
||||
---Purpose: Creates a point on 2 surfaces, with tangents.
|
||||
returns Point from Blend;
|
||||
|
||||
Create(Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard)
|
||||
---Purpose: Creates a point on 2 surfaces, without tangents.
|
||||
returns Point from Blend;
|
||||
|
||||
Create(Pts,Ptc : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U,V,W : Real from Standard;
|
||||
Tgs,Tgc : Vec from gp;
|
||||
Tg2d : Vec2d from gp)
|
||||
---Purpose: Creates a point on a surface and a curve, with tangents.
|
||||
returns Point from Blend;
|
||||
|
||||
Create(Pts,Ptc : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U,V,W : Real from Standard)
|
||||
---Purpose: Creates a point on a surface and a curve, without tangents.
|
||||
returns Point from Blend;
|
||||
|
||||
Create(Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
PC : Real from Standard;
|
||||
Tg1,Tg2 : Vec from gp;
|
||||
Tg12d,Tg22d : Vec2d from gp)
|
||||
---Purpose: Creates a point on a surface and a curve on surface,
|
||||
-- with tangents.
|
||||
returns Point from Blend;
|
||||
|
||||
Create(Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
PC : Real from Standard)
|
||||
---Purpose: Creates a point on a surface and a curve on surface,
|
||||
-- without tangents.
|
||||
returns Point from Blend;
|
||||
|
||||
Create(Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
PC1,PC2 : Real from Standard;
|
||||
Tg1,Tg2 : Vec from gp;
|
||||
Tg12d,Tg22d : Vec2d from gp)
|
||||
---Purpose: Creates a point on two curves on surfaces, with tangents.
|
||||
returns Point from Blend;
|
||||
|
||||
Create(Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
PC1,PC2 : Real from Standard)
|
||||
---Purpose: Creates a point on two curves on surfaces, with tangents.
|
||||
returns Point from Blend;
|
||||
|
||||
SetValue(me: in out;Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
Tg1,Tg2 : Vec from gp;
|
||||
Tg12d,Tg22d : Vec2d from gp)
|
||||
---Purpose: Set the values for a point on 2 surfaces, with tangents.
|
||||
is static;
|
||||
|
||||
SetValue(me: in out;Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard)
|
||||
---Purpose: Set the values for a point on 2 surfaces, without tangents.
|
||||
is static;
|
||||
|
||||
SetValue(me: in out;Pts,Ptc : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U,V,W : Real from Standard;
|
||||
Tgs,Tgc : Vec from gp;
|
||||
Tg2d : Vec2d from gp)
|
||||
---Purpose: Set the values for a point on a surface and a curve,
|
||||
-- with tangents.
|
||||
is static;
|
||||
|
||||
SetValue(me: in out;Pts,Ptc : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U,V,W : Real from Standard)
|
||||
---Purpose: Set the values for a point on a surface and a curve,
|
||||
-- without tangents.
|
||||
is static;
|
||||
|
||||
SetValue(me : in out;
|
||||
Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
PC : Real from Standard;
|
||||
Tg1,Tg2 : Vec from gp;
|
||||
Tg12d,Tg22d : Vec2d from gp);
|
||||
---Purpose: Creates a point on a surface and a curve on surface,
|
||||
-- with tangents.
|
||||
|
||||
SetValue(me : in out;
|
||||
Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
PC : Real from Standard);
|
||||
---Purpose: Creates a point on a surface and a curve on surface,
|
||||
-- without tangents.
|
||||
|
||||
SetValue(me : in out;
|
||||
Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
PC1,PC2 : Real from Standard;
|
||||
Tg1,Tg2 : Vec from gp;
|
||||
Tg12d,Tg22d : Vec2d from gp);
|
||||
---Purpose: Creates a point on two curves on surfaces, with tangents.
|
||||
|
||||
SetValue(me : in out;
|
||||
Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
U1,V1,U2,V2 : Real from Standard;
|
||||
PC1,PC2 : Real from Standard);
|
||||
---Purpose: Creates a point on two curves on surfaces, without tangents.
|
||||
|
||||
SetValue(me : in out;
|
||||
Pt1,Pt2 : Pnt from gp;
|
||||
Param : Real from Standard;
|
||||
PC1,PC2 : Real from Standard);
|
||||
---Purpose: Creates a point on two curves.
|
||||
|
||||
SetParameter(me : in out;
|
||||
Param : Real from Standard);
|
||||
---C++: inline
|
||||
---Purpose: Changes parameter on existing point
|
||||
|
||||
Parameter(me)
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
IsTangencyPoint(me)
|
||||
---Purpose: Returns Standard_True if it was not possible to compute
|
||||
-- the tangent vectors at PointOnS1 and/or PointOnS2.
|
||||
---C++: inline
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
|
||||
-- methods for a point on 2 surfaces
|
||||
|
||||
PointOnS1(me)
|
||||
returns Pnt from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
is static;
|
||||
|
||||
PointOnS2(me)
|
||||
returns Pnt from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
is static;
|
||||
|
||||
ParametersOnS1(me; U,V: out Real from Standard)
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
ParametersOnS2(me; U,V: out Real from Standard)
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
TangentOnS1(me)
|
||||
returns Vec from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is static;
|
||||
|
||||
TangentOnS2(me)
|
||||
returns Vec from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is static;
|
||||
|
||||
Tangent2dOnS1(me)
|
||||
returns Vec2d from gp
|
||||
---C++: inline
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is static;
|
||||
|
||||
Tangent2dOnS2(me)
|
||||
returns Vec2d from gp
|
||||
---C++: inline
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is static;
|
||||
|
||||
|
||||
-- methods for a point on a surface and a curve
|
||||
|
||||
PointOnS(me)
|
||||
returns Pnt from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
is static;
|
||||
|
||||
PointOnC(me)
|
||||
returns Pnt from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
is static;
|
||||
|
||||
ParametersOnS(me; U,V: out Real from Standard)
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
ParameterOnC(me)
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
TangentOnS(me)
|
||||
returns Vec from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is static;
|
||||
|
||||
TangentOnC(me)
|
||||
returns Vec from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is static;
|
||||
|
||||
Tangent2d(me)
|
||||
returns Vec2d from gp
|
||||
---C++: inline
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is static;
|
||||
|
||||
-- methods for a point on two curves
|
||||
|
||||
PointOnC1(me)
|
||||
returns Pnt from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
is static;
|
||||
|
||||
PointOnC2(me)
|
||||
returns Pnt from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
is static;
|
||||
|
||||
|
||||
ParameterOnC1(me)
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
ParameterOnC2(me)
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
TangentOnC1(me)
|
||||
returns Vec from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is static;
|
||||
|
||||
TangentOnC2(me)
|
||||
returns Vec from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
fields
|
||||
pt1 : Pnt from gp;
|
||||
pt2 : Pnt from gp;
|
||||
tg1 : Vec from gp;
|
||||
tg2 : Vec from gp;
|
||||
prm : Real from Standard;
|
||||
u1 : Real from Standard;
|
||||
v1 : Real from Standard;
|
||||
u2 : Real from Standard;
|
||||
v2 : Real from Standard;
|
||||
pc1 : Real from Standard;
|
||||
pc2 : Real from Standard;
|
||||
utg12d : Real from Standard;
|
||||
vtg12d : Real from Standard;
|
||||
utg22d : Real from Standard;
|
||||
vtg22d : Real from Standard;
|
||||
hass1 : Boolean from Standard;
|
||||
hass2 : Boolean from Standard;
|
||||
hasc1 : Boolean from Standard;
|
||||
hasc2 : Boolean from Standard;
|
||||
istgt : Boolean from Standard;
|
||||
end Point;
|
@@ -12,7 +12,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_Point.ixx>
|
||||
|
||||
#include <Blend_Point.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
Blend_Point::Blend_Point ():istgt(Standard_True) {}
|
||||
|
||||
|
197
src/Blend/Blend_Point.hxx
Normal file
197
src/Blend/Blend_Point.hxx
Normal file
@@ -0,0 +1,197 @@
|
||||
// Created on: 1993-12-02
|
||||
// Created by: Jacques GOUSSARD
|
||||
// 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.
|
||||
|
||||
#ifndef _Blend_Point_HeaderFile
|
||||
#define _Blend_Point_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
class Standard_DomainError;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class gp_Vec2d;
|
||||
|
||||
|
||||
|
||||
class Blend_Point
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Blend_Point();
|
||||
|
||||
//! Creates a point on 2 surfaces, with tangents.
|
||||
Standard_EXPORT Blend_Point(const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const gp_Vec& Tg1, const gp_Vec& Tg2, const gp_Vec2d& Tg12d, const gp_Vec2d& Tg22d);
|
||||
|
||||
//! Creates a point on 2 surfaces, without tangents.
|
||||
Standard_EXPORT Blend_Point(const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
|
||||
|
||||
//! Creates a point on a surface and a curve, with tangents.
|
||||
Standard_EXPORT Blend_Point(const gp_Pnt& Pts, const gp_Pnt& Ptc, const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, const gp_Vec& Tgs, const gp_Vec& Tgc, const gp_Vec2d& Tg2d);
|
||||
|
||||
//! Creates a point on a surface and a curve, without tangents.
|
||||
Standard_EXPORT Blend_Point(const gp_Pnt& Pts, const gp_Pnt& Ptc, const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W);
|
||||
|
||||
//! Creates a point on a surface and a curve on surface,
|
||||
//! with tangents.
|
||||
Standard_EXPORT Blend_Point(const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real PC, const gp_Vec& Tg1, const gp_Vec& Tg2, const gp_Vec2d& Tg12d, const gp_Vec2d& Tg22d);
|
||||
|
||||
//! Creates a point on a surface and a curve on surface,
|
||||
//! without tangents.
|
||||
Standard_EXPORT Blend_Point(const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real PC);
|
||||
|
||||
//! Creates a point on two curves on surfaces, with tangents.
|
||||
Standard_EXPORT Blend_Point(const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real PC1, const Standard_Real PC2, const gp_Vec& Tg1, const gp_Vec& Tg2, const gp_Vec2d& Tg12d, const gp_Vec2d& Tg22d);
|
||||
|
||||
//! Creates a point on two curves on surfaces, with tangents.
|
||||
Standard_EXPORT Blend_Point(const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real PC1, const Standard_Real PC2);
|
||||
|
||||
//! Set the values for a point on 2 surfaces, with tangents.
|
||||
Standard_EXPORT void SetValue (const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const gp_Vec& Tg1, const gp_Vec& Tg2, const gp_Vec2d& Tg12d, const gp_Vec2d& Tg22d);
|
||||
|
||||
//! Set the values for a point on 2 surfaces, without tangents.
|
||||
Standard_EXPORT void SetValue (const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2);
|
||||
|
||||
//! Set the values for a point on a surface and a curve,
|
||||
//! with tangents.
|
||||
Standard_EXPORT void SetValue (const gp_Pnt& Pts, const gp_Pnt& Ptc, const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W, const gp_Vec& Tgs, const gp_Vec& Tgc, const gp_Vec2d& Tg2d);
|
||||
|
||||
//! Set the values for a point on a surface and a curve,
|
||||
//! without tangents.
|
||||
Standard_EXPORT void SetValue (const gp_Pnt& Pts, const gp_Pnt& Ptc, const Standard_Real Param, const Standard_Real U, const Standard_Real V, const Standard_Real W);
|
||||
|
||||
//! Creates a point on a surface and a curve on surface,
|
||||
//! with tangents.
|
||||
Standard_EXPORT void SetValue (const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real PC, const gp_Vec& Tg1, const gp_Vec& Tg2, const gp_Vec2d& Tg12d, const gp_Vec2d& Tg22d);
|
||||
|
||||
//! Creates a point on a surface and a curve on surface,
|
||||
//! without tangents.
|
||||
Standard_EXPORT void SetValue (const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real PC);
|
||||
|
||||
//! Creates a point on two curves on surfaces, with tangents.
|
||||
Standard_EXPORT void SetValue (const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real PC1, const Standard_Real PC2, const gp_Vec& Tg1, const gp_Vec& Tg2, const gp_Vec2d& Tg12d, const gp_Vec2d& Tg22d);
|
||||
|
||||
//! Creates a point on two curves on surfaces, without tangents.
|
||||
Standard_EXPORT void SetValue (const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real PC1, const Standard_Real PC2);
|
||||
|
||||
//! Creates a point on two curves.
|
||||
Standard_EXPORT void SetValue (const gp_Pnt& Pt1, const gp_Pnt& Pt2, const Standard_Real Param, const Standard_Real PC1, const Standard_Real PC2);
|
||||
|
||||
//! Changes parameter on existing point
|
||||
void SetParameter (const Standard_Real Param);
|
||||
|
||||
Standard_Real Parameter() const;
|
||||
|
||||
//! Returns Standard_True if it was not possible to compute
|
||||
//! the tangent vectors at PointOnS1 and/or PointOnS2.
|
||||
Standard_Boolean IsTangencyPoint() const;
|
||||
|
||||
const gp_Pnt& PointOnS1() const;
|
||||
|
||||
const gp_Pnt& PointOnS2() const;
|
||||
|
||||
void ParametersOnS1 (Standard_Real& U, Standard_Real& V) const;
|
||||
|
||||
void ParametersOnS2 (Standard_Real& U, Standard_Real& V) const;
|
||||
|
||||
const gp_Vec& TangentOnS1() const;
|
||||
|
||||
const gp_Vec& TangentOnS2() const;
|
||||
|
||||
gp_Vec2d Tangent2dOnS1() const;
|
||||
|
||||
gp_Vec2d Tangent2dOnS2() const;
|
||||
|
||||
const gp_Pnt& PointOnS() const;
|
||||
|
||||
const gp_Pnt& PointOnC() const;
|
||||
|
||||
void ParametersOnS (Standard_Real& U, Standard_Real& V) const;
|
||||
|
||||
Standard_Real ParameterOnC() const;
|
||||
|
||||
const gp_Vec& TangentOnS() const;
|
||||
|
||||
const gp_Vec& TangentOnC() const;
|
||||
|
||||
gp_Vec2d Tangent2d() const;
|
||||
|
||||
const gp_Pnt& PointOnC1() const;
|
||||
|
||||
const gp_Pnt& PointOnC2() const;
|
||||
|
||||
Standard_Real ParameterOnC1() const;
|
||||
|
||||
Standard_Real ParameterOnC2() const;
|
||||
|
||||
const gp_Vec& TangentOnC1() const;
|
||||
|
||||
const gp_Vec& TangentOnC2() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
gp_Pnt pt1;
|
||||
gp_Pnt pt2;
|
||||
gp_Vec tg1;
|
||||
gp_Vec tg2;
|
||||
Standard_Real prm;
|
||||
Standard_Real u1;
|
||||
Standard_Real v1;
|
||||
Standard_Real u2;
|
||||
Standard_Real v2;
|
||||
Standard_Real pc1;
|
||||
Standard_Real pc2;
|
||||
Standard_Real utg12d;
|
||||
Standard_Real vtg12d;
|
||||
Standard_Real utg22d;
|
||||
Standard_Real vtg22d;
|
||||
Standard_Boolean hass1;
|
||||
Standard_Boolean hass2;
|
||||
Standard_Boolean hasc1;
|
||||
Standard_Boolean hasc2;
|
||||
Standard_Boolean istgt;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Blend_Point.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_Point_HeaderFile
|
@@ -1,325 +0,0 @@
|
||||
-- Created by: Jacques GOUSSARD Author: Laurent BOURESCHE --
|
||||
-- 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.
|
||||
|
||||
-- Modify by jlr : Ajout de la methode GetTolerance pour l'approx
|
||||
|
||||
deferred class RstRstFunction from Blend
|
||||
|
||||
|
||||
inherits AppFunction from Blend
|
||||
|
||||
---Purpose: Deferred class for a function used to compute a blending
|
||||
-- surface between a surface and a pcurve on an other Surface,
|
||||
-- using a guide line.
|
||||
-- The vector <X> used in Value, Values and Derivatives methods
|
||||
-- may be the vector of the parametric coordinates U,V,
|
||||
-- W of the extremities of a section on the surface and
|
||||
-- the curve.
|
||||
|
||||
uses Vector from math,
|
||||
Matrix from math,
|
||||
Vec from gp,
|
||||
Vec2d from gp,
|
||||
Pnt from gp,
|
||||
Pnt2d from gp,
|
||||
Shape from GeomAbs,
|
||||
Point from Blend,
|
||||
Array1OfPnt from TColgp,
|
||||
Array1OfVec from TColgp,
|
||||
Array1OfPnt2d from TColgp,
|
||||
Array1OfVec2d from TColgp,
|
||||
Array1OfReal from TColStd,
|
||||
Array1OfInteger from TColStd,
|
||||
DecrochStatus from Blend
|
||||
|
||||
raises DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: Returns 2 (default value). Can be redefined.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns the number of equations of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Set(me: in out; Param: Real from Standard)
|
||||
---Purpose: Sets the value of the parameter along the guide line.
|
||||
-- This determines the plane in which the solution has
|
||||
-- to be found.
|
||||
is deferred;
|
||||
|
||||
Set(me: in out; First, Last: Real from Standard)
|
||||
---Purpose: Sets the bounds of the parametric interval on
|
||||
-- the guide line.
|
||||
-- This determines the derivatives in these values if the
|
||||
-- function is not Cn.
|
||||
is deferred;
|
||||
|
||||
GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns in the vector Tolerance the parametric tolerance
|
||||
-- for each variable;
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
is deferred;
|
||||
|
||||
GetBounds(me; InfBound,SupBound: out Vector from math)
|
||||
---Purpose: Returns in the vector InfBound the lowest values allowed
|
||||
-- for each variables.
|
||||
-- Returns in the vector SupBound the greatest values allowed
|
||||
-- for each of the 3 variables.
|
||||
is deferred;
|
||||
|
||||
IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns Standard_True if Sol is a zero of the function.
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
-- The computation is made at the current value of
|
||||
-- the parameter on the guide line.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
GetMinimalDistance(me)
|
||||
---Purpose: Returns the minimal Distance beetween two
|
||||
-- extremitys of calculed sections.
|
||||
returns Real from Standard;
|
||||
|
||||
|
||||
--- TheFollowing methods are called only when
|
||||
-- IsSolution returns Standard_True.
|
||||
|
||||
Pnt1(me)
|
||||
---Purpose: Returns the point on the first support.
|
||||
---C++: return const &
|
||||
returns Pnt from gp;
|
||||
|
||||
Pnt2(me)
|
||||
---Purpose: Returns the point on the seconde support.
|
||||
---C++: return const &
|
||||
returns Pnt from gp;
|
||||
|
||||
PointOnRst1(me)
|
||||
---Purpose: Returns the point on the surface.
|
||||
returns Pnt from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
PointOnRst2(me)
|
||||
---Purpose: Returns the point on the curve.
|
||||
returns Pnt from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
Pnt2dOnRst1(me)
|
||||
---Purpose: Returns U,V coordinates of the point on the surface.
|
||||
returns Pnt2d from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
Pnt2dOnRst2(me)
|
||||
---Purpose: Returns U,V coordinates of the point on the curve on
|
||||
-- surface.
|
||||
returns Pnt2d from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
ParameterOnRst1(me)
|
||||
---Purpose: Returns parameter of the point on the curve.
|
||||
returns Real from Standard
|
||||
is deferred;
|
||||
|
||||
ParameterOnRst2(me)
|
||||
---Purpose: Returns parameter of the point on the curve.
|
||||
returns Real from Standard
|
||||
is deferred;
|
||||
|
||||
IsTangencyPoint(me)
|
||||
---Purpose: Returns True when it is not possible to compute
|
||||
-- the tangent vectors at PointOnS and/or PointOnRst.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
TangentOnRst1(me)
|
||||
---Purpose: Returns the tangent vector at PointOnS, in 3d space.
|
||||
returns Vec from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is deferred;
|
||||
|
||||
Tangent2dOnRst1(me)
|
||||
---Purpose: Returns the tangent vector at PointOnS, in the
|
||||
-- parametric space of the first surface.
|
||||
returns Vec2d from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is deferred;
|
||||
|
||||
TangentOnRst2(me)
|
||||
---Purpose: Returns the tangent vector at PointOnC, in 3d space.
|
||||
returns Vec from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is deferred;
|
||||
|
||||
Tangent2dOnRst2(me)
|
||||
---Purpose: Returns the tangent vector at PointOnRst, in the
|
||||
-- parametric space of the second surface.
|
||||
returns Vec2d from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is deferred;
|
||||
|
||||
Decroch(me;
|
||||
Sol : Vector from math;
|
||||
NRst1, TgRst1 : out Vec from gp;
|
||||
NRst2, TgRst2 : out Vec from gp)
|
||||
---Purpose: Enables to implement a criterion of decrochage
|
||||
-- specific to the function.
|
||||
-- Warning: Can be called without previous call of issolution
|
||||
-- but the values calculated can be senseless.
|
||||
returns DecrochStatus from Blend
|
||||
is deferred;
|
||||
|
||||
-- Methods for the approximation
|
||||
--
|
||||
IsRational(me) returns Boolean
|
||||
---Purpose: Returns if the section is rationnal
|
||||
is deferred;
|
||||
|
||||
GetSectionSize(me) returns Real
|
||||
---Purpose: Returns the length of the maximum section
|
||||
is deferred;
|
||||
|
||||
GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
|
||||
---Purpose: Compute the minimal value of weight for each poles
|
||||
-- of all sections.
|
||||
is deferred;
|
||||
|
||||
NbIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of intervals for continuity
|
||||
-- <S>. May be one if Continuity(me) >= <S>
|
||||
is deferred;
|
||||
|
||||
Intervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
--
|
||||
-- The array must provide enough room to accomodate
|
||||
-- for the parameters. i.e. T.Length() > NbIntervals()
|
||||
is deferred;
|
||||
|
||||
GetShape(me: in out;
|
||||
NbPoles : out Integer from Standard;
|
||||
NbKnots : out Integer from Standard;
|
||||
Degree : out Integer from Standard;
|
||||
NbPoles2d : out Integer from Standard)
|
||||
|
||||
is deferred;
|
||||
|
||||
GetTolerance(me;
|
||||
BoundTol, SurfTol, AngleTol : Real;
|
||||
Tol3d : out Vector;
|
||||
Tol1D : out Vector )
|
||||
---Purpose: Returns the tolerance to reach in approximation
|
||||
-- to respecte
|
||||
-- BoundTol error at the Boundary
|
||||
-- AngleTol tangent error at the Boundary
|
||||
-- SurfTol error inside the surface.
|
||||
is deferred;
|
||||
|
||||
Knots(me: in out; TKnots: out Array1OfReal from TColStd)
|
||||
is deferred;
|
||||
|
||||
Mults(me: in out; TMults: out Array1OfInteger from TColStd)
|
||||
is deferred;
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd)
|
||||
is deferred;
|
||||
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd)
|
||||
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
D2Poles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
D2Poles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd;
|
||||
D2Weigths : out Array1OfReal from TColStd)
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
end RstRstFunction;
|
||||
|
||||
|
||||
|
@@ -14,7 +14,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_RstRstFunction.ixx>
|
||||
|
||||
#include <Blend_Point.hxx>
|
||||
#include <Blend_RstRstFunction.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
|
||||
const gp_Pnt& Blend_RstRstFunction::Pnt1() const
|
||||
|
233
src/Blend/Blend_RstRstFunction.hxx
Normal file
233
src/Blend/Blend_RstRstFunction.hxx
Normal file
@@ -0,0 +1,233 @@
|
||||
// Created by: Jacques GOUSSARD Author: Laurent BOURESCHE --
|
||||
// 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 _Blend_RstRstFunction_HeaderFile
|
||||
#define _Blend_RstRstFunction_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Blend_AppFunction.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Blend_DecrochStatus.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_Array1OfVec.hxx>
|
||||
#include <TColgp_Array1OfVec2d.hxx>
|
||||
class Standard_DomainError;
|
||||
class math_Matrix;
|
||||
class gp_Pnt;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec;
|
||||
class gp_Vec2d;
|
||||
class Blend_Point;
|
||||
|
||||
|
||||
//! Deferred class for a function used to compute a blending
|
||||
//! surface between a surface and a pcurve on an other Surface,
|
||||
//! using a guide line.
|
||||
//! The vector <X> used in Value, Values and Derivatives methods
|
||||
//! may be the vector of the parametric coordinates U,V,
|
||||
//! W of the extremities of a section on the surface and
|
||||
//! the curve.
|
||||
class Blend_RstRstFunction : public Blend_AppFunction
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns 2 (default value). Can be redefined.
|
||||
Standard_EXPORT virtual Standard_Integer NbVariables() const = 0;
|
||||
|
||||
//! returns the number of equations of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbEquations() const = 0;
|
||||
|
||||
//! computes the values <F> of the Functions for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) = 0;
|
||||
|
||||
//! returns the values <D> of the derivatives for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) = 0;
|
||||
|
||||
//! returns the values <F> of the functions and the derivatives
|
||||
//! <D> for the variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0;
|
||||
|
||||
//! Sets the value of the parameter along the guide line.
|
||||
//! This determines the plane in which the solution has
|
||||
//! to be found.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real Param) = 0;
|
||||
|
||||
//! Sets the bounds of the parametric interval on
|
||||
//! the guide line.
|
||||
//! This determines the derivatives in these values if the
|
||||
//! function is not Cn.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real First, const Standard_Real Last) = 0;
|
||||
|
||||
//! Returns in the vector Tolerance the parametric tolerance
|
||||
//! for each variable;
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const = 0;
|
||||
|
||||
//! Returns in the vector InfBound the lowest values allowed
|
||||
//! for each variables.
|
||||
//! Returns in the vector SupBound the greatest values allowed
|
||||
//! for each of the 3 variables.
|
||||
Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const = 0;
|
||||
|
||||
//! Returns Standard_True if Sol is a zero of the function.
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
//! The computation is made at the current value of
|
||||
//! the parameter on the guide line.
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) = 0;
|
||||
|
||||
//! Returns the minimal Distance beetween two
|
||||
//! extremitys of calculed sections.
|
||||
Standard_EXPORT Standard_Real GetMinimalDistance() const;
|
||||
|
||||
//! Returns the point on the first support.
|
||||
Standard_EXPORT const gp_Pnt& Pnt1() const;
|
||||
|
||||
//! Returns the point on the seconde support.
|
||||
Standard_EXPORT const gp_Pnt& Pnt2() const;
|
||||
|
||||
//! Returns the point on the surface.
|
||||
Standard_EXPORT virtual const gp_Pnt& PointOnRst1() const = 0;
|
||||
|
||||
//! Returns the point on the curve.
|
||||
Standard_EXPORT virtual const gp_Pnt& PointOnRst2() const = 0;
|
||||
|
||||
//! Returns U,V coordinates of the point on the surface.
|
||||
Standard_EXPORT virtual const gp_Pnt2d& Pnt2dOnRst1() const = 0;
|
||||
|
||||
//! Returns U,V coordinates of the point on the curve on
|
||||
//! surface.
|
||||
Standard_EXPORT virtual const gp_Pnt2d& Pnt2dOnRst2() const = 0;
|
||||
|
||||
//! Returns parameter of the point on the curve.
|
||||
Standard_EXPORT virtual Standard_Real ParameterOnRst1() const = 0;
|
||||
|
||||
//! Returns parameter of the point on the curve.
|
||||
Standard_EXPORT virtual Standard_Real ParameterOnRst2() const = 0;
|
||||
|
||||
//! Returns True when it is not possible to compute
|
||||
//! the tangent vectors at PointOnS and/or PointOnRst.
|
||||
Standard_EXPORT virtual Standard_Boolean IsTangencyPoint() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS, in 3d space.
|
||||
Standard_EXPORT virtual const gp_Vec& TangentOnRst1() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS, in the
|
||||
//! parametric space of the first surface.
|
||||
Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnRst1() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnC, in 3d space.
|
||||
Standard_EXPORT virtual const gp_Vec& TangentOnRst2() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnRst, in the
|
||||
//! parametric space of the second surface.
|
||||
Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnRst2() const = 0;
|
||||
|
||||
//! Enables to implement a criterion of decrochage
|
||||
//! specific to the function.
|
||||
//! Warning: Can be called without previous call of issolution
|
||||
//! but the values calculated can be senseless.
|
||||
Standard_EXPORT virtual Blend_DecrochStatus Decroch (const math_Vector& Sol, gp_Vec& NRst1, gp_Vec& TgRst1, gp_Vec& NRst2, gp_Vec& TgRst2) const = 0;
|
||||
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const = 0;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
Standard_EXPORT virtual Standard_Real GetSectionSize() const = 0;
|
||||
|
||||
//! Compute the minimal value of weight for each poles
|
||||
//! of all sections.
|
||||
Standard_EXPORT virtual void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const = 0;
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
//! <S>. May be one if Continuity(me) >= <S>
|
||||
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const = 0;
|
||||
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! of continuity <S>.
|
||||
//!
|
||||
//! The array must provide enough room to accomodate
|
||||
//! for the parameters. i.e. T.Length() > NbIntervals()
|
||||
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) = 0;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False.
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False.
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_RstRstFunction_HeaderFile
|
33
src/Blend/Blend_Status.hxx
Normal file
33
src/Blend/Blend_Status.hxx
Normal file
@@ -0,0 +1,33 @@
|
||||
// Created on: 1993-12-02
|
||||
// Created by: Jacques GOUSSARD
|
||||
// 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.
|
||||
|
||||
#ifndef _Blend_Status_HeaderFile
|
||||
#define _Blend_Status_HeaderFile
|
||||
|
||||
|
||||
enum Blend_Status
|
||||
{
|
||||
Blend_StepTooLarge,
|
||||
Blend_StepTooSmall,
|
||||
Blend_Backward,
|
||||
Blend_SamePoints,
|
||||
Blend_OnRst1,
|
||||
Blend_OnRst2,
|
||||
Blend_OnRst12,
|
||||
Blend_OK
|
||||
};
|
||||
|
||||
#endif // _Blend_Status_HeaderFile
|
@@ -1,101 +0,0 @@
|
||||
-- Created on: 1997-02-21
|
||||
-- Created by: Laurent BOURESCHE
|
||||
-- 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.
|
||||
|
||||
deferred class SurfCurvFuncInv from Blend
|
||||
|
||||
inherits FunctionSetWithDerivatives from math
|
||||
|
||||
|
||||
---Purpose: Deferred class for a function used to compute a
|
||||
-- blending surface between a surface and a curve, using
|
||||
-- a guide line. This function is used to find a
|
||||
-- solution on a done restriction of the surface.
|
||||
--
|
||||
-- The vector <X> used in Value, Values and Derivatives
|
||||
-- methods has to be the vector of the parametric
|
||||
-- coordinates wguide, wcurv, wrst where wguide is the
|
||||
-- parameter on the guide line, wcurv is the parameter on
|
||||
-- the curve, wrst is the parameter on the restriction on
|
||||
-- the surface.
|
||||
|
||||
uses
|
||||
HCurve2d from Adaptor2d,
|
||||
Vector from math,
|
||||
Matrix from math
|
||||
|
||||
|
||||
is
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: Returns 3.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns the number of equations of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Set(me: in out; Rst : HCurve2d from Adaptor2d)
|
||||
---Purpose: Set the Point on which a solution has to be found.
|
||||
is deferred;
|
||||
|
||||
GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns in the vector Tolerance the parametric tolerance
|
||||
-- for each of the 3 variables;
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
is deferred;
|
||||
|
||||
GetBounds(me; InfBound,SupBound: out Vector from math)
|
||||
---Purpose: Returns in the vector InfBound the lowest values allowed
|
||||
-- for each of the 3 variables.
|
||||
-- Returns in the vector SupBound the greatest values allowed
|
||||
-- for each of the 3 variables.
|
||||
is deferred;
|
||||
|
||||
|
||||
IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns Standard_True if Sol is a zero of the function.
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
end SurfCurvFuncInv;
|
@@ -14,13 +14,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_SurfCurvFuncInv.ixx>
|
||||
|
||||
#include <Adaptor2d_HCurve2d.hxx>
|
||||
#include <Blend_SurfCurvFuncInv.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : NbVariables
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer Blend_SurfCurvFuncInv::NbVariables() const
|
||||
{
|
||||
return 3;
|
||||
|
116
src/Blend/Blend_SurfCurvFuncInv.hxx
Normal file
116
src/Blend/Blend_SurfCurvFuncInv.hxx
Normal file
@@ -0,0 +1,116 @@
|
||||
// Created on: 1997-02-21
|
||||
// Created by: Laurent BOURESCHE
|
||||
// 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 _Blend_SurfCurvFuncInv_HeaderFile
|
||||
#define _Blend_SurfCurvFuncInv_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <math_FunctionSetWithDerivatives.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class math_Matrix;
|
||||
class Adaptor2d_HCurve2d;
|
||||
|
||||
|
||||
//! Deferred class for a function used to compute a
|
||||
//! blending surface between a surface and a curve, using
|
||||
//! a guide line. This function is used to find a
|
||||
//! solution on a done restriction of the surface.
|
||||
//!
|
||||
//! The vector <X> used in Value, Values and Derivatives
|
||||
//! methods has to be the vector of the parametric
|
||||
//! coordinates wguide, wcurv, wrst where wguide is the
|
||||
//! parameter on the guide line, wcurv is the parameter on
|
||||
//! the curve, wrst is the parameter on the restriction on
|
||||
//! the surface.
|
||||
class Blend_SurfCurvFuncInv : public math_FunctionSetWithDerivatives
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns 3.
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
//! returns the number of equations of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbEquations() const = 0;
|
||||
|
||||
//! computes the values <F> of the Functions for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) = 0;
|
||||
|
||||
//! returns the values <D> of the derivatives for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) = 0;
|
||||
|
||||
//! returns the values <F> of the functions and the derivatives
|
||||
//! <D> for the variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0;
|
||||
|
||||
//! Set the Point on which a solution has to be found.
|
||||
Standard_EXPORT virtual void Set (const Handle(Adaptor2d_HCurve2d)& Rst) = 0;
|
||||
|
||||
//! Returns in the vector Tolerance the parametric tolerance
|
||||
//! for each of the 3 variables;
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const = 0;
|
||||
|
||||
//! Returns in the vector InfBound the lowest values allowed
|
||||
//! for each of the 3 variables.
|
||||
//! Returns in the vector SupBound the greatest values allowed
|
||||
//! for each of the 3 variables.
|
||||
Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const = 0;
|
||||
|
||||
//! Returns Standard_True if Sol is a zero of the function.
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_SurfCurvFuncInv_HeaderFile
|
@@ -1,100 +0,0 @@
|
||||
-- Created on: 1997-02-12
|
||||
-- Created by: Laurent BOURESCHE
|
||||
-- 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.
|
||||
|
||||
deferred class SurfPointFuncInv from Blend
|
||||
|
||||
|
||||
inherits FunctionSetWithDerivatives from math
|
||||
|
||||
|
||||
---Purpose: Deferred class for a function used to compute a
|
||||
-- blending surface between a surface and a curve, using
|
||||
-- a guide line. This function is used to find a
|
||||
-- solution on a done point of the curve.
|
||||
--
|
||||
-- The vector <X> used in Value, Values and Derivatives
|
||||
-- methods has to be the vector of the parametric
|
||||
-- coordinates w, U, V where w is the parameter on the
|
||||
-- guide line, U,V are the parametric coordinates of a
|
||||
-- point on the partner surface.
|
||||
|
||||
uses
|
||||
Pnt from gp,
|
||||
Vector from math,
|
||||
Matrix from math
|
||||
|
||||
is
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: Returns 3.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns the number of equations of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Set(me: in out; P : Pnt from gp)
|
||||
---Purpose: Set the Point on which a solution has to be found.
|
||||
is deferred;
|
||||
|
||||
GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns in the vector Tolerance the parametric tolerance
|
||||
-- for each of the 3 variables;
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
is deferred;
|
||||
|
||||
GetBounds(me; InfBound,SupBound: out Vector from math)
|
||||
---Purpose: Returns in the vector InfBound the lowest values allowed
|
||||
-- for each of the 3 variables.
|
||||
-- Returns in the vector SupBound the greatest values allowed
|
||||
-- for each of the 3 variables.
|
||||
is deferred;
|
||||
|
||||
|
||||
IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns Standard_True if Sol is a zero of the function.
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
end SurfPointFuncInv;
|
@@ -14,13 +14,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_SurfPointFuncInv.ixx>
|
||||
|
||||
#include <Blend_SurfPointFuncInv.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : NbVariables
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer Blend_SurfPointFuncInv::NbVariables() const
|
||||
{
|
||||
return 3;
|
||||
|
115
src/Blend/Blend_SurfPointFuncInv.hxx
Normal file
115
src/Blend/Blend_SurfPointFuncInv.hxx
Normal file
@@ -0,0 +1,115 @@
|
||||
// Created on: 1997-02-12
|
||||
// Created by: Laurent BOURESCHE
|
||||
// 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 _Blend_SurfPointFuncInv_HeaderFile
|
||||
#define _Blend_SurfPointFuncInv_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <math_FunctionSetWithDerivatives.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class math_Matrix;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
//! Deferred class for a function used to compute a
|
||||
//! blending surface between a surface and a curve, using
|
||||
//! a guide line. This function is used to find a
|
||||
//! solution on a done point of the curve.
|
||||
//!
|
||||
//! The vector <X> used in Value, Values and Derivatives
|
||||
//! methods has to be the vector of the parametric
|
||||
//! coordinates w, U, V where w is the parameter on the
|
||||
//! guide line, U,V are the parametric coordinates of a
|
||||
//! point on the partner surface.
|
||||
class Blend_SurfPointFuncInv : public math_FunctionSetWithDerivatives
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns 3.
|
||||
Standard_EXPORT Standard_Integer NbVariables() const;
|
||||
|
||||
//! returns the number of equations of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbEquations() const = 0;
|
||||
|
||||
//! computes the values <F> of the Functions for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) = 0;
|
||||
|
||||
//! returns the values <D> of the derivatives for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) = 0;
|
||||
|
||||
//! returns the values <F> of the functions and the derivatives
|
||||
//! <D> for the variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0;
|
||||
|
||||
//! Set the Point on which a solution has to be found.
|
||||
Standard_EXPORT virtual void Set (const gp_Pnt& P) = 0;
|
||||
|
||||
//! Returns in the vector Tolerance the parametric tolerance
|
||||
//! for each of the 3 variables;
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const = 0;
|
||||
|
||||
//! Returns in the vector InfBound the lowest values allowed
|
||||
//! for each of the 3 variables.
|
||||
//! Returns in the vector SupBound the greatest values allowed
|
||||
//! for each of the 3 variables.
|
||||
Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const = 0;
|
||||
|
||||
//! Returns Standard_True if Sol is a zero of the function.
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_SurfPointFuncInv_HeaderFile
|
@@ -1,314 +0,0 @@
|
||||
-- Created by: Jacques GOUSSARD Author: Laurent BOURESCHE --
|
||||
-- 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.
|
||||
|
||||
-- Modify by jlr : Ajout de la methode GetTolerance pour l'approx
|
||||
|
||||
deferred class SurfRstFunction from Blend
|
||||
|
||||
|
||||
inherits AppFunction from Blend
|
||||
|
||||
---Purpose: Deferred class for a function used to compute a blending
|
||||
-- surface between a surface and a pcurve on an other Surface,
|
||||
-- using a guide line.
|
||||
-- The vector <X> used in Value, Values and Derivatives methods
|
||||
-- may be the vector of the parametric coordinates U,V,
|
||||
-- W of the extremities of a section on the surface and
|
||||
-- the curve.
|
||||
|
||||
uses Vector from math,
|
||||
Matrix from math,
|
||||
Vec from gp,
|
||||
Vec2d from gp,
|
||||
Pnt from gp,
|
||||
Pnt2d from gp,
|
||||
Shape from GeomAbs,
|
||||
Point from Blend,
|
||||
Array1OfPnt from TColgp,
|
||||
Array1OfVec from TColgp,
|
||||
Array1OfPnt2d from TColgp,
|
||||
Array1OfVec2d from TColgp,
|
||||
Array1OfReal from TColStd,
|
||||
Array1OfInteger from TColStd
|
||||
|
||||
|
||||
raises DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
|
||||
NbVariables(me)
|
||||
---Purpose: Returns 3 (default value). Can be redefined.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
NbEquations(me)
|
||||
---Purpose: returns the number of equations of the function.
|
||||
returns Integer from Standard
|
||||
is deferred;
|
||||
|
||||
Value(me: in out; X: Vector; F: out Vector)
|
||||
---Purpose: computes the values <F> of the Functions for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Derivatives(me: in out; X: Vector; D: out Matrix)
|
||||
---Purpose: returns the values <D> of the derivatives for the
|
||||
-- variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Values(me: in out; X: Vector; F: out Vector; D: out Matrix)
|
||||
---Purpose: returns the values <F> of the functions and the derivatives
|
||||
-- <D> for the variable <X>.
|
||||
-- Returns True if the computation was done successfully,
|
||||
-- False otherwise.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Set(me: in out; Param: Real from Standard)
|
||||
---Purpose: Sets the value of the parameter along the guide line.
|
||||
-- This determines the plane in which the solution has
|
||||
-- to be found.
|
||||
is deferred;
|
||||
|
||||
Set(me: in out; First, Last: Real from Standard)
|
||||
---Purpose: Sets the bounds of the parametric interval on
|
||||
-- the guide line.
|
||||
-- This determines the derivatives in these values if the
|
||||
-- function is not Cn.
|
||||
is deferred;
|
||||
|
||||
GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns in the vector Tolerance the parametric tolerance
|
||||
-- for each variable;
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
is deferred;
|
||||
|
||||
GetBounds(me; InfBound,SupBound: out Vector from math)
|
||||
---Purpose: Returns in the vector InfBound the lowest values allowed
|
||||
-- for each variables.
|
||||
-- Returns in the vector SupBound the greatest values allowed
|
||||
-- for each of the 3 variables.
|
||||
is deferred;
|
||||
|
||||
IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard)
|
||||
---Purpose: Returns Standard_True if Sol is a zero of the function.
|
||||
-- Tol is the tolerance used in 3d space.
|
||||
-- The computation is made at the current value of
|
||||
-- the parameter on the guide line.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
GetMinimalDistance(me)
|
||||
---Purpose: Returns the minimal Distance beetween two
|
||||
-- extremitys of calculed sections.
|
||||
returns Real from Standard;
|
||||
|
||||
|
||||
--- TheFollowing methods are called only when
|
||||
-- IsSolution returns Standard_True.
|
||||
|
||||
Pnt1(me)
|
||||
---Purpose: Returns the point on the first support.
|
||||
---C++: return const &
|
||||
returns Pnt from gp;
|
||||
|
||||
Pnt2(me)
|
||||
---Purpose: Returns the point on the seconde support.
|
||||
---C++: return const &
|
||||
returns Pnt from gp;
|
||||
|
||||
PointOnS(me)
|
||||
---Purpose: Returns the point on the surface.
|
||||
returns Pnt from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
PointOnRst(me)
|
||||
---Purpose: Returns the point on the curve.
|
||||
returns Pnt from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
Pnt2dOnS(me)
|
||||
---Purpose: Returns U,V coordinates of the point on the surface.
|
||||
returns Pnt2d from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
Pnt2dOnRst(me)
|
||||
---Purpose: Returns U,V coordinates of the point on the curve on
|
||||
-- surface.
|
||||
returns Pnt2d from gp
|
||||
---C++: return const&
|
||||
is deferred;
|
||||
|
||||
ParameterOnRst(me)
|
||||
---Purpose: Returns parameter of the point on the curve.
|
||||
returns Real from Standard
|
||||
is deferred;
|
||||
|
||||
IsTangencyPoint(me)
|
||||
---Purpose: Returns True when it is not possible to compute
|
||||
-- the tangent vectors at PointOnS and/or PointOnRst.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
TangentOnS(me)
|
||||
---Purpose: Returns the tangent vector at PointOnS, in 3d space.
|
||||
returns Vec from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is deferred;
|
||||
|
||||
Tangent2dOnS(me)
|
||||
---Purpose: Returns the tangent vector at PointOnS, in the
|
||||
-- parametric space of the first surface.
|
||||
returns Vec2d from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is deferred;
|
||||
|
||||
TangentOnRst(me)
|
||||
---Purpose: Returns the tangent vector at PointOnC, in 3d space.
|
||||
returns Vec from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is deferred;
|
||||
|
||||
Tangent2dOnRst(me)
|
||||
---Purpose: Returns the tangent vector at PointOnRst, in the
|
||||
-- parametric space of the second surface.
|
||||
returns Vec2d from gp
|
||||
---C++: return const&
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsTangencyPoint
|
||||
-- returns Standard_True.
|
||||
is deferred;
|
||||
|
||||
Decroch(me;
|
||||
Sol : Vector from math;
|
||||
NS,TgS : out Vec from gp)
|
||||
---Purpose: Enables implementation of a criterion of decrochage
|
||||
-- specific to the function.
|
||||
---Warning: Can be called without previous call of issolution
|
||||
-- but the calculated values might be senseless.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
-- Methods for the approximation
|
||||
--
|
||||
IsRational(me) returns Boolean
|
||||
---Purpose: Returns if the section is rationnal
|
||||
is deferred;
|
||||
|
||||
GetSectionSize(me) returns Real
|
||||
---Purpose: Returns the length of the maximum section
|
||||
is deferred;
|
||||
|
||||
GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
|
||||
---Purpose: Compute the minimal value of weight for each poles
|
||||
-- of all sections.
|
||||
is deferred;
|
||||
|
||||
NbIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of intervals for continuity
|
||||
-- <S>. May be one if Continuity(me) >= <S>
|
||||
is deferred;
|
||||
|
||||
Intervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
--
|
||||
-- The array must provide enough room to accomodate
|
||||
-- for the parameters. i.e. T.Length() > NbIntervals()
|
||||
is deferred;
|
||||
|
||||
GetShape(me: in out;
|
||||
NbPoles : out Integer from Standard;
|
||||
NbKnots : out Integer from Standard;
|
||||
Degree : out Integer from Standard;
|
||||
NbPoles2d : out Integer from Standard)
|
||||
|
||||
is deferred;
|
||||
|
||||
GetTolerance(me;
|
||||
BoundTol, SurfTol, AngleTol : Real;
|
||||
Tol3d : out Vector;
|
||||
Tol1D : out Vector )
|
||||
---Purpose: Returns the tolerance to reach in approximation
|
||||
-- to respecte
|
||||
-- BoundTol error at the Boundary
|
||||
-- AngleTol tangent error at the Boundary
|
||||
-- SurfTol error inside the surface.
|
||||
is deferred;
|
||||
|
||||
Knots(me: in out; TKnots: out Array1OfReal from TColStd)
|
||||
is deferred;
|
||||
|
||||
Mults(me: in out; TMults: out Array1OfInteger from TColStd)
|
||||
is deferred;
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd)
|
||||
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
DPoles : out Array1OfVec from TColgp;
|
||||
D2Poles : out Array1OfVec from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
DPoles2d : out Array1OfVec2d from TColgp;
|
||||
D2Poles2d : out Array1OfVec2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd;
|
||||
DWeigths : out Array1OfReal from TColStd;
|
||||
D2Weigths : out Array1OfReal from TColStd)
|
||||
---Purpose: Used for the first and last section
|
||||
-- The method returns Standard_True if the derivatives
|
||||
-- are computed, otherwise it returns Standard_False.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
Section(me: in out; P: Point from Blend;
|
||||
Poles : out Array1OfPnt from TColgp;
|
||||
Poles2d : out Array1OfPnt2d from TColgp;
|
||||
Weigths : out Array1OfReal from TColStd)
|
||||
is deferred;
|
||||
|
||||
end SurfRstFunction;
|
@@ -14,7 +14,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_SurfRstFunction.ixx>
|
||||
|
||||
#include <Blend_Point.hxx>
|
||||
#include <Blend_SurfRstFunction.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <math_Matrix.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
|
||||
const gp_Pnt& Blend_SurfRstFunction::Pnt1() const
|
||||
|
227
src/Blend/Blend_SurfRstFunction.hxx
Normal file
227
src/Blend/Blend_SurfRstFunction.hxx
Normal file
@@ -0,0 +1,227 @@
|
||||
// Created by: Jacques GOUSSARD Author: Laurent BOURESCHE --
|
||||
// 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 _Blend_SurfRstFunction_HeaderFile
|
||||
#define _Blend_SurfRstFunction_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Blend_AppFunction.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_Vector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfVec.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_Array1OfVec2d.hxx>
|
||||
class Standard_DomainError;
|
||||
class math_Matrix;
|
||||
class gp_Pnt;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec;
|
||||
class gp_Vec2d;
|
||||
class Blend_Point;
|
||||
|
||||
|
||||
//! Deferred class for a function used to compute a blending
|
||||
//! surface between a surface and a pcurve on an other Surface,
|
||||
//! using a guide line.
|
||||
//! The vector <X> used in Value, Values and Derivatives methods
|
||||
//! may be the vector of the parametric coordinates U,V,
|
||||
//! W of the extremities of a section on the surface and
|
||||
//! the curve.
|
||||
class Blend_SurfRstFunction : public Blend_AppFunction
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns 3 (default value). Can be redefined.
|
||||
Standard_EXPORT virtual Standard_Integer NbVariables() const = 0;
|
||||
|
||||
//! returns the number of equations of the function.
|
||||
Standard_EXPORT virtual Standard_Integer NbEquations() const = 0;
|
||||
|
||||
//! computes the values <F> of the Functions for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Value (const math_Vector& X, math_Vector& F) = 0;
|
||||
|
||||
//! returns the values <D> of the derivatives for the
|
||||
//! variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) = 0;
|
||||
|
||||
//! returns the values <F> of the functions and the derivatives
|
||||
//! <D> for the variable <X>.
|
||||
//! Returns True if the computation was done successfully,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT virtual Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D) = 0;
|
||||
|
||||
//! Sets the value of the parameter along the guide line.
|
||||
//! This determines the plane in which the solution has
|
||||
//! to be found.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real Param) = 0;
|
||||
|
||||
//! Sets the bounds of the parametric interval on
|
||||
//! the guide line.
|
||||
//! This determines the derivatives in these values if the
|
||||
//! function is not Cn.
|
||||
Standard_EXPORT virtual void Set (const Standard_Real First, const Standard_Real Last) = 0;
|
||||
|
||||
//! Returns in the vector Tolerance the parametric tolerance
|
||||
//! for each variable;
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
Standard_EXPORT virtual void GetTolerance (math_Vector& Tolerance, const Standard_Real Tol) const = 0;
|
||||
|
||||
//! Returns in the vector InfBound the lowest values allowed
|
||||
//! for each variables.
|
||||
//! Returns in the vector SupBound the greatest values allowed
|
||||
//! for each of the 3 variables.
|
||||
Standard_EXPORT virtual void GetBounds (math_Vector& InfBound, math_Vector& SupBound) const = 0;
|
||||
|
||||
//! Returns Standard_True if Sol is a zero of the function.
|
||||
//! Tol is the tolerance used in 3d space.
|
||||
//! The computation is made at the current value of
|
||||
//! the parameter on the guide line.
|
||||
Standard_EXPORT virtual Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) = 0;
|
||||
|
||||
//! Returns the minimal Distance beetween two
|
||||
//! extremitys of calculed sections.
|
||||
Standard_EXPORT Standard_Real GetMinimalDistance() const;
|
||||
|
||||
//! Returns the point on the first support.
|
||||
Standard_EXPORT const gp_Pnt& Pnt1() const;
|
||||
|
||||
//! Returns the point on the seconde support.
|
||||
Standard_EXPORT const gp_Pnt& Pnt2() const;
|
||||
|
||||
//! Returns the point on the surface.
|
||||
Standard_EXPORT virtual const gp_Pnt& PointOnS() const = 0;
|
||||
|
||||
//! Returns the point on the curve.
|
||||
Standard_EXPORT virtual const gp_Pnt& PointOnRst() const = 0;
|
||||
|
||||
//! Returns U,V coordinates of the point on the surface.
|
||||
Standard_EXPORT virtual const gp_Pnt2d& Pnt2dOnS() const = 0;
|
||||
|
||||
//! Returns U,V coordinates of the point on the curve on
|
||||
//! surface.
|
||||
Standard_EXPORT virtual const gp_Pnt2d& Pnt2dOnRst() const = 0;
|
||||
|
||||
//! Returns parameter of the point on the curve.
|
||||
Standard_EXPORT virtual Standard_Real ParameterOnRst() const = 0;
|
||||
|
||||
//! Returns True when it is not possible to compute
|
||||
//! the tangent vectors at PointOnS and/or PointOnRst.
|
||||
Standard_EXPORT virtual Standard_Boolean IsTangencyPoint() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS, in 3d space.
|
||||
Standard_EXPORT virtual const gp_Vec& TangentOnS() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnS, in the
|
||||
//! parametric space of the first surface.
|
||||
Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnS() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnC, in 3d space.
|
||||
Standard_EXPORT virtual const gp_Vec& TangentOnRst() const = 0;
|
||||
|
||||
//! Returns the tangent vector at PointOnRst, in the
|
||||
//! parametric space of the second surface.
|
||||
Standard_EXPORT virtual const gp_Vec2d& Tangent2dOnRst() const = 0;
|
||||
|
||||
//! Enables implementation of a criterion of decrochage
|
||||
//! specific to the function.
|
||||
Standard_EXPORT virtual Standard_Boolean Decroch (const math_Vector& Sol, gp_Vec& NS, gp_Vec& TgS) const = 0;
|
||||
|
||||
//! Returns if the section is rationnal
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const = 0;
|
||||
|
||||
//! Returns the length of the maximum section
|
||||
Standard_EXPORT virtual Standard_Real GetSectionSize() const = 0;
|
||||
|
||||
//! Compute the minimal value of weight for each poles
|
||||
//! of all sections.
|
||||
Standard_EXPORT virtual void GetMinimalWeight (TColStd_Array1OfReal& Weigths) const = 0;
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
//! <S>. May be one if Continuity(me) >= <S>
|
||||
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const = 0;
|
||||
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! of continuity <S>.
|
||||
//!
|
||||
//! The array must provide enough room to accomodate
|
||||
//! for the parameters. i.e. T.Length() > NbIntervals()
|
||||
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void GetShape (Standard_Integer& NbPoles, Standard_Integer& NbKnots, Standard_Integer& Degree, Standard_Integer& NbPoles2d) = 0;
|
||||
|
||||
//! Returns the tolerance to reach in approximation
|
||||
//! to respecte
|
||||
//! BoundTol error at the Boundary
|
||||
//! AngleTol tangent error at the Boundary
|
||||
//! SurfTol error inside the surface.
|
||||
Standard_EXPORT virtual void GetTolerance (const Standard_Real BoundTol, const Standard_Real SurfTol, const Standard_Real AngleTol, math_Vector& Tol3d, math_Vector& Tol1D) const = 0;
|
||||
|
||||
Standard_EXPORT virtual void Knots (TColStd_Array1OfReal& TKnots) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Mults (TColStd_Array1OfInteger& TMults) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False.
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths) = 0;
|
||||
|
||||
//! Used for the first and last section
|
||||
//! The method returns Standard_True if the derivatives
|
||||
//! are computed, otherwise it returns Standard_False.
|
||||
Standard_EXPORT virtual Standard_Boolean Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfVec& DPoles, TColgp_Array1OfVec& D2Poles, TColgp_Array1OfPnt2d& Poles2d, TColgp_Array1OfVec2d& DPoles2d, TColgp_Array1OfVec2d& D2Poles2d, TColStd_Array1OfReal& Weigths, TColStd_Array1OfReal& DWeigths, TColStd_Array1OfReal& D2Weigths) = 0;
|
||||
|
||||
Standard_EXPORT virtual void Section (const Blend_Point& P, TColgp_Array1OfPnt& Poles, TColgp_Array1OfPnt2d& Poles2d, TColStd_Array1OfReal& Weigths) = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Blend_SurfRstFunction_HeaderFile
|
@@ -1,302 +0,0 @@
|
||||
-- Created on: 1993-12-02
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- 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 Walking from Blend
|
||||
(TheVertex as any;
|
||||
TheArc as any;
|
||||
TheSurface as any;
|
||||
TheCurve as any;
|
||||
TheVertexTool as any;
|
||||
TheArcTool as any;
|
||||
TheSurfaceTool as any;
|
||||
TheCurveTool as any;
|
||||
TheTopolTool as Transient;
|
||||
TheBlendTool as any;
|
||||
ThePointOnRst as any;
|
||||
TheSeqPointOnRst as any;
|
||||
TheExtremity as any;
|
||||
TheLine as Transient)
|
||||
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses Point from Blend,
|
||||
SequenceOfPoint from Blend,
|
||||
Status from Blend,
|
||||
Vector from math,
|
||||
Matrix from math,
|
||||
Pnt from gp,
|
||||
Pnt2d from gp,
|
||||
Vec from gp,
|
||||
Vec2d from gp,
|
||||
Transition from IntSurf,
|
||||
Function from Blend,
|
||||
FuncInv from Blend,
|
||||
HElSpine from ChFiDS,
|
||||
State from TopAbs
|
||||
|
||||
|
||||
raises NotDone from StdFail
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create(Surf1,Surf2: TheSurface;
|
||||
Domain1,Domain2: TheTopolTool;
|
||||
HGuide : HElSpine from ChFiDS)
|
||||
returns Walking from Blend;
|
||||
|
||||
|
||||
SetDomainsToRecadre(me : in out; RecDomain1, RecDomain2: TheTopolTool);
|
||||
---Purpose: To define different domains for control and clipping.
|
||||
|
||||
AddSingularPoint(me : in out; P : Point from Blend);
|
||||
---Purpose: To define singular points computed before walking.
|
||||
|
||||
Perform(me: in out; F : in out Function from Blend;
|
||||
FInv : in out FuncInv from Blend;
|
||||
Pdep : Real from Standard;
|
||||
Pmax : Real from Standard;
|
||||
MaxStep : Real from Standard;
|
||||
TolGuide: Real from Standard;
|
||||
Soldep : Vector from math;
|
||||
Tolesp : Real from Standard;
|
||||
Fleche : Real from Standard;
|
||||
Appro : Boolean from Standard = Standard_False)
|
||||
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
PerformFirstSection(me : in out;
|
||||
F : in out Function from Blend;
|
||||
Pdep : Real from Standard;
|
||||
ParDep : in out Vector from math;
|
||||
Tolesp : Real from Standard;
|
||||
TolGuide : Real from Standard;
|
||||
Pos1, Pos2 : out State from TopAbs)
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
|
||||
PerformFirstSection(me: in out;
|
||||
F : in out Function from Blend;
|
||||
FInv : in out FuncInv from Blend;
|
||||
Pdep : Real from Standard;
|
||||
Pmax : Real from Standard;
|
||||
ParDep : Vector from math;
|
||||
Tolesp : Real from Standard;
|
||||
TolGuide : Real from Standard;
|
||||
RecOnS1 : Boolean from Standard;
|
||||
RecOnS2 : Boolean from Standard;
|
||||
Psol : out Real from Standard;
|
||||
ParSol : out Vector from math)
|
||||
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Continu(me: in out;F : in out Function from Blend;
|
||||
FInv : in out FuncInv from Blend;
|
||||
P : Real from Standard)
|
||||
|
||||
returns Boolean from Standard
|
||||
raises NotDone from StdFail
|
||||
is static;
|
||||
|
||||
|
||||
Continu(me: in out;F : in out Function from Blend;
|
||||
FInv : in out FuncInv from Blend;
|
||||
P : Real from Standard;
|
||||
OnS1 : Boolean from Standard)
|
||||
|
||||
returns Boolean from Standard
|
||||
raises NotDone from StdFail
|
||||
is static;
|
||||
|
||||
|
||||
Complete(me: in out;F : in out Function from Blend;
|
||||
FInv : in out FuncInv from Blend;
|
||||
Pmin : Real from Standard)
|
||||
|
||||
returns Boolean from Standard
|
||||
raises NotDone from StdFail
|
||||
is static;
|
||||
|
||||
|
||||
ClassificationOnS1(me : in out;
|
||||
C : Boolean from Standard)
|
||||
is static;
|
||||
|
||||
|
||||
ClassificationOnS2(me : in out;
|
||||
C : Boolean from Standard)
|
||||
is static;
|
||||
|
||||
|
||||
Check2d(me : in out;
|
||||
C : Boolean from Standard)
|
||||
is static;
|
||||
|
||||
|
||||
Check(me : in out;
|
||||
C : Boolean from Standard)
|
||||
is static;
|
||||
|
||||
TwistOnS1(me) returns Boolean from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
TwistOnS2(me) returns Boolean from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
InternalPerform (me: in out;F : in out Function from Blend;
|
||||
FInv : in out FuncInv from Blend;
|
||||
Bound : Real from Standard)
|
||||
|
||||
is static private;
|
||||
|
||||
CorrectExtremityOnOneRst (me; IndexOfRst : Integer from Standard;
|
||||
theU : Real from Standard;
|
||||
theV : Real from Standard;
|
||||
theParam : Real from Standard;
|
||||
thePntOnRst : Pnt from gp;
|
||||
NewU : out Real from Standard;
|
||||
NewV : out Real from Standard;
|
||||
NewPoint : out Pnt from gp;
|
||||
NewParam : out Real from Standard)
|
||||
returns Boolean from Standard
|
||||
is static private;
|
||||
|
||||
|
||||
IsDone(me)
|
||||
|
||||
returns Boolean from Standard
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
|
||||
Line(me)
|
||||
|
||||
returns TheLine
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
raises NotDone from StdFail
|
||||
|
||||
is static;
|
||||
|
||||
ArcToRecadre(me: in out;
|
||||
OnFirst: Boolean from Standard;
|
||||
Sol: Vector from math;
|
||||
PrevIndex : Integer;
|
||||
lpt2d : out Pnt2d from gp;
|
||||
pt2d : out Pnt2d from gp;
|
||||
ponarc : out Real)
|
||||
returns Integer from Standard
|
||||
is static private;
|
||||
|
||||
|
||||
Recadre(me: in out; FInv : in out FuncInv from Blend;
|
||||
OnFirst: Boolean from Standard;
|
||||
Sol: Vector from math;
|
||||
Solrst : out Vector from math;
|
||||
Indexsol: out Integer from Standard;
|
||||
IsVtx: out Boolean from Standard;
|
||||
Vtx: out TheVertex;
|
||||
Extrap : Real = 0.0)
|
||||
returns Boolean from Standard
|
||||
is static private;
|
||||
|
||||
|
||||
Transition(me:in out; OnFirst: Boolean from Standard;
|
||||
A: TheArc; Param: Real from Standard;
|
||||
TLine,TArc: out Transition from IntSurf)
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
MakeExtremity(me:in out; Extrem : in out TheExtremity;
|
||||
OnFirst: Boolean from Standard;
|
||||
Index : Integer from Standard;
|
||||
Param : Real from Standard;
|
||||
IsVtx : Boolean from Standard;
|
||||
Vtx : TheVertex)
|
||||
|
||||
is static private;
|
||||
|
||||
MakeSingularExtremity(me:in out;
|
||||
Extrem : in out TheExtremity;
|
||||
OnFirst: Boolean from Standard;
|
||||
Vtx : TheVertex)
|
||||
|
||||
is static private;
|
||||
|
||||
|
||||
CheckDeflection(me: in out; OnFirst : Boolean from Standard;
|
||||
CurPoint : Point from Blend)
|
||||
returns Status from Blend
|
||||
is static private;
|
||||
|
||||
|
||||
TestArret(me: in out; F : in out Function from Blend;
|
||||
State: Status from Blend;
|
||||
TestDeflection : Boolean = Standard_True;
|
||||
TestSolution : Boolean = Standard_True;
|
||||
TestLengthStep : Boolean = Standard_False)
|
||||
returns Status from Blend
|
||||
is static private;
|
||||
|
||||
|
||||
|
||||
fields
|
||||
previousP : Point from Blend;
|
||||
line : TheLine;
|
||||
sol : Vector from math;
|
||||
jalons : SequenceOfPoint from Blend;
|
||||
surf1 : TheSurface;
|
||||
surf2 : TheSurface;
|
||||
domain1 : TheTopolTool;
|
||||
domain2 : TheTopolTool;
|
||||
recdomain1 : TheTopolTool;
|
||||
recdomain2 : TheTopolTool;
|
||||
hguide : HElSpine from ChFiDS;
|
||||
ToCorrectOnRst1 : Boolean from Standard;
|
||||
ToCorrectOnRst2 : Boolean from Standard;
|
||||
CorrectedParam : Real from Standard;
|
||||
|
||||
tolesp : Real from Standard;
|
||||
tolgui : Real from Standard;
|
||||
pasmax : Real from Standard;
|
||||
fleche : Real from Standard;
|
||||
param : Real from Standard;
|
||||
sens : Real from Standard;
|
||||
|
||||
done : Boolean from Standard;
|
||||
rebrou : Boolean from Standard;
|
||||
iscomplete : Boolean from Standard;
|
||||
comptra : Boolean from Standard;
|
||||
clasonS1 : Boolean from Standard;
|
||||
clasonS2 : Boolean from Standard;
|
||||
check2d : Boolean from Standard;
|
||||
check : Boolean from Standard;
|
||||
twistflag1 : Boolean from Standard;
|
||||
twistflag2 : Boolean from Standard;
|
||||
end Walking;
|
@@ -1,10 +1,37 @@
|
||||
Blend_Walking_1.gxx
|
||||
Blend_Walking_2.gxx
|
||||
Blend_Walking_3.gxx
|
||||
Blend_Walking_4.gxx
|
||||
Blend_AppFunction.cxx
|
||||
Blend_AppFunction.hxx
|
||||
Blend_CSFunction.cxx
|
||||
Blend_CSFunction.hxx
|
||||
Blend_CSWalking.gxx
|
||||
Blend_CSWalking.lxx
|
||||
Blend_CSWalking_1.gxx
|
||||
Blend_CSWalking_2.gxx
|
||||
Blend_CSWalking_3.gxx
|
||||
Blend_CSWalking_4.gxx
|
||||
Blend_CurvPointFuncInv.cxx
|
||||
Blend_CurvPointFuncInv.hxx
|
||||
Blend_Debug.cxx
|
||||
Blend_DecrochStatus.hxx
|
||||
Blend_FuncInv.cxx
|
||||
Blend_FuncInv.hxx
|
||||
Blend_Function.cxx
|
||||
Blend_Function.hxx
|
||||
Blend_Point.cxx
|
||||
Blend_Point.hxx
|
||||
Blend_Point.lxx
|
||||
Blend_RstRstFunction.cxx
|
||||
Blend_RstRstFunction.hxx
|
||||
Blend_SequenceOfPoint.hxx
|
||||
Blend_Status.hxx
|
||||
Blend_SurfCurvFuncInv.cxx
|
||||
Blend_SurfCurvFuncInv.hxx
|
||||
Blend_SurfPointFuncInv.cxx
|
||||
Blend_SurfPointFuncInv.hxx
|
||||
Blend_SurfRstFunction.cxx
|
||||
Blend_SurfRstFunction.hxx
|
||||
Blend_Walking.gxx
|
||||
Blend_Walking.lxx
|
||||
Blend_Walking_1.gxx
|
||||
Blend_Walking_2.gxx
|
||||
Blend_Walking_3.gxx
|
||||
Blend_Walking_4.gxx
|
||||
|
Reference in New Issue
Block a user