is
- generic class ApproxLineGen;
-
- class ApproxLine instantiates ApproxLineGen from BRepApprox
- (BSplineCurve from Geom,
- BSplineCurve from Geom2d);
-
- generic class SurfaceToolGen;
-
- class SurfaceTool instantiates SurfaceToolGen from BRepApprox
- (Surface from BRepAdaptor);
+ class ApproxLine;
+
+ class SurfaceTool;
class Approx instantiates Approx from ApproxInt
(Surface from BRepAdaptor,
--- /dev/null
+-- Created on: 1995-07-20
+-- Created by: Modelistation
+-- 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.
+
+class ApproxLine from BRepApprox inherits TShared from MMgt
+
+uses
+
+ PntOn2S from IntSurf,
+ LineOn2S from IntSurf,
+ BSplineCurve from Geom,
+ BSplineCurve from Geom2d
+
+is
+
+ Create(CurveXYZ: BSplineCurve from Geom;
+ CurveUV1: BSplineCurve from Geom2d;
+ CurveUV2: BSplineCurve from Geom2d)
+ returns mutable ApproxLine from BRepApprox;
+
+ Create(lin: LineOn2S from IntSurf; Tang: Boolean from Standard)
+ returns mutable ApproxLine from BRepApprox;
+
+ NbPnts(me)
+ returns Integer from Standard
+ is static;
+
+ Point(me: mutable; Index: Integer from Standard)
+
+ returns PntOn2S from IntSurf
+ is static;
+
+fields
+
+ myCurveXYZ : BSplineCurve from Geom;
+ myCurveUV1 : BSplineCurve from Geom2d;
+ myCurveUV2 : BSplineCurve from Geom2d;
+ myLineOn2S : LineOn2S from IntSurf;
+
+end ApproxLine from BRepApprox;
+
--- /dev/null
+// Created on: 1995-07-20
+// Created by: Modelistation
+// 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 <BRepApprox_ApproxLine.ixx>
+
+#include <gp_Pnt2d.hxx>
+
+//=======================================================================
+//function : BRepApprox_ApproxLine
+//purpose :
+//=======================================================================
+
+BRepApprox_ApproxLine::BRepApprox_ApproxLine
+ (const Handle(Geom_BSplineCurve)& CurveXYZ,
+ const Handle(Geom2d_BSplineCurve)& CurveUV1,
+ const Handle(Geom2d_BSplineCurve)& CurveUV2)
+{
+ myCurveXYZ = CurveXYZ;
+ myCurveUV1 = CurveUV1;
+ myCurveUV2 = CurveUV2;
+}
+
+
+//=======================================================================
+//function : BRepApprox_ApproxLine
+//purpose :
+//=======================================================================
+
+BRepApprox_ApproxLine::BRepApprox_ApproxLine
+ (const Handle(IntSurf_LineOn2S)& lin,
+ const Standard_Boolean )
+ :myLineOn2S(lin)
+{
+}
+
+//=======================================================================
+//function : NbPnts
+//purpose :
+//=======================================================================
+
+Standard_Integer BRepApprox_ApproxLine::NbPnts() const
+{
+ if(!myCurveXYZ.IsNull())
+ return(myCurveXYZ->NbPoles());
+ if(!myCurveUV1.IsNull())
+ return(myCurveUV1->NbPoles());
+ if(!myCurveUV2.IsNull())
+ return(myCurveUV2->NbPoles());
+ return(myLineOn2S->NbPoints());
+}
+
+//=======================================================================
+//function : Point
+//purpose :
+//=======================================================================
+
+IntSurf_PntOn2S BRepApprox_ApproxLine::Point(const Standard_Integer Index)
+{
+ if(!myLineOn2S.IsNull()) {
+ if(myLineOn2S->NbPoints()) {
+ return(myLineOn2S->Value(Index));
+ }
+ }
+ gp_Pnt2d P1,P2;
+ gp_Pnt P;
+ if(!myCurveXYZ.IsNull())
+ P = myCurveXYZ->Pole(Index);
+ if(!myCurveUV1.IsNull())
+ P1 = myCurveUV1->Pole(Index);
+ if(!myCurveUV2.IsNull())
+ P2 = myCurveUV2->Pole(Index);
+
+ IntSurf_PntOn2S aPntOn2S;
+ aPntOn2S.SetValue(P, P1.X(), P1.Y(), P2.X(), P2.Y());
+
+ return aPntOn2S;
+}
+++ /dev/null
--- Created on: 1995-07-20
--- Created by: Modelistation
--- 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.
-
-generic class ApproxLineGen from BRepApprox
- (TheCurve as any;
- TheCurve2d as any)
-inherits TShared from MMgt
-
-
-uses
-
- PntOn2S from IntSurf,
- LineOn2S from IntSurf
-
-is
-
- Create(CurveXYZ: TheCurve;
- CurveUV1: TheCurve2d;
- CurveUV2: TheCurve2d)
- returns mutable ApproxLineGen from BRepApprox;
-
- Create(lin: LineOn2S from IntSurf; Tang: Boolean from Standard)
- returns mutable ApproxLineGen from BRepApprox;
-
- NbPnts(me)
- returns Integer from Standard
- is static;
-
- Point(me: mutable; Index: Integer from Standard)
- returns PntOn2S from IntSurf
- is static;
-
-fields
-
- curvxyz : TheCurve;
- curvuv1 : TheCurve2d;
- curvuv2 : TheCurve2d;
- pnton2s : PntOn2S from IntSurf;
- linon2s : LineOn2S from IntSurf;
-
-end ApproxLineGen from BRepApprox;
-
+++ /dev/null
-// Created on: 1995-07-20
-// Created by: Modelistation
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <gp_Pnt2d.hxx>
-
-//=======================================================================
-//function : BRepApprox_ApproxLineGen
-//purpose :
-//=======================================================================
-
-BRepApprox_ApproxLineGen::BRepApprox_ApproxLineGen
- (const TheCurve& CurveXYZ,
- const TheCurve2d& CurveUV1,
- const TheCurve2d& CurveUV2)
-{
- curvxyz = CurveXYZ;
- curvuv1 = CurveUV1;
- curvuv2 = CurveUV2;
-}
-
-
-//=======================================================================
-//function : BRepApprox_ApproxLineGen
-//purpose :
-//=======================================================================
-
-BRepApprox_ApproxLineGen::BRepApprox_ApproxLineGen
- (const Handle(IntSurf_LineOn2S)& lin,
- const Standard_Boolean )
- :linon2s(lin)
-{
-}
-
-//=======================================================================
-//function : NbPnts
-//purpose :
-//=======================================================================
-
-Standard_Integer BRepApprox_ApproxLineGen::NbPnts() const
-{
- if(!curvxyz.IsNull())
- return(curvxyz->NbPoles());
- if(!curvuv1.IsNull())
- return(curvuv1->NbPoles());
- if(!curvuv2.IsNull())
- return(curvuv2->NbPoles());
- return(linon2s->NbPoints());
-}
-
-//=======================================================================
-//function : Point
-//purpose :
-//=======================================================================
-
-IntSurf_PntOn2S BRepApprox_ApproxLineGen::Point
- (const Standard_Integer Index)
-{
- if(!linon2s.IsNull()) {
- if(linon2s->NbPoints()) {
- return(linon2s->Value(Index));
- }
- }
- gp_Pnt2d P1,P2;
- gp_Pnt P;
- if(!curvxyz.IsNull())
- P = curvxyz->Pole(Index);
- if(!curvuv1.IsNull())
- P1 = curvuv1->Pole(Index);
- if(!curvuv2.IsNull())
- P2 = curvuv2->Pole(Index);
-
- pnton2s.SetValue(P,
- P1.X(),
- P1.Y(),
- P2.X(),
- P2.Y());
- return(pnton2s);
-}
--- /dev/null
+-- Created on: 1995-07-20
+-- Created by: Modelistation
+-- 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.
+
+class SurfaceTool from BRepApprox
+
+uses
+
+ Shape from GeomAbs,
+ SurfaceType from GeomAbs,
+ Pln from gp,
+ Cone from gp,
+ Cylinder from gp,
+ Sphere from gp,
+ Torus from gp,
+ Pnt from gp,
+ Vec from gp,
+ Array1OfReal from TColStd,
+ BezierSurface from Geom,
+ BSplineSurface from Geom,
+ HSurface from Adaptor3d,
+ HCurve from Adaptor3d,
+ Ax1 from gp,
+ Dir from gp,
+ Surface from BRepAdaptor
+
+raises
+
+ NoSuchObject from Standard,
+ OutOfRange from Standard
+
+is
+
+ FirstUParameter(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Real from Standard;
+
+ FirstVParameter(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Real from Standard;
+
+ LastUParameter(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Real from Standard;
+
+ LastVParameter(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Real from Standard;
+
+
+
+ NbUIntervals(myclass; S: Surface from BRepAdaptor;
+ Sh : Shape from GeomAbs)
+ ---C++: inline
+ returns Integer from Standard;
+
+ NbVIntervals(myclass; S: Surface from BRepAdaptor;
+ Sh : Shape from GeomAbs)
+ ---C++: inline
+ returns Integer from Standard;
+
+
+
+ UIntervals(myclass; S : Surface from BRepAdaptor;
+ T : in out Array1OfReal from TColStd;
+ Sh : Shape from GeomAbs);
+ ---C++: inline
+
+ VIntervals(myclass; S : Surface from BRepAdaptor;
+ T : in out Array1OfReal from TColStd;
+ Sh : Shape from GeomAbs) ;
+ ---C++: inline
+
+
+ UTrim(myclass; S : Surface from BRepAdaptor;
+ First, Last, Tol : Real)
+ ---C++: inline
+ returns HSurface from Adaptor3d
+ raises
+ OutOfRange from Standard;
+ ---Purpose: If <First> >= <Last>
+
+ VTrim(myclass; S : Surface from BRepAdaptor;
+ First, Last, Tol : Real)
+ ---C++: inline
+ returns HSurface from Adaptor3d
+ raises
+ OutOfRange from Standard;
+ ---Purpose: If <First> >= <Last>
+
+
+ IsUClosed(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Boolean from Standard;
+
+ IsVClosed(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Boolean from Standard;
+
+
+ IsUPeriodic(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Boolean from Standard;
+
+ UPeriod(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Real from Standard;
+
+ IsVPeriodic(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Boolean from Standard;
+
+ VPeriod(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Real from Standard;
+
+
+
+ Value(myclass; S : Surface from BRepAdaptor;
+ u,v : Real from Standard)
+ ---C++: inline
+ returns Pnt from gp;
+
+ D0(myclass; S : Surface from BRepAdaptor;
+ u,v : Real from Standard;
+ P : out Pnt from gp);
+ ---C++: inline
+
+ D1(myclass; S : Surface from BRepAdaptor;
+ u,v : Real from Standard;
+ P : out Pnt from gp;
+ D1u,D1v: out Vec from gp);
+ ---C++: inline
+
+ D2(myclass; S : Surface from BRepAdaptor;
+ u,v : Real from Standard;
+ P : out Pnt from gp;
+ D1U,D1V,D2U,D2V,D2UV: out Vec from gp);
+ ---C++: inline
+
+ D3(myclass; S : Surface from BRepAdaptor;
+ u,v : Real from Standard;
+ P : out Pnt from gp;
+ D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV: out Vec from gp);
+ ---C++: inline
+
+ DN(myclass; S : Surface from BRepAdaptor;
+ u,v : Real from Standard;
+ Nu,Nv : Integer from Standard)
+ ---C++: inline
+ returns Vec from gp;
+
+
+
+ UResolution(myclass; S:Surface from BRepAdaptor; R3d: Real from Standard)
+ ---C++: inline
+ returns Real from Standard;
+
+ VResolution(myclass; S:Surface from BRepAdaptor; R3d: Real from Standard)
+ ---C++: inline
+ returns Real from Standard;
+
+ GetType(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns SurfaceType from GeomAbs;
+
+
+ Plane(myclass; S: Surface from BRepAdaptor)
+ ---C++: inline
+ returns Pln from gp;
+
+ Cylinder(myclass; S : Surface from BRepAdaptor) returns Cylinder from gp
+ raises NoSuchObject from Standard;
+ ---C++: inline
+
+
+ Cone(myclass; S : Surface from BRepAdaptor) returns Cone from gp
+ raises NoSuchObject from Standard;
+ ---C++: inline
+
+ Torus(myclass; S : Surface from BRepAdaptor) returns Torus from gp
+ raises NoSuchObject from Standard;
+ ---C++: inline
+
+
+ Sphere(myclass; S : Surface from BRepAdaptor) returns Sphere from gp
+ raises NoSuchObject from Standard;
+ ---C++: inline
+
+ Bezier(myclass; S : Surface from BRepAdaptor) returns BezierSurface from Geom
+ raises NoSuchObject from Standard;
+ ---C++: inline
+
+ BSpline(myclass; S : Surface from BRepAdaptor) returns BSplineSurface from Geom
+ raises NoSuchObject from Standard;
+ ---C++: inline
+
+ AxeOfRevolution(myclass; S: Surface from BRepAdaptor) returns Ax1 from gp
+ raises NoSuchObject from Standard;
+ ---C++: inline
+
+ Direction(myclass; S: Surface from BRepAdaptor) returns Dir from gp
+ raises NoSuchObject from Standard;
+ ---C++: inline
+
+ BasisCurve(myclass; S:Surface from BRepAdaptor) returns HCurve from Adaptor3d
+ raises NoSuchObject from Standard;
+ ---C++: inline
+
+
+--------------------------------------------------------------------------------
+
+
+ NbSamplesU(myclass; S : Surface from BRepAdaptor) returns Integer from Standard;
+
+
+ NbSamplesV(myclass; S : Surface from BRepAdaptor) returns Integer from Standard;
+
+
+ NbSamplesU(myclass; S : Surface from BRepAdaptor; u1,u2: Real from Standard) returns Integer from Standard;
+
+
+ NbSamplesV(myclass; S : Surface from BRepAdaptor; v1,v2: Real from Standard) returns Integer from Standard;
+
+
+
+end SurfaceTool from BRepApprox ;
--- /dev/null
+// Created on: 1995-07-20
+// Created by: Modelistation
+// 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 "BRepApprox_SurfaceTool.ixx"
+
+Standard_Integer BRepApprox_SurfaceTool::NbSamplesU (const BRepAdaptor_Surface&)
+{
+ return(10);
+}
+
+Standard_Integer BRepApprox_SurfaceTool::NbSamplesV (const BRepAdaptor_Surface&)
+{
+ return(10);
+}
+
+Standard_Integer BRepApprox_SurfaceTool::NbSamplesU (const BRepAdaptor_Surface&,
+ const Standard_Real,
+ const Standard_Real)
+{
+ return(10);
+}
+
+Standard_Integer BRepApprox_SurfaceTool::NbSamplesV (const BRepAdaptor_Surface&,
+ const Standard_Real,
+ const Standard_Real)
+{
+ return(10);
+}
--- /dev/null
+// Created on: 1995-07-20
+// Created by: Modelistation
+// Copyright (c) 1995-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <gp_Pnt.hxx>
+#include <gp_Vec.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Cylinder.hxx>
+#include <gp_Cone.hxx>
+#include <gp_Torus.hxx>
+#include <gp_Sphere.hxx>
+#include <gp_Ax1.hxx>
+#include <gp_Dir.hxx>
+#include <Geom_BezierSurface.hxx>
+#include <Geom_BSplineSurface.hxx>
+#include <Adaptor3d_HSurface.hxx>
+#include <Adaptor3d_HCurve.hxx>
+
+inline Standard_Real BRepApprox_SurfaceTool::FirstUParameter(const BRepAdaptor_Surface& Surf){ return Surf.FirstUParameter(); }
+inline Standard_Real BRepApprox_SurfaceTool::FirstVParameter(const BRepAdaptor_Surface& Surf){ return Surf.FirstVParameter();}
+inline Standard_Real BRepApprox_SurfaceTool::LastUParameter(const BRepAdaptor_Surface& Surf){ return Surf.LastUParameter();}
+inline Standard_Real BRepApprox_SurfaceTool::LastVParameter(const BRepAdaptor_Surface& Surf){ return Surf.LastVParameter();}
+
+inline Standard_Integer BRepApprox_SurfaceTool::NbUIntervals(const BRepAdaptor_Surface& Surf,
+ const GeomAbs_Shape S){
+ return Surf.NbUIntervals(S);
+}
+
+inline Standard_Integer BRepApprox_SurfaceTool::NbVIntervals(const BRepAdaptor_Surface& Surf,
+ const GeomAbs_Shape S){
+ return Surf.NbVIntervals(S);
+}
+
+inline void BRepApprox_SurfaceTool::UIntervals(const BRepAdaptor_Surface& Surf,
+ TColStd_Array1OfReal& Tab,
+ const GeomAbs_Shape S){
+ Surf.UIntervals(Tab,S);
+}
+
+inline void BRepApprox_SurfaceTool::VIntervals(const BRepAdaptor_Surface& Surf,
+ TColStd_Array1OfReal& Tab,
+ const GeomAbs_Shape S){
+ Surf.VIntervals(Tab,S);
+}
+
+
+inline Handle_Adaptor3d_HSurface BRepApprox_SurfaceTool::UTrim(const BRepAdaptor_Surface& Surf,
+ const Standard_Real F,
+ const Standard_Real L,
+ const Standard_Real Tol) {
+ return Surf.UTrim(F,L,Tol);
+}
+
+inline Handle_Adaptor3d_HSurface BRepApprox_SurfaceTool::VTrim(const BRepAdaptor_Surface& Surf,
+ const Standard_Real F,
+ const Standard_Real L,
+ const Standard_Real Tol) {
+ return Surf.VTrim(F,L,Tol);
+}
+
+
+
+
+inline Standard_Boolean BRepApprox_SurfaceTool::IsUClosed(const BRepAdaptor_Surface& S)
+{
+ return S.IsUClosed();
+}
+
+inline Standard_Boolean BRepApprox_SurfaceTool::IsVClosed(const BRepAdaptor_Surface& S)
+{
+ return S.IsVClosed();
+}
+
+inline Standard_Boolean BRepApprox_SurfaceTool::IsUPeriodic(const BRepAdaptor_Surface& S)
+{
+ return S.IsUPeriodic();
+}
+
+inline Standard_Real BRepApprox_SurfaceTool::UPeriod(const BRepAdaptor_Surface& S)
+{
+ return S.UPeriod();
+}
+
+inline Standard_Boolean BRepApprox_SurfaceTool::IsVPeriodic(const BRepAdaptor_Surface& S)
+{
+ return S.IsVPeriodic();
+}
+
+inline Standard_Real BRepApprox_SurfaceTool::VPeriod(const BRepAdaptor_Surface& S)
+{
+ return S.VPeriod();
+}
+
+inline gp_Pnt BRepApprox_SurfaceTool::Value(const BRepAdaptor_Surface& S,
+ const Standard_Real U,
+ const Standard_Real V )
+{
+ return S.Value(U,V);
+}
+
+inline void BRepApprox_SurfaceTool::D0(const BRepAdaptor_Surface& S,
+ const Standard_Real U,
+ const Standard_Real V,
+ gp_Pnt& P)
+{
+ S.D0(U,V,P);
+}
+
+inline void BRepApprox_SurfaceTool::D1(const BRepAdaptor_Surface& S,
+ const Standard_Real U,
+ const Standard_Real V,
+ gp_Pnt& P,
+ gp_Vec& D1U,
+ gp_Vec& D1V)
+{
+ S.D1(U,V,P,D1U,D1V);
+}
+
+inline void BRepApprox_SurfaceTool::D2(const BRepAdaptor_Surface& S,
+ const Standard_Real U,
+ const Standard_Real V,
+ gp_Pnt& P,
+ gp_Vec& D1U,
+ gp_Vec& D1V,
+ gp_Vec& D2U,
+ gp_Vec& D2V,
+ gp_Vec& D2UV)
+{
+ S.D2(U,V,P,D1U,D1V,D2U,D2V,D2UV);
+}
+
+inline void BRepApprox_SurfaceTool::D3(const BRepAdaptor_Surface& S,
+ const Standard_Real U,
+ const Standard_Real V,
+ gp_Pnt& P,
+ gp_Vec& D1U,
+ gp_Vec& D1V,
+ gp_Vec& D2U,
+ gp_Vec& D2V,
+ gp_Vec& D2UV,
+ gp_Vec& D3U,
+ gp_Vec& D3V,
+ gp_Vec& D3UUV,
+ gp_Vec& D3UVV)
+{
+ S.D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV);
+}
+
+inline gp_Vec BRepApprox_SurfaceTool::DN(const BRepAdaptor_Surface& S,
+ const Standard_Real U,
+ const Standard_Real V,
+ const Standard_Integer Nu,
+ const Standard_Integer Nv)
+{
+ return S.DN(U,V,Nu,Nv);
+}
+
+inline Standard_Real BRepApprox_SurfaceTool::UResolution(const BRepAdaptor_Surface& S,
+ const Standard_Real R3d)
+{
+ return S.UResolution(R3d);
+}
+
+inline Standard_Real BRepApprox_SurfaceTool::VResolution(const BRepAdaptor_Surface& S,
+ const Standard_Real R3d)
+{
+ return S.VResolution(R3d);
+}
+
+inline GeomAbs_SurfaceType BRepApprox_SurfaceTool::GetType(const BRepAdaptor_Surface& S )
+{
+ return S.GetType();
+}
+
+inline gp_Pln BRepApprox_SurfaceTool::Plane(const BRepAdaptor_Surface& S)
+{
+ return S.Plane();
+}
+
+inline gp_Cylinder BRepApprox_SurfaceTool::Cylinder(const BRepAdaptor_Surface& S)
+{
+ return S.Cylinder();
+}
+
+inline gp_Cone BRepApprox_SurfaceTool::Cone(const BRepAdaptor_Surface& S)
+{
+ return S.Cone();
+}
+
+inline gp_Sphere BRepApprox_SurfaceTool::Sphere(const BRepAdaptor_Surface& S)
+{
+ return S.Sphere();
+}
+
+inline gp_Torus BRepApprox_SurfaceTool::Torus(const BRepAdaptor_Surface& S)
+{
+ return S.Torus();
+}
+
+
+inline Handle(Geom_BezierSurface) BRepApprox_SurfaceTool::Bezier(const BRepAdaptor_Surface& S) {
+ return(S.Bezier());
+}
+
+inline Handle(Geom_BSplineSurface) BRepApprox_SurfaceTool::BSpline(const BRepAdaptor_Surface& S) {
+ return(S.BSpline());
+}
+
+
+inline gp_Ax1 BRepApprox_SurfaceTool::AxeOfRevolution(const BRepAdaptor_Surface& S) {
+ return(S.AxeOfRevolution());
+}
+
+inline gp_Dir BRepApprox_SurfaceTool::Direction(const BRepAdaptor_Surface& S) {
+ return(S.Direction());
+}
+
+inline Handle(Adaptor3d_HCurve) BRepApprox_SurfaceTool::BasisCurve(const BRepAdaptor_Surface& S) {
+ return(S.BasisCurve());
+}
+++ /dev/null
--- Created on: 1995-07-20
--- Created by: Modelistation
--- 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.
-
-generic class SurfaceToolGen from BRepApprox
- (TheSurface as any)
-
-
-uses
-
- Shape from GeomAbs,
- SurfaceType from GeomAbs,
- Pln from gp,
- Cone from gp,
- Cylinder from gp,
- Sphere from gp,
- Torus from gp,
- Pnt from gp,
- Vec from gp,
- Array1OfReal from TColStd,
- BezierSurface from Geom,
- BSplineSurface from Geom,
- HSurface from Adaptor3d,
- HCurve from Adaptor3d,
- Ax1 from gp,
- Dir from gp
-
-raises
-
- NoSuchObject from Standard,
- OutOfRange from Standard
-
-is
-
- FirstUParameter(myclass; S: TheSurface)
- ---C++: inline
- returns Real from Standard;
-
- FirstVParameter(myclass; S: TheSurface)
- ---C++: inline
- returns Real from Standard;
-
- LastUParameter(myclass; S: TheSurface)
- ---C++: inline
- returns Real from Standard;
-
- LastVParameter(myclass; S: TheSurface)
- ---C++: inline
- returns Real from Standard;
-
-
-
- NbUIntervals(myclass; S: TheSurface;
- Sh : Shape from GeomAbs)
- ---C++: inline
- returns Integer from Standard;
-
- NbVIntervals(myclass; S: TheSurface;
- Sh : Shape from GeomAbs)
- ---C++: inline
- returns Integer from Standard;
-
-
-
- UIntervals(myclass; S : TheSurface;
- T : in out Array1OfReal from TColStd;
- Sh : Shape from GeomAbs);
- ---C++: inline
-
- VIntervals(myclass; S : TheSurface;
- T : in out Array1OfReal from TColStd;
- Sh : Shape from GeomAbs) ;
- ---C++: inline
-
-
- UTrim(myclass; S : TheSurface;
- First, Last, Tol : Real)
- ---C++: inline
- returns HSurface from Adaptor3d
- raises
- OutOfRange from Standard;
- ---Purpose: If <First> >= <Last>
-
- VTrim(myclass; S : TheSurface;
- First, Last, Tol : Real)
- ---C++: inline
- returns HSurface from Adaptor3d
- raises
- OutOfRange from Standard;
- ---Purpose: If <First> >= <Last>
-
-
- IsUClosed(myclass; S: TheSurface)
- ---C++: inline
- returns Boolean from Standard;
-
- IsVClosed(myclass; S: TheSurface)
- ---C++: inline
- returns Boolean from Standard;
-
-
- IsUPeriodic(myclass; S: TheSurface)
- ---C++: inline
- returns Boolean from Standard;
-
- UPeriod(myclass; S: TheSurface)
- ---C++: inline
- returns Real from Standard;
-
- IsVPeriodic(myclass; S: TheSurface)
- ---C++: inline
- returns Boolean from Standard;
-
- VPeriod(myclass; S: TheSurface)
- ---C++: inline
- returns Real from Standard;
-
-
-
- Value(myclass; S : TheSurface;
- u,v : Real from Standard)
- ---C++: inline
- returns Pnt from gp;
-
- D0(myclass; S : TheSurface;
- u,v : Real from Standard;
- P : out Pnt from gp);
- ---C++: inline
-
- D1(myclass; S : TheSurface;
- u,v : Real from Standard;
- P : out Pnt from gp;
- D1u,D1v: out Vec from gp);
- ---C++: inline
-
- D2(myclass; S : TheSurface;
- u,v : Real from Standard;
- P : out Pnt from gp;
- D1U,D1V,D2U,D2V,D2UV: out Vec from gp);
- ---C++: inline
-
- D3(myclass; S : TheSurface;
- u,v : Real from Standard;
- P : out Pnt from gp;
- D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV: out Vec from gp);
- ---C++: inline
-
- DN(myclass; S : TheSurface;
- u,v : Real from Standard;
- Nu,Nv : Integer from Standard)
- ---C++: inline
- returns Vec from gp;
-
-
-
- UResolution(myclass; S:TheSurface; R3d: Real from Standard)
- ---C++: inline
- returns Real from Standard;
-
- VResolution(myclass; S:TheSurface; R3d: Real from Standard)
- ---C++: inline
- returns Real from Standard;
-
- GetType(myclass; S: TheSurface)
- ---C++: inline
- returns SurfaceType from GeomAbs;
-
-
- Plane(myclass; S: TheSurface)
- ---C++: inline
- returns Pln from gp;
-
- Cylinder(myclass; S : TheSurface) returns Cylinder from gp
- raises NoSuchObject from Standard;
- ---C++: inline
-
-
- Cone(myclass; S : TheSurface) returns Cone from gp
- raises NoSuchObject from Standard;
- ---C++: inline
-
- Torus(myclass; S : TheSurface) returns Torus from gp
- raises NoSuchObject from Standard;
- ---C++: inline
-
-
- Sphere(myclass; S : TheSurface) returns Sphere from gp
- raises NoSuchObject from Standard;
- ---C++: inline
-
- Bezier(myclass; S : TheSurface) returns BezierSurface from Geom
- raises NoSuchObject from Standard;
- ---C++: inline
-
- BSpline(myclass; S : TheSurface) returns BSplineSurface from Geom
- raises NoSuchObject from Standard;
- ---C++: inline
-
- AxeOfRevolution(myclass; S: TheSurface) returns Ax1 from gp
- raises NoSuchObject from Standard;
- ---C++: inline
-
- Direction(myclass; S: TheSurface) returns Dir from gp
- raises NoSuchObject from Standard;
- ---C++: inline
-
- BasisCurve(myclass; S:TheSurface) returns HCurve from Adaptor3d
- raises NoSuchObject from Standard;
- ---C++: inline
-
-
---------------------------------------------------------------------------------
-
-
- NbSamplesU(myclass; S : TheSurface) returns Integer from Standard;
-
-
- NbSamplesV(myclass; S : TheSurface) returns Integer from Standard;
-
-
- NbSamplesU(myclass; S : TheSurface; u1,u2: Real from Standard) returns Integer from Standard;
-
-
- NbSamplesV(myclass; S : TheSurface; v1,v2: Real from Standard) returns Integer from Standard;
-
-
-
-end SurfaceToolGen from BRepApprox ;
+++ /dev/null
-// Created on: 1995-07-20
-// Created by: Modelistation
-// 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 TheSurface_hxx
-
-
-Standard_Integer BRepApprox_SurfaceToolGen::NbSamplesU (const TheSurface&)
-{
- return(10);
-}
-
-Standard_Integer BRepApprox_SurfaceToolGen::NbSamplesV (const TheSurface&)
-{
- return(10);
-}
-
-Standard_Integer BRepApprox_SurfaceToolGen::NbSamplesU (const TheSurface&,
- const Standard_Real,
- const Standard_Real)
-{
- return(10);
-}
-
-Standard_Integer BRepApprox_SurfaceToolGen::NbSamplesV (const TheSurface&,
- const Standard_Real,
- const Standard_Real)
-{
- return(10);
-}
+++ /dev/null
-// Created on: 1995-07-20
-// Created by: Modelistation
-// 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 TheSurface_hxx
-#include <gp_Pnt.hxx>
-#include <gp_Vec.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Cylinder.hxx>
-#include <gp_Cone.hxx>
-#include <gp_Torus.hxx>
-#include <gp_Sphere.hxx>
-#include <gp_Ax1.hxx>
-#include <gp_Dir.hxx>
-#include <Geom_BezierSurface.hxx>
-#include <Geom_BSplineSurface.hxx>
-#include <Adaptor3d_HSurface.hxx>
-#include <Adaptor3d_HCurve.hxx>
-
-
-
-inline Standard_Real BRepApprox_SurfaceToolGen::FirstUParameter(const TheSurface& Surf){ return Surf.FirstUParameter(); }
-inline Standard_Real BRepApprox_SurfaceToolGen::FirstVParameter(const TheSurface& Surf){ return Surf.FirstVParameter();}
-inline Standard_Real BRepApprox_SurfaceToolGen::LastUParameter(const TheSurface& Surf){ return Surf.LastUParameter();}
-inline Standard_Real BRepApprox_SurfaceToolGen::LastVParameter(const TheSurface& Surf){ return Surf.LastVParameter();}
-
-inline Standard_Integer BRepApprox_SurfaceToolGen::NbUIntervals(const TheSurface& Surf,
- const GeomAbs_Shape S){
- return Surf.NbUIntervals(S);
-}
-
-inline Standard_Integer BRepApprox_SurfaceToolGen::NbVIntervals(const TheSurface& Surf,
- const GeomAbs_Shape S){
- return Surf.NbVIntervals(S);
-}
-
-inline void BRepApprox_SurfaceToolGen::UIntervals(const TheSurface& Surf,
- TColStd_Array1OfReal& Tab,
- const GeomAbs_Shape S){
- Surf.UIntervals(Tab,S);
-}
-
-inline void BRepApprox_SurfaceToolGen::VIntervals(const TheSurface& Surf,
- TColStd_Array1OfReal& Tab,
- const GeomAbs_Shape S){
- Surf.VIntervals(Tab,S);
-}
-
-
-inline Handle_Adaptor3d_HSurface BRepApprox_SurfaceToolGen::UTrim(const TheSurface& Surf,
- const Standard_Real F,
- const Standard_Real L,
- const Standard_Real Tol) {
- return Surf.UTrim(F,L,Tol);
-}
-
-inline Handle_Adaptor3d_HSurface BRepApprox_SurfaceToolGen::VTrim(const TheSurface& Surf,
- const Standard_Real F,
- const Standard_Real L,
- const Standard_Real Tol) {
- return Surf.VTrim(F,L,Tol);
-}
-
-
-
-
-inline Standard_Boolean BRepApprox_SurfaceToolGen::IsUClosed(const TheSurface& S)
-{
- return S.IsUClosed();
-}
-
-inline Standard_Boolean BRepApprox_SurfaceToolGen::IsVClosed(const TheSurface& S)
-{
- return S.IsVClosed();
-}
-
-inline Standard_Boolean BRepApprox_SurfaceToolGen::IsUPeriodic(const TheSurface& S)
-{
- return S.IsUPeriodic();
-}
-
-inline Standard_Real BRepApprox_SurfaceToolGen::UPeriod(const TheSurface& S)
-{
- return S.UPeriod();
-}
-
-inline Standard_Boolean BRepApprox_SurfaceToolGen::IsVPeriodic(const TheSurface& S)
-{
- return S.IsVPeriodic();
-}
-
-inline Standard_Real BRepApprox_SurfaceToolGen::VPeriod(const TheSurface& S)
-{
- return S.VPeriod();
-}
-
-inline gp_Pnt BRepApprox_SurfaceToolGen::Value(const TheSurface& S,
- const Standard_Real U,
- const Standard_Real V )
-{
- return S.Value(U,V);
-}
-
-inline void BRepApprox_SurfaceToolGen::D0(const TheSurface& S,
- const Standard_Real U,
- const Standard_Real V,
- gp_Pnt& P)
-{
- S.D0(U,V,P);
-}
-
-inline void BRepApprox_SurfaceToolGen::D1(const TheSurface& S,
- const Standard_Real U,
- const Standard_Real V,
- gp_Pnt& P,
- gp_Vec& D1U,
- gp_Vec& D1V)
-{
- S.D1(U,V,P,D1U,D1V);
-}
-
-inline void BRepApprox_SurfaceToolGen::D2(const TheSurface& S,
- const Standard_Real U,
- const Standard_Real V,
- gp_Pnt& P,
- gp_Vec& D1U,
- gp_Vec& D1V,
- gp_Vec& D2U,
- gp_Vec& D2V,
- gp_Vec& D2UV)
-{
- S.D2(U,V,P,D1U,D1V,D2U,D2V,D2UV);
-}
-
-inline void BRepApprox_SurfaceToolGen::D3(const TheSurface& S,
- const Standard_Real U,
- const Standard_Real V,
- gp_Pnt& P,
- gp_Vec& D1U,
- gp_Vec& D1V,
- gp_Vec& D2U,
- gp_Vec& D2V,
- gp_Vec& D2UV,
- gp_Vec& D3U,
- gp_Vec& D3V,
- gp_Vec& D3UUV,
- gp_Vec& D3UVV)
-{
- S.D3(U,V,P,D1U,D1V,D2U,D2V,D2UV,D3U,D3V,D3UUV,D3UVV);
-}
-
-inline gp_Vec BRepApprox_SurfaceToolGen::DN(const TheSurface& S,
- const Standard_Real U,
- const Standard_Real V,
- const Standard_Integer Nu,
- const Standard_Integer Nv)
-{
- return S.DN(U,V,Nu,Nv);
-}
-
-inline Standard_Real BRepApprox_SurfaceToolGen::UResolution(const TheSurface& S,
- const Standard_Real R3d)
-{
- return S.UResolution(R3d);
-}
-
-inline Standard_Real BRepApprox_SurfaceToolGen::VResolution(const TheSurface& S,
- const Standard_Real R3d)
-{
- return S.VResolution(R3d);
-}
-
-inline GeomAbs_SurfaceType BRepApprox_SurfaceToolGen::GetType(const TheSurface& S )
-{
- return S.GetType();
-}
-
-inline gp_Pln BRepApprox_SurfaceToolGen::Plane(const TheSurface& S)
-{
- return S.Plane();
-}
-
-inline gp_Cylinder BRepApprox_SurfaceToolGen::Cylinder(const TheSurface& S)
-{
- return S.Cylinder();
-}
-
-inline gp_Cone BRepApprox_SurfaceToolGen::Cone(const TheSurface& S)
-{
- return S.Cone();
-}
-
-inline gp_Sphere BRepApprox_SurfaceToolGen::Sphere(const TheSurface& S)
-{
- return S.Sphere();
-}
-
-inline gp_Torus BRepApprox_SurfaceToolGen::Torus(const TheSurface& S)
-{
- return S.Torus();
-}
-
-
-inline Handle(Geom_BezierSurface) BRepApprox_SurfaceToolGen::Bezier(const TheSurface& S) {
- return(S.Bezier());
-}
-
-inline Handle(Geom_BSplineSurface) BRepApprox_SurfaceToolGen::BSpline(const TheSurface& S) {
- return(S.BSpline());
-}
-
-
-inline gp_Ax1 BRepApprox_SurfaceToolGen::AxeOfRevolution(const TheSurface& S) {
- return(S.AxeOfRevolution());
-}
-
-inline gp_Dir BRepApprox_SurfaceToolGen::Direction(const TheSurface& S) {
- return(S.Direction());
-}
-
-inline Handle(Adaptor3d_HCurve) BRepApprox_SurfaceToolGen::BasisCurve(const TheSurface& S) {
- return(S.BasisCurve());
-}
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;
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,
--- /dev/null
+-- 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;
+
+
--- /dev/null
+// 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));
+}
+
--- /dev/null
+// 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;
+}
+
--- /dev/null
+-- Created on: 1995-07-17
+-- Created by: Laurent BUCHARD
+-- 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.
+
+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,
+ BezierCurve from Geom2d,
+ BSplineCurve from Geom2d,
+ HCurve2d from Adaptor2d
+
+raises
+
+ OutOfRange from Standard,
+ NoSuchObject from Standard,
+ DomainError from Standard
+
+is
+
+ --
+ -- Global methods - Apply to the whole curve.
+ --
+
+ FirstParameter(myclass; C: HCurve2d from Adaptor2d) returns Real
+ ---C++: inline
+ ;
+
+
+ LastParameter(myclass; C: HCurve2d from Adaptor2d) returns Real
+ ---C++: inline
+ ;
+
+ --
+ -- Services to break the curves to the expected continuity
+ --
+ -- If for example you need the curve to be C2 and the method
+ -- Continuity returns you something lower than C2 (say C1 for
+ -- example).
+ --
+ -- First compute the number of intervals with the requested
+ -- continuity with the method NbIntervals(). Note that if the
+ -- continuity is higher than the one you need NbIntervals will
+ -- return 1.
+ --
+ -- Then you get the parameters bounding the intervals with the
+ -- method Intervals, using an array of length at least
+ -- NbIntervals()+1.
+ --
+ -- If you need to create a curve with a restricted span you can
+ -- use the method Trim().
+
+
+ Continuity(myclass; C: HCurve2d from Adaptor2d) returns Shape from GeomAbs
+ ---Purpose:
+ ---C++: inline
+ ;
+
+ 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: 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>.
+ --
+ -- The array must provide enough room to accomodate
+ -- for the parameters. i.e. T.Length() > NbIntervals()
+ raises
+ OutOfRange from Standard
+ ---C++: inline
+ ;
+
+ IsClosed(myclass; C: HCurve2d from Adaptor2d) returns Boolean
+ ---C++: inline
+ ;
+
+ IsPeriodic(myclass; C: HCurve2d from Adaptor2d) returns Boolean
+ ---C++: inline
+ ;
+
+ Period(myclass; C: HCurve2d from Adaptor2d) returns Real
+ raises
+ DomainError from Standard -- if the curve is not periodic
+ ---C++: inline
+ ;
+
+ 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: 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: 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
+ DomainError from Standard
+ --- Purpose : Raised if the continuity of the current interval
+ -- is not C1.
+ ---C++: inline
+ ;
+
+ 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.
+ raises
+ DomainError from Standard
+ --- Purpose : Raised if the continuity of the current interval
+ -- is not C2.
+ ---C++: inline
+ ;
+
+ 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.
+ raises
+ DomainError from Standard
+ --- Purpose : Raised if the continuity of the current interval
+ -- is not C3.
+ ---C++: inline
+ ;
+
+ 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.
+ raises
+ DomainError from Standard,
+ --- Purpose : Raised if the continuity of the current interval
+ -- is not CN.
+ OutOfRange from Standard
+ --- Purpose : Raised if N < 1.
+ ---C++: inline
+ ;
+
+ 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: 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.
+ ---C++: inline
+ ;
+
+ --
+ -- The following methods must be called when GetType returned
+ -- the corresponding type.
+ --
+
+ Line(myclass; C: HCurve2d from Adaptor2d) returns Lin2d from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Circle(myclass; C: HCurve2d from Adaptor2d) returns Circ2d from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Ellipse(myclass; C: HCurve2d from Adaptor2d) returns Elips2d from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Hyperbola(myclass; C: HCurve2d from Adaptor2d) returns Hypr2d from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Parabola(myclass; C: HCurve2d from Adaptor2d) returns Parab2d from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Bezier(myclass; C: HCurve2d from Adaptor2d) returns BezierCurve from Geom2d
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ BSpline(myclass; C: HCurve2d from Adaptor2d) returns BSplineCurve from Geom2d
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+
+
+
+
+ NbSamples(myclass; C: HCurve2d from Adaptor2d; U0,U1: Real from Standard)
+ returns Integer from Standard;
+
+end HCurve2dTool;
+
+
--- /dev/null
+// Created on: 1995-07-17
+// Created by: Modelistation
+// 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_HCurve2dTool.ixx>
+
+#include <GeomAbs_CurveType.hxx>
+#include <GeomAbs_Shape.hxx>
+#include <Geom2d_BezierCurve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
+
+#include <TColStd_Array1OfReal.hxx>
+
+
+//============================================================
+Standard_Integer BRepBlend_HCurve2dTool::NbSamples (const Handle(Adaptor2d_HCurve2d)& C,
+ const Standard_Real U0,
+ const Standard_Real U1) {
+ GeomAbs_CurveType typC = C->GetType();
+ static Standard_Real nbsOther = 10.0;
+ Standard_Real nbs = nbsOther;
+
+ if(typC == GeomAbs_Line)
+ nbs = 2;
+ else if(typC == GeomAbs_BezierCurve)
+ nbs = 3 + C->Bezier()->NbPoles();
+ else if(typC == GeomAbs_BSplineCurve) {
+ Handle(Geom2d_BSplineCurve) BSC = C->BSpline();
+ nbs = BSC->NbKnots();
+ nbs*= BSC->Degree();
+ nbs*= BSC->LastParameter()- BSC->FirstParameter();
+ nbs/= U1-U0;
+ if(nbs < 2.0) nbs=2;
+ }
+ if(nbs>50)
+ nbs = 50;
+ return((Standard_Integer)nbs);
+}
--- /dev/null
+// Created on: 1992-10-22
+// Created by: Laurent BUCHARD
+// Copyright (c) 1992-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 <GeomAbs_CurveType.hxx>
+#include <GeomAbs_Shape.hxx>
+
+#include <gp_Vec2d.hxx>
+#include <gp_Lin2d.hxx>
+#include <gp_Circ2d.hxx>
+#include <gp_Elips2d.hxx>
+#include <gp_Parab2d.hxx>
+#include <gp_Hypr2d.hxx>
+
+
+#include <Geom2d_BezierCurve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
+
+#include <TColStd_Array1OfReal.hxx>
+
+//============================================================
+inline Standard_Real BRepBlend_HCurve2dTool::FirstParameter (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->FirstParameter());
+}
+//============================================================
+inline Standard_Real BRepBlend_HCurve2dTool::LastParameter (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->LastParameter());
+}
+//============================================================
+inline GeomAbs_Shape BRepBlend_HCurve2dTool::Continuity (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->Continuity());
+}
+//============================================================
+inline Standard_Integer BRepBlend_HCurve2dTool::NbIntervals(const Handle(Adaptor2d_HCurve2d)& C,const GeomAbs_Shape Sh) {
+ return(C->NbIntervals(Sh));
+}
+//============================================================
+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_HCurve2dTool::IsClosed(const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->IsClosed());
+}
+//============================================================
+inline Standard_Boolean BRepBlend_HCurve2dTool::IsPeriodic(const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->IsPeriodic());
+}
+//============================================================
+inline Standard_Real BRepBlend_HCurve2dTool::Period(const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->Period());
+}
+//============================================================
+inline gp_Pnt2d BRepBlend_HCurve2dTool::Value (const Handle(Adaptor2d_HCurve2d)& C,
+ const Standard_Real U) {
+ return(C->Value(U));
+}
+//============================================================
+inline void BRepBlend_HCurve2dTool::D0(const Handle(Adaptor2d_HCurve2d)& C,
+ const Standard_Real U,
+ gp_Pnt2d& P) {
+ C->D0(U,P);
+}
+//============================================================
+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_HCurve2dTool::D2 (const Handle(Adaptor2d_HCurve2d)& C,
+ const Standard_Real U,
+ gp_Pnt2d& P,
+ gp_Vec2d& T,
+ gp_Vec2d& N) {
+
+ C->D2(U,P,T,N);
+}
+//============================================================
+inline void BRepBlend_HCurve2dTool::D3 (const Handle(Adaptor2d_HCurve2d)& C,
+ const Standard_Real U,
+ gp_Pnt2d& P,
+ gp_Vec2d& V1,
+ gp_Vec2d& V2,
+ gp_Vec2d& V3) {
+
+ C->D3(U,P,V1,V2,V3);
+}
+//============================================================
+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_HCurve2dTool::Resolution(const Handle(Adaptor2d_HCurve2d)& C,
+ const Standard_Real R3d) {
+ return(C->Resolution(R3d));
+}
+//============================================================
+inline GeomAbs_CurveType BRepBlend_HCurve2dTool::GetType(const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->GetType());
+}
+//============================================================
+inline gp_Lin2d BRepBlend_HCurve2dTool::Line (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->Line());
+}
+//============================================================
+inline gp_Circ2d BRepBlend_HCurve2dTool::Circle (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->Circle());
+}
+//============================================================
+inline gp_Elips2d BRepBlend_HCurve2dTool::Ellipse (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->Ellipse());
+}
+//============================================================
+inline gp_Parab2d BRepBlend_HCurve2dTool::Parabola (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->Parabola());
+}
+//============================================================
+inline gp_Hypr2d BRepBlend_HCurve2dTool::Hyperbola (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->Hyperbola());
+}
+//============================================================
+inline Handle(Geom2d_BezierCurve) BRepBlend_HCurve2dTool::Bezier (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->Bezier());
+}
+//============================================================
+inline Handle(Geom2d_BSplineCurve) BRepBlend_HCurve2dTool::BSpline (const Handle(Adaptor2d_HCurve2d)& C) {
+ return(C->BSpline());
+}
+//============================================================
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+++ /dev/null
--- Created on: 1995-07-17
--- Created by: Laurent BUCHARD
--- 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.
-
-generic class HCurve2dToolGen from BRepBlend (
- CurveGen as any)
-
-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,
- BezierCurve from Geom2d,
- BSplineCurve from Geom2d
-
-raises
-
- OutOfRange from Standard,
- NoSuchObject from Standard,
- DomainError from Standard
-
-is
-
- --
- -- Global methods - Apply to the whole curve.
- --
-
- FirstParameter(myclass; C: CurveGen) returns Real
- ---C++: inline
- ;
-
-
- LastParameter(myclass; C: CurveGen) returns Real
- ---C++: inline
- ;
-
- --
- -- Services to break the curves to the expected continuity
- --
- -- If for example you need the curve to be C2 and the method
- -- Continuity returns you something lower than C2 (say C1 for
- -- example).
- --
- -- First compute the number of intervals with the requested
- -- continuity with the method NbIntervals(). Note that if the
- -- continuity is higher than the one you need NbIntervals will
- -- return 1.
- --
- -- Then you get the parameters bounding the intervals with the
- -- method Intervals, using an array of length at least
- -- NbIntervals()+1.
- --
- -- If you need to create a curve with a restricted span you can
- -- use the method Trim().
-
-
- Continuity(myclass; C: CurveGen) returns Shape from GeomAbs
- ---Purpose:
- ---C++: inline
- ;
-
- NbIntervals(myclass; C: CurveGen; 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;
- 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
- ---C++: inline
- ;
-
- IsClosed(myclass; C: CurveGen) returns Boolean
- ---C++: inline
- ;
-
- IsPeriodic(myclass; C: CurveGen) returns Boolean
- ---C++: inline
- ;
-
- Period(myclass; C: CurveGen) returns Real
- raises
- DomainError from Standard -- if the curve is not periodic
- ---C++: inline
- ;
-
- Value(myclass; C: CurveGen; 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)
- --- 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)
- --- Purpose : Computes the point of parameter U on the curve with its
- -- first derivative.
- raises
- DomainError from Standard
- --- Purpose : Raised if the continuity of the current interval
- -- is not C1.
- ---C++: inline
- ;
-
- D2 (myclass; C: CurveGen; 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.
- raises
- DomainError from Standard
- --- Purpose : Raised if the continuity of the current interval
- -- is not C2.
- ---C++: inline
- ;
-
- D3 (myclass; C: CurveGen; 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.
- raises
- DomainError from Standard
- --- Purpose : Raised if the continuity of the current interval
- -- is not C3.
- ---C++: inline
- ;
-
- DN (myclass; C: CurveGen; U : Real; N : Integer) returns Vec2d from gp
- --- Purpose :
- -- The returned vector gives the value of the derivative for the
- -- order of derivation N.
- raises
- DomainError from Standard,
- --- Purpose : Raised if the continuity of the current interval
- -- is not CN.
- OutOfRange from Standard
- --- Purpose : Raised if N < 1.
- ---C++: inline
- ;
-
- Resolution(myclass; C: CurveGen; 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
- ---Purpose: Returns the type of the curve in the current
- -- interval : Line, Circle, Ellipse, Hyperbola,
- -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
- ---C++: inline
- ;
-
- --
- -- The following methods must be called when GetType returned
- -- the corresponding type.
- --
-
- Line(myclass; C: CurveGen) returns Lin2d from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Circle(myclass; C: CurveGen) returns Circ2d from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Ellipse(myclass; C: CurveGen) returns Elips2d from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Hyperbola(myclass; C: CurveGen) returns Hypr2d from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Parabola(myclass; C: CurveGen) returns Parab2d from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Bezier(myclass; C: CurveGen) returns BezierCurve from Geom2d
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- BSpline(myclass; C: CurveGen) returns BSplineCurve from Geom2d
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
-
-
-
-
- NbSamples(myclass; C: CurveGen; U0,U1: Real from Standard)
- returns Integer from Standard;
-
-end HCurve2dToolGen;
-
-
+++ /dev/null
-// Created on: 1995-07-17
-// Created by: Modelistation
-// 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 CurveGen_hxx
-#include <GeomAbs_CurveType.hxx>
-#include <GeomAbs_Shape.hxx>
-#include <Geom2d_BezierCurve.hxx>
-#include <Geom2d_BSplineCurve.hxx>
-
-#include <TColStd_Array1OfReal.hxx>
-
-
-//============================================================
-Standard_Integer BRepBlend_HCurve2dToolGen::NbSamples (const CurveGen& C,
- const Standard_Real U0,
- const Standard_Real U1) {
- GeomAbs_CurveType typC = C->GetType();
- static Standard_Real nbsOther = 10.0;
- Standard_Real nbs = nbsOther;
-
- if(typC == GeomAbs_Line)
- nbs = 2;
- else if(typC == GeomAbs_BezierCurve)
- nbs = 3 + C->Bezier()->NbPoles();
- else if(typC == GeomAbs_BSplineCurve) {
- Handle(Geom2d_BSplineCurve) BSC = C->BSpline();
- nbs = BSC->NbKnots();
- nbs*= BSC->Degree();
- nbs*= BSC->LastParameter()- BSC->FirstParameter();
- nbs/= U1-U0;
- if(nbs < 2.0) nbs=2;
- }
- if(nbs>50)
- nbs = 50;
- return((Standard_Integer)nbs);
-}
+++ /dev/null
-// Created on: 1992-10-22
-// Created by: Laurent BUCHARD
-// Copyright (c) 1992-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 CurveGen_hxx
-
-#include <GeomAbs_CurveType.hxx>
-#include <GeomAbs_Shape.hxx>
-
-#include <gp_Vec2d.hxx>
-#include <gp_Lin2d.hxx>
-#include <gp_Circ2d.hxx>
-#include <gp_Elips2d.hxx>
-#include <gp_Parab2d.hxx>
-#include <gp_Hypr2d.hxx>
-
-
-#include <Geom2d_BezierCurve.hxx>
-#include <Geom2d_BSplineCurve.hxx>
-
-#include <TColStd_Array1OfReal.hxx>
-
-//============================================================
-inline Standard_Real BRepBlend_HCurve2dToolGen::FirstParameter (const CurveGen& C) {
- return(C->FirstParameter());
-}
-//============================================================
-inline Standard_Real BRepBlend_HCurve2dToolGen::LastParameter (const CurveGen& C) {
- return(C->LastParameter());
-}
-//============================================================
-inline GeomAbs_Shape BRepBlend_HCurve2dToolGen::Continuity (const CurveGen& C) {
- return(C->Continuity());
-}
-//============================================================
-inline Standard_Integer BRepBlend_HCurve2dToolGen::NbIntervals(const CurveGen& C,const GeomAbs_Shape Sh) {
- return(C->NbIntervals(Sh));
-}
-//============================================================
-inline void BRepBlend_HCurve2dToolGen::Intervals(const CurveGen& C,
- TColStd_Array1OfReal& Tab,
- const GeomAbs_Shape Sh) {
- C->Intervals(Tab,Sh);
-}
-//============================================================
-inline Standard_Boolean BRepBlend_HCurve2dToolGen::IsClosed(const CurveGen& C) {
- return(C->IsClosed());
-}
-//============================================================
-inline Standard_Boolean BRepBlend_HCurve2dToolGen::IsPeriodic(const CurveGen& C) {
- return(C->IsPeriodic());
-}
-//============================================================
-inline Standard_Real BRepBlend_HCurve2dToolGen::Period(const CurveGen& C) {
- return(C->Period());
-}
-//============================================================
-inline gp_Pnt2d BRepBlend_HCurve2dToolGen::Value (const CurveGen& C,
- const Standard_Real U) {
- return(C->Value(U));
-}
-//============================================================
-inline void BRepBlend_HCurve2dToolGen::D0(const CurveGen& C,
- const Standard_Real U,
- gp_Pnt2d& P) {
- C->D0(U,P);
-}
-//============================================================
-inline void BRepBlend_HCurve2dToolGen::D1 (const CurveGen& C,
- const Standard_Real U,
- gp_Pnt2d& P,
- gp_Vec2d& T) {
- C->D1(U,P,T);
-}
-//============================================================
-inline void BRepBlend_HCurve2dToolGen::D2 (const CurveGen& C,
- const Standard_Real U,
- gp_Pnt2d& P,
- gp_Vec2d& T,
- gp_Vec2d& N) {
-
- C->D2(U,P,T,N);
-}
-//============================================================
-inline void BRepBlend_HCurve2dToolGen::D3 (const CurveGen& C,
- const Standard_Real U,
- gp_Pnt2d& P,
- gp_Vec2d& V1,
- gp_Vec2d& V2,
- gp_Vec2d& V3) {
-
- C->D3(U,P,V1,V2,V3);
-}
-//============================================================
-inline gp_Vec2d BRepBlend_HCurve2dToolGen::DN (const CurveGen& C,
- const Standard_Real U,
- const Standard_Integer N) {
-
- return(C->DN(U,N));
-}
-//============================================================
-inline Standard_Real BRepBlend_HCurve2dToolGen::Resolution(const CurveGen& C,
- const Standard_Real R3d) {
- return(C->Resolution(R3d));
-}
-//============================================================
-inline GeomAbs_CurveType BRepBlend_HCurve2dToolGen::GetType(const CurveGen& C) {
- return(C->GetType());
-}
-//============================================================
-inline gp_Lin2d BRepBlend_HCurve2dToolGen::Line (const CurveGen& C) {
- return(C->Line());
-}
-//============================================================
-inline gp_Circ2d BRepBlend_HCurve2dToolGen::Circle (const CurveGen& C) {
- return(C->Circle());
-}
-//============================================================
-inline gp_Elips2d BRepBlend_HCurve2dToolGen::Ellipse (const CurveGen& C) {
- return(C->Ellipse());
-}
-//============================================================
-inline gp_Parab2d BRepBlend_HCurve2dToolGen::Parabola (const CurveGen& C) {
- return(C->Parabola());
-}
-//============================================================
-inline gp_Hypr2d BRepBlend_HCurve2dToolGen::Hyperbola (const CurveGen& C) {
- return(C->Hyperbola());
-}
-//============================================================
-inline Handle(Geom2d_BezierCurve) BRepBlend_HCurve2dToolGen::Bezier (const CurveGen& C) {
- return(C->Bezier());
-}
-//============================================================
-inline Handle(Geom2d_BSplineCurve) BRepBlend_HCurve2dToolGen::BSpline (const CurveGen& C) {
- return(C->BSpline());
-}
-//============================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--- /dev/null
+-- Created on: 1995-07-17
+-- Created by: Laurent BUCHARD
+-- 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.
+
+class HCurveTool from BRepBlend
+
+uses
+ Array1OfReal from TColStd,
+ Shape from GeomAbs,
+ CurveType from GeomAbs,
+ Vec from gp,
+ Pnt from gp,
+ Circ from gp,
+ Elips from gp,
+ Hypr from gp,
+ Parab from gp,
+ Lin from gp,
+ BezierCurve from Geom,
+ BSplineCurve from Geom,
+ HCurve from Adaptor3d
+
+raises
+
+ OutOfRange from Standard,
+ NoSuchObject from Standard,
+ DomainError from Standard
+
+is
+
+ --
+ -- Global methods - Apply to the whole curve.
+ --
+
+ FirstParameter(myclass; C: HCurve from Adaptor3d) returns Real
+ ---C++: inline
+ ;
+
+
+ LastParameter(myclass; C: HCurve from Adaptor3d) returns Real
+ ---C++: inline
+ ;
+
+ --
+ -- Services to break the curves to the expected continuity
+ --
+ -- If for example you need the curve to be C2 and the method
+ -- Continuity returns you something lower than C2 (say C1 for
+ -- example).
+ --
+ -- First compute the number of intervals with the requested
+ -- continuity with the method NbIntervals(). Note that if the
+ -- continuity is higher than the one you need NbIntervals will
+ -- return 1.
+ --
+ -- Then you get the parameters bounding the intervals with the
+ -- method Intervals, using an array of length at least
+ -- NbIntervals()+1.
+ --
+ -- If you need to create a curve with a restricted span you can
+ -- use the method Trim().
+
+
+ Continuity(myclass; C: HCurve from Adaptor3d) returns Shape from GeomAbs
+ ---Purpose:
+ ---C++: inline
+ ;
+
+ 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: 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>.
+ --
+ -- The array must provide enough room to accomodate
+ -- for the parameters. i.e. T.Length() > NbIntervals()
+ raises
+ OutOfRange from Standard
+ ---C++: inline
+ ;
+
+ IsClosed(myclass; C: HCurve from Adaptor3d) returns Boolean
+ ---C++: inline
+ ;
+
+ IsPeriodic(myclass; C: HCurve from Adaptor3d) returns Boolean
+ ---C++: inline
+ ;
+
+ Period(myclass; C: HCurve from Adaptor3d) returns Real
+ raises
+ DomainError from Standard -- if the curve is not periodic
+ ---C++: inline
+ ;
+
+ 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: 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: 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
+ DomainError from Standard
+ --- Purpose : Raised if the continuity of the current interval
+ -- is not C1.
+ ---C++: inline
+ ;
+
+ 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.
+ raises
+ DomainError from Standard
+ --- Purpose : Raised if the continuity of the current interval
+ -- is not C2.
+ ---C++: inline
+ ;
+
+ 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.
+ raises
+ DomainError from Standard
+ --- Purpose : Raised if the continuity of the current interval
+ -- is not C3.
+ ---C++: inline
+ ;
+
+ 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.
+ raises
+ DomainError from Standard,
+ --- Purpose : Raised if the continuity of the current interval
+ -- is not CN.
+ OutOfRange from Standard
+ --- Purpose : Raised if N < 1.
+ ---C++: inline
+ ;
+
+ 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: 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.
+ ---C++: inline
+ ;
+
+ --
+ -- The following methods must be called when GetType returned
+ -- the corresponding type.
+ --
+
+ Line(myclass; C: HCurve from Adaptor3d) returns Lin from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Circle(myclass; C: HCurve from Adaptor3d) returns Circ from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Ellipse(myclass; C: HCurve from Adaptor3d) returns Elips from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Hyperbola(myclass; C: HCurve from Adaptor3d) returns Hypr from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Parabola(myclass; C: HCurve from Adaptor3d) returns Parab from gp
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ Bezier(myclass; C: HCurve from Adaptor3d) returns BezierCurve from Geom
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+ BSpline(myclass; C: HCurve from Adaptor3d) returns BSplineCurve from Geom
+ raises
+ NoSuchObject from Standard
+ ---C++: inline
+ ;
+
+
+
+
+
+ NbSamples(myclass; C: HCurve from Adaptor3d; U0,U1: Real from Standard)
+ returns Integer from Standard;
+
+end HCurveTool;
+
+
--- /dev/null
+// Created on: 1995-07-17
+// Created by: Modelistation
+// 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_HCurveTool.ixx>
+
+#include <GeomAbs_CurveType.hxx>
+#include <GeomAbs_Shape.hxx>
+#include <Geom_BezierCurve.hxx>
+#include <Geom_BSplineCurve.hxx>
+
+#include <TColStd_Array1OfReal.hxx>
+
+
+//============================================================
+Standard_Integer BRepBlend_HCurveTool::NbSamples (const Handle(Adaptor3d_HCurve)& C,
+ const Standard_Real U0,
+ const Standard_Real U1) {
+ GeomAbs_CurveType typC = C->GetType();
+ static Standard_Real nbsOther = 10.0;
+ Standard_Real nbs = nbsOther;
+
+ if(typC == GeomAbs_Line)
+ nbs = 2;
+ else if(typC == GeomAbs_BezierCurve)
+ nbs = 3 + C->Bezier()->NbPoles();
+ else if(typC == GeomAbs_BSplineCurve) {
+ Handle(Geom_BSplineCurve) BSC = C->BSpline();
+ nbs = BSC->NbKnots();
+ nbs*= BSC->Degree();
+ nbs*= BSC->LastParameter()- BSC->FirstParameter();
+ nbs/= U1-U0;
+ if(nbs < 2.0) nbs=2;
+ }
+ if(nbs>50)
+ nbs = 50;
+ return((Standard_Integer)nbs);
+}
--- /dev/null
+// Created on: 1992-10-22
+// Created by: Laurent BUCHARD
+// Copyright (c) 1992-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 <GeomAbs_CurveType.hxx>
+#include <GeomAbs_Shape.hxx>
+
+#include <gp_Vec.hxx>
+#include <gp_Lin.hxx>
+#include <gp_Circ.hxx>
+#include <gp_Elips.hxx>
+#include <gp_Parab.hxx>
+#include <gp_Hypr.hxx>
+
+
+#include <Geom_BezierCurve.hxx>
+#include <Geom_BSplineCurve.hxx>
+
+#include <TColStd_Array1OfReal.hxx>
+
+//============================================================
+inline Standard_Real BRepBlend_HCurveTool::FirstParameter (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->FirstParameter());
+}
+//============================================================
+inline Standard_Real BRepBlend_HCurveTool::LastParameter (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->LastParameter());
+}
+//============================================================
+inline GeomAbs_Shape BRepBlend_HCurveTool::Continuity (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->Continuity());
+}
+//============================================================
+inline Standard_Integer BRepBlend_HCurveTool::NbIntervals(const Handle(Adaptor3d_HCurve)& C,const GeomAbs_Shape Sh) {
+ return(C->NbIntervals(Sh));
+}
+//============================================================
+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_HCurveTool::IsClosed(const Handle(Adaptor3d_HCurve)& C) {
+ return(C->IsClosed());
+}
+//============================================================
+inline Standard_Boolean BRepBlend_HCurveTool::IsPeriodic(const Handle(Adaptor3d_HCurve)& C) {
+ return(C->IsPeriodic());
+}
+//============================================================
+inline Standard_Real BRepBlend_HCurveTool::Period(const Handle(Adaptor3d_HCurve)& C) {
+ return(C->Period());
+}
+//============================================================
+inline gp_Pnt BRepBlend_HCurveTool::Value (const Handle(Adaptor3d_HCurve)& C,
+ const Standard_Real U) {
+ return(C->Value(U));
+}
+//============================================================
+inline void BRepBlend_HCurveTool::D0(const Handle(Adaptor3d_HCurve)& C,
+ const Standard_Real U,
+ gp_Pnt& P) {
+ C->D0(U,P);
+}
+//============================================================
+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_HCurveTool::D2 (const Handle(Adaptor3d_HCurve)& C,
+ const Standard_Real U,
+ gp_Pnt& P,
+ gp_Vec& T,
+ gp_Vec& N) {
+
+ C->D2(U,P,T,N);
+}
+//============================================================
+inline void BRepBlend_HCurveTool::D3 (const Handle(Adaptor3d_HCurve)& C,
+ const Standard_Real U,
+ gp_Pnt& P,
+ gp_Vec& V1,
+ gp_Vec& V2,
+ gp_Vec& V3) {
+
+ C->D3(U,P,V1,V2,V3);
+}
+//============================================================
+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_HCurveTool::Resolution(const Handle(Adaptor3d_HCurve)& C,
+ const Standard_Real R3d) {
+ return(C->Resolution(R3d));
+}
+//============================================================
+inline GeomAbs_CurveType BRepBlend_HCurveTool::GetType(const Handle(Adaptor3d_HCurve)& C) {
+ return(C->GetType());
+}
+//============================================================
+inline gp_Lin BRepBlend_HCurveTool::Line (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->Line());
+}
+//============================================================
+inline gp_Circ BRepBlend_HCurveTool::Circle (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->Circle());
+}
+//============================================================
+inline gp_Elips BRepBlend_HCurveTool::Ellipse (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->Ellipse());
+}
+//============================================================
+inline gp_Parab BRepBlend_HCurveTool::Parabola (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->Parabola());
+}
+//============================================================
+inline gp_Hypr BRepBlend_HCurveTool::Hyperbola (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->Hyperbola());
+}
+//============================================================
+inline Handle(Geom_BezierCurve) BRepBlend_HCurveTool::Bezier (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->Bezier());
+}
+//============================================================
+inline Handle(Geom_BSplineCurve) BRepBlend_HCurveTool::BSpline (const Handle(Adaptor3d_HCurve)& C) {
+ return(C->BSpline());
+}
+//============================================================
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+++ /dev/null
--- Created on: 1995-07-17
--- Created by: Laurent BUCHARD
--- 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.
-
-generic class HCurveToolGen from BRepBlend (
- CurveGen as any)
-
-uses
- Array1OfReal from TColStd,
- Shape from GeomAbs,
- CurveType from GeomAbs,
- Vec from gp,
- Pnt from gp,
- Circ from gp,
- Elips from gp,
- Hypr from gp,
- Parab from gp,
- Lin from gp,
- BezierCurve from Geom,
- BSplineCurve from Geom
-
-raises
-
- OutOfRange from Standard,
- NoSuchObject from Standard,
- DomainError from Standard
-
-is
-
- --
- -- Global methods - Apply to the whole curve.
- --
-
- FirstParameter(myclass; C: CurveGen) returns Real
- ---C++: inline
- ;
-
-
- LastParameter(myclass; C: CurveGen) returns Real
- ---C++: inline
- ;
-
- --
- -- Services to break the curves to the expected continuity
- --
- -- If for example you need the curve to be C2 and the method
- -- Continuity returns you something lower than C2 (say C1 for
- -- example).
- --
- -- First compute the number of intervals with the requested
- -- continuity with the method NbIntervals(). Note that if the
- -- continuity is higher than the one you need NbIntervals will
- -- return 1.
- --
- -- Then you get the parameters bounding the intervals with the
- -- method Intervals, using an array of length at least
- -- NbIntervals()+1.
- --
- -- If you need to create a curve with a restricted span you can
- -- use the method Trim().
-
-
- Continuity(myclass; C: CurveGen) returns Shape from GeomAbs
- ---Purpose:
- ---C++: inline
- ;
-
- NbIntervals(myclass; C: CurveGen; 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;
- 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
- ---C++: inline
- ;
-
- IsClosed(myclass; C: CurveGen) returns Boolean
- ---C++: inline
- ;
-
- IsPeriodic(myclass; C: CurveGen) returns Boolean
- ---C++: inline
- ;
-
- Period(myclass; C: CurveGen) returns Real
- raises
- DomainError from Standard -- if the curve is not periodic
- ---C++: inline
- ;
-
- Value(myclass; C: CurveGen; 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)
- --- 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)
- --- Purpose : Computes the point of parameter U on the curve with its
- -- first derivative.
- raises
- DomainError from Standard
- --- Purpose : Raised if the continuity of the current interval
- -- is not C1.
- ---C++: inline
- ;
-
- D2 (myclass; C: CurveGen; 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.
- raises
- DomainError from Standard
- --- Purpose : Raised if the continuity of the current interval
- -- is not C2.
- ---C++: inline
- ;
-
- D3 (myclass; C: CurveGen; 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.
- raises
- DomainError from Standard
- --- Purpose : Raised if the continuity of the current interval
- -- is not C3.
- ---C++: inline
- ;
-
- DN (myclass; C: CurveGen; U : Real; N : Integer) returns Vec from gp
- --- Purpose :
- -- The returned vector gives the value of the derivative for the
- -- order of derivation N.
- raises
- DomainError from Standard,
- --- Purpose : Raised if the continuity of the current interval
- -- is not CN.
- OutOfRange from Standard
- --- Purpose : Raised if N < 1.
- ---C++: inline
- ;
-
- Resolution(myclass; C: CurveGen; 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
- ---Purpose: Returns the type of the curve in the current
- -- interval : Line, Circle, Ellipse, Hyperbola,
- -- Parabola, BezierCurve, BSplineCurve, OtherCurve.
- ---C++: inline
- ;
-
- --
- -- The following methods must be called when GetType returned
- -- the corresponding type.
- --
-
- Line(myclass; C: CurveGen) returns Lin from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Circle(myclass; C: CurveGen) returns Circ from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Ellipse(myclass; C: CurveGen) returns Elips from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Hyperbola(myclass; C: CurveGen) returns Hypr from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Parabola(myclass; C: CurveGen) returns Parab from gp
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- Bezier(myclass; C: CurveGen) returns BezierCurve from Geom
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
- BSpline(myclass; C: CurveGen) returns BSplineCurve from Geom
- raises
- NoSuchObject from Standard
- ---C++: inline
- ;
-
-
-
-
-
- NbSamples(myclass; C: CurveGen; U0,U1: Real from Standard)
- returns Integer from Standard;
-
-end HCurveToolGen;
-
-
+++ /dev/null
-// Created on: 1995-07-17
-// Created by: Modelistation
-// 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 CurveGen_hxx
-#include <GeomAbs_CurveType.hxx>
-#include <GeomAbs_Shape.hxx>
-#include <Geom_BezierCurve.hxx>
-#include <Geom_BSplineCurve.hxx>
-
-#include <TColStd_Array1OfReal.hxx>
-
-
-//============================================================
-Standard_Integer BRepBlend_HCurveToolGen::NbSamples (const CurveGen& C,
- const Standard_Real U0,
- const Standard_Real U1) {
- GeomAbs_CurveType typC = C->GetType();
- static Standard_Real nbsOther = 10.0;
- Standard_Real nbs = nbsOther;
-
- if(typC == GeomAbs_Line)
- nbs = 2;
- else if(typC == GeomAbs_BezierCurve)
- nbs = 3 + C->Bezier()->NbPoles();
- else if(typC == GeomAbs_BSplineCurve) {
- Handle(Geom_BSplineCurve) BSC = C->BSpline();
- nbs = BSC->NbKnots();
- nbs*= BSC->Degree();
- nbs*= BSC->LastParameter()- BSC->FirstParameter();
- nbs/= U1-U0;
- if(nbs < 2.0) nbs=2;
- }
- if(nbs>50)
- nbs = 50;
- return((Standard_Integer)nbs);
-}
+++ /dev/null
-// Created on: 1992-10-22
-// Created by: Laurent BUCHARD
-// Copyright (c) 1992-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 CurveGen_hxx
-
-#include <GeomAbs_CurveType.hxx>
-#include <GeomAbs_Shape.hxx>
-
-#include <gp_Vec.hxx>
-#include <gp_Lin.hxx>
-#include <gp_Circ.hxx>
-#include <gp_Elips.hxx>
-#include <gp_Parab.hxx>
-#include <gp_Hypr.hxx>
-
-
-#include <Geom_BezierCurve.hxx>
-#include <Geom_BSplineCurve.hxx>
-
-#include <TColStd_Array1OfReal.hxx>
-
-//============================================================
-inline Standard_Real BRepBlend_HCurveToolGen::FirstParameter (const CurveGen& C) {
- return(C->FirstParameter());
-}
-//============================================================
-inline Standard_Real BRepBlend_HCurveToolGen::LastParameter (const CurveGen& C) {
- return(C->LastParameter());
-}
-//============================================================
-inline GeomAbs_Shape BRepBlend_HCurveToolGen::Continuity (const CurveGen& C) {
- return(C->Continuity());
-}
-//============================================================
-inline Standard_Integer BRepBlend_HCurveToolGen::NbIntervals(const CurveGen& C,const GeomAbs_Shape Sh) {
- return(C->NbIntervals(Sh));
-}
-//============================================================
-inline void BRepBlend_HCurveToolGen::Intervals(const CurveGen& C,
- TColStd_Array1OfReal& Tab,
- const GeomAbs_Shape Sh) {
- C->Intervals(Tab,Sh);
-}
-//============================================================
-inline Standard_Boolean BRepBlend_HCurveToolGen::IsClosed(const CurveGen& C) {
- return(C->IsClosed());
-}
-//============================================================
-inline Standard_Boolean BRepBlend_HCurveToolGen::IsPeriodic(const CurveGen& C) {
- return(C->IsPeriodic());
-}
-//============================================================
-inline Standard_Real BRepBlend_HCurveToolGen::Period(const CurveGen& C) {
- return(C->Period());
-}
-//============================================================
-inline gp_Pnt BRepBlend_HCurveToolGen::Value (const CurveGen& C,
- const Standard_Real U) {
- return(C->Value(U));
-}
-//============================================================
-inline void BRepBlend_HCurveToolGen::D0(const CurveGen& C,
- const Standard_Real U,
- gp_Pnt& P) {
- C->D0(U,P);
-}
-//============================================================
-inline void BRepBlend_HCurveToolGen::D1 (const CurveGen& C,
- const Standard_Real U,
- gp_Pnt& P,
- gp_Vec& T) {
- C->D1(U,P,T);
-}
-//============================================================
-inline void BRepBlend_HCurveToolGen::D2 (const CurveGen& C,
- const Standard_Real U,
- gp_Pnt& P,
- gp_Vec& T,
- gp_Vec& N) {
-
- C->D2(U,P,T,N);
-}
-//============================================================
-inline void BRepBlend_HCurveToolGen::D3 (const CurveGen& C,
- const Standard_Real U,
- gp_Pnt& P,
- gp_Vec& V1,
- gp_Vec& V2,
- gp_Vec& V3) {
-
- C->D3(U,P,V1,V2,V3);
-}
-//============================================================
-inline gp_Vec BRepBlend_HCurveToolGen::DN (const CurveGen& C,
- const Standard_Real U,
- const Standard_Integer N) {
-
- return(C->DN(U,N));
-}
-//============================================================
-inline Standard_Real BRepBlend_HCurveToolGen::Resolution(const CurveGen& C,
- const Standard_Real R3d) {
- return(C->Resolution(R3d));
-}
-//============================================================
-inline GeomAbs_CurveType BRepBlend_HCurveToolGen::GetType(const CurveGen& C) {
- return(C->GetType());
-}
-//============================================================
-inline gp_Lin BRepBlend_HCurveToolGen::Line (const CurveGen& C) {
- return(C->Line());
-}
-//============================================================
-inline gp_Circ BRepBlend_HCurveToolGen::Circle (const CurveGen& C) {
- return(C->Circle());
-}
-//============================================================
-inline gp_Elips BRepBlend_HCurveToolGen::Ellipse (const CurveGen& C) {
- return(C->Ellipse());
-}
-//============================================================
-inline gp_Parab BRepBlend_HCurveToolGen::Parabola (const CurveGen& C) {
- return(C->Parabola());
-}
-//============================================================
-inline gp_Hypr BRepBlend_HCurveToolGen::Hyperbola (const CurveGen& C) {
- return(C->Hyperbola());
-}
-//============================================================
-inline Handle(Geom_BezierCurve) BRepBlend_HCurveToolGen::Bezier (const CurveGen& C) {
- return(C->Bezier());
-}
-//============================================================
-inline Handle(Geom_BSplineCurve) BRepBlend_HCurveToolGen::BSpline (const CurveGen& C) {
- return(C->BSpline());
-}
-//============================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--- /dev/null
+-- 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;
--- /dev/null
+// 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;
+}
+
--- /dev/null
+// 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;
+}
+
+
--- /dev/null
+-- 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;
--- /dev/null
+// 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;
+}
+
--- /dev/null
+// 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;
+}
+
uses IntSurf,
TColgp,
TColStd,
- Adaptor2d,
+ Adaptor2d,
gp,
TopAbs,
math,
class Point;
-
- generic class Extremity;
-
- generic class PointOnRst;
-
- generic class Line;
generic class Walking;
TheCurveTool as any;
TheTopolTool as Transient;
TheBlendTool as any;
- ThePointOnRst as any; -- as PointOnRst from Blend(TheArc)
+ ThePointOnRst as any;
TheSeqPointOnRst as any;
- TheExtremity as any; -- as Extremity from Blend(TheVertex,TheArc,
- -- ThePointOnRst,TheSeqPointOnRst)
- TheLine as Transient) -- as Line from Blend(TheVertex,TheArc,
- -- ThePointOnRst,TheSeqPointOnRst,
- -- TheExtremity)
-
-
+ TheExtremity as any;
+ TheLine as Transient)
---Purpose:
+++ /dev/null
--- 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.
-
-generic class Extremity from Blend
- (TheVertex as any;
- TheArc as any;
- ThePointOnRst as any; -- as PointOnRst from Blend(TheArc)
- TheSequenceOfPointOnRst as any)
-
-
-
- ---Purpose:
-
-uses Pnt from gp,
- Vec from gp,
- Transition from IntSurf
-
-
-raises DomainError from Standard,
- OutOfRange from Standard
-
-is
-
- Create
-
- returns Extremity from Blend;
-
-
- 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 Blend;
-
-
- Create(P: Pnt from gp;
- U,V,Param: Real from Standard; Tol: Real from Standard;
- Vtx: TheVertex)
- ---Purpose: Creates an extremity on a surface. This extremity matches
- -- the vertex <Vtx>.
-
- returns Extremity from Blend;
-
-
- Create(P: Pnt from gp;
- W, Param: Real from Standard; Tol: Real from Standard)
- ---Purpose: Creates an extremity on a curve
- returns Extremity from Blend;
-
-
- 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: TheVertex)
- ---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: TheVertex)
- ---Purpose: Set the values for an extremity on a curve.
- is static;
-
-
- AddArc(me: in out; A: TheArc; 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 TheVertex
- ---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 ThePointOnRst
- ---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 : TheVertex;
- seqpt : TheSequenceOfPointOnRst;
- 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;
-
-
+++ /dev/null
-// 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.
-
-Blend_Extremity::Blend_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)
-{
-}
-
-Blend_Extremity::Blend_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)
-{
-}
-
-
-Blend_Extremity::Blend_Extremity (const gp_Pnt& P,
- const Standard_Real U,
- const Standard_Real V,
- const Standard_Real Param,
- const Standard_Real Tol,
- const TheVertex& 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)
-{}
-
-
-Blend_Extremity::Blend_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 Blend_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 Blend_Extremity::SetValue (const gp_Pnt& P,
- const Standard_Real U,
- const Standard_Real V,
- const Standard_Real Param,
- const Standard_Real Tol,
- const TheVertex& Vtx)
-{
- pt = P;
- u = U;
- v = V;
- param = Param;
- tol = Tol;
- isvtx = Standard_True;
- vtx = Vtx;
- seqpt.Clear();
-}
-
-void Blend_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 Blend_Extremity::SetVertex (const TheVertex& V)
-{
- isvtx = Standard_True;
- vtx = V;
-}
-
-void Blend_Extremity::AddArc (const TheArc& A,
- const Standard_Real Param,
- const IntSurf_Transition& TLine,
- const IntSurf_Transition& TArc)
-{
- seqpt.Append(ThePointOnRst(A,Param,TLine,TArc));
-}
-
+++ /dev/null
-// 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& Blend_Extremity::Value () const
-{
- return pt;
-}
-
-inline void Blend_Extremity::SetTangent(const gp_Vec& Tangent)
-{
- hastang = Standard_True;
- tang = Tangent;
-}
-
-inline Standard_Boolean Blend_Extremity::HasTangent () const
-{
- return hastang;
-}
-
-inline const gp_Vec& Blend_Extremity::Tangent () const
-{
- if (!hastang) {Standard_DomainError::Raise();}
- return tang;
-}
-
-inline void Blend_Extremity::Parameters(Standard_Real& U,
- Standard_Real& V) const
-{
- U = u;
- V = v;
-}
-
-inline Standard_Real Blend_Extremity::Tolerance() const
-{
- return tol;
-}
-
-
-inline Standard_Boolean Blend_Extremity::IsVertex() const
-{
- return isvtx;
-}
-
-
-inline const TheVertex& Blend_Extremity::Vertex () const
-{
- if (!isvtx) {Standard_DomainError::Raise();}
- return vtx;
-}
-
-inline Standard_Integer Blend_Extremity::NbPointOnRst () const
-{
- return seqpt.Length();
-}
-
-inline const ThePointOnRst& Blend_Extremity::PointOnRst
- (const Standard_Integer Index) const
-{
- return seqpt(Index);
-}
-
-inline Standard_Real Blend_Extremity::Parameter() const
-
-{
- return u;
-}
-
-inline Standard_Real Blend_Extremity::ParameterOnGuide() const
-
-{
- return param;
-}
-
+++ /dev/null
--- 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 Line from Blend
- (TheVertex as any;
- TheArc as any;
- ThePointOnRst as any; -- as PointOnRst from Blend(TheArc)
- TheSequenceOfPointOnRst as any;
- TheExtremity as any) -- as Extremity from Blend (TheVertex,TheArc,
- -- ThePointOnRst,TheSequenceOfPointOnRst)
-
-
-
-inherits TShared from MMgt
-
-
-uses Point from Blend,
- SequenceOfPoint from Blend,
- TypeTrans from IntSurf
-
-
-raises OutOfRange from Standard
-
-
-is
-
- Create
-
- returns mutable Line from Blend;
-
-
-
- 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: TheExtremity)
-
- ---Purpose: Sets the values of the start points for the line.
- ---C++: inline
-
- is static;
-
-
- SetEndPoints(me: mutable; EndPt1,EndPt2: TheExtremity)
-
- ---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 TheExtremity
- ---C++: inline
- ---C++: return const&
-
- is static;
-
-
- StartPointOnSecond(me)
-
- ---Purpose: Returns the start point on S2
-
- returns TheExtremity
- ---C++: inline
- ---C++: return const&
-
- is static;
-
-
- EndPointOnFirst(me)
-
- ---Purpose: Returns the end point on S1.
-
- returns TheExtremity
- ---C++: inline
- ---C++: return const&
-
- is static;
-
-
- EndPointOnSecond(me)
-
- ---Purpose: Returns the point on S2.
-
- returns TheExtremity
- ---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 : TheExtremity;
- stp2 : TheExtremity;
- endp1 : TheExtremity;
- endp2 : TheExtremity;
- hass1 : Boolean from Standard;
- hass2 : Boolean from Standard;
-end;
+++ /dev/null
-// 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.
-
-Blend_Line::Blend_Line ():
- tras1(IntSurf_Undecided),tras2(IntSurf_Undecided),
- hass1(Standard_False),hass2(Standard_False)
-{}
-
-
-void Blend_Line::Clear ()
-{
- seqpt.Clear();
- hass1 = Standard_False;
- hass2 = Standard_False;
- tras1 = IntSurf_Undecided;
- tras2 = IntSurf_Undecided;
-}
-
-void Blend_Line::Set(const IntSurf_TypeTrans TranS1,
- const IntSurf_TypeTrans TranS2)
-{
- hass1 = Standard_True;
- hass2 = Standard_True;
- tras1 = TranS1;
- tras2 = TranS2;
-}
-
-void Blend_Line::Set(const IntSurf_TypeTrans Trans)
-{
- hass1 = Standard_True;
- hass2 = Standard_False;
- tras1 = Trans;
-}
-
+++ /dev/null
-// 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 Blend_Line::Append(const Blend_Point& P)
-{
- seqpt.Append(P);
-}
-
-inline void Blend_Line::Prepend(const Blend_Point& P)
-{
- seqpt.Prepend(P);
-}
-
-inline void Blend_Line::InsertBefore(const Standard_Integer Index,
- const Blend_Point& P)
-{
- seqpt.InsertBefore(Index, P);
-}
-
-inline void Blend_Line::Remove(const Standard_Integer FromIndex,
- const Standard_Integer ToIndex)
-{
- seqpt.Remove(FromIndex,ToIndex);
-}
-
-inline void Blend_Line::SetStartPoints(const TheExtremity& StartPtOnS1,
- const TheExtremity& StartPtOnS2)
-
-{
- stp1 = StartPtOnS1;
- stp2 = StartPtOnS2;
-}
-
-inline void Blend_Line::SetEndPoints(const TheExtremity& EndPtOnS1,
- const TheExtremity& EndPtOnS2)
-
-{
- endp1 = EndPtOnS1;
- endp2 = EndPtOnS2;
-}
-
-inline Standard_Integer Blend_Line::NbPoints () const
-{
- return seqpt.Length();
-}
-
-inline const Blend_Point& Blend_Line::Point(const Standard_Integer Index) const
-{
- return seqpt(Index);
-}
-
-inline IntSurf_TypeTrans Blend_Line::TransitionOnS1 () const
-{
- if (!hass1) {Standard_DomainError::Raise();}
- return tras1;
-}
-
-inline IntSurf_TypeTrans Blend_Line::TransitionOnS2 () const
-{
- if (!hass2) {Standard_DomainError::Raise();}
- return tras2;
-}
-
-inline const TheExtremity& Blend_Line::StartPointOnFirst() const
-{
- return stp1;
-}
-
-inline const TheExtremity& Blend_Line::StartPointOnSecond() const
-{
- return stp2;
-}
-
-inline const TheExtremity& Blend_Line::EndPointOnFirst() const
-{
- return endp1;
-}
-
-inline const TheExtremity& Blend_Line::EndPointOnSecond() const
-{
- return endp2;
-}
-
-inline IntSurf_TypeTrans Blend_Line::TransitionOnS () const
-{
- if (!hass1) {Standard_DomainError::Raise();}
- return tras1;
-}
-
-
+++ /dev/null
--- 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 PointOnRst from Blend
- (TheArc as any)
-
-
- ---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
-
-raises DomainError from Standard
-
-is
-
-
- Create
-
- ---Purpose: Empty constructor.
-
- returns PointOnRst from Blend;
-
-
- Create( A: TheArc; 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 Blend;
-
-
-
- SetArc(me: in out; A: TheArc; 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 TheArc
- ---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 : TheArc;
- traline : Transition from IntSurf;
- traarc : Transition from IntSurf;
- prm : Real from Standard;
-
-end PointOnRst;
+++ /dev/null
-// 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.
-
-Blend_PointOnRst::Blend_PointOnRst () {}
-
-
-Blend_PointOnRst::Blend_PointOnRst(const TheArc& A,
- const Standard_Real Param,
- const IntSurf_Transition& TLine,
- const IntSurf_Transition& TArc):
-
- arc(A),traline(TLine),traarc(TArc),prm(Param)
-{}
-
-void Blend_PointOnRst::SetArc(const TheArc& A,
- const Standard_Real Param,
- const IntSurf_Transition& TLine,
- const IntSurf_Transition& TArc)
-{
- arc = A;
- prm = Param;
- traline = TLine;
- traarc = TArc;
-}
-
+++ /dev/null
-// 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 TheArc& Blend_PointOnRst::Arc () const
-{
- return arc;
-}
-
-inline const IntSurf_Transition& Blend_PointOnRst::TransitionOnLine () const
-{
- return traline;
-}
-
-inline const IntSurf_Transition& Blend_PointOnRst::TransitionOnArc () const
-{
- return traarc;
-}
-
-inline Standard_Real Blend_PointOnRst::ParameterOnArc () const
-{
- return prm;
-}
-
TheCurveTool as any;
TheTopolTool as Transient;
TheBlendTool as any;
- ThePointOnRst as any; -- as PointOnRst from Blend(TheArc)
+ ThePointOnRst as any;
TheSeqPointOnRst as any;
- TheExtremity as any; -- as Extremity from Blend(TheVertex,TheArc,
- -- ThePointOnRst,TheSeqPointOnRst)
- TheLine as Transient) -- as Line from Blend(TheVertex,TheArc,
- -- ThePointOnRst,TheSeqPointOnRst,
- -- TheExtremity)
-
+ TheExtremity as any;
+ TheLine as Transient)
---Purpose: