mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024683: Convertation of the generic classes to the non-generic. Part 1
Generic classes from "BRepApprox" package: "BRepApprox_ApproxLineGen" and "BRepApprox_SurfaceToolGen" converted to the non-generic classes "BRepApprox_ApproxLine" and "BRepApprox_SurfaceTool". Generic classes from "BRepBlend" package: "BRepBlend_HCurve3dToolGen" and "BRepBlend_HCurve2dToolGen" converted to the non-generic classes "BRepBlend_HCurve3dTool" and "BRepBlend_HCurve2dTool". Generic classes from "Blend" package: "Blend_Extremity", "Blend_Line" and "Blend_PointOnRst" moved to the corresponding non-generic classes "BRepBlend_Extremity", "BRepBlend_Line" and "BRepBlend_PointOnRst" to "BRepBlend" package. And some other minor changes were done. Field "myPntOn2S" was deleted from "BRepApprox_ApproxLine" class. Therefore BRepApprox_ApproxLine::Point(...) method was a little changed.
This commit is contained in:
@@ -27,14 +27,12 @@ uses Blend, BlendFunc, AppBlend, Approx, Adaptor3d,Adaptor2d,
|
||||
|
||||
is
|
||||
|
||||
generic class HCurveToolGen;
|
||||
generic class HCurve2dToolGen;
|
||||
class PointOnRst;
|
||||
class Extremity;
|
||||
class Line;
|
||||
|
||||
class HCurveTool instantiates HCurveToolGen from BRepBlend (
|
||||
HCurve from Adaptor3d);
|
||||
|
||||
class HCurve2dTool instantiates HCurve2dToolGen from BRepBlend (
|
||||
HCurve2d from Adaptor2d);
|
||||
class HCurveTool;
|
||||
class HCurve2dTool;
|
||||
|
||||
class BlendTool;
|
||||
|
||||
@@ -62,29 +60,9 @@ is
|
||||
|
||||
alias ChAsymInv is ChAsymInv from BlendFunc;
|
||||
|
||||
|
||||
class PointOnRst instantiates PointOnRst from Blend
|
||||
(HCurve2d from Adaptor2d);
|
||||
|
||||
|
||||
class SequenceOfPointOnRst instantiates Sequence from TCollection
|
||||
(PointOnRst from BRepBlend);
|
||||
|
||||
|
||||
class Extremity instantiates Extremity from Blend
|
||||
(HVertex from Adaptor3d,
|
||||
HCurve2d from Adaptor2d,
|
||||
PointOnRst from BRepBlend,
|
||||
SequenceOfPointOnRst from BRepBlend);
|
||||
|
||||
class Line instantiates Line from Blend
|
||||
(HVertex from Adaptor3d,
|
||||
HCurve2d from Adaptor2d,
|
||||
PointOnRst from BRepBlend,
|
||||
SequenceOfPointOnRst from BRepBlend,
|
||||
Extremity from BRepBlend);
|
||||
|
||||
|
||||
class Walking instantiates Walking from Blend
|
||||
(HVertex from Adaptor3d,
|
||||
HCurve2d from Adaptor2d,
|
||||
|
237
src/BRepBlend/BRepBlend_Extremity.cdl
Normal file
237
src/BRepBlend/BRepBlend_Extremity.cdl
Normal file
@@ -0,0 +1,237 @@
|
||||
-- Created on: 1994-01-25
|
||||
-- Created by: Jacques GOUSSARD
|
||||
-- Copyright (c) 1994-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class Extremity from BRepBlend
|
||||
---Purpose:
|
||||
|
||||
uses Pnt from gp,
|
||||
Vec from gp,
|
||||
Transition from IntSurf,
|
||||
HVertex from Adaptor3d,
|
||||
HCurve2d from Adaptor2d,
|
||||
PointOnRst from BRepBlend,
|
||||
SequenceOfPointOnRst from BRepBlend
|
||||
|
||||
raises DomainError from Standard,
|
||||
OutOfRange from Standard
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
|
||||
returns Extremity from BRepBlend;
|
||||
|
||||
|
||||
Create(P: Pnt from gp;
|
||||
U,V,Param: Real from Standard; Tol: Real from Standard)
|
||||
---Purpose: Creates an extremity on a surface
|
||||
returns Extremity from BRepBlend;
|
||||
|
||||
|
||||
Create(P: Pnt from gp;
|
||||
U,V,Param: Real from Standard; Tol: Real from Standard;
|
||||
Vtx: HVertex from Adaptor3d)
|
||||
---Purpose: Creates an extremity on a surface. This extremity matches
|
||||
-- the vertex <Vtx>.
|
||||
|
||||
returns Extremity from BRepBlend;
|
||||
|
||||
|
||||
Create(P: Pnt from gp;
|
||||
W, Param: Real from Standard; Tol: Real from Standard)
|
||||
---Purpose: Creates an extremity on a curve
|
||||
returns Extremity from BRepBlend;
|
||||
|
||||
|
||||
SetValue(me: in out; P: Pnt from gp;
|
||||
U,V,Param : Real from Standard;
|
||||
Tol: Real from Standard)
|
||||
---Purpose: Set the values for an extremity on a surface.
|
||||
is static;
|
||||
|
||||
|
||||
SetValue(me: in out; P: Pnt from gp;
|
||||
U,V,Param: Real from Standard;
|
||||
Tol: Real from Standard; Vtx: HVertex from Adaptor3d)
|
||||
---Purpose: Set the values for an extremity on a surface.This
|
||||
-- extremity matches the vertex <Vtx>.
|
||||
is static;
|
||||
|
||||
|
||||
SetValue(me: in out; P: Pnt from gp;
|
||||
W,Param: Real from Standard;
|
||||
Tol: Real from Standard)
|
||||
---Purpose: Set the values for an extremity on curve.
|
||||
is static;
|
||||
|
||||
|
||||
Value(me)
|
||||
|
||||
---Purpose: This method returns the value of the point in 3d space.
|
||||
|
||||
returns Pnt from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
is static;
|
||||
|
||||
SetTangent(me: in out; Tangent : Vec from gp)
|
||||
---Purpose: Set the tangent vector for an extremity on a
|
||||
-- surface.
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
HasTangent(me)
|
||||
|
||||
---Purpose: Returns TRUE if the Tangent is stored.
|
||||
|
||||
returns Boolean from Standard
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
Tangent(me)
|
||||
|
||||
---Purpose: This method returns the value of tangent in 3d
|
||||
-- space.
|
||||
|
||||
returns Vec from gp
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
is static;
|
||||
|
||||
Tolerance(me)
|
||||
|
||||
---Purpose: This method returns the fuzziness on the point
|
||||
-- in 3d space.
|
||||
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
-- methods for an extremity on a surface
|
||||
|
||||
SetVertex(me: in out; V: HVertex from Adaptor3d)
|
||||
---Purpose: Set the values for an extremity on a curve.
|
||||
is static;
|
||||
|
||||
|
||||
AddArc(me: in out; A: HCurve2d from Adaptor2d; Param: Real from Standard;
|
||||
TLine, TArc: Transition from IntSurf)
|
||||
|
||||
---Purpose: Sets the values of a point which is on the arc
|
||||
-- A, at parameter Param.
|
||||
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Parameters(me; U,V: out Real from Standard)
|
||||
|
||||
---Purpose: This method returns the parameters of the point
|
||||
-- on the concerned surface.
|
||||
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
IsVertex(me)
|
||||
|
||||
---Purpose: Returns Standard_True when the point coincide with
|
||||
-- an existing vertex.
|
||||
|
||||
returns Boolean from Standard
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Vertex(me)
|
||||
|
||||
---Purpose: Returns the vertex when IsVertex returns Standard_True.
|
||||
|
||||
returns any HVertex from Adaptor3d
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
raises DomainError from Standard
|
||||
--- The exception is raised when IsVertex returns Standard_False
|
||||
is static;
|
||||
|
||||
|
||||
NbPointOnRst(me)
|
||||
|
||||
---Purpose: Returns the number of arc containing the extremity.
|
||||
-- If the method returns 0, the point is inside the
|
||||
-- surface.
|
||||
-- Otherwise, the extremity lies on at least 1 arc,
|
||||
-- and all the information (arc, parameter, transitions)
|
||||
-- are given by the point on restriction (PointOnRst)
|
||||
-- returned by the next method.
|
||||
|
||||
returns Integer from Standard
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
PointOnRst(me; Index: Integer from Standard)
|
||||
|
||||
---Purpose:
|
||||
|
||||
returns any PointOnRst from BRepBlend
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
raises OutOfRange from Standard
|
||||
--- The exception is raised when Index <=0 or Index > NbPointOnRst
|
||||
is static;
|
||||
|
||||
|
||||
-- method for an extremity on a curve
|
||||
|
||||
Parameter(me)
|
||||
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
-- method for the parameter on the guide
|
||||
ParameterOnGuide(me)
|
||||
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
fields
|
||||
vtx : HVertex from Adaptor3d;
|
||||
seqpt : SequenceOfPointOnRst from BRepBlend;
|
||||
pt : Pnt from gp;
|
||||
tang : Vec from gp;
|
||||
param : Real from Standard;
|
||||
u : Real from Standard;
|
||||
v : Real from Standard;
|
||||
tol : Real from Standard;
|
||||
isvtx : Boolean from Standard;
|
||||
hastang: Boolean from Standard;
|
||||
|
||||
end Extremity;
|
||||
|
||||
|
123
src/BRepBlend/BRepBlend_Extremity.cxx
Normal file
123
src/BRepBlend/BRepBlend_Extremity.cxx
Normal file
@@ -0,0 +1,123 @@
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepBlend_Extremity.ixx>
|
||||
#include <BRepBlend_PointOnRst.hxx>
|
||||
|
||||
BRepBlend_Extremity::BRepBlend_Extremity ():
|
||||
pt(gp_Pnt(0,0,0)),
|
||||
tang(gp_Vec(0,0,0)),
|
||||
param(0.0), u(0.0), v(0.0), tol(0.0),
|
||||
isvtx(Standard_False), hastang(Standard_False)
|
||||
{
|
||||
}
|
||||
|
||||
BRepBlend_Extremity::BRepBlend_Extremity (const gp_Pnt& P,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Real Param,
|
||||
const Standard_Real Tol) :
|
||||
pt(P),
|
||||
tang(gp_Vec(0,0,0)),
|
||||
param(Param),u(U),v(V),tol(Tol),isvtx(Standard_False),
|
||||
hastang(Standard_False)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BRepBlend_Extremity::BRepBlend_Extremity (const gp_Pnt& P,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Real Param,
|
||||
const Standard_Real Tol,
|
||||
const Handle(Adaptor3d_HVertex)& Vtx) :
|
||||
vtx(Vtx),pt(P),
|
||||
tang(gp_Vec(0,0,0)),
|
||||
param(Param),u(U),v(V),tol(Tol),isvtx(Standard_True),
|
||||
hastang(Standard_False)
|
||||
{}
|
||||
|
||||
|
||||
BRepBlend_Extremity::BRepBlend_Extremity (const gp_Pnt& P,
|
||||
const Standard_Real W,
|
||||
const Standard_Real Param,
|
||||
const Standard_Real Tol) :
|
||||
pt(P),
|
||||
tang(gp_Vec(0,0,0)),
|
||||
param(Param),u(W),tol(Tol),isvtx(Standard_False),
|
||||
hastang(Standard_False)
|
||||
{}
|
||||
|
||||
|
||||
void BRepBlend_Extremity::SetValue (const gp_Pnt& P,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Real Param,
|
||||
const Standard_Real Tol)
|
||||
{
|
||||
pt = P;
|
||||
u = U;
|
||||
v = V;
|
||||
param = Param;
|
||||
tol = Tol;
|
||||
isvtx = Standard_False;
|
||||
seqpt.Clear();
|
||||
}
|
||||
|
||||
|
||||
void BRepBlend_Extremity::SetValue (const gp_Pnt& P,
|
||||
const Standard_Real U,
|
||||
const Standard_Real V,
|
||||
const Standard_Real Param,
|
||||
const Standard_Real Tol,
|
||||
const Handle(Adaptor3d_HVertex)& Vtx)
|
||||
{
|
||||
pt = P;
|
||||
u = U;
|
||||
v = V;
|
||||
param = Param;
|
||||
tol = Tol;
|
||||
isvtx = Standard_True;
|
||||
vtx = Vtx;
|
||||
seqpt.Clear();
|
||||
}
|
||||
|
||||
void BRepBlend_Extremity::SetValue (const gp_Pnt& P,
|
||||
const Standard_Real W,
|
||||
const Standard_Real Param,
|
||||
const Standard_Real Tol)
|
||||
{
|
||||
pt = P;
|
||||
u = W;
|
||||
param = Param;
|
||||
tol = Tol;
|
||||
isvtx = Standard_False;
|
||||
seqpt.Clear();
|
||||
}
|
||||
|
||||
|
||||
void BRepBlend_Extremity::SetVertex (const Handle(Adaptor3d_HVertex)& V)
|
||||
{
|
||||
isvtx = Standard_True;
|
||||
vtx = V;
|
||||
}
|
||||
|
||||
void BRepBlend_Extremity::AddArc (const Handle(Adaptor2d_HCurve2d)& A,
|
||||
const Standard_Real Param,
|
||||
const IntSurf_Transition& TLine,
|
||||
const IntSurf_Transition& TArc)
|
||||
{
|
||||
seqpt.Append(BRepBlend_PointOnRst(A,Param,TLine,TArc));
|
||||
}
|
||||
|
86
src/BRepBlend/BRepBlend_Extremity.lxx
Normal file
86
src/BRepBlend/BRepBlend_Extremity.lxx
Normal file
@@ -0,0 +1,86 @@
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
inline const gp_Pnt& BRepBlend_Extremity::Value () const
|
||||
{
|
||||
return pt;
|
||||
}
|
||||
|
||||
inline void BRepBlend_Extremity::SetTangent(const gp_Vec& Tangent)
|
||||
{
|
||||
hastang = Standard_True;
|
||||
tang = Tangent;
|
||||
}
|
||||
|
||||
inline Standard_Boolean BRepBlend_Extremity::HasTangent () const
|
||||
{
|
||||
return hastang;
|
||||
}
|
||||
|
||||
inline const gp_Vec& BRepBlend_Extremity::Tangent () const
|
||||
{
|
||||
if (!hastang) {Standard_DomainError::Raise();}
|
||||
return tang;
|
||||
}
|
||||
|
||||
inline void BRepBlend_Extremity::Parameters(Standard_Real& U,
|
||||
Standard_Real& V) const
|
||||
{
|
||||
U = u;
|
||||
V = v;
|
||||
}
|
||||
|
||||
inline Standard_Real BRepBlend_Extremity::Tolerance() const
|
||||
{
|
||||
return tol;
|
||||
}
|
||||
|
||||
|
||||
inline Standard_Boolean BRepBlend_Extremity::IsVertex() const
|
||||
{
|
||||
return isvtx;
|
||||
}
|
||||
|
||||
|
||||
inline const Handle_Adaptor3d_HVertex& BRepBlend_Extremity::Vertex () const
|
||||
{
|
||||
if (!isvtx) {Standard_DomainError::Raise();}
|
||||
return vtx;
|
||||
}
|
||||
|
||||
inline Standard_Integer BRepBlend_Extremity::NbPointOnRst () const
|
||||
{
|
||||
return seqpt.Length();
|
||||
}
|
||||
|
||||
inline const BRepBlend_PointOnRst& BRepBlend_Extremity::PointOnRst
|
||||
(const Standard_Integer Index) const
|
||||
{
|
||||
return seqpt(Index);
|
||||
}
|
||||
|
||||
inline Standard_Real BRepBlend_Extremity::Parameter() const
|
||||
|
||||
{
|
||||
return u;
|
||||
}
|
||||
|
||||
inline Standard_Real BRepBlend_Extremity::ParameterOnGuide() const
|
||||
|
||||
{
|
||||
return param;
|
||||
}
|
||||
|
@@ -14,22 +14,22 @@
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
generic class HCurve2dToolGen from BRepBlend (
|
||||
CurveGen as any)
|
||||
class HCurve2dTool from BRepBlend
|
||||
|
||||
uses
|
||||
Array1OfReal from TColStd,
|
||||
Shape from GeomAbs,
|
||||
CurveType from GeomAbs,
|
||||
Vec2d from gp,
|
||||
Pnt2d from gp,
|
||||
Circ2d from gp,
|
||||
Elips2d from gp,
|
||||
Hypr2d from gp,
|
||||
Parab2d from gp,
|
||||
Lin2d from gp,
|
||||
Vec2d from gp,
|
||||
Pnt2d from gp,
|
||||
Circ2d from gp,
|
||||
Elips2d from gp,
|
||||
Hypr2d from gp,
|
||||
Parab2d from gp,
|
||||
Lin2d from gp,
|
||||
BezierCurve from Geom2d,
|
||||
BSplineCurve from Geom2d
|
||||
BSplineCurve from Geom2d,
|
||||
HCurve2d from Adaptor2d
|
||||
|
||||
raises
|
||||
|
||||
@@ -43,12 +43,12 @@ is
|
||||
-- Global methods - Apply to the whole curve.
|
||||
--
|
||||
|
||||
FirstParameter(myclass; C: CurveGen) returns Real
|
||||
FirstParameter(myclass; C: HCurve2d from Adaptor2d) returns Real
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
|
||||
LastParameter(myclass; C: CurveGen) returns Real
|
||||
LastParameter(myclass; C: HCurve2d from Adaptor2d) returns Real
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
@@ -72,18 +72,18 @@ is
|
||||
-- use the method Trim().
|
||||
|
||||
|
||||
Continuity(myclass; C: CurveGen) returns Shape from GeomAbs
|
||||
Continuity(myclass; C: HCurve2d from Adaptor2d) returns Shape from GeomAbs
|
||||
---Purpose:
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
NbIntervals(myclass; C: CurveGen; S : Shape from GeomAbs) returns Integer
|
||||
NbIntervals(myclass; C: HCurve2d from Adaptor2d; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of intervals for continuity
|
||||
-- <S>. May be one if Continuity(myclass) >= <S>
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Intervals(myclass; C: CurveGen; T : in out Array1OfReal from TColStd;
|
||||
Intervals(myclass; C: HCurve2d from Adaptor2d; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
@@ -95,31 +95,31 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
IsClosed(myclass; C: CurveGen) returns Boolean
|
||||
IsClosed(myclass; C: HCurve2d from Adaptor2d) returns Boolean
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
IsPeriodic(myclass; C: CurveGen) returns Boolean
|
||||
IsPeriodic(myclass; C: HCurve2d from Adaptor2d) returns Boolean
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Period(myclass; C: CurveGen) returns Real
|
||||
Period(myclass; C: HCurve2d from Adaptor2d) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Value(myclass; C: CurveGen; U : Real) returns Pnt2d from gp
|
||||
Value(myclass; C: HCurve2d from Adaptor2d; U : Real) returns Pnt2d from gp
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
D0 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp)
|
||||
D0 (myclass; C: HCurve2d from Adaptor2d; U : Real; P : out Pnt2d from gp)
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
D1 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
|
||||
D1 (myclass; C: HCurve2d from Adaptor2d; U : Real; P : out Pnt2d from gp ; V : out Vec2d from gp)
|
||||
--- Purpose : Computes the point of parameter U on the curve with its
|
||||
-- first derivative.
|
||||
raises
|
||||
@@ -129,7 +129,7 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
D2 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
|
||||
D2 (myclass; C: HCurve2d from Adaptor2d; U : Real; P : out Pnt2d from gp; V1, V2 : out Vec2d from gp)
|
||||
--- Purpose :
|
||||
-- Returns the point P of parameter U, the first and second
|
||||
-- derivatives V1 and V2.
|
||||
@@ -140,7 +140,7 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
D3 (myclass; C: CurveGen; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
|
||||
D3 (myclass; C: HCurve2d from Adaptor2d; U : Real; P : out Pnt2d from gp; V1, V2, V3 : out Vec2d from gp)
|
||||
--- Purpose :
|
||||
-- Returns the point P of parameter U, the first, the second
|
||||
-- and the third derivative.
|
||||
@@ -151,7 +151,7 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
DN (myclass; C: CurveGen; U : Real; N : Integer) returns Vec2d from gp
|
||||
DN (myclass; C: HCurve2d from Adaptor2d; U : Real; N : Integer) returns Vec2d from gp
|
||||
--- Purpose :
|
||||
-- The returned vector gives the value of the derivative for the
|
||||
-- order of derivation N.
|
||||
@@ -164,13 +164,13 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Resolution(myclass; C: CurveGen; R3d : Real) returns Real
|
||||
Resolution(myclass; C: HCurve2d from Adaptor2d; R3d : Real) returns Real
|
||||
---Purpose : Returns the parametric resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
GetType(myclass; C: CurveGen) returns CurveType from GeomAbs
|
||||
GetType(myclass; C: HCurve2d from Adaptor2d) returns CurveType from GeomAbs
|
||||
---Purpose: Returns the type of the curve in the current
|
||||
-- interval : Line, Circle, Ellipse, Hyperbola,
|
||||
-- Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
@@ -182,43 +182,43 @@ is
|
||||
-- the corresponding type.
|
||||
--
|
||||
|
||||
Line(myclass; C: CurveGen) returns Lin2d from gp
|
||||
Line(myclass; C: HCurve2d from Adaptor2d) returns Lin2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Circle(myclass; C: CurveGen) returns Circ2d from gp
|
||||
Circle(myclass; C: HCurve2d from Adaptor2d) returns Circ2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Ellipse(myclass; C: CurveGen) returns Elips2d from gp
|
||||
Ellipse(myclass; C: HCurve2d from Adaptor2d) returns Elips2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Hyperbola(myclass; C: CurveGen) returns Hypr2d from gp
|
||||
Hyperbola(myclass; C: HCurve2d from Adaptor2d) returns Hypr2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Parabola(myclass; C: CurveGen) returns Parab2d from gp
|
||||
Parabola(myclass; C: HCurve2d from Adaptor2d) returns Parab2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Bezier(myclass; C: CurveGen) returns BezierCurve from Geom2d
|
||||
Bezier(myclass; C: HCurve2d from Adaptor2d) returns BezierCurve from Geom2d
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
BSpline(myclass; C: CurveGen) returns BSplineCurve from Geom2d
|
||||
BSpline(myclass; C: HCurve2d from Adaptor2d) returns BSplineCurve from Geom2d
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
@@ -228,9 +228,9 @@ is
|
||||
|
||||
|
||||
|
||||
NbSamples(myclass; C: CurveGen; U0,U1: Real from Standard)
|
||||
NbSamples(myclass; C: HCurve2d from Adaptor2d; U0,U1: Real from Standard)
|
||||
returns Integer from Standard;
|
||||
|
||||
end HCurve2dToolGen;
|
||||
end HCurve2dTool;
|
||||
|
||||
|
@@ -14,7 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include CurveGen_hxx
|
||||
#include <BRepBlend_HCurve2dTool.ixx>
|
||||
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
@@ -24,7 +25,7 @@
|
||||
|
||||
|
||||
//============================================================
|
||||
Standard_Integer BRepBlend_HCurve2dToolGen::NbSamples (const CurveGen& C,
|
||||
Standard_Integer BRepBlend_HCurve2dTool::NbSamples (const Handle(Adaptor2d_HCurve2d)& C,
|
||||
const Standard_Real U0,
|
||||
const Standard_Real U1) {
|
||||
GeomAbs_CurveType typC = C->GetType();
|
@@ -14,8 +14,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include CurveGen_hxx
|
||||
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
|
||||
@@ -33,59 +31,59 @@
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
//============================================================
|
||||
inline Standard_Real BRepBlend_HCurve2dToolGen::FirstParameter (const CurveGen& C) {
|
||||
inline Standard_Real BRepBlend_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->FirstParameter());
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Real BRepBlend_HCurve2dToolGen::LastParameter (const CurveGen& C) {
|
||||
inline Standard_Real BRepBlend_HCurve2dTool::LastParameter (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->LastParameter());
|
||||
}
|
||||
//============================================================
|
||||
inline GeomAbs_Shape BRepBlend_HCurve2dToolGen::Continuity (const CurveGen& C) {
|
||||
inline GeomAbs_Shape BRepBlend_HCurve2dTool::Continuity (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->Continuity());
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Integer BRepBlend_HCurve2dToolGen::NbIntervals(const CurveGen& C,const GeomAbs_Shape Sh) {
|
||||
inline Standard_Integer BRepBlend_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_HCurve2d)& C,const GeomAbs_Shape Sh) {
|
||||
return(C->NbIntervals(Sh));
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurve2dToolGen::Intervals(const CurveGen& C,
|
||||
inline void BRepBlend_HCurve2dTool::Intervals(const Handle(Adaptor2d_HCurve2d)& C,
|
||||
TColStd_Array1OfReal& Tab,
|
||||
const GeomAbs_Shape Sh) {
|
||||
C->Intervals(Tab,Sh);
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Boolean BRepBlend_HCurve2dToolGen::IsClosed(const CurveGen& C) {
|
||||
inline Standard_Boolean BRepBlend_HCurve2dTool::IsClosed(const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->IsClosed());
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Boolean BRepBlend_HCurve2dToolGen::IsPeriodic(const CurveGen& C) {
|
||||
inline Standard_Boolean BRepBlend_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->IsPeriodic());
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Real BRepBlend_HCurve2dToolGen::Period(const CurveGen& C) {
|
||||
inline Standard_Real BRepBlend_HCurve2dTool::Period(const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->Period());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Pnt2d BRepBlend_HCurve2dToolGen::Value (const CurveGen& C,
|
||||
inline gp_Pnt2d BRepBlend_HCurve2dTool::Value (const Handle(Adaptor2d_HCurve2d)& C,
|
||||
const Standard_Real U) {
|
||||
return(C->Value(U));
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurve2dToolGen::D0(const CurveGen& C,
|
||||
inline void BRepBlend_HCurve2dTool::D0(const Handle(Adaptor2d_HCurve2d)& C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt2d& P) {
|
||||
C->D0(U,P);
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurve2dToolGen::D1 (const CurveGen& C,
|
||||
inline void BRepBlend_HCurve2dTool::D1 (const Handle(Adaptor2d_HCurve2d)& C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt2d& P,
|
||||
gp_Vec2d& T) {
|
||||
C->D1(U,P,T);
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurve2dToolGen::D2 (const CurveGen& C,
|
||||
inline void BRepBlend_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt2d& P,
|
||||
gp_Vec2d& T,
|
||||
@@ -94,7 +92,7 @@ inline void BRepBlend_HCurve2dToolGen::D2 (const CurveGen& C,
|
||||
C->D2(U,P,T,N);
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurve2dToolGen::D3 (const CurveGen& C,
|
||||
inline void BRepBlend_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt2d& P,
|
||||
gp_Vec2d& V1,
|
||||
@@ -104,47 +102,47 @@ inline void BRepBlend_HCurve2dToolGen::D3 (const CurveGen& C,
|
||||
C->D3(U,P,V1,V2,V3);
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Vec2d BRepBlend_HCurve2dToolGen::DN (const CurveGen& C,
|
||||
inline gp_Vec2d BRepBlend_HCurve2dTool::DN (const Handle(Adaptor2d_HCurve2d)& C,
|
||||
const Standard_Real U,
|
||||
const Standard_Integer N) {
|
||||
|
||||
return(C->DN(U,N));
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Real BRepBlend_HCurve2dToolGen::Resolution(const CurveGen& C,
|
||||
inline Standard_Real BRepBlend_HCurve2dTool::Resolution(const Handle(Adaptor2d_HCurve2d)& C,
|
||||
const Standard_Real R3d) {
|
||||
return(C->Resolution(R3d));
|
||||
}
|
||||
//============================================================
|
||||
inline GeomAbs_CurveType BRepBlend_HCurve2dToolGen::GetType(const CurveGen& C) {
|
||||
inline GeomAbs_CurveType BRepBlend_HCurve2dTool::GetType(const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->GetType());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Lin2d BRepBlend_HCurve2dToolGen::Line (const CurveGen& C) {
|
||||
inline gp_Lin2d BRepBlend_HCurve2dTool::Line (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->Line());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Circ2d BRepBlend_HCurve2dToolGen::Circle (const CurveGen& C) {
|
||||
inline gp_Circ2d BRepBlend_HCurve2dTool::Circle (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->Circle());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Elips2d BRepBlend_HCurve2dToolGen::Ellipse (const CurveGen& C) {
|
||||
inline gp_Elips2d BRepBlend_HCurve2dTool::Ellipse (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->Ellipse());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Parab2d BRepBlend_HCurve2dToolGen::Parabola (const CurveGen& C) {
|
||||
inline gp_Parab2d BRepBlend_HCurve2dTool::Parabola (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->Parabola());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Hypr2d BRepBlend_HCurve2dToolGen::Hyperbola (const CurveGen& C) {
|
||||
inline gp_Hypr2d BRepBlend_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->Hyperbola());
|
||||
}
|
||||
//============================================================
|
||||
inline Handle(Geom2d_BezierCurve) BRepBlend_HCurve2dToolGen::Bezier (const CurveGen& C) {
|
||||
inline Handle(Geom2d_BezierCurve) BRepBlend_HCurve2dTool::Bezier (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->Bezier());
|
||||
}
|
||||
//============================================================
|
||||
inline Handle(Geom2d_BSplineCurve) BRepBlend_HCurve2dToolGen::BSpline (const CurveGen& C) {
|
||||
inline Handle(Geom2d_BSplineCurve) BRepBlend_HCurve2dTool::BSpline (const Handle(Adaptor2d_HCurve2d)& C) {
|
||||
return(C->BSpline());
|
||||
}
|
||||
//============================================================
|
@@ -14,8 +14,7 @@
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
generic class HCurveToolGen from BRepBlend (
|
||||
CurveGen as any)
|
||||
class HCurveTool from BRepBlend
|
||||
|
||||
uses
|
||||
Array1OfReal from TColStd,
|
||||
@@ -29,7 +28,8 @@ uses
|
||||
Parab from gp,
|
||||
Lin from gp,
|
||||
BezierCurve from Geom,
|
||||
BSplineCurve from Geom
|
||||
BSplineCurve from Geom,
|
||||
HCurve from Adaptor3d
|
||||
|
||||
raises
|
||||
|
||||
@@ -43,12 +43,12 @@ is
|
||||
-- Global methods - Apply to the whole curve.
|
||||
--
|
||||
|
||||
FirstParameter(myclass; C: CurveGen) returns Real
|
||||
FirstParameter(myclass; C: HCurve from Adaptor3d) returns Real
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
|
||||
LastParameter(myclass; C: CurveGen) returns Real
|
||||
LastParameter(myclass; C: HCurve from Adaptor3d) returns Real
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
@@ -72,18 +72,18 @@ is
|
||||
-- use the method Trim().
|
||||
|
||||
|
||||
Continuity(myclass; C: CurveGen) returns Shape from GeomAbs
|
||||
Continuity(myclass; C: HCurve from Adaptor3d) returns Shape from GeomAbs
|
||||
---Purpose:
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
NbIntervals(myclass; C: CurveGen; S : Shape from GeomAbs) returns Integer
|
||||
NbIntervals(myclass; C: HCurve from Adaptor3d; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of intervals for continuity
|
||||
-- <S>. May be one if Continuity(myclass) >= <S>
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Intervals(myclass; C: CurveGen; T : in out Array1OfReal from TColStd;
|
||||
Intervals(myclass; C: HCurve from Adaptor3d; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
@@ -95,31 +95,31 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
IsClosed(myclass; C: CurveGen) returns Boolean
|
||||
IsClosed(myclass; C: HCurve from Adaptor3d) returns Boolean
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
IsPeriodic(myclass; C: CurveGen) returns Boolean
|
||||
IsPeriodic(myclass; C: HCurve from Adaptor3d) returns Boolean
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Period(myclass; C: CurveGen) returns Real
|
||||
Period(myclass; C: HCurve from Adaptor3d) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Value(myclass; C: CurveGen; U : Real) returns Pnt from gp
|
||||
Value(myclass; C: HCurve from Adaptor3d; U : Real) returns Pnt from gp
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
D0 (myclass; C: CurveGen; U : Real; P : out Pnt from gp)
|
||||
D0 (myclass; C: HCurve from Adaptor3d; U : Real; P : out Pnt from gp)
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
D1 (myclass; C: CurveGen; U : Real; P : out Pnt from gp ; V : out Vec from gp)
|
||||
D1 (myclass; C: HCurve from Adaptor3d; U : Real; P : out Pnt from gp ; V : out Vec from gp)
|
||||
--- Purpose : Computes the point of parameter U on the curve with its
|
||||
-- first derivative.
|
||||
raises
|
||||
@@ -129,7 +129,7 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
D2 (myclass; C: CurveGen; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
|
||||
D2 (myclass; C: HCurve from Adaptor3d; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
|
||||
--- Purpose :
|
||||
-- Returns the point P of parameter U, the first and second
|
||||
-- derivatives V1 and V2.
|
||||
@@ -140,7 +140,7 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
D3 (myclass; C: CurveGen; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
|
||||
D3 (myclass; C: HCurve from Adaptor3d; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
|
||||
--- Purpose :
|
||||
-- Returns the point P of parameter U, the first, the second
|
||||
-- and the third derivative.
|
||||
@@ -151,7 +151,7 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
DN (myclass; C: CurveGen; U : Real; N : Integer) returns Vec from gp
|
||||
DN (myclass; C: HCurve from Adaptor3d; U : Real; N : Integer) returns Vec from gp
|
||||
--- Purpose :
|
||||
-- The returned vector gives the value of the derivative for the
|
||||
-- order of derivation N.
|
||||
@@ -164,13 +164,13 @@ is
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Resolution(myclass; C: CurveGen; R3d : Real) returns Real
|
||||
Resolution(myclass; C: HCurve from Adaptor3d; R3d : Real) returns Real
|
||||
---Purpose : Returns the parametric resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
GetType(myclass; C: CurveGen) returns CurveType from GeomAbs
|
||||
GetType(myclass; C: HCurve from Adaptor3d) returns CurveType from GeomAbs
|
||||
---Purpose: Returns the type of the curve in the current
|
||||
-- interval : Line, Circle, Ellipse, Hyperbola,
|
||||
-- Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
@@ -182,43 +182,43 @@ is
|
||||
-- the corresponding type.
|
||||
--
|
||||
|
||||
Line(myclass; C: CurveGen) returns Lin from gp
|
||||
Line(myclass; C: HCurve from Adaptor3d) returns Lin from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Circle(myclass; C: CurveGen) returns Circ from gp
|
||||
Circle(myclass; C: HCurve from Adaptor3d) returns Circ from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Ellipse(myclass; C: CurveGen) returns Elips from gp
|
||||
Ellipse(myclass; C: HCurve from Adaptor3d) returns Elips from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Hyperbola(myclass; C: CurveGen) returns Hypr from gp
|
||||
Hyperbola(myclass; C: HCurve from Adaptor3d) returns Hypr from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Parabola(myclass; C: CurveGen) returns Parab from gp
|
||||
Parabola(myclass; C: HCurve from Adaptor3d) returns Parab from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
Bezier(myclass; C: CurveGen) returns BezierCurve from Geom
|
||||
Bezier(myclass; C: HCurve from Adaptor3d) returns BezierCurve from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
;
|
||||
|
||||
BSpline(myclass; C: CurveGen) returns BSplineCurve from Geom
|
||||
BSpline(myclass; C: HCurve from Adaptor3d) returns BSplineCurve from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
---C++: inline
|
||||
@@ -228,9 +228,9 @@ is
|
||||
|
||||
|
||||
|
||||
NbSamples(myclass; C: CurveGen; U0,U1: Real from Standard)
|
||||
NbSamples(myclass; C: HCurve from Adaptor3d; U0,U1: Real from Standard)
|
||||
returns Integer from Standard;
|
||||
|
||||
end HCurveToolGen;
|
||||
end HCurveTool;
|
||||
|
||||
|
@@ -14,7 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include CurveGen_hxx
|
||||
#include <BRepBlend_HCurveTool.ixx>
|
||||
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
@@ -24,7 +25,7 @@
|
||||
|
||||
|
||||
//============================================================
|
||||
Standard_Integer BRepBlend_HCurveToolGen::NbSamples (const CurveGen& C,
|
||||
Standard_Integer BRepBlend_HCurveTool::NbSamples (const Handle(Adaptor3d_HCurve)& C,
|
||||
const Standard_Real U0,
|
||||
const Standard_Real U1) {
|
||||
GeomAbs_CurveType typC = C->GetType();
|
@@ -14,8 +14,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include CurveGen_hxx
|
||||
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
|
||||
@@ -33,59 +31,59 @@
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
//============================================================
|
||||
inline Standard_Real BRepBlend_HCurveToolGen::FirstParameter (const CurveGen& C) {
|
||||
inline Standard_Real BRepBlend_HCurveTool::FirstParameter (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->FirstParameter());
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Real BRepBlend_HCurveToolGen::LastParameter (const CurveGen& C) {
|
||||
inline Standard_Real BRepBlend_HCurveTool::LastParameter (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->LastParameter());
|
||||
}
|
||||
//============================================================
|
||||
inline GeomAbs_Shape BRepBlend_HCurveToolGen::Continuity (const CurveGen& C) {
|
||||
inline GeomAbs_Shape BRepBlend_HCurveTool::Continuity (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->Continuity());
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Integer BRepBlend_HCurveToolGen::NbIntervals(const CurveGen& C,const GeomAbs_Shape Sh) {
|
||||
inline Standard_Integer BRepBlend_HCurveTool::NbIntervals(const Handle(Adaptor3d_HCurve)& C,const GeomAbs_Shape Sh) {
|
||||
return(C->NbIntervals(Sh));
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurveToolGen::Intervals(const CurveGen& C,
|
||||
inline void BRepBlend_HCurveTool::Intervals(const Handle(Adaptor3d_HCurve)& C,
|
||||
TColStd_Array1OfReal& Tab,
|
||||
const GeomAbs_Shape Sh) {
|
||||
C->Intervals(Tab,Sh);
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Boolean BRepBlend_HCurveToolGen::IsClosed(const CurveGen& C) {
|
||||
inline Standard_Boolean BRepBlend_HCurveTool::IsClosed(const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->IsClosed());
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Boolean BRepBlend_HCurveToolGen::IsPeriodic(const CurveGen& C) {
|
||||
inline Standard_Boolean BRepBlend_HCurveTool::IsPeriodic(const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->IsPeriodic());
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Real BRepBlend_HCurveToolGen::Period(const CurveGen& C) {
|
||||
inline Standard_Real BRepBlend_HCurveTool::Period(const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->Period());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Pnt BRepBlend_HCurveToolGen::Value (const CurveGen& C,
|
||||
inline gp_Pnt BRepBlend_HCurveTool::Value (const Handle(Adaptor3d_HCurve)& C,
|
||||
const Standard_Real U) {
|
||||
return(C->Value(U));
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurveToolGen::D0(const CurveGen& C,
|
||||
inline void BRepBlend_HCurveTool::D0(const Handle(Adaptor3d_HCurve)& C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt& P) {
|
||||
C->D0(U,P);
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurveToolGen::D1 (const CurveGen& C,
|
||||
inline void BRepBlend_HCurveTool::D1 (const Handle(Adaptor3d_HCurve)& C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& T) {
|
||||
C->D1(U,P,T);
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurveToolGen::D2 (const CurveGen& C,
|
||||
inline void BRepBlend_HCurveTool::D2 (const Handle(Adaptor3d_HCurve)& C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& T,
|
||||
@@ -94,7 +92,7 @@ inline void BRepBlend_HCurveToolGen::D2 (const CurveGen& C,
|
||||
C->D2(U,P,T,N);
|
||||
}
|
||||
//============================================================
|
||||
inline void BRepBlend_HCurveToolGen::D3 (const CurveGen& C,
|
||||
inline void BRepBlend_HCurveTool::D3 (const Handle(Adaptor3d_HCurve)& C,
|
||||
const Standard_Real U,
|
||||
gp_Pnt& P,
|
||||
gp_Vec& V1,
|
||||
@@ -104,47 +102,47 @@ inline void BRepBlend_HCurveToolGen::D3 (const CurveGen& C,
|
||||
C->D3(U,P,V1,V2,V3);
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Vec BRepBlend_HCurveToolGen::DN (const CurveGen& C,
|
||||
inline gp_Vec BRepBlend_HCurveTool::DN (const Handle(Adaptor3d_HCurve)& C,
|
||||
const Standard_Real U,
|
||||
const Standard_Integer N) {
|
||||
|
||||
return(C->DN(U,N));
|
||||
}
|
||||
//============================================================
|
||||
inline Standard_Real BRepBlend_HCurveToolGen::Resolution(const CurveGen& C,
|
||||
inline Standard_Real BRepBlend_HCurveTool::Resolution(const Handle(Adaptor3d_HCurve)& C,
|
||||
const Standard_Real R3d) {
|
||||
return(C->Resolution(R3d));
|
||||
}
|
||||
//============================================================
|
||||
inline GeomAbs_CurveType BRepBlend_HCurveToolGen::GetType(const CurveGen& C) {
|
||||
inline GeomAbs_CurveType BRepBlend_HCurveTool::GetType(const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->GetType());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Lin BRepBlend_HCurveToolGen::Line (const CurveGen& C) {
|
||||
inline gp_Lin BRepBlend_HCurveTool::Line (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->Line());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Circ BRepBlend_HCurveToolGen::Circle (const CurveGen& C) {
|
||||
inline gp_Circ BRepBlend_HCurveTool::Circle (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->Circle());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Elips BRepBlend_HCurveToolGen::Ellipse (const CurveGen& C) {
|
||||
inline gp_Elips BRepBlend_HCurveTool::Ellipse (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->Ellipse());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Parab BRepBlend_HCurveToolGen::Parabola (const CurveGen& C) {
|
||||
inline gp_Parab BRepBlend_HCurveTool::Parabola (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->Parabola());
|
||||
}
|
||||
//============================================================
|
||||
inline gp_Hypr BRepBlend_HCurveToolGen::Hyperbola (const CurveGen& C) {
|
||||
inline gp_Hypr BRepBlend_HCurveTool::Hyperbola (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->Hyperbola());
|
||||
}
|
||||
//============================================================
|
||||
inline Handle(Geom_BezierCurve) BRepBlend_HCurveToolGen::Bezier (const CurveGen& C) {
|
||||
inline Handle(Geom_BezierCurve) BRepBlend_HCurveTool::Bezier (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->Bezier());
|
||||
}
|
||||
//============================================================
|
||||
inline Handle(Geom_BSplineCurve) BRepBlend_HCurveToolGen::BSpline (const CurveGen& C) {
|
||||
inline Handle(Geom_BSplineCurve) BRepBlend_HCurveTool::BSpline (const Handle(Adaptor3d_HCurve)& C) {
|
||||
return(C->BSpline());
|
||||
}
|
||||
//============================================================
|
236
src/BRepBlend/BRepBlend_Line.cdl
Normal file
236
src/BRepBlend/BRepBlend_Line.cdl
Normal file
@@ -0,0 +1,236 @@
|
||||
-- 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 Line from BRepBlend inherits TShared from MMgt
|
||||
|
||||
|
||||
uses Point from Blend,
|
||||
SequenceOfPoint from Blend,
|
||||
Extremity from BRepBlend,
|
||||
TypeTrans from IntSurf
|
||||
|
||||
|
||||
raises OutOfRange from Standard
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
|
||||
returns mutable Line from BRepBlend;
|
||||
|
||||
|
||||
|
||||
Clear(me: mutable)
|
||||
|
||||
---Purpose: Clears the content of the line.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
Append(me: mutable; P: Point from Blend)
|
||||
|
||||
---Purpose: Adds a point in the line.
|
||||
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
Prepend(me: mutable; P: Point from Blend)
|
||||
|
||||
---Purpose: Adds a point in the line at the first place.
|
||||
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
InsertBefore(me : mutable;
|
||||
Index : Integer from Standard;
|
||||
P : Point from Blend)
|
||||
|
||||
---Purpose: Adds a point in the line at the first place.
|
||||
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
Remove(me: mutable; FromIndex,ToIndex: Integer from Standard)
|
||||
|
||||
---Purpose: Removes from <me> all the items of
|
||||
-- positions between <FromIndex> and <ToIndex>.
|
||||
-- Raises an exception if the indices are out of bounds.
|
||||
---C++: inline
|
||||
raises OutOfRange from Standard
|
||||
is static;
|
||||
|
||||
|
||||
Set(me: mutable; TranS1,TranS2: TypeTrans from IntSurf)
|
||||
|
||||
---Purpose: Sets the value of the transition of the line on S1 and
|
||||
-- the line on S2.
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Set(me: mutable; Trans: TypeTrans from IntSurf)
|
||||
|
||||
---Purpose: Sets the value of the transition of the line on a surface
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
SetStartPoints(me: mutable; StartPt1,StartPt2: Extremity from BRepBlend)
|
||||
|
||||
---Purpose: Sets the values of the start points for the line.
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
SetEndPoints(me: mutable; EndPt1,EndPt2: Extremity from BRepBlend)
|
||||
|
||||
---Purpose: Sets tne values of the end points for the line.
|
||||
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
NbPoints(me)
|
||||
|
||||
---Purpose: Returns the number of points in the line.
|
||||
|
||||
returns Integer from Standard
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Point(me; Index: Integer from Standard)
|
||||
|
||||
---Purpose: Returns the point of range Index.
|
||||
|
||||
returns Point from Blend
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
raises OutOfRange from Standard
|
||||
--- The exception OutOfRange is raised when Index <=0 or
|
||||
-- Index > NbPoints
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
TransitionOnS1(me)
|
||||
|
||||
---Purpose: Returns the type of the transition of the line defined
|
||||
-- on the first surface. The transition is "constant"
|
||||
-- along the line.
|
||||
-- The transition is IN if the line is oriented in such
|
||||
-- a way that the system of vectors (N,DRac,T) is
|
||||
-- right-handed, where
|
||||
-- N is the normal to the first surface at a point P,
|
||||
-- DRac is a vector tangent to the blending patch,
|
||||
-- oriented towards the valid part of this patch,
|
||||
-- T is the tangent to the line on S1 at P.
|
||||
-- The transitioon is OUT when the system of vectors is
|
||||
-- left-handed.
|
||||
|
||||
returns TypeTrans from IntSurf
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
TransitionOnS2(me)
|
||||
|
||||
---Purpose: Returns the type of the transition of the line defined
|
||||
-- on the second surface. The transition is "constant"
|
||||
-- along the line.
|
||||
|
||||
returns TypeTrans from IntSurf
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
StartPointOnFirst(me)
|
||||
|
||||
---Purpose: Returns the start point on S1.
|
||||
|
||||
returns Extremity from BRepBlend
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
StartPointOnSecond(me)
|
||||
|
||||
---Purpose: Returns the start point on S2
|
||||
|
||||
returns Extremity from BRepBlend
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
EndPointOnFirst(me)
|
||||
|
||||
---Purpose: Returns the end point on S1.
|
||||
|
||||
returns Extremity from BRepBlend
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
EndPointOnSecond(me)
|
||||
|
||||
---Purpose: Returns the point on S2.
|
||||
|
||||
returns Extremity from BRepBlend
|
||||
---C++: inline
|
||||
---C++: return const&
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
TransitionOnS(me)
|
||||
|
||||
---Purpose: Returns the type of the transition of the line defined
|
||||
-- on the surface.
|
||||
|
||||
returns TypeTrans from IntSurf
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
fields
|
||||
seqpt : SequenceOfPoint from Blend;
|
||||
tras1 : TypeTrans from IntSurf;
|
||||
tras2 : TypeTrans from IntSurf;
|
||||
stp1 : Extremity from BRepBlend;
|
||||
stp2 : Extremity from BRepBlend;
|
||||
endp1 : Extremity from BRepBlend;
|
||||
endp2 : Extremity from BRepBlend;
|
||||
hass1 : Boolean from Standard;
|
||||
hass2 : Boolean from Standard;
|
||||
end;
|
47
src/BRepBlend/BRepBlend_Line.cxx
Normal file
47
src/BRepBlend/BRepBlend_Line.cxx
Normal file
@@ -0,0 +1,47 @@
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepBlend_Line.ixx>
|
||||
|
||||
BRepBlend_Line::BRepBlend_Line ():
|
||||
tras1(IntSurf_Undecided),tras2(IntSurf_Undecided),
|
||||
hass1(Standard_False),hass2(Standard_False)
|
||||
{}
|
||||
|
||||
|
||||
void BRepBlend_Line::Clear ()
|
||||
{
|
||||
seqpt.Clear();
|
||||
hass1 = Standard_False;
|
||||
hass2 = Standard_False;
|
||||
tras1 = IntSurf_Undecided;
|
||||
tras2 = IntSurf_Undecided;
|
||||
}
|
||||
|
||||
void BRepBlend_Line::Set(const IntSurf_TypeTrans TranS1,
|
||||
const IntSurf_TypeTrans TranS2)
|
||||
{
|
||||
hass1 = Standard_True;
|
||||
hass2 = Standard_True;
|
||||
tras1 = TranS1;
|
||||
tras2 = TranS2;
|
||||
}
|
||||
|
||||
void BRepBlend_Line::Set(const IntSurf_TypeTrans Trans)
|
||||
{
|
||||
hass1 = Standard_True;
|
||||
hass2 = Standard_False;
|
||||
tras1 = Trans;
|
||||
}
|
||||
|
105
src/BRepBlend/BRepBlend_Line.lxx
Normal file
105
src/BRepBlend/BRepBlend_Line.lxx
Normal file
@@ -0,0 +1,105 @@
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Blend_SequenceOfPoint.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
|
||||
inline void BRepBlend_Line::Append(const Blend_Point& P)
|
||||
{
|
||||
seqpt.Append(P);
|
||||
}
|
||||
|
||||
inline void BRepBlend_Line::Prepend(const Blend_Point& P)
|
||||
{
|
||||
seqpt.Prepend(P);
|
||||
}
|
||||
|
||||
inline void BRepBlend_Line::InsertBefore(const Standard_Integer Index,
|
||||
const Blend_Point& P)
|
||||
{
|
||||
seqpt.InsertBefore(Index, P);
|
||||
}
|
||||
|
||||
inline void BRepBlend_Line::Remove(const Standard_Integer FromIndex,
|
||||
const Standard_Integer ToIndex)
|
||||
{
|
||||
seqpt.Remove(FromIndex,ToIndex);
|
||||
}
|
||||
|
||||
inline void BRepBlend_Line::SetStartPoints(const BRepBlend_Extremity& StartPtOnS1,
|
||||
const BRepBlend_Extremity& StartPtOnS2)
|
||||
|
||||
{
|
||||
stp1 = StartPtOnS1;
|
||||
stp2 = StartPtOnS2;
|
||||
}
|
||||
|
||||
inline void BRepBlend_Line::SetEndPoints(const BRepBlend_Extremity& EndPtOnS1,
|
||||
const BRepBlend_Extremity& EndPtOnS2)
|
||||
|
||||
{
|
||||
endp1 = EndPtOnS1;
|
||||
endp2 = EndPtOnS2;
|
||||
}
|
||||
|
||||
inline Standard_Integer BRepBlend_Line::NbPoints () const
|
||||
{
|
||||
return seqpt.Length();
|
||||
}
|
||||
|
||||
inline const Blend_Point& BRepBlend_Line::Point(const Standard_Integer Index) const
|
||||
{
|
||||
return seqpt(Index);
|
||||
}
|
||||
|
||||
inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS1 () const
|
||||
{
|
||||
if (!hass1) {Standard_DomainError::Raise();}
|
||||
return tras1;
|
||||
}
|
||||
|
||||
inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS2 () const
|
||||
{
|
||||
if (!hass2) {Standard_DomainError::Raise();}
|
||||
return tras2;
|
||||
}
|
||||
|
||||
inline const BRepBlend_Extremity& BRepBlend_Line::StartPointOnFirst() const
|
||||
{
|
||||
return stp1;
|
||||
}
|
||||
|
||||
inline const BRepBlend_Extremity& BRepBlend_Line::StartPointOnSecond() const
|
||||
{
|
||||
return stp2;
|
||||
}
|
||||
|
||||
inline const BRepBlend_Extremity& BRepBlend_Line::EndPointOnFirst() const
|
||||
{
|
||||
return endp1;
|
||||
}
|
||||
|
||||
inline const BRepBlend_Extremity& BRepBlend_Line::EndPointOnSecond() const
|
||||
{
|
||||
return endp2;
|
||||
}
|
||||
|
||||
inline IntSurf_TypeTrans BRepBlend_Line::TransitionOnS () const
|
||||
{
|
||||
if (!hass1) {Standard_DomainError::Raise();}
|
||||
return tras1;
|
||||
}
|
||||
|
||||
|
117
src/BRepBlend/BRepBlend_PointOnRst.cdl
Normal file
117
src/BRepBlend/BRepBlend_PointOnRst.cdl
Normal file
@@ -0,0 +1,117 @@
|
||||
-- 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 PointOnRst from BRepBlend
|
||||
|
||||
|
||||
---Purpose: Definition of an intersection point between a line
|
||||
-- and a restriction on a surface.
|
||||
-- Such a point is contains geometrical informations (see
|
||||
-- the Value method) and logical informations.
|
||||
|
||||
|
||||
uses Transition from IntSurf,
|
||||
HCurve2d from Adaptor2d
|
||||
|
||||
raises DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
|
||||
Create
|
||||
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
returns PointOnRst from BRepBlend;
|
||||
|
||||
|
||||
Create( A: HCurve2d from Adaptor2d; Param: Real from Standard;
|
||||
TLine, TArc: Transition from IntSurf)
|
||||
|
||||
---Purpose: Creates the PointOnRst on the arc A, at parameter Param,
|
||||
-- with the transition TLine on the walking line, and
|
||||
-- TArc on the arc A.
|
||||
|
||||
returns PointOnRst from BRepBlend;
|
||||
|
||||
|
||||
|
||||
SetArc(me: in out; A: HCurve2d from Adaptor2d; Param: Real from Standard;
|
||||
TLine, TArc: Transition from IntSurf)
|
||||
|
||||
---Purpose: Sets the values of a point which is on the arc
|
||||
-- A, at parameter Param.
|
||||
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
Arc(me)
|
||||
|
||||
---Purpose: Returns the arc of restriction containing the
|
||||
-- vertex.
|
||||
|
||||
returns any HCurve2d from Adaptor2d
|
||||
---C++: return const&
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
TransitionOnLine(me)
|
||||
|
||||
---Purpose: Returns the transition of the point on the
|
||||
-- line on surface.
|
||||
|
||||
returns Transition from IntSurf
|
||||
---C++: return const&
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
TransitionOnArc(me)
|
||||
|
||||
---Purpose: Returns the transition of the point on the arc
|
||||
-- returned by Arc().
|
||||
|
||||
returns Transition from IntSurf
|
||||
---C++: return const&
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
ParameterOnArc(me)
|
||||
|
||||
---Purpose: Returns the parameter of the point on the
|
||||
-- arc returned by the method Arc().
|
||||
|
||||
returns Real from Standard
|
||||
---C++: inline
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
fields
|
||||
|
||||
arc : HCurve2d from Adaptor2d;
|
||||
traline : Transition from IntSurf;
|
||||
traarc : Transition from IntSurf;
|
||||
prm : Real from Standard;
|
||||
|
||||
end PointOnRst;
|
38
src/BRepBlend/BRepBlend_PointOnRst.cxx
Normal file
38
src/BRepBlend/BRepBlend_PointOnRst.cxx
Normal file
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <BRepBlend_PointOnRst.ixx>
|
||||
|
||||
BRepBlend_PointOnRst::BRepBlend_PointOnRst () {}
|
||||
|
||||
|
||||
BRepBlend_PointOnRst::BRepBlend_PointOnRst(const Handle(Adaptor2d_HCurve2d)& A,
|
||||
const Standard_Real Param,
|
||||
const IntSurf_Transition& TLine,
|
||||
const IntSurf_Transition& TArc):
|
||||
|
||||
arc(A),traline(TLine),traarc(TArc),prm(Param)
|
||||
{}
|
||||
|
||||
void BRepBlend_PointOnRst::SetArc(const Handle(Adaptor2d_HCurve2d)& A,
|
||||
const Standard_Real Param,
|
||||
const IntSurf_Transition& TLine,
|
||||
const IntSurf_Transition& TArc)
|
||||
{
|
||||
arc = A;
|
||||
prm = Param;
|
||||
traline = TLine;
|
||||
traarc = TArc;
|
||||
}
|
||||
|
36
src/BRepBlend/BRepBlend_PointOnRst.lxx
Normal file
36
src/BRepBlend/BRepBlend_PointOnRst.lxx
Normal file
@@ -0,0 +1,36 @@
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
inline const Handle_Adaptor2d_HCurve2d& BRepBlend_PointOnRst::Arc () const
|
||||
{
|
||||
return arc;
|
||||
}
|
||||
|
||||
inline const IntSurf_Transition& BRepBlend_PointOnRst::TransitionOnLine () const
|
||||
{
|
||||
return traline;
|
||||
}
|
||||
|
||||
inline const IntSurf_Transition& BRepBlend_PointOnRst::TransitionOnArc () const
|
||||
{
|
||||
return traarc;
|
||||
}
|
||||
|
||||
inline Standard_Real BRepBlend_PointOnRst::ParameterOnArc () const
|
||||
{
|
||||
return prm;
|
||||
}
|
||||
|
Reference in New Issue
Block a user