mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
@@ -1,213 +0,0 @@
|
||||
-- Created on: 1992-10-08
|
||||
-- Created by: Isabelle GRIGNON
|
||||
-- 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.
|
||||
|
||||
package Adaptor3d
|
||||
|
||||
---Purpose: The Adaptor3d package is used to help defining
|
||||
-- reusable geometric algorithms. i.e. that can be
|
||||
-- used on curves and surfaces.
|
||||
--
|
||||
-- It defines general services for 3 kind of objects :
|
||||
--
|
||||
-- - the 2d curve. Curve2d
|
||||
-- - the 3d curve. Curve
|
||||
-- - the 3d surface. Surface
|
||||
--
|
||||
-- The services are :
|
||||
--
|
||||
-- - Usual services found in Geom or Geom2d :
|
||||
--
|
||||
-- * parameter range, value and derivatives, etc...
|
||||
--
|
||||
-- - Continuity breakout services :
|
||||
--
|
||||
-- * Allows to divide a curve or a surfaces in
|
||||
-- parts with a given derivation order.
|
||||
--
|
||||
-- - Special geometries detection services :
|
||||
--
|
||||
-- * Allows to test for special cases that can
|
||||
-- be processed more easily :
|
||||
-- - Conics, Quadrics, Bezier, BSpline ...
|
||||
--
|
||||
-- And to get the correponding data form the
|
||||
-- package gp or Geom. The special type
|
||||
-- OtherCurve means that no special case has
|
||||
-- been detected and the algorithm may use
|
||||
-- only the evaluation methods (D0, D1, ...)
|
||||
--
|
||||
--
|
||||
-- For each category Curve2d, Curve, Surface we
|
||||
-- define three classes, we illustrate now the
|
||||
-- principles with the Curve, the same applies to
|
||||
-- Curve2d and Surface.
|
||||
--
|
||||
-- The class Curve is the abstract root for all
|
||||
-- Curves used by algorithms, it is handled by value
|
||||
-- and provides as deferred methods the services
|
||||
-- described above.
|
||||
--
|
||||
-- Some services (breakout) requires to create new
|
||||
-- curves, this leads to memory allocation
|
||||
-- considerations (who create the curve, who deletes
|
||||
-- it ?). To solve this problem elegantly the curve
|
||||
-- will return a HCurve, the HCurve is a curve
|
||||
-- handled by reference so it will be deallocated
|
||||
-- automatically when it is not used.
|
||||
--
|
||||
-- A third class GenHCurve is provided, this class is
|
||||
-- generic and its utility is to provide automatic
|
||||
-- generation of the HCurve class when you have
|
||||
-- written the Curve class.
|
||||
--
|
||||
--
|
||||
-- * Let us show an example (with 2d curves) :
|
||||
--
|
||||
-- Imagine an algorithm to intersect curves, this
|
||||
-- algorithms is written to process Curve2d from
|
||||
-- Adaptor3d :
|
||||
--
|
||||
-- A method may look like :
|
||||
--
|
||||
-- Intersect(C1,C2 : Curve2d from Adaptor3d);
|
||||
--
|
||||
-- Which will look like in C++
|
||||
--
|
||||
-- Intersect(const Adaptor2d_Curve2d& C1,
|
||||
-- const Adaptor2d_Curve2d& C2)
|
||||
-- {
|
||||
-- // you can call any method
|
||||
-- Standard_Real first1 = C1.FirstParameter();
|
||||
--
|
||||
-- // but avoid to copy in an Adaptor3d_Curve which
|
||||
-- // is an Abstract class, use a reference or a pointer
|
||||
--
|
||||
-- const Adaptor3d_Curve& C = C1;
|
||||
-- const Adaptor3d_Curve *pC = &C1;
|
||||
--
|
||||
-- // If you are interseted in Intervals you must
|
||||
-- // store them in a HCurve to ensure they are kept
|
||||
-- // in memory. Then a referrence may be used.
|
||||
--
|
||||
-- Handle(Adaptor3d_HCurve) HCI = C1.Interval(1);
|
||||
--
|
||||
-- const Adaptor3d_Curve& CI = HCI->Curve();
|
||||
-- pC = &(HCI->Curve());
|
||||
--
|
||||
--
|
||||
-- * The Adaptor3d provides also Generic classes
|
||||
-- implementing algorithmic curves and surfaces.
|
||||
--
|
||||
-- - IsoCurve : Isoparametric curve on a surface.
|
||||
-- - CurveOnSurface : 2D curve in the parametric
|
||||
-- space of a surface.
|
||||
--
|
||||
--
|
||||
-- - OffsetCurve2d : 2d offset curve
|
||||
-- - ProjectedCurve : 3d curve projected on a plane
|
||||
-- - SurfaceOfLinearExtrusion
|
||||
-- - SurfaceOfRevolution
|
||||
--
|
||||
-- They are instantiated with HCurve, HSurface, HCurved2d
|
||||
|
||||
uses
|
||||
Standard,
|
||||
MMgt,
|
||||
TColStd,
|
||||
GeomAbs,
|
||||
TopAbs,
|
||||
TColgp,
|
||||
gp,
|
||||
Geom2d,
|
||||
Geom,
|
||||
math,
|
||||
Adaptor2d
|
||||
|
||||
is
|
||||
|
||||
deferred class Curve;
|
||||
|
||||
pointer CurvePtr to Curve from Adaptor3d;
|
||||
|
||||
deferred class HCurve;
|
||||
|
||||
generic class GenHCurve;
|
||||
|
||||
deferred class Surface;
|
||||
|
||||
pointer SurfacePtr to Surface from Adaptor3d;
|
||||
|
||||
deferred class HSurface;
|
||||
|
||||
generic class GenHSurface;
|
||||
|
||||
|
||||
--
|
||||
-- The following classes are used to define an abstract
|
||||
-- simplified "topology" for surfaces. This is used by
|
||||
-- algorithm as mass properties or surface intersections.
|
||||
--
|
||||
|
||||
|
||||
class HVertex;
|
||||
|
||||
class HSurfaceTool;
|
||||
|
||||
class TopolTool;
|
||||
|
||||
--
|
||||
-- The following classes provides algorithmic curves and
|
||||
-- surface, they are inheriting from Curve and Surface and the
|
||||
-- correponding HCurve and HSurface is instantiated.
|
||||
--
|
||||
--
|
||||
|
||||
|
||||
class IsoCurve;
|
||||
|
||||
class HIsoCurve instantiates GenHCurve from Adaptor3d
|
||||
(IsoCurve from Adaptor3d);
|
||||
|
||||
|
||||
class CurveOnSurface;
|
||||
|
||||
pointer CurveOnSurfacePtr to CurveOnSurface from Adaptor3d;
|
||||
|
||||
class HCurveOnSurface instantiates GenHCurve from Adaptor3d
|
||||
(CurveOnSurface from Adaptor3d);
|
||||
|
||||
|
||||
|
||||
class OffsetCurve;
|
||||
|
||||
class HOffsetCurve instantiates GenHCurve2d from Adaptor2d
|
||||
(OffsetCurve from Adaptor3d);
|
||||
|
||||
class SurfaceOfRevolution;
|
||||
|
||||
class HSurfaceOfRevolution instantiates GenHSurface from Adaptor3d
|
||||
(SurfaceOfRevolution from Adaptor3d);
|
||||
|
||||
|
||||
|
||||
class SurfaceOfLinearExtrusion;
|
||||
|
||||
class HSurfaceOfLinearExtrusion instantiates GenHSurface from Adaptor3d
|
||||
(SurfaceOfLinearExtrusion from Adaptor3d);
|
||||
|
||||
private class InterFunc;
|
||||
|
||||
end Adaptor3d;
|
@@ -1,250 +0,0 @@
|
||||
-- Created on: 1993-03-31
|
||||
-- Created by: Bruno DUMORTIER
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
deferred class Curve from Adaptor3d
|
||||
|
||||
---Purpose: Root class for 3D curves on which geometric
|
||||
-- algorithms work.
|
||||
-- An adapted curve is an interface between the
|
||||
-- services provided by a curve and those required of
|
||||
-- the curve by algorithms which use it.
|
||||
-- Two derived concrete classes are provided:
|
||||
-- - GeomAdaptor_Curve for a curve from the Geom package
|
||||
-- - Adaptor3d_CurveOnSurface for a curve lying on
|
||||
-- a surface from the Geom package.
|
||||
|
||||
|
||||
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(me) returns Real
|
||||
is virtual;
|
||||
|
||||
LastParameter(me) returns Real
|
||||
is virtual;
|
||||
|
||||
--
|
||||
-- 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(me) returns Shape from GeomAbs
|
||||
---Purpose:
|
||||
is virtual;
|
||||
|
||||
NbIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of intervals for continuity
|
||||
-- <S>. May be one if Continuity(me) >= <S>
|
||||
is virtual;
|
||||
|
||||
Intervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
--
|
||||
-- The array must provide enough room to accomodate
|
||||
-- for the parameters. i.e. T.Length() > NbIntervals()
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
is virtual;
|
||||
|
||||
Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d
|
||||
---Purpose: Returns a curve equivalent of <me> between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is virtual;
|
||||
|
||||
|
||||
IsClosed(me) returns Boolean
|
||||
is virtual;
|
||||
|
||||
IsPeriodic(me) returns Boolean
|
||||
is virtual;
|
||||
|
||||
Period(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is virtual;
|
||||
|
||||
Value(me; U : Real) returns Pnt from gp
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
is virtual;
|
||||
|
||||
D0 (me; U : Real; P : out Pnt from gp)
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
is virtual;
|
||||
|
||||
D1 (me; 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.
|
||||
is virtual;
|
||||
|
||||
D2 (me; 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.
|
||||
is virtual;
|
||||
|
||||
D3 (me; 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.
|
||||
is virtual;
|
||||
|
||||
DN (me; 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.
|
||||
is virtual;
|
||||
|
||||
Resolution(me; R3d : Real) returns Real
|
||||
---Purpose : Returns the parametric resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is virtual;
|
||||
|
||||
GetType(me) returns CurveType from GeomAbs
|
||||
---Purpose: Returns the type of the curve in the current
|
||||
-- interval : Line, Circle, Ellipse, Hyperbola,
|
||||
-- Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
is virtual;
|
||||
|
||||
--
|
||||
-- The following methods must be called when GetType returned
|
||||
-- the corresponding type.
|
||||
--
|
||||
|
||||
Line(me) returns Lin from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
Circle(me) returns Circ from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
Ellipse(me) returns Elips from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
Hyperbola(me) returns Hypr from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
Parabola(me) returns Parab from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Degree(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
IsRational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
NbPoles(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
NbKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
Bezier(me) returns BezierCurve from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
BSpline(me) returns BSplineCurve from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
---C++: alias " Standard_EXPORT virtual ~Adaptor3d_Curve();"
|
||||
|
||||
end Curve;
|
||||
|
||||
|
@@ -14,14 +14,27 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_Curve.ixx>
|
||||
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Elips.hxx>
|
||||
#include <gp_Hypr.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Parab.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ~Adaptor3d_Curve
|
||||
//purpose : Destructor
|
||||
//=======================================================================
|
||||
|
||||
Adaptor3d_Curve::~Adaptor3d_Curve()
|
||||
{
|
||||
}
|
||||
|
179
src/Adaptor3d/Adaptor3d_Curve.hxx
Normal file
179
src/Adaptor3d/Adaptor3d_Curve.hxx
Normal file
@@ -0,0 +1,179 @@
|
||||
// Created on: 1993-03-31
|
||||
// Created by: Bruno DUMORTIER
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Adaptor3d_Curve_HeaderFile
|
||||
#define _Adaptor3d_Curve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_HCurve;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class gp_Lin;
|
||||
class gp_Circ;
|
||||
class gp_Elips;
|
||||
class gp_Hypr;
|
||||
class gp_Parab;
|
||||
class Geom_BezierCurve;
|
||||
class Geom_BSplineCurve;
|
||||
|
||||
|
||||
//! Root class for 3D curves on which geometric
|
||||
//! algorithms work.
|
||||
//! An adapted curve is an interface between the
|
||||
//! services provided by a curve and those required of
|
||||
//! the curve by algorithms which use it.
|
||||
//! Two derived concrete classes are provided:
|
||||
//! - GeomAdaptor_Curve for a curve from the Geom package
|
||||
//! - Adaptor3d_CurveOnSurface for a curve lying on
|
||||
//! a surface from the Geom package.
|
||||
class Adaptor3d_Curve
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT virtual Standard_Real FirstParameter() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real LastParameter() const;
|
||||
|
||||
Standard_EXPORT virtual GeomAbs_Shape Continuity() const;
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
//! <S>. May be one if Continuity(me) >= <S>
|
||||
Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const;
|
||||
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! of continuity <S>.
|
||||
//!
|
||||
//! The array must provide enough room to accomodate
|
||||
//! for the parameters. i.e. T.Length() > NbIntervals()
|
||||
Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
|
||||
|
||||
//! Returns a curve equivalent of <me> between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT virtual Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsClosed() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsPeriodic() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real Period() const;
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
Standard_EXPORT virtual gp_Pnt Value (const Standard_Real U) const;
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
Standard_EXPORT virtual void D0 (const Standard_Real U, gp_Pnt& P) const;
|
||||
|
||||
//! Computes the point of parameter U on the curve with its
|
||||
//! first derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C1.
|
||||
Standard_EXPORT virtual void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const;
|
||||
|
||||
|
||||
//! Returns the point P of parameter U, the first and second
|
||||
//! derivatives V1 and V2.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C2.
|
||||
Standard_EXPORT virtual void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const;
|
||||
|
||||
|
||||
//! Returns the point P of parameter U, the first, the second
|
||||
//! and the third derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C3.
|
||||
Standard_EXPORT virtual void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const;
|
||||
|
||||
|
||||
//! The returned vector gives the value of the derivative for the
|
||||
//! order of derivation N.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not CN.
|
||||
//! Raised if N < 1.
|
||||
Standard_EXPORT virtual gp_Vec DN (const Standard_Real U, const Standard_Integer N) const;
|
||||
|
||||
//! Returns the parametric resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT virtual Standard_Real Resolution (const Standard_Real R3d) const;
|
||||
|
||||
//! Returns the type of the curve in the current
|
||||
//! interval : Line, Circle, Ellipse, Hyperbola,
|
||||
//! Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
Standard_EXPORT virtual GeomAbs_CurveType GetType() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Lin Line() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Circ Circle() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Elips Ellipse() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Hypr Hyperbola() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Parab Parabola() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer Degree() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsRational() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer NbPoles() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer NbKnots() const;
|
||||
|
||||
Standard_EXPORT virtual Handle(Geom_BezierCurve) Bezier() const;
|
||||
|
||||
Standard_EXPORT virtual Handle(Geom_BSplineCurve) BSpline() const;
|
||||
Standard_EXPORT virtual ~Adaptor3d_Curve();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_Curve_HeaderFile
|
@@ -1,330 +0,0 @@
|
||||
-- Created on: 1993-02-22
|
||||
-- Created by: Modelistation
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class CurveOnSurface from Adaptor3d inherits Curve from Adaptor3d
|
||||
|
||||
---Purpose: An interface between the services provided by a curve
|
||||
-- lying on a surface from the package Geom and those
|
||||
-- required of the curve by algorithms which use it. The
|
||||
-- curve is defined as a 2D curve from the Geom2d
|
||||
-- package, in the parametric space of the surface.
|
||||
|
||||
|
||||
uses
|
||||
Array1OfReal from TColStd,
|
||||
Pnt from gp,
|
||||
Vec from gp,
|
||||
Circ from gp,
|
||||
Elips from gp,
|
||||
Hypr from gp,
|
||||
Parab from gp,
|
||||
Lin from gp,
|
||||
CurveType from GeomAbs,
|
||||
Shape from GeomAbs,
|
||||
BezierCurve from Geom,
|
||||
BSplineCurve from Geom,
|
||||
BSplineSurface from Geom,
|
||||
HCurve from Adaptor3d,
|
||||
HCurve2d from Adaptor2d,
|
||||
HSurface from Adaptor3d,
|
||||
HSequenceOfReal from TColStd,
|
||||
Pnt2d from gp,
|
||||
Vec2d from gp
|
||||
|
||||
raises NoSuchObject from Standard,
|
||||
DomainError from Standard,
|
||||
OutOfRange from Standard
|
||||
|
||||
is
|
||||
|
||||
Create returns CurveOnSurface;
|
||||
|
||||
Create(S : HSurface from Adaptor3d) returns CurveOnSurface;
|
||||
|
||||
Create (C : HCurve2d from Adaptor2d; S : HSurface from Adaptor3d)
|
||||
returns CurveOnSurface;
|
||||
---Purpose: Creates a CurveOnSurface from the 2d curve <C> and
|
||||
-- the surface <S>.
|
||||
|
||||
Load(me : in out;S : HSurface from Adaptor3d)
|
||||
---Purpose: Changes the surface.
|
||||
is static;
|
||||
|
||||
Load(me : in out; C : HCurve2d from Adaptor2d)
|
||||
---Purpose: Changes the 2d curve.
|
||||
is static;
|
||||
|
||||
Load(me : in out; C : HCurve2d from Adaptor2d;
|
||||
S : HSurface from Adaptor3d)
|
||||
---Purpose: Load both curve and surface.
|
||||
is static;
|
||||
|
||||
GetCurve(me) returns HCurve2d from Adaptor2d
|
||||
---C++: return const &
|
||||
is static;
|
||||
|
||||
GetSurface(me) returns HSurface from Adaptor3d
|
||||
---C++: return const &
|
||||
is static;
|
||||
|
||||
ChangeCurve(me : in out) returns HCurve2d from Adaptor2d
|
||||
---C++: return &
|
||||
is static;
|
||||
|
||||
ChangeSurface(me : in out) returns HSurface from Adaptor3d
|
||||
---C++: return &
|
||||
is static;
|
||||
|
||||
--
|
||||
-- Implementation of Curve from Adaptor3d methods
|
||||
--
|
||||
|
||||
--
|
||||
-- Global methods - Apply to the whole curve.
|
||||
--
|
||||
|
||||
FirstParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
LastParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
Continuity(me) returns Shape from GeomAbs
|
||||
is redefined static;
|
||||
|
||||
NbIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of intervals for continuity
|
||||
-- <S>. May be one if Continuity(me) >= <S>
|
||||
is redefined static;
|
||||
|
||||
Intervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
--
|
||||
-- The array must provide enough room to accomodate
|
||||
-- for the parameters. i.e. T.Length() > NbIntervals()
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
is redefined static;
|
||||
|
||||
Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d
|
||||
---Purpose: Returns a curve equivalent of <me> between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is redefined static;
|
||||
|
||||
IsClosed(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
IsPeriodic(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
Period(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is redefined static;
|
||||
|
||||
Value(me; U : Real) returns Pnt from gp
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
is redefined static;
|
||||
|
||||
D0 (me; U : Real; P : out Pnt from gp)
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
is redefined static;
|
||||
|
||||
D1 (me; 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.
|
||||
is redefined static;
|
||||
|
||||
D2 (me; 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.
|
||||
is redefined static;
|
||||
|
||||
D3 (me; 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.
|
||||
is redefined static;
|
||||
|
||||
DN (me; 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.
|
||||
is redefined static;
|
||||
|
||||
Resolution(me; R3d : Real) returns Real
|
||||
---Purpose : Returns the parametric resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is redefined static;
|
||||
|
||||
GetType(me) returns CurveType from GeomAbs
|
||||
---Purpose: Returns the type of the curve in the current
|
||||
-- interval : Line, Circle, Ellipse, Hyperbola,
|
||||
-- Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
is redefined static;
|
||||
|
||||
--
|
||||
-- The following methods must be called when GetType returned
|
||||
-- the corresponding type.
|
||||
--
|
||||
|
||||
Line(me) returns Lin from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Circle(me) returns Circ from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Ellipse(me) returns Elips from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Hyperbola(me) returns Hypr from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Parabola(me) returns Parab from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Degree(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
IsRational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
NbPoles(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
NbKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
---Warning: will raize if this asked on a curve
|
||||
-- that is not planar
|
||||
|
||||
Bezier(me) returns BezierCurve from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
BSpline(me) returns BSplineCurve from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
EvalKPart(me : in out)
|
||||
is static private;
|
||||
|
||||
EvalFirstLastSurf(me : in out)
|
||||
---Purpose: Evaluates myFirstSurf and myLastSurf
|
||||
-- for trimming the curve on surface.
|
||||
is static private;
|
||||
|
||||
|
||||
---Purpose: Following methods output left-bottom and right-top points
|
||||
-- of located part on surface
|
||||
-- for trimming the curve on surface.
|
||||
|
||||
LocatePart(me; UV : Pnt2d from gp; DUV : Vec2d from gp;
|
||||
S : HSurface from Adaptor3d;
|
||||
LeftBot, RightTop : out Pnt2d from gp)
|
||||
is static private;
|
||||
|
||||
LocatePart_RevExt(me; UV : Pnt2d from gp; DUV : Vec2d from gp;
|
||||
S : HSurface from Adaptor3d;
|
||||
LeftBot, RightTop : out Pnt2d from gp)
|
||||
returns Boolean
|
||||
is static private;
|
||||
|
||||
LocatePart_Offset(me; UV : Pnt2d from gp; DUV : Vec2d from gp;
|
||||
S : HSurface from Adaptor3d;
|
||||
LeftBot, RightTop : out Pnt2d from gp)
|
||||
returns Boolean
|
||||
is static private;
|
||||
|
||||
FindBounds(me; Arr : Array1OfReal from TColStd;
|
||||
XYComp : Real from Standard;
|
||||
DUVComp : Real from Standard;
|
||||
Bnd1 : out Integer from Standard;
|
||||
Bnd2 : out Integer from Standard;
|
||||
DerIsNull : out Boolean from Standard)
|
||||
---Purpose: Extracts the numbers of knots which equal
|
||||
-- the point and checks derivative components
|
||||
-- by zero equivalence.
|
||||
is static private;
|
||||
|
||||
|
||||
|
||||
fields
|
||||
|
||||
mySurface : HSurface from Adaptor3d;
|
||||
myCurve : HCurve2d from Adaptor2d;
|
||||
|
||||
myType : CurveType from GeomAbs;
|
||||
myCirc : Circ from gp;
|
||||
myLin : Lin from gp;
|
||||
|
||||
myFirstSurf : HSurface from Adaptor3d;
|
||||
myLastSurf : HSurface from Adaptor3d;
|
||||
|
||||
myIntervals : HSequenceOfReal from TColStd;
|
||||
myIntCont : Shape from GeomAbs;
|
||||
|
||||
end CurveOnSurface;
|
||||
|
||||
|
||||
|
||||
|
@@ -13,36 +13,50 @@
|
||||
|
||||
#define No_Standard_OutOfRange
|
||||
|
||||
#include <Adaptor3d_CurveOnSurface.ixx>
|
||||
|
||||
#include <Adaptor2d_HCurve2d.hxx>
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_HCurveOnSurface.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Elips2d.hxx>
|
||||
#include <gp_Hypr2d.hxx>
|
||||
#include <gp_Parab2d.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_Assert.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_InterFunc.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Adaptor3d_InterFunc.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_OffsetSurface.hxx>
|
||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_SurfaceOfRevolution.hxx>
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Elips.hxx>
|
||||
#include <gp_Elips2d.hxx>
|
||||
#include <gp_Hypr.hxx>
|
||||
#include <gp_Hypr2d.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Parab.hxx>
|
||||
#include <gp_Parab2d.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <math_FunctionRoots.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_Assert.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
|
||||
static gp_Pnt to3d(const gp_Pln& Pl, const gp_Pnt2d& P)
|
||||
{
|
||||
|
236
src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx
Normal file
236
src/Adaptor3d/Adaptor3d_CurveOnSurface.hxx
Normal file
@@ -0,0 +1,236 @@
|
||||
// Created on: 1993-02-22
|
||||
// Created by: Modelistation
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Adaptor3d_CurveOnSurface_HeaderFile
|
||||
#define _Adaptor3d_CurveOnSurface_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Adaptor3d_HSurface;
|
||||
class Adaptor2d_HCurve2d;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Standard_OutOfRange;
|
||||
class Adaptor3d_HCurve;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class gp_Lin;
|
||||
class gp_Circ;
|
||||
class gp_Elips;
|
||||
class gp_Hypr;
|
||||
class gp_Parab;
|
||||
class Geom_BezierCurve;
|
||||
class Geom_BSplineCurve;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
|
||||
|
||||
//! An interface between the services provided by a curve
|
||||
//! lying on a surface from the package Geom and those
|
||||
//! required of the curve by algorithms which use it. The
|
||||
//! curve is defined as a 2D curve from the Geom2d
|
||||
//! package, in the parametric space of the surface.
|
||||
class Adaptor3d_CurveOnSurface : public Adaptor3d_Curve
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_CurveOnSurface();
|
||||
|
||||
Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
//! Creates a CurveOnSurface from the 2d curve <C> and
|
||||
//! the surface <S>.
|
||||
Standard_EXPORT Adaptor3d_CurveOnSurface(const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
//! Changes the surface.
|
||||
Standard_EXPORT void Load (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
//! Changes the 2d curve.
|
||||
Standard_EXPORT void Load (const Handle(Adaptor2d_HCurve2d)& C);
|
||||
|
||||
//! Load both curve and surface.
|
||||
Standard_EXPORT void Load (const Handle(Adaptor2d_HCurve2d)& C, const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
Standard_EXPORT const Handle(Adaptor2d_HCurve2d)& GetCurve() const;
|
||||
|
||||
Standard_EXPORT const Handle(Adaptor3d_HSurface)& GetSurface() const;
|
||||
|
||||
Standard_EXPORT Handle(Adaptor2d_HCurve2d)& ChangeCurve();
|
||||
|
||||
Standard_EXPORT Handle(Adaptor3d_HSurface)& ChangeSurface();
|
||||
|
||||
Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
//! <S>. May be one if Continuity(me) >= <S>
|
||||
Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! of continuity <S>.
|
||||
//!
|
||||
//! The array must provide enough room to accomodate
|
||||
//! for the parameters. i.e. T.Length() > NbIntervals()
|
||||
Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a curve equivalent of <me> between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameter U on the curve with its
|
||||
//! first derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C1.
|
||||
Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Returns the point P of parameter U, the first and second
|
||||
//! derivatives V1 and V2.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C2.
|
||||
Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Returns the point P of parameter U, the first, the second
|
||||
//! and the third derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C3.
|
||||
Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! The returned vector gives the value of the derivative for the
|
||||
//! order of derivation N.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not CN.
|
||||
//! Raised if N < 1.
|
||||
Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the parametric resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the type of the curve in the current
|
||||
//! interval : Line, Circle, Ellipse, Hyperbola,
|
||||
//! Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT void EvalKPart();
|
||||
|
||||
//! Evaluates myFirstSurf and myLastSurf
|
||||
//! for trimming the curve on surface.
|
||||
//! Following methods output left-bottom and right-top points
|
||||
//! of located part on surface
|
||||
//! for trimming the curve on surface.
|
||||
Standard_EXPORT void EvalFirstLastSurf();
|
||||
|
||||
Standard_EXPORT void LocatePart (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_HSurface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean LocatePart_RevExt (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_HSurface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean LocatePart_Offset (const gp_Pnt2d& UV, const gp_Vec2d& DUV, const Handle(Adaptor3d_HSurface)& S, gp_Pnt2d& LeftBot, gp_Pnt2d& RightTop) const;
|
||||
|
||||
//! Extracts the numbers of knots which equal
|
||||
//! the point and checks derivative components
|
||||
//! by zero equivalence.
|
||||
Standard_EXPORT void FindBounds (const TColStd_Array1OfReal& Arr, const Standard_Real XYComp, const Standard_Real DUVComp, Standard_Integer& Bnd1, Standard_Integer& Bnd2, Standard_Boolean& DerIsNull) const;
|
||||
|
||||
|
||||
Handle(Adaptor3d_HSurface) mySurface;
|
||||
Handle(Adaptor2d_HCurve2d) myCurve;
|
||||
GeomAbs_CurveType myType;
|
||||
gp_Circ myCirc;
|
||||
gp_Lin myLin;
|
||||
Handle(Adaptor3d_HSurface) myFirstSurf;
|
||||
Handle(Adaptor3d_HSurface) myLastSurf;
|
||||
Handle(TColStd_HSequenceOfReal) myIntervals;
|
||||
GeomAbs_Shape myIntCont;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_CurveOnSurface_HeaderFile
|
23
src/Adaptor3d/Adaptor3d_CurveOnSurfacePtr.hxx
Normal file
23
src/Adaptor3d/Adaptor3d_CurveOnSurfacePtr.hxx
Normal file
@@ -0,0 +1,23 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_CurveOnSurfacePtr_HeaderFile
|
||||
#define _Adaptor3d_CurveOnSurfacePtr_HeaderFile
|
||||
|
||||
class Adaptor3d_CurveOnSurface;
|
||||
typedef Adaptor3d_CurveOnSurface* Adaptor3d_CurveOnSurfacePtr;
|
||||
|
||||
#endif // _Adaptor3d_CurveOnSurfacePtr_HeaderFile
|
23
src/Adaptor3d/Adaptor3d_CurvePtr.hxx
Normal file
23
src/Adaptor3d/Adaptor3d_CurvePtr.hxx
Normal file
@@ -0,0 +1,23 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_CurvePtr_HeaderFile
|
||||
#define _Adaptor3d_CurvePtr_HeaderFile
|
||||
|
||||
class Adaptor3d_Curve;
|
||||
typedef Adaptor3d_Curve* Adaptor3d_CurvePtr;
|
||||
|
||||
#endif // _Adaptor3d_CurvePtr_HeaderFile
|
@@ -1,85 +0,0 @@
|
||||
-- Created on: 1994-02-23
|
||||
-- Created by: model
|
||||
-- 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 GenHCurve from Adaptor3d
|
||||
(TheCurve as Curve from Adaptor3d)
|
||||
|
||||
inherits HCurve from Adaptor3d
|
||||
|
||||
---Purpose: Generic class used to create a curve manipulated
|
||||
-- with Handle from a curve described by the class Curve.
|
||||
|
||||
uses
|
||||
Curve from Adaptor3d
|
||||
|
||||
|
||||
raises
|
||||
|
||||
OutOfRange from Standard,
|
||||
NoSuchObject from Standard,
|
||||
DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
---Purpose: Creates an empty GenHCurve.
|
||||
returns GenHCurve from Adaptor3d;
|
||||
|
||||
|
||||
Create(C: TheCurve)
|
||||
|
||||
---Purpose: Creates a GenHCurve from a Curve
|
||||
returns GenHCurve from Adaptor3d;
|
||||
|
||||
|
||||
Set(me: mutable; C: TheCurve)
|
||||
|
||||
---Purpose: Sets the field of the GenHCurve.
|
||||
is static;
|
||||
|
||||
Curve(me)
|
||||
|
||||
---Purpose: Returns the curve used to create the GenHCurve.
|
||||
-- This is redefined from HCurve, cannot be inline.
|
||||
--
|
||||
---C++: return const &
|
||||
|
||||
returns Curve from Adaptor3d;
|
||||
|
||||
GetCurve(me:mutable)
|
||||
|
||||
---Purpose: Returns the curve used to create the GenHCurve.
|
||||
-- This is redefined from HCurve, cannot be inline.
|
||||
--
|
||||
---C++: return &
|
||||
|
||||
returns Curve from Adaptor3d;
|
||||
|
||||
|
||||
ChangeCurve(me : mutable)
|
||||
|
||||
---Purpose: Returns the curve used to create the GenHCurve.
|
||||
--
|
||||
---C++: return &
|
||||
---C++: inline
|
||||
|
||||
returns TheCurve;
|
||||
|
||||
fields
|
||||
|
||||
myCurve : TheCurve is protected;
|
||||
|
||||
end GenHCurve;
|
@@ -1,80 +0,0 @@
|
||||
-- Created on: 1994-02-14
|
||||
-- Created by: model
|
||||
-- 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 GenHSurface from Adaptor3d
|
||||
(TheSurface as Surface from Adaptor3d)
|
||||
|
||||
inherits HSurface from Adaptor3d
|
||||
|
||||
---Purpose: Generic class used to create a surface manipulated
|
||||
-- with Handle from a surface described by the class Surface.
|
||||
|
||||
uses
|
||||
|
||||
Surface from Adaptor3d
|
||||
|
||||
|
||||
raises
|
||||
|
||||
OutOfRange from Standard,
|
||||
NoSuchObject from Standard,
|
||||
DomainError from Standard
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
|
||||
---Purpose: Creates an empty GenHSurface.
|
||||
returns GenHSurface from Adaptor3d;
|
||||
|
||||
|
||||
Create(S: TheSurface)
|
||||
|
||||
---Purpose: Creates a GenHSurface from a Surface.
|
||||
returns GenHSurface from Adaptor3d;
|
||||
|
||||
|
||||
Set(me: mutable; S: TheSurface)
|
||||
|
||||
---Purpose: Sets the field of the GenHSurface.
|
||||
is static;
|
||||
|
||||
--
|
||||
-- Access to the surface
|
||||
--
|
||||
|
||||
Surface(me) returns Surface from Adaptor3d;
|
||||
---Purpose: Returns a reference to the Surface inside the HSurface.
|
||||
-- This is redefined from HSurface, cannot be inline.
|
||||
--
|
||||
---C++: return const &
|
||||
|
||||
ChangeSurface(me : mutable)
|
||||
|
||||
---Purpose: Returns the surface used to create the GenHSurface.
|
||||
--
|
||||
---C++: return &
|
||||
---C++: inline
|
||||
|
||||
returns TheSurface;
|
||||
|
||||
|
||||
fields
|
||||
|
||||
mySurf: TheSurface is protected;
|
||||
|
||||
end GenHSurface;
|
@@ -1,223 +0,0 @@
|
||||
-- Created on: 1994-02-23
|
||||
-- Created by: model
|
||||
-- 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.
|
||||
|
||||
deferred class HCurve from Adaptor3d inherits TShared from MMgt
|
||||
|
||||
---Purpose: Root class for 3D curves manipulated by handles, on
|
||||
-- which geometric algorithms work.
|
||||
-- An adapted curve is an interface between the
|
||||
-- services provided by a curve and those required of
|
||||
-- the curve by algorithms which use it.
|
||||
-- Two derived concrete classes are provided:
|
||||
-- - GeomAdaptor_HCurve for a curve from the Geom package
|
||||
-- - Adaptor3d_HCurveOnSurface for a curve lying
|
||||
-- on a surface from the Geom package.
|
||||
|
||||
|
||||
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,
|
||||
Curve from Adaptor3d
|
||||
|
||||
raises
|
||||
|
||||
OutOfRange from Standard,
|
||||
NoSuchObject from Standard,
|
||||
DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
|
||||
--
|
||||
-- Access to the curve
|
||||
--
|
||||
|
||||
Curve(me) returns Curve from Adaptor3d
|
||||
---Purpose: Returns a pointer to the Curve inside the HCurve.
|
||||
--
|
||||
---C++: return const &
|
||||
is deferred;
|
||||
|
||||
GetCurve(me:mutable) returns Curve from Adaptor3d
|
||||
---Purpose: Returns a pointer to the Curve inside the HCurve.
|
||||
--
|
||||
---C++: return &
|
||||
is deferred;
|
||||
|
||||
--
|
||||
-- Curve methods, they are provided for convenience. Each
|
||||
-- method M() is defined inline as :
|
||||
--
|
||||
-- Adaptor3d_HCurve::M() { Curve().M(); }
|
||||
--
|
||||
-- See the class Curve for comments on the methods.
|
||||
--
|
||||
|
||||
FirstParameter(me) returns Real;
|
||||
---C++: inline
|
||||
|
||||
LastParameter(me) returns Real;
|
||||
---C++: inline
|
||||
|
||||
Continuity(me) returns Shape from GeomAbs ;
|
||||
---C++: inline
|
||||
|
||||
NbIntervals(me; S : Shape from GeomAbs) returns Integer;
|
||||
---C++: inline
|
||||
|
||||
Intervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
--
|
||||
-- The array must provide enough room to accomodate
|
||||
-- for the parameters. i.e. T.Length() > NbIntervals()
|
||||
--
|
||||
---C++: inline
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
is static;
|
||||
|
||||
Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d
|
||||
---Purpose: Returns a curve equivalent of <me> between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
--
|
||||
---C++: inline
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is static;
|
||||
|
||||
|
||||
IsClosed(me) returns Boolean;
|
||||
---C++: inline
|
||||
|
||||
IsPeriodic(me) returns Boolean;
|
||||
---C++: inline
|
||||
|
||||
Period(me) returns Real
|
||||
---C++: inline
|
||||
raises
|
||||
DomainError from Standard;
|
||||
|
||||
Value(me; U : Real) returns Pnt from gp;
|
||||
---C++: inline
|
||||
|
||||
D0 (me; U : Real; P : out Pnt from gp);
|
||||
---C++: inline
|
||||
|
||||
D1 (me; U : Real; P : out Pnt from gp ; V : out Vec from gp)
|
||||
---C++: inline
|
||||
raises
|
||||
DomainError from Standard;
|
||||
|
||||
D2 (me; U : Real; P : out Pnt from gp; V1, V2 : out Vec from gp)
|
||||
---C++: inline
|
||||
raises
|
||||
DomainError from Standard;
|
||||
|
||||
D3 (me; U : Real; P : out Pnt from gp; V1, V2, V3 : out Vec from gp)
|
||||
---C++: inline
|
||||
raises
|
||||
DomainError from Standard;
|
||||
|
||||
DN (me; U : Real; N : Integer) returns Vec from gp
|
||||
---C++: inline
|
||||
raises
|
||||
DomainError from Standard,
|
||||
OutOfRange from Standard;
|
||||
|
||||
Resolution(me; R3d : Real) returns Real;
|
||||
---C++: inline
|
||||
|
||||
GetType(me) returns CurveType from GeomAbs;
|
||||
---C++: inline
|
||||
|
||||
Line(me) returns Lin from gp
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard;
|
||||
|
||||
Circle(me) returns Circ from gp
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard;
|
||||
|
||||
Ellipse(me) returns Elips from gp
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard;
|
||||
|
||||
Hyperbola(me) returns Hypr from gp
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard;
|
||||
|
||||
Parabola(me) returns Parab from gp
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard;
|
||||
|
||||
Degree(me) returns Integer
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard ;
|
||||
|
||||
|
||||
IsRational(me) returns Boolean
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard ;
|
||||
|
||||
|
||||
NbPoles(me) returns Integer
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard ;
|
||||
|
||||
|
||||
NbKnots(me) returns Integer
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard ;
|
||||
|
||||
|
||||
Bezier(me) returns BezierCurve from Geom
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard;
|
||||
|
||||
BSpline(me) returns BSplineCurve from Geom
|
||||
---C++: inline
|
||||
raises
|
||||
NoSuchObject from Standard;
|
||||
|
||||
|
||||
end HCurve;
|
||||
|
||||
|
||||
|
@@ -11,5 +11,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_HCurve.ixx>
|
||||
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
161
src/Adaptor3d/Adaptor3d_HCurve.hxx
Normal file
161
src/Adaptor3d/Adaptor3d_HCurve.hxx
Normal file
@@ -0,0 +1,161 @@
|
||||
// Created on: 1994-02-23
|
||||
// Created by: model
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_HCurve_HeaderFile
|
||||
#define _Adaptor3d_HCurve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Elips.hxx>
|
||||
#include <gp_Hypr.hxx>
|
||||
#include <gp_Parab.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_Curve;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class Geom_BezierCurve;
|
||||
class Geom_BSplineCurve;
|
||||
|
||||
|
||||
class Adaptor3d_HCurve;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_HCurve, MMgt_TShared)
|
||||
|
||||
//! Root class for 3D curves manipulated by handles, on
|
||||
//! which geometric algorithms work.
|
||||
//! An adapted curve is an interface between the
|
||||
//! services provided by a curve and those required of
|
||||
//! the curve by algorithms which use it.
|
||||
//! Two derived concrete classes are provided:
|
||||
//! - GeomAdaptor_HCurve for a curve from the Geom package
|
||||
//! - Adaptor3d_HCurveOnSurface for a curve lying
|
||||
//! on a surface from the Geom package.
|
||||
class Adaptor3d_HCurve : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Returns a pointer to the Curve inside the HCurve.
|
||||
Standard_EXPORT virtual const Adaptor3d_Curve& Curve() const = 0;
|
||||
|
||||
//! Returns a pointer to the Curve inside the HCurve.
|
||||
Standard_EXPORT virtual Adaptor3d_Curve& GetCurve() = 0;
|
||||
|
||||
Standard_Real FirstParameter() const;
|
||||
|
||||
Standard_Real LastParameter() const;
|
||||
|
||||
GeomAbs_Shape Continuity() const;
|
||||
|
||||
Standard_Integer NbIntervals (const GeomAbs_Shape S) const;
|
||||
|
||||
//! 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()
|
||||
void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
|
||||
|
||||
//! Returns a curve equivalent of <me> between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//!
|
||||
//! If <First> >= <Last>
|
||||
Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
|
||||
|
||||
Standard_Boolean IsClosed() const;
|
||||
|
||||
Standard_Boolean IsPeriodic() const;
|
||||
|
||||
Standard_Real Period() const;
|
||||
|
||||
gp_Pnt Value (const Standard_Real U) const;
|
||||
|
||||
void D0 (const Standard_Real U, gp_Pnt& P) const;
|
||||
|
||||
void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const;
|
||||
|
||||
void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const;
|
||||
|
||||
void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const;
|
||||
|
||||
gp_Vec DN (const Standard_Real U, const Standard_Integer N) const;
|
||||
|
||||
Standard_Real Resolution (const Standard_Real R3d) const;
|
||||
|
||||
GeomAbs_CurveType GetType() const;
|
||||
|
||||
gp_Lin Line() const;
|
||||
|
||||
gp_Circ Circle() const;
|
||||
|
||||
gp_Elips Ellipse() const;
|
||||
|
||||
gp_Hypr Hyperbola() const;
|
||||
|
||||
gp_Parab Parabola() const;
|
||||
|
||||
Standard_Integer Degree() const;
|
||||
|
||||
Standard_Boolean IsRational() const;
|
||||
|
||||
Standard_Integer NbPoles() const;
|
||||
|
||||
Standard_Integer NbKnots() const;
|
||||
|
||||
Handle(Geom_BezierCurve) Bezier() const;
|
||||
|
||||
Handle(Geom_BSplineCurve) BSpline() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Adaptor3d_HCurve,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Adaptor3d_HCurve.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_HCurve_HeaderFile
|
89
src/Adaptor3d/Adaptor3d_HCurveOnSurface.hxx
Normal file
89
src/Adaptor3d/Adaptor3d_HCurveOnSurface.hxx
Normal file
@@ -0,0 +1,89 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_HCurveOnSurface_HeaderFile
|
||||
#define _Adaptor3d_HCurveOnSurface_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_CurveOnSurface;
|
||||
class Adaptor3d_Curve;
|
||||
|
||||
|
||||
class Adaptor3d_HCurveOnSurface;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_HCurveOnSurface, Adaptor3d_HCurve)
|
||||
|
||||
|
||||
class Adaptor3d_HCurveOnSurface : public Adaptor3d_HCurve
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_HCurveOnSurface();
|
||||
|
||||
Standard_EXPORT Adaptor3d_HCurveOnSurface(const Adaptor3d_CurveOnSurface& C);
|
||||
|
||||
Standard_EXPORT void Set (const Adaptor3d_CurveOnSurface& C);
|
||||
|
||||
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
|
||||
|
||||
Standard_EXPORT Adaptor3d_Curve& GetCurve();
|
||||
|
||||
Adaptor3d_CurveOnSurface& ChangeCurve();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Adaptor3d_HCurveOnSurface,Adaptor3d_HCurve)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Adaptor3d_CurveOnSurface myCurve;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define TheCurve Adaptor3d_CurveOnSurface
|
||||
#define TheCurve_hxx <Adaptor3d_CurveOnSurface.hxx>
|
||||
#define Adaptor3d_GenHCurve Adaptor3d_HCurveOnSurface
|
||||
#define Adaptor3d_GenHCurve_hxx <Adaptor3d_HCurveOnSurface.hxx>
|
||||
#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HCurveOnSurface)
|
||||
|
||||
#include <Adaptor3d_GenHCurve.lxx>
|
||||
|
||||
#undef TheCurve
|
||||
#undef TheCurve_hxx
|
||||
#undef Adaptor3d_GenHCurve
|
||||
#undef Adaptor3d_GenHCurve_hxx
|
||||
#undef Handle_Adaptor3d_GenHCurve
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_HCurveOnSurface_HeaderFile
|
42
src/Adaptor3d/Adaptor3d_HCurveOnSurface_0.cxx
Normal file
42
src/Adaptor3d/Adaptor3d_HCurveOnSurface_0.cxx
Normal file
@@ -0,0 +1,42 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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 <Adaptor3d_HCurveOnSurface.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheCurve Adaptor3d_CurveOnSurface
|
||||
#define TheCurve_hxx <Adaptor3d_CurveOnSurface.hxx>
|
||||
#define Adaptor3d_GenHCurve Adaptor3d_HCurveOnSurface
|
||||
#define Adaptor3d_GenHCurve_hxx <Adaptor3d_HCurveOnSurface.hxx>
|
||||
#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HCurveOnSurface)
|
||||
#include <Adaptor3d_GenHCurve.gxx>
|
||||
|
89
src/Adaptor3d/Adaptor3d_HIsoCurve.hxx
Normal file
89
src/Adaptor3d/Adaptor3d_HIsoCurve.hxx
Normal file
@@ -0,0 +1,89 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_HIsoCurve_HeaderFile
|
||||
#define _Adaptor3d_HIsoCurve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Adaptor3d_IsoCurve.hxx>
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_IsoCurve;
|
||||
class Adaptor3d_Curve;
|
||||
|
||||
|
||||
class Adaptor3d_HIsoCurve;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_HIsoCurve, Adaptor3d_HCurve)
|
||||
|
||||
|
||||
class Adaptor3d_HIsoCurve : public Adaptor3d_HCurve
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_HIsoCurve();
|
||||
|
||||
Standard_EXPORT Adaptor3d_HIsoCurve(const Adaptor3d_IsoCurve& C);
|
||||
|
||||
Standard_EXPORT void Set (const Adaptor3d_IsoCurve& C);
|
||||
|
||||
Standard_EXPORT const Adaptor3d_Curve& Curve() const;
|
||||
|
||||
Standard_EXPORT Adaptor3d_Curve& GetCurve();
|
||||
|
||||
Adaptor3d_IsoCurve& ChangeCurve();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Adaptor3d_HIsoCurve,Adaptor3d_HCurve)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Adaptor3d_IsoCurve myCurve;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define TheCurve Adaptor3d_IsoCurve
|
||||
#define TheCurve_hxx <Adaptor3d_IsoCurve.hxx>
|
||||
#define Adaptor3d_GenHCurve Adaptor3d_HIsoCurve
|
||||
#define Adaptor3d_GenHCurve_hxx <Adaptor3d_HIsoCurve.hxx>
|
||||
#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HIsoCurve)
|
||||
|
||||
#include <Adaptor3d_GenHCurve.lxx>
|
||||
|
||||
#undef TheCurve
|
||||
#undef TheCurve_hxx
|
||||
#undef Adaptor3d_GenHCurve
|
||||
#undef Adaptor3d_GenHCurve_hxx
|
||||
#undef Handle_Adaptor3d_GenHCurve
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_HIsoCurve_HeaderFile
|
42
src/Adaptor3d/Adaptor3d_HIsoCurve_0.cxx
Normal file
42
src/Adaptor3d/Adaptor3d_HIsoCurve_0.cxx
Normal file
@@ -0,0 +1,42 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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 <Adaptor3d_HIsoCurve.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Adaptor3d_IsoCurve.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheCurve Adaptor3d_IsoCurve
|
||||
#define TheCurve_hxx <Adaptor3d_IsoCurve.hxx>
|
||||
#define Adaptor3d_GenHCurve Adaptor3d_HIsoCurve
|
||||
#define Adaptor3d_GenHCurve_hxx <Adaptor3d_HIsoCurve.hxx>
|
||||
#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HIsoCurve)
|
||||
#include <Adaptor3d_GenHCurve.gxx>
|
||||
|
87
src/Adaptor3d/Adaptor3d_HOffsetCurve.hxx
Normal file
87
src/Adaptor3d/Adaptor3d_HOffsetCurve.hxx
Normal file
@@ -0,0 +1,87 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_HOffsetCurve_HeaderFile
|
||||
#define _Adaptor3d_HOffsetCurve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Adaptor3d_OffsetCurve.hxx>
|
||||
#include <Adaptor2d_HCurve2d.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_OffsetCurve;
|
||||
class Adaptor2d_Curve2d;
|
||||
|
||||
|
||||
class Adaptor3d_HOffsetCurve;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_HOffsetCurve, Adaptor2d_HCurve2d)
|
||||
|
||||
|
||||
class Adaptor3d_HOffsetCurve : public Adaptor2d_HCurve2d
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_HOffsetCurve();
|
||||
|
||||
Standard_EXPORT Adaptor3d_HOffsetCurve(const Adaptor3d_OffsetCurve& C);
|
||||
|
||||
Standard_EXPORT void Set (const Adaptor3d_OffsetCurve& C);
|
||||
|
||||
Standard_EXPORT const Adaptor2d_Curve2d& Curve2d() const;
|
||||
|
||||
Adaptor3d_OffsetCurve& ChangeCurve2d();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Adaptor3d_HOffsetCurve,Adaptor2d_HCurve2d)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Adaptor3d_OffsetCurve myCurve;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define TheCurve Adaptor3d_OffsetCurve
|
||||
#define TheCurve_hxx <Adaptor3d_OffsetCurve.hxx>
|
||||
#define Adaptor2d_GenHCurve2d Adaptor3d_HOffsetCurve
|
||||
#define Adaptor2d_GenHCurve2d_hxx <Adaptor3d_HOffsetCurve.hxx>
|
||||
#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor3d_HOffsetCurve)
|
||||
|
||||
#include <Adaptor2d_GenHCurve2d.lxx>
|
||||
|
||||
#undef TheCurve
|
||||
#undef TheCurve_hxx
|
||||
#undef Adaptor2d_GenHCurve2d
|
||||
#undef Adaptor2d_GenHCurve2d_hxx
|
||||
#undef Handle_Adaptor2d_GenHCurve2d
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_HOffsetCurve_HeaderFile
|
42
src/Adaptor3d/Adaptor3d_HOffsetCurve_0.cxx
Normal file
42
src/Adaptor3d/Adaptor3d_HOffsetCurve_0.cxx
Normal file
@@ -0,0 +1,42 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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 <Adaptor3d_HOffsetCurve.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Adaptor3d_OffsetCurve.hxx>
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheCurve Adaptor3d_OffsetCurve
|
||||
#define TheCurve_hxx <Adaptor3d_OffsetCurve.hxx>
|
||||
#define Adaptor2d_GenHCurve2d Adaptor3d_HOffsetCurve
|
||||
#define Adaptor2d_GenHCurve2d_hxx <Adaptor3d_HOffsetCurve.hxx>
|
||||
#define Handle_Adaptor2d_GenHCurve2d Handle(Adaptor3d_HOffsetCurve)
|
||||
#include <Adaptor2d_GenHCurve2d.gxx>
|
||||
|
@@ -1,240 +0,0 @@
|
||||
-- Created on: 1994-02-14
|
||||
-- Created by: model
|
||||
-- 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.
|
||||
|
||||
deferred class HSurface from Adaptor3d
|
||||
|
||||
inherits TShared from MMgt
|
||||
|
||||
---Purpose: Root class for surfaces manipulated by handles, on
|
||||
-- which geometric algorithms work.
|
||||
-- An adapted surface is an interface between the
|
||||
-- services provided by a surface and those required of
|
||||
-- the surface by algorithms which use it.
|
||||
-- A derived concrete class is provided:
|
||||
-- GeomAdaptor_HSurface for a surface from the Geom package.
|
||||
|
||||
uses
|
||||
Array1OfReal from TColStd,
|
||||
Shape from GeomAbs,
|
||||
SurfaceType from GeomAbs,
|
||||
Vec from gp,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
Pln from gp,
|
||||
Cone from gp,
|
||||
Cylinder from gp,
|
||||
Sphere from gp,
|
||||
Torus from gp,
|
||||
Ax1 from gp,
|
||||
BezierSurface from Geom,
|
||||
BSplineSurface from Geom,
|
||||
Surface from Adaptor3d,
|
||||
HCurve from Adaptor3d
|
||||
|
||||
raises
|
||||
|
||||
OutOfRange from Standard,
|
||||
NoSuchObject from Standard,
|
||||
DomainError from Standard,
|
||||
NotImplemented from Standard
|
||||
|
||||
|
||||
is
|
||||
|
||||
|
||||
--
|
||||
-- Access to the surface
|
||||
--
|
||||
|
||||
Surface(me) returns Surface from Adaptor3d
|
||||
---Purpose: Returns a reference to the Surface inside the HSurface.
|
||||
--
|
||||
---C++: return const &
|
||||
is deferred;
|
||||
|
||||
|
||||
--
|
||||
-- Surface methods, they are provided for convenience. Each
|
||||
-- method M() is defined inline as :
|
||||
--
|
||||
-- Adaptor3d_HSurface::M() { Surface()->M(); }
|
||||
--
|
||||
-- See the class Surface for comments on the methods.
|
||||
--
|
||||
--
|
||||
|
||||
FirstUParameter(me) returns Real ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
LastUParameter(me) returns Real ;
|
||||
---C++: inline
|
||||
|
||||
FirstVParameter(me) returns Real ;
|
||||
---C++: inline
|
||||
|
||||
LastVParameter(me) returns Real ;
|
||||
---C++: inline
|
||||
|
||||
UContinuity(me) returns Shape from GeomAbs ;
|
||||
---C++: inline
|
||||
|
||||
VContinuity(me) returns Shape from GeomAbs ;
|
||||
---C++: inline
|
||||
|
||||
NbUIntervals(me ; S : Shape from GeomAbs) returns Integer ;
|
||||
---C++: inline
|
||||
|
||||
NbVIntervals(me ; S : Shape from GeomAbs) returns Integer ;
|
||||
---C++: inline
|
||||
|
||||
UIntervals(me ;T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs ) ;
|
||||
---C++: inline
|
||||
|
||||
VIntervals(me ; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs ) ;
|
||||
---C++: inline
|
||||
--
|
||||
UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d ;
|
||||
---C++: inline
|
||||
--
|
||||
VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d ;
|
||||
---C++: inline
|
||||
--
|
||||
IsUClosed(me) returns Boolean ;
|
||||
---C++: inline
|
||||
|
||||
IsVClosed(me) returns Boolean ;
|
||||
---C++: inline
|
||||
|
||||
IsUPeriodic(me) returns Boolean ;
|
||||
---C++: inline
|
||||
|
||||
UPeriod(me) returns Real ;
|
||||
---C++: inline
|
||||
|
||||
IsVPeriodic(me) returns Boolean ;
|
||||
---C++: inline
|
||||
|
||||
VPeriod(me) returns Real ;
|
||||
---C++: inline
|
||||
|
||||
Value (me; U, V : Real) returns Pnt from gp;
|
||||
---C++: inline
|
||||
|
||||
D0 (me; U, V : Real; P : out Pnt from gp) ;
|
||||
---C++: inline
|
||||
|
||||
D1 (me; U, V : Real; P : out Pnt from gp;
|
||||
D1U, D1V : out Vec from gp) ;
|
||||
---C++: inline
|
||||
|
||||
D2 (me; U, V : Real; P : out Pnt from gp;
|
||||
D1U, D1V, D2U, D2V, D2UV : out Vec from gp) ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
D3 (me; U, V : Real; P : out Pnt from gp;
|
||||
D1U, D1V, D2U, D2V, D2UV,
|
||||
D3U, D3V, D3UUV, D3UVV : out Vec from gp) ;
|
||||
---C++: inline
|
||||
|
||||
DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp ;
|
||||
---C++: inline
|
||||
|
||||
UResolution(me; R3d : Real ) returns Real ;
|
||||
---C++: inline
|
||||
|
||||
VResolution(me; R3d : Real ) returns Real ;
|
||||
---C++: inline
|
||||
|
||||
GetType(me) returns SurfaceType from GeomAbs ;
|
||||
---C++: inline
|
||||
|
||||
Plane(me) returns Pln from gp ;
|
||||
---C++: inline
|
||||
|
||||
Cylinder(me) returns Cylinder from gp ;
|
||||
---C++: inline
|
||||
|
||||
Cone(me) returns Cone from gp ;
|
||||
---C++: inline
|
||||
|
||||
Sphere(me) returns Sphere from gp ;
|
||||
---C++: inline
|
||||
|
||||
Torus(me) returns Torus from gp ;
|
||||
---C++: inline
|
||||
|
||||
UDegree(me) returns Integer ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
NbUPoles(me) returns Integer ;
|
||||
---C++: inline
|
||||
|
||||
VDegree(me) returns Integer ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
NbVPoles(me) returns Integer ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
|
||||
NbUKnots(me) returns Integer ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
NbVKnots(me) returns Integer ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
IsURational(me) returns Boolean ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
IsVRational(me) returns Boolean ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
Bezier(me) returns BezierSurface from Geom ;
|
||||
---C++: inline
|
||||
|
||||
BSpline(me) returns BSplineSurface from Geom ;
|
||||
---C++: inline
|
||||
|
||||
AxeOfRevolution(me) returns Ax1 from gp ;
|
||||
---C++: inline
|
||||
|
||||
Direction(me) returns Dir from gp ;
|
||||
---C++: inline
|
||||
|
||||
BasisCurve(me) returns HCurve from Adaptor3d ;
|
||||
---C++: inline
|
||||
|
||||
BasisSurface(me) returns HSurface from Adaptor3d;
|
||||
---C++: inline
|
||||
|
||||
OffsetValue(me) returns Real from Standard;
|
||||
---C++: inline
|
||||
|
||||
end HSurface;
|
||||
|
||||
|
||||
|
||||
|
@@ -11,5 +11,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_HSurface.ixx>
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
188
src/Adaptor3d/Adaptor3d_HSurface.hxx
Normal file
188
src/Adaptor3d/Adaptor3d_HSurface.hxx
Normal file
@@ -0,0 +1,188 @@
|
||||
// Created on: 1994-02-14
|
||||
// Created by: model
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_HSurface_HeaderFile
|
||||
#define _Adaptor3d_HSurface_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
#include <gp_Sphere.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Standard_NotImplemented;
|
||||
class Adaptor3d_Surface;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class Geom_BezierSurface;
|
||||
class Geom_BSplineSurface;
|
||||
class Adaptor3d_HCurve;
|
||||
|
||||
|
||||
class Adaptor3d_HSurface;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_HSurface, MMgt_TShared)
|
||||
|
||||
//! Root class for surfaces manipulated by handles, on
|
||||
//! which geometric algorithms work.
|
||||
//! An adapted surface is an interface between the
|
||||
//! services provided by a surface and those required of
|
||||
//! the surface by algorithms which use it.
|
||||
//! A derived concrete class is provided:
|
||||
//! GeomAdaptor_HSurface for a surface from the Geom package.
|
||||
class Adaptor3d_HSurface : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Returns a reference to the Surface inside the HSurface.
|
||||
Standard_EXPORT virtual const Adaptor3d_Surface& Surface() const = 0;
|
||||
|
||||
Standard_Real FirstUParameter() const;
|
||||
|
||||
Standard_Real LastUParameter() const;
|
||||
|
||||
Standard_Real FirstVParameter() const;
|
||||
|
||||
Standard_Real LastVParameter() const;
|
||||
|
||||
GeomAbs_Shape UContinuity() const;
|
||||
|
||||
GeomAbs_Shape VContinuity() const;
|
||||
|
||||
Standard_Integer NbUIntervals (const GeomAbs_Shape S) const;
|
||||
|
||||
Standard_Integer NbVIntervals (const GeomAbs_Shape S) const;
|
||||
|
||||
void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
|
||||
|
||||
void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
|
||||
|
||||
Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
|
||||
|
||||
Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
|
||||
|
||||
Standard_Boolean IsUClosed() const;
|
||||
|
||||
Standard_Boolean IsVClosed() const;
|
||||
|
||||
Standard_Boolean IsUPeriodic() const;
|
||||
|
||||
Standard_Real UPeriod() const;
|
||||
|
||||
Standard_Boolean IsVPeriodic() const;
|
||||
|
||||
Standard_Real VPeriod() const;
|
||||
|
||||
gp_Pnt Value (const Standard_Real U, const Standard_Real V) const;
|
||||
|
||||
void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const;
|
||||
|
||||
void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const;
|
||||
|
||||
void D2 (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) const;
|
||||
|
||||
void D3 (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) const;
|
||||
|
||||
gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const;
|
||||
|
||||
Standard_Real UResolution (const Standard_Real R3d) const;
|
||||
|
||||
Standard_Real VResolution (const Standard_Real R3d) const;
|
||||
|
||||
GeomAbs_SurfaceType GetType() const;
|
||||
|
||||
gp_Pln Plane() const;
|
||||
|
||||
gp_Cylinder Cylinder() const;
|
||||
|
||||
gp_Cone Cone() const;
|
||||
|
||||
gp_Sphere Sphere() const;
|
||||
|
||||
gp_Torus Torus() const;
|
||||
|
||||
Standard_Integer UDegree() const;
|
||||
|
||||
Standard_Integer NbUPoles() const;
|
||||
|
||||
Standard_Integer VDegree() const;
|
||||
|
||||
Standard_Integer NbVPoles() const;
|
||||
|
||||
Standard_Integer NbUKnots() const;
|
||||
|
||||
Standard_Integer NbVKnots() const;
|
||||
|
||||
Standard_Boolean IsURational() const;
|
||||
|
||||
Standard_Boolean IsVRational() const;
|
||||
|
||||
Handle(Geom_BezierSurface) Bezier() const;
|
||||
|
||||
Handle(Geom_BSplineSurface) BSpline() const;
|
||||
|
||||
gp_Ax1 AxeOfRevolution() const;
|
||||
|
||||
gp_Dir Direction() const;
|
||||
|
||||
Handle(Adaptor3d_HCurve) BasisCurve() const;
|
||||
|
||||
Handle(Adaptor3d_HSurface) BasisSurface() const;
|
||||
|
||||
Standard_Real OffsetValue() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Adaptor3d_HSurface,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Adaptor3d_HSurface.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_HSurface_HeaderFile
|
87
src/Adaptor3d/Adaptor3d_HSurfaceOfLinearExtrusion.hxx
Normal file
87
src/Adaptor3d/Adaptor3d_HSurfaceOfLinearExtrusion.hxx
Normal file
@@ -0,0 +1,87 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_HSurfaceOfLinearExtrusion_HeaderFile
|
||||
#define _Adaptor3d_HSurfaceOfLinearExtrusion_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Adaptor3d_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_SurfaceOfLinearExtrusion;
|
||||
class Adaptor3d_Surface;
|
||||
|
||||
|
||||
class Adaptor3d_HSurfaceOfLinearExtrusion;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_HSurfaceOfLinearExtrusion, Adaptor3d_HSurface)
|
||||
|
||||
|
||||
class Adaptor3d_HSurfaceOfLinearExtrusion : public Adaptor3d_HSurface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_HSurfaceOfLinearExtrusion();
|
||||
|
||||
Standard_EXPORT Adaptor3d_HSurfaceOfLinearExtrusion(const Adaptor3d_SurfaceOfLinearExtrusion& S);
|
||||
|
||||
Standard_EXPORT void Set (const Adaptor3d_SurfaceOfLinearExtrusion& S);
|
||||
|
||||
Standard_EXPORT const Adaptor3d_Surface& Surface() const;
|
||||
|
||||
Adaptor3d_SurfaceOfLinearExtrusion& ChangeSurface();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Adaptor3d_HSurfaceOfLinearExtrusion,Adaptor3d_HSurface)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Adaptor3d_SurfaceOfLinearExtrusion mySurf;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define TheSurface Adaptor3d_SurfaceOfLinearExtrusion
|
||||
#define TheSurface_hxx <Adaptor3d_SurfaceOfLinearExtrusion.hxx>
|
||||
#define Adaptor3d_GenHSurface Adaptor3d_HSurfaceOfLinearExtrusion
|
||||
#define Adaptor3d_GenHSurface_hxx <Adaptor3d_HSurfaceOfLinearExtrusion.hxx>
|
||||
#define Handle_Adaptor3d_GenHSurface Handle(Adaptor3d_HSurfaceOfLinearExtrusion)
|
||||
|
||||
#include <Adaptor3d_GenHSurface.lxx>
|
||||
|
||||
#undef TheSurface
|
||||
#undef TheSurface_hxx
|
||||
#undef Adaptor3d_GenHSurface
|
||||
#undef Adaptor3d_GenHSurface_hxx
|
||||
#undef Handle_Adaptor3d_GenHSurface
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_HSurfaceOfLinearExtrusion_HeaderFile
|
42
src/Adaptor3d/Adaptor3d_HSurfaceOfLinearExtrusion_0.cxx
Normal file
42
src/Adaptor3d/Adaptor3d_HSurfaceOfLinearExtrusion_0.cxx
Normal file
@@ -0,0 +1,42 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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 <Adaptor3d_HSurfaceOfLinearExtrusion.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Adaptor3d_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheSurface Adaptor3d_SurfaceOfLinearExtrusion
|
||||
#define TheSurface_hxx <Adaptor3d_SurfaceOfLinearExtrusion.hxx>
|
||||
#define Adaptor3d_GenHSurface Adaptor3d_HSurfaceOfLinearExtrusion
|
||||
#define Adaptor3d_GenHSurface_hxx <Adaptor3d_HSurfaceOfLinearExtrusion.hxx>
|
||||
#define Handle_Adaptor3d_GenHSurface Handle(Adaptor3d_HSurfaceOfLinearExtrusion)
|
||||
#include <Adaptor3d_GenHSurface.gxx>
|
||||
|
87
src/Adaptor3d/Adaptor3d_HSurfaceOfRevolution.hxx
Normal file
87
src/Adaptor3d/Adaptor3d_HSurfaceOfRevolution.hxx
Normal file
@@ -0,0 +1,87 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_HSurfaceOfRevolution_HeaderFile
|
||||
#define _Adaptor3d_HSurfaceOfRevolution_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Adaptor3d_SurfaceOfRevolution.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_SurfaceOfRevolution;
|
||||
class Adaptor3d_Surface;
|
||||
|
||||
|
||||
class Adaptor3d_HSurfaceOfRevolution;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_HSurfaceOfRevolution, Adaptor3d_HSurface)
|
||||
|
||||
|
||||
class Adaptor3d_HSurfaceOfRevolution : public Adaptor3d_HSurface
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_HSurfaceOfRevolution();
|
||||
|
||||
Standard_EXPORT Adaptor3d_HSurfaceOfRevolution(const Adaptor3d_SurfaceOfRevolution& S);
|
||||
|
||||
Standard_EXPORT void Set (const Adaptor3d_SurfaceOfRevolution& S);
|
||||
|
||||
Standard_EXPORT const Adaptor3d_Surface& Surface() const;
|
||||
|
||||
Adaptor3d_SurfaceOfRevolution& ChangeSurface();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Adaptor3d_HSurfaceOfRevolution,Adaptor3d_HSurface)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Adaptor3d_SurfaceOfRevolution mySurf;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define TheSurface Adaptor3d_SurfaceOfRevolution
|
||||
#define TheSurface_hxx <Adaptor3d_SurfaceOfRevolution.hxx>
|
||||
#define Adaptor3d_GenHSurface Adaptor3d_HSurfaceOfRevolution
|
||||
#define Adaptor3d_GenHSurface_hxx <Adaptor3d_HSurfaceOfRevolution.hxx>
|
||||
#define Handle_Adaptor3d_GenHSurface Handle(Adaptor3d_HSurfaceOfRevolution)
|
||||
|
||||
#include <Adaptor3d_GenHSurface.lxx>
|
||||
|
||||
#undef TheSurface
|
||||
#undef TheSurface_hxx
|
||||
#undef Adaptor3d_GenHSurface
|
||||
#undef Adaptor3d_GenHSurface_hxx
|
||||
#undef Handle_Adaptor3d_GenHSurface
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_HSurfaceOfRevolution_HeaderFile
|
42
src/Adaptor3d/Adaptor3d_HSurfaceOfRevolution_0.cxx
Normal file
42
src/Adaptor3d/Adaptor3d_HSurfaceOfRevolution_0.cxx
Normal file
@@ -0,0 +1,42 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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 <Adaptor3d_HSurfaceOfRevolution.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Adaptor3d_SurfaceOfRevolution.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheSurface Adaptor3d_SurfaceOfRevolution
|
||||
#define TheSurface_hxx <Adaptor3d_SurfaceOfRevolution.hxx>
|
||||
#define Adaptor3d_GenHSurface Adaptor3d_HSurfaceOfRevolution
|
||||
#define Adaptor3d_GenHSurface_hxx <Adaptor3d_HSurfaceOfRevolution.hxx>
|
||||
#define Handle_Adaptor3d_GenHSurface Handle(Adaptor3d_HSurfaceOfRevolution)
|
||||
#include <Adaptor3d_GenHSurface.gxx>
|
||||
|
@@ -1,245 +0,0 @@
|
||||
-- Created on: 1993-07-02
|
||||
-- Created by: Laurent BUCHARD
|
||||
-- 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 HSurfaceTool from Adaptor3d
|
||||
|
||||
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: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
FirstVParameter(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
LastUParameter(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
LastVParameter(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
|
||||
|
||||
NbUIntervals(myclass; S: HSurface from Adaptor3d;
|
||||
Sh : Shape from GeomAbs)
|
||||
---C++: inline
|
||||
returns Integer from Standard;
|
||||
|
||||
NbVIntervals(myclass; S: HSurface from Adaptor3d;
|
||||
Sh : Shape from GeomAbs)
|
||||
---C++: inline
|
||||
returns Integer from Standard;
|
||||
|
||||
|
||||
|
||||
UIntervals(myclass; S : HSurface from Adaptor3d;
|
||||
T : in out Array1OfReal from TColStd;
|
||||
Sh : Shape from GeomAbs);
|
||||
---C++: inline
|
||||
|
||||
VIntervals(myclass; S : HSurface from Adaptor3d;
|
||||
T : in out Array1OfReal from TColStd;
|
||||
Sh : Shape from GeomAbs) ;
|
||||
---C++: inline
|
||||
|
||||
|
||||
UTrim(myclass; S : HSurface from Adaptor3d;
|
||||
First, Last, Tol : Real)
|
||||
---C++: inline
|
||||
returns HSurface from Adaptor3d
|
||||
raises
|
||||
OutOfRange from Standard;
|
||||
---Purpose: If <First> >= <Last>
|
||||
|
||||
VTrim(myclass; S : HSurface from Adaptor3d;
|
||||
First, Last, Tol : Real)
|
||||
---C++: inline
|
||||
returns HSurface from Adaptor3d
|
||||
raises
|
||||
OutOfRange from Standard;
|
||||
---Purpose: If <First> >= <Last>
|
||||
|
||||
|
||||
IsUClosed(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
IsVClosed(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
|
||||
IsUPeriodic(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
UPeriod(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
IsVPeriodic(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Boolean from Standard;
|
||||
|
||||
VPeriod(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
|
||||
|
||||
Value(myclass; S : HSurface from Adaptor3d;
|
||||
u,v : Real from Standard)
|
||||
---C++: inline
|
||||
returns Pnt from gp;
|
||||
|
||||
D0(myclass; S : HSurface from Adaptor3d;
|
||||
u,v : Real from Standard;
|
||||
P : out Pnt from gp);
|
||||
---C++: inline
|
||||
|
||||
D1(myclass; S : HSurface from Adaptor3d;
|
||||
u,v : Real from Standard;
|
||||
P : out Pnt from gp;
|
||||
D1u,D1v: out Vec from gp);
|
||||
---C++: inline
|
||||
|
||||
D2(myclass; S : HSurface from Adaptor3d;
|
||||
u,v : Real from Standard;
|
||||
P : out Pnt from gp;
|
||||
D1U,D1V,D2U,D2V,D2UV: out Vec from gp);
|
||||
---C++: inline
|
||||
|
||||
D3(myclass; S : HSurface from Adaptor3d;
|
||||
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 : HSurface from Adaptor3d;
|
||||
u,v : Real from Standard;
|
||||
Nu,Nv : Integer from Standard)
|
||||
---C++: inline
|
||||
returns Vec from gp;
|
||||
|
||||
|
||||
|
||||
UResolution(myclass; S:HSurface from Adaptor3d; R3d: Real from Standard)
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
VResolution(myclass; S:HSurface from Adaptor3d; R3d: Real from Standard)
|
||||
---C++: inline
|
||||
returns Real from Standard;
|
||||
|
||||
GetType(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns SurfaceType from GeomAbs;
|
||||
|
||||
|
||||
Plane(myclass; S: HSurface from Adaptor3d)
|
||||
---C++: inline
|
||||
returns Pln from gp;
|
||||
|
||||
Cylinder(myclass; S : HSurface from Adaptor3d) returns Cylinder from gp
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
|
||||
Cone(myclass; S : HSurface from Adaptor3d) returns Cone from gp
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
Torus(myclass; S : HSurface from Adaptor3d) returns Torus from gp
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
|
||||
Sphere(myclass; S : HSurface from Adaptor3d) returns Sphere from gp
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
Bezier(myclass; S : HSurface from Adaptor3d) returns BezierSurface from Geom
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
BSpline(myclass; S : HSurface from Adaptor3d) returns BSplineSurface from Geom
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
AxeOfRevolution(myclass; S: HSurface from Adaptor3d) returns Ax1 from gp
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
Direction(myclass; S: HSurface from Adaptor3d) returns Dir from gp
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
BasisCurve(myclass; S:HSurface from Adaptor3d) returns HCurve from Adaptor3d
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
BasisSurface(myclass; S:HSurface from Adaptor3d) returns HSurface from Adaptor3d
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
OffsetValue(myclass; S:HSurface from Adaptor3d) returns Real from Standard
|
||||
raises NoSuchObject from Standard;
|
||||
---C++: inline
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
NbSamplesU(myclass; S : HSurface from Adaptor3d) returns Integer from Standard;
|
||||
|
||||
|
||||
NbSamplesV(myclass; S : HSurface from Adaptor3d) returns Integer from Standard;
|
||||
|
||||
|
||||
NbSamplesU(myclass; S : HSurface from Adaptor3d; u1,u2: Real from Standard) returns Integer from Standard;
|
||||
|
||||
|
||||
NbSamplesV(myclass; S : HSurface from Adaptor3d; v1,v2: Real from Standard) returns Integer from Standard;
|
||||
|
||||
|
||||
end HSurfaceTool;
|
@@ -13,7 +13,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_HSurfaceTool.ixx>
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_HSurfaceTool.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
Standard_Integer Adaptor3d_HSurfaceTool::NbSamplesU(const Handle(Adaptor3d_HSurface)& S)
|
||||
{
|
||||
|
165
src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx
Normal file
165
src/Adaptor3d/Adaptor3d_HSurfaceTool.hxx
Normal file
@@ -0,0 +1,165 @@
|
||||
// Created on: 1993-07-02
|
||||
// Created by: Laurent BUCHARD
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Adaptor3d_HSurfaceTool_HeaderFile
|
||||
#define _Adaptor3d_HSurfaceTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <GeomAbs_SurfaceType.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>
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_OutOfRange;
|
||||
class Adaptor3d_HSurface;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class Geom_BezierSurface;
|
||||
class Geom_BSplineSurface;
|
||||
class Adaptor3d_HCurve;
|
||||
|
||||
|
||||
|
||||
class Adaptor3d_HSurfaceTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
static Standard_Real FirstUParameter (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Real FirstVParameter (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Real LastUParameter (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Real LastVParameter (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Integer NbUIntervals (const Handle(Adaptor3d_HSurface)& S, const GeomAbs_Shape Sh);
|
||||
|
||||
static Standard_Integer NbVIntervals (const Handle(Adaptor3d_HSurface)& S, const GeomAbs_Shape Sh);
|
||||
|
||||
static void UIntervals (const Handle(Adaptor3d_HSurface)& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
|
||||
|
||||
static void VIntervals (const Handle(Adaptor3d_HSurface)& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
|
||||
|
||||
//! If <First> >= <Last>
|
||||
static Handle(Adaptor3d_HSurface) UTrim (const Handle(Adaptor3d_HSurface)& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
|
||||
//! If <First> >= <Last>
|
||||
static Handle(Adaptor3d_HSurface) VTrim (const Handle(Adaptor3d_HSurface)& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
|
||||
static Standard_Boolean IsUClosed (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Boolean IsVClosed (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Boolean IsUPeriodic (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Real UPeriod (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Boolean IsVPeriodic (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Real VPeriod (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static gp_Pnt Value (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v);
|
||||
|
||||
static void D0 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P);
|
||||
|
||||
static void D1 (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, gp_Pnt& P, gp_Vec& D1u, gp_Vec& D1v);
|
||||
|
||||
static void D2 (const Handle(Adaptor3d_HSurface)& 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);
|
||||
|
||||
static void D3 (const Handle(Adaptor3d_HSurface)& 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);
|
||||
|
||||
static gp_Vec DN (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u, const Standard_Real v, const Standard_Integer Nu, const Standard_Integer Nv);
|
||||
|
||||
static Standard_Real UResolution (const Handle(Adaptor3d_HSurface)& S, const Standard_Real R3d);
|
||||
|
||||
static Standard_Real VResolution (const Handle(Adaptor3d_HSurface)& S, const Standard_Real R3d);
|
||||
|
||||
static GeomAbs_SurfaceType GetType (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static gp_Pln Plane (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static gp_Cylinder Cylinder (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static gp_Cone Cone (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static gp_Torus Torus (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static gp_Sphere Sphere (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Handle(Geom_BezierSurface) Bezier (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Handle(Geom_BSplineSurface) BSpline (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static gp_Ax1 AxeOfRevolution (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static gp_Dir Direction (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Handle(Adaptor3d_HCurve) BasisCurve (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Handle(Adaptor3d_HSurface) BasisSurface (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
static Standard_Real OffsetValue (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_HSurface)& S, const Standard_Real u1, const Standard_Real u2);
|
||||
|
||||
Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_HSurface)& S, const Standard_Real v1, const Standard_Real v2);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Adaptor3d_HSurfaceTool.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_HSurfaceTool_HeaderFile
|
@@ -1,79 +0,0 @@
|
||||
-- Created on: 1994-03-25
|
||||
-- Created by: model
|
||||
-- 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 HVertex from Adaptor3d
|
||||
|
||||
---Purpose:
|
||||
|
||||
|
||||
inherits TShared from MMgt
|
||||
|
||||
uses Pnt2d from gp,
|
||||
Orientation from TopAbs,
|
||||
HCurve2d from Adaptor2d
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
|
||||
returns HVertex from Adaptor3d;
|
||||
|
||||
|
||||
Create(P: Pnt2d from gp; Ori: Orientation from TopAbs;
|
||||
Resolution: Real from Standard)
|
||||
|
||||
returns HVertex from Adaptor3d;
|
||||
|
||||
|
||||
Value(me: mutable)
|
||||
|
||||
returns Pnt2d from gp
|
||||
is virtual;
|
||||
|
||||
|
||||
Parameter(me: mutable; C: HCurve2d from Adaptor2d)
|
||||
|
||||
returns Real from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Resolution(me: mutable; C: HCurve2d from Adaptor2d)
|
||||
|
||||
---Purpose: Parametric resolution (2d).
|
||||
|
||||
returns Real from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Orientation(me: mutable)
|
||||
|
||||
returns Orientation from TopAbs
|
||||
is virtual;
|
||||
|
||||
|
||||
IsSame(me: mutable; Other: like me)
|
||||
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
fields
|
||||
|
||||
myPnt : Pnt2d from gp;
|
||||
myTol : Real from Standard;
|
||||
myOri : Orientation from TopAbs;
|
||||
|
||||
end HVertex;
|
@@ -11,12 +11,13 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_HVertex.ixx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <Adaptor2d_HCurve2d.hxx>
|
||||
|
||||
#include <Adaptor3d_HVertex.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
Adaptor3d_HVertex::Adaptor3d_HVertex ()
|
||||
{}
|
||||
|
83
src/Adaptor3d/Adaptor3d_HVertex.hxx
Normal file
83
src/Adaptor3d/Adaptor3d_HVertex.hxx
Normal file
@@ -0,0 +1,83 @@
|
||||
// Created on: 1994-03-25
|
||||
// Created by: model
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_HVertex_HeaderFile
|
||||
#define _Adaptor3d_HVertex_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class gp_Pnt2d;
|
||||
class Adaptor2d_HCurve2d;
|
||||
|
||||
|
||||
class Adaptor3d_HVertex;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_HVertex, MMgt_TShared)
|
||||
|
||||
|
||||
class Adaptor3d_HVertex : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_HVertex();
|
||||
|
||||
Standard_EXPORT Adaptor3d_HVertex(const gp_Pnt2d& P, const TopAbs_Orientation Ori, const Standard_Real Resolution);
|
||||
|
||||
Standard_EXPORT virtual gp_Pnt2d Value();
|
||||
|
||||
Standard_EXPORT virtual Standard_Real Parameter (const Handle(Adaptor2d_HCurve2d)& C);
|
||||
|
||||
//! Parametric resolution (2d).
|
||||
Standard_EXPORT virtual Standard_Real Resolution (const Handle(Adaptor2d_HCurve2d)& C);
|
||||
|
||||
Standard_EXPORT virtual TopAbs_Orientation Orientation();
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsSame (const Handle(Adaptor3d_HVertex)& Other);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Adaptor3d_HVertex,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
gp_Pnt2d myPnt;
|
||||
Standard_Real myTol;
|
||||
TopAbs_Orientation myOri;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_HVertex_HeaderFile
|
@@ -1,72 +0,0 @@
|
||||
-- Created on: 1998-02-18
|
||||
-- Created by: Jeanine PANCIATICI
|
||||
-- Copyright (c) 1998-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.
|
||||
|
||||
private class InterFunc from Adaptor3d inherits FunctionWithDerivative from math
|
||||
|
||||
---Purpose: Used to find the points U(t) = U0 or V(t) = V0 in
|
||||
-- order to determine the Cn discontinuities of an
|
||||
-- Adpator_CurveOnSurface relativly to the
|
||||
-- discontinuities of the surface. Used to
|
||||
-- find the roots of the functions
|
||||
|
||||
uses
|
||||
HCurve2d from Adaptor2d
|
||||
|
||||
raises ConstructionError
|
||||
|
||||
is
|
||||
Create (C : HCurve2d from Adaptor2d; FixVal: Real from Standard;
|
||||
Fix: Integer)
|
||||
returns InterFunc
|
||||
raises ConstructionError from Standard;
|
||||
---Purpose: build the function U(t)=FixVal if Fix =1 or
|
||||
-- V(t)=FixVal if Fix=2
|
||||
|
||||
Value(me: in out; X: Real; F: out Real)
|
||||
---Purpose: computes the value <F>of the function for the variable <X>.
|
||||
-- Returns True if the calculation were successfully done,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean;
|
||||
|
||||
|
||||
Derivative(me: in out; X: Real; D: out Real)
|
||||
---Purpose: computes the derivative <D> of the function
|
||||
-- for the variable <X>.
|
||||
-- Returns True if the calculation were successfully done,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean;
|
||||
|
||||
|
||||
Values(me: in out; X: Real; F, D: out Real)
|
||||
---Purpose: computes the value <F> and the derivative <D> of the
|
||||
-- function for the variable <X>.
|
||||
-- Returns True if the calculation were successfully done,
|
||||
-- False otherwise.
|
||||
|
||||
returns Boolean;
|
||||
|
||||
fields
|
||||
|
||||
myCurve2d : HCurve2d from Adaptor2d;
|
||||
myFixVal : Real from Standard;
|
||||
myFix : Integer from Standard;
|
||||
|
||||
|
||||
|
||||
end InterFunc;
|
||||
|
@@ -14,10 +14,12 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_InterFunc.ixx>
|
||||
|
||||
#include <Adaptor2d_HCurve2d.hxx>
|
||||
#include <Adaptor3d_InterFunc.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
Adaptor3d_InterFunc::Adaptor3d_InterFunc(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix) : myCurve2d(C),myFixVal(FixVal),myFix(Fix)
|
||||
{
|
||||
|
91
src/Adaptor3d/Adaptor3d_InterFunc.hxx
Normal file
91
src/Adaptor3d/Adaptor3d_InterFunc.hxx
Normal file
@@ -0,0 +1,91 @@
|
||||
// Created on: 1998-02-18
|
||||
// Created by: Jeanine PANCIATICI
|
||||
// Copyright (c) 1998-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Adaptor3d_InterFunc_HeaderFile
|
||||
#define _Adaptor3d_InterFunc_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <math_FunctionWithDerivative.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Adaptor2d_HCurve2d;
|
||||
class Standard_ConstructionError;
|
||||
|
||||
|
||||
//! Used to find the points U(t) = U0 or V(t) = V0 in
|
||||
//! order to determine the Cn discontinuities of an
|
||||
//! Adpator_CurveOnSurface relativly to the
|
||||
//! discontinuities of the surface. Used to
|
||||
//! find the roots of the functions
|
||||
class Adaptor3d_InterFunc : public math_FunctionWithDerivative
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! build the function U(t)=FixVal if Fix =1 or
|
||||
//! V(t)=FixVal if Fix=2
|
||||
Standard_EXPORT Adaptor3d_InterFunc(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real FixVal, const Standard_Integer Fix);
|
||||
|
||||
//! computes the value <F>of the function for the variable <X>.
|
||||
//! Returns True if the calculation were successfully done,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F);
|
||||
|
||||
//! computes the derivative <D> of the function
|
||||
//! for the variable <X>.
|
||||
//! Returns True if the calculation were successfully done,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real X, Standard_Real& D);
|
||||
|
||||
//! computes the value <F> and the derivative <D> of the
|
||||
//! function for the variable <X>.
|
||||
//! Returns True if the calculation were successfully done,
|
||||
//! False otherwise.
|
||||
Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& D);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Adaptor2d_HCurve2d) myCurve2d;
|
||||
Standard_Real myFixVal;
|
||||
Standard_Integer myFix;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_InterFunc_HeaderFile
|
@@ -1,300 +0,0 @@
|
||||
-- Created on: 1993-03-11
|
||||
-- Created by: Isabelle GRIGNON
|
||||
-- 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.
|
||||
|
||||
-- modified 01-1994 by rob (time comsumption)
|
||||
|
||||
|
||||
class IsoCurve from Adaptor3d inherits Curve from Adaptor3d
|
||||
|
||||
---Purpose: Defines an isoparametric curve on a surface. The
|
||||
-- type of isoparametric curve (U or V) is defined
|
||||
-- with the enumeration IsoType from GeomAbs if
|
||||
-- NoneIso is given an error is raised.
|
||||
|
||||
uses
|
||||
Array1OfReal from TColStd,
|
||||
IsoType from GeomAbs,
|
||||
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,
|
||||
HSurface from Adaptor3d
|
||||
|
||||
raises
|
||||
NoSuchObject from Standard,
|
||||
OutOfRange from Standard,
|
||||
DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
--
|
||||
-- Methods specific of IsoCurve
|
||||
--
|
||||
|
||||
Create returns IsoCurve from Adaptor3d;
|
||||
---Purpose: The iso is set to NoneIso.
|
||||
|
||||
Create(S : HSurface from Adaptor3d) returns IsoCurve from Adaptor3d;
|
||||
---Purpose: The surface is loaded. The iso is set to NoneIso.
|
||||
|
||||
Create(S : HSurface from Adaptor3d;
|
||||
Iso : IsoType from GeomAbs; Param : Real)
|
||||
returns IsoCurve from Adaptor3d;
|
||||
---Purpose: Creates an IsoCurve curve. Iso defines the
|
||||
-- type (isoU or isoU) Param defines the value of
|
||||
-- the iso. The bounds of the iso are the bounds
|
||||
-- of the surface.
|
||||
|
||||
Create(S : HSurface from Adaptor3d;
|
||||
Iso : IsoType from GeomAbs; Param : Real; WFirst,WLast : Real)
|
||||
returns IsoCurve from Adaptor3d;
|
||||
---Purpose: Create an IsoCurve curve. Iso defines the type
|
||||
-- (isoU or isov). Param defines the value of the
|
||||
-- iso. WFirst,WLast define the bounds of the iso.
|
||||
|
||||
|
||||
Load( me:in out ;S : HSurface from Adaptor3d)
|
||||
---Purpose: Changes the surface. The iso is reset to
|
||||
-- NoneIso.
|
||||
is static;
|
||||
|
||||
Load (me : in out ; Iso : IsoType from GeomAbs; Param : Real)
|
||||
---Purpose: Changes the iso on the current surface.
|
||||
is static;
|
||||
|
||||
Load (me : in out ;
|
||||
Iso : IsoType from GeomAbs; Param : Real; WFirst,WLast : Real)
|
||||
---Purpose: Changes the iso on the current surface.
|
||||
is static;
|
||||
|
||||
Surface(me) returns HSurface from Adaptor3d
|
||||
---C++: inline
|
||||
---C++: return const &
|
||||
is static;
|
||||
|
||||
Iso(me) returns IsoType from GeomAbs
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
Parameter(me) returns Real
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
--
|
||||
-- Implementation of Curve from Adaptor3d methods
|
||||
--
|
||||
|
||||
--
|
||||
-- Global methods - Apply to the whole curve.
|
||||
--
|
||||
|
||||
FirstParameter(me) returns Real
|
||||
---C++: inline
|
||||
is redefined static;
|
||||
|
||||
LastParameter(me) returns Real
|
||||
---C++: inline
|
||||
is redefined static;
|
||||
|
||||
Continuity(me) returns Shape from GeomAbs
|
||||
is redefined static;
|
||||
|
||||
NbIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of intervals for continuity
|
||||
-- <S>. May be one if Continuity(me) >= <S>
|
||||
is redefined static;
|
||||
|
||||
Intervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
--
|
||||
-- The array must provide enough room to accomodate
|
||||
-- for the parameters. i.e. T.Length() > NbIntervals()
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
is redefined static;
|
||||
|
||||
Trim(me; First, Last, Tol : Real) returns HCurve from Adaptor3d
|
||||
---Purpose: Returns a curve equivalent of <me> between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is redefined static;
|
||||
|
||||
|
||||
IsClosed(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
IsPeriodic(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
Period(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is redefined static;
|
||||
|
||||
Value(me; U : Real) returns Pnt from gp
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
is redefined static;
|
||||
|
||||
D0 (me; U : Real; P : out Pnt from gp)
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
is redefined static;
|
||||
|
||||
D1 (me; 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.
|
||||
is redefined static;
|
||||
|
||||
D2 (me; 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.
|
||||
is redefined static;
|
||||
|
||||
D3 (me; 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.
|
||||
is redefined static;
|
||||
|
||||
DN (me; 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.
|
||||
is redefined static;
|
||||
|
||||
Resolution(me; R3d : Real) returns Real
|
||||
---Purpose : Returns the parametric resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is redefined static;
|
||||
|
||||
GetType(me) returns CurveType from GeomAbs
|
||||
---Purpose: Returns the type of the curve in the current
|
||||
-- interval : Line, Circle, Ellipse, Hyperbola,
|
||||
-- Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
is redefined static;
|
||||
|
||||
--
|
||||
-- The following methods must be called when GetType returned
|
||||
-- the corresponding type.
|
||||
--
|
||||
|
||||
Line(me) returns Lin from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Circle(me) returns Circ from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Ellipse(me) returns Elips from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Hyperbola(me) returns Hypr from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Parabola(me) returns Parab from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
|
||||
Degree(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
IsRational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
NbPoles(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
NbKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Bezier(me) returns BezierCurve from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
BSpline(me) returns BSplineCurve from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
fields
|
||||
|
||||
mySurface : HSurface from Adaptor3d;
|
||||
myIso : IsoType from GeomAbs;
|
||||
myFirst : Real;
|
||||
myLast : Real;
|
||||
myParameter : Real;
|
||||
end IsoCurve;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -11,32 +11,41 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_IsoCurve.ixx>
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_HIsoCurve.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_HSurfaceOfRevolution.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Adaptor3d_IsoCurve.hxx>
|
||||
#include <BSplCLib.hxx>
|
||||
#include <BSplSLib.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <gp_Circ.hxx>
|
||||
#include <gp_Elips.hxx>
|
||||
#include <gp_Hypr.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Parab.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array2OfPnt.hxx>
|
||||
#include <Geom_BezierCurve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Adaptor3d_IsoCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve()
|
||||
: myIso (GeomAbs_NoneIso),
|
||||
myFirst (0.0),
|
||||
|
215
src/Adaptor3d/Adaptor3d_IsoCurve.hxx
Normal file
215
src/Adaptor3d/Adaptor3d_IsoCurve.hxx
Normal file
@@ -0,0 +1,215 @@
|
||||
// Created on: 1993-03-11
|
||||
// Created by: Isabelle GRIGNON
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Adaptor3d_IsoCurve_HeaderFile
|
||||
#define _Adaptor3d_IsoCurve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GeomAbs_IsoType.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
class Adaptor3d_HSurface;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_HCurve;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class gp_Lin;
|
||||
class gp_Circ;
|
||||
class gp_Elips;
|
||||
class gp_Hypr;
|
||||
class gp_Parab;
|
||||
class Geom_BezierCurve;
|
||||
class Geom_BSplineCurve;
|
||||
|
||||
|
||||
//! Defines an isoparametric curve on a surface. The
|
||||
//! type of isoparametric curve (U or V) is defined
|
||||
//! with the enumeration IsoType from GeomAbs if
|
||||
//! NoneIso is given an error is raised.
|
||||
class Adaptor3d_IsoCurve : public Adaptor3d_Curve
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! The iso is set to NoneIso.
|
||||
Standard_EXPORT Adaptor3d_IsoCurve();
|
||||
|
||||
//! The surface is loaded. The iso is set to NoneIso.
|
||||
Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
//! Creates an IsoCurve curve. Iso defines the
|
||||
//! type (isoU or isoU) Param defines the value of
|
||||
//! the iso. The bounds of the iso are the bounds
|
||||
//! of the surface.
|
||||
Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param);
|
||||
|
||||
//! Create an IsoCurve curve. Iso defines the type
|
||||
//! (isoU or isov). Param defines the value of the
|
||||
//! iso. WFirst,WLast define the bounds of the iso.
|
||||
Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast);
|
||||
|
||||
//! Changes the surface. The iso is reset to
|
||||
//! NoneIso.
|
||||
Standard_EXPORT void Load (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
//! Changes the iso on the current surface.
|
||||
Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param);
|
||||
|
||||
//! Changes the iso on the current surface.
|
||||
Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast);
|
||||
|
||||
const Handle(Adaptor3d_HSurface)& Surface() const;
|
||||
|
||||
GeomAbs_IsoType Iso() const;
|
||||
|
||||
Standard_Real Parameter() const;
|
||||
|
||||
Standard_Real FirstParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_Real LastParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the number of intervals for continuity
|
||||
//! <S>. May be one if Continuity(me) >= <S>
|
||||
Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! of continuity <S>.
|
||||
//!
|
||||
//! The array must provide enough room to accomodate
|
||||
//! for the parameters. i.e. T.Length() > NbIntervals()
|
||||
Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a curve equivalent of <me> between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT Handle(Adaptor3d_HCurve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameter U on the curve with its
|
||||
//! first derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C1.
|
||||
Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Returns the point P of parameter U, the first and second
|
||||
//! derivatives V1 and V2.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C2.
|
||||
Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Returns the point P of parameter U, the first, the second
|
||||
//! and the third derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C3.
|
||||
Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! The returned vector gives the value of the derivative for the
|
||||
//! order of derivation N.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not CN.
|
||||
//! Raised if N < 1.
|
||||
Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the parametric resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the type of the curve in the current
|
||||
//! interval : Line, Circle, Ellipse, Hyperbola,
|
||||
//! Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Adaptor3d_HSurface) mySurface;
|
||||
GeomAbs_IsoType myIso;
|
||||
Standard_Real myFirst;
|
||||
Standard_Real myLast;
|
||||
Standard_Real myParameter;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Adaptor3d_IsoCurve.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_IsoCurve_HeaderFile
|
@@ -1,277 +0,0 @@
|
||||
-- Created on: 1993-04-15
|
||||
-- Created by: Bruno DUMORTIER
|
||||
-- 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 OffsetCurve from Adaptor3d inherits Curve2d from Adaptor2d
|
||||
|
||||
---Purpose: Defines an Offset curve (algorithmic 2d curve).
|
||||
--
|
||||
|
||||
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
|
||||
NoSuchObject from Standard,
|
||||
DomainError from Standard,
|
||||
OutOfRange from Standard,
|
||||
TypeMismatch from Standard
|
||||
|
||||
is
|
||||
|
||||
--
|
||||
-- Methods specific of OffsetCurve
|
||||
--
|
||||
|
||||
Create returns OffsetCurve from Adaptor3d;
|
||||
---Purpose: The Offset is set to 0.
|
||||
|
||||
Create(C : HCurve2d from Adaptor2d) returns OffsetCurve from Adaptor3d;
|
||||
---Purpose: The curve is loaded. The Offset is set to 0.
|
||||
|
||||
Create(C : HCurve2d from Adaptor2d; Offset : Real)
|
||||
returns OffsetCurve from Adaptor3d;
|
||||
---Purpose: Creates an OffsetCurve curve.
|
||||
-- The Offset is set to Offset.
|
||||
--
|
||||
|
||||
Create(C : HCurve2d from Adaptor2d; Offset : Real; WFirst,WLast : Real)
|
||||
returns OffsetCurve from Adaptor3d;
|
||||
---Purpose: Create an Offset curve.
|
||||
-- WFirst,WLast define the bounds of the Offset curve.
|
||||
|
||||
|
||||
Load( me:in out ;S : HCurve2d from Adaptor2d)
|
||||
---Purpose: Changes the curve. The Offset is reset to 0.
|
||||
is static;
|
||||
|
||||
Load (me : in out ; Offset : Real)
|
||||
---Purpose: Changes the Offset on the current Curve.
|
||||
is static;
|
||||
|
||||
Load (me : in out ; Offset : Real; WFirst,WLast : Real)
|
||||
---Purpose: Changes the Offset Curve on the current Curve.
|
||||
is static;
|
||||
|
||||
Curve(me) returns HCurve2d from Adaptor2d
|
||||
---C++: inline
|
||||
---C++: return const &
|
||||
is static;
|
||||
|
||||
Offset(me) returns Real
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
--
|
||||
-- Implementation of Curve2d from Adaptor2d methods
|
||||
--
|
||||
|
||||
--
|
||||
-- Global methods - Apply to the whole curve.
|
||||
--
|
||||
|
||||
FirstParameter(me) returns Real
|
||||
---C++: inline
|
||||
is redefined static;
|
||||
|
||||
LastParameter(me) returns Real
|
||||
---C++: inline
|
||||
is redefined static;
|
||||
|
||||
Continuity(me) returns Shape from GeomAbs
|
||||
is redefined static;
|
||||
|
||||
NbIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: If necessary, breaks the curve in intervals of
|
||||
-- continuity <S>. And returns the number of
|
||||
-- intervals.
|
||||
is redefined static;
|
||||
|
||||
Intervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs)
|
||||
---Purpose: Stores in <T> the parameters bounding the intervals
|
||||
-- of continuity <S>.
|
||||
--
|
||||
-- The array must provide enough room to accomodate
|
||||
-- for the parameters. i.e. T.Length() > NbIntervals()
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
is redefined static;
|
||||
|
||||
Trim(me; First, Last, Tol : Real) returns HCurve2d from Adaptor2d
|
||||
---Purpose: Returns a curve equivalent of <me> between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is redefined static;
|
||||
|
||||
IsClosed(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
IsPeriodic(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
Period(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is redefined static;
|
||||
|
||||
Value(me; U : Real) returns Pnt2d from gp
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
is redefined static;
|
||||
|
||||
D0 (me; U : Real; P : out Pnt2d from gp)
|
||||
--- Purpose : Computes the point of parameter U on the curve.
|
||||
is redefined static;
|
||||
|
||||
D1 (me; 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.
|
||||
is redefined static;
|
||||
|
||||
D2 (me; 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.
|
||||
is redefined static;
|
||||
|
||||
D3 (me; 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.
|
||||
is redefined static;
|
||||
|
||||
DN (me; 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.
|
||||
is redefined static;
|
||||
|
||||
Resolution(me; R3d : Real) returns Real
|
||||
---Purpose : Returns the parametric resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is redefined static;
|
||||
|
||||
GetType(me) returns CurveType from GeomAbs
|
||||
---Purpose: Returns the type of the curve in the current
|
||||
-- interval : Line, Circle, Ellipse, Hyperbola,
|
||||
-- Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
is redefined static;
|
||||
|
||||
--
|
||||
-- The following methods must be called when GetType returned
|
||||
-- the corresponding type.
|
||||
--
|
||||
|
||||
Line(me) returns Lin2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Circle(me) returns Circ2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Ellipse(me) returns Elips2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Hyperbola(me) returns Hypr2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Parabola(me) returns Parab2d from gp
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
Degree(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
IsRational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
NbPoles(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
NbKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
Bezier(me) returns BezierCurve from Geom2d
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
BSpline(me) returns BSplineCurve from Geom2d
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
fields
|
||||
|
||||
myCurve : HCurve2d from Adaptor2d;
|
||||
myOffset : Real;
|
||||
myFirst : Real;
|
||||
myLast : Real;
|
||||
|
||||
end OffsetCurve;
|
||||
|
@@ -11,23 +11,35 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_OffsetCurve.ixx>
|
||||
|
||||
#include <Adaptor2d_HCurve2d.hxx>
|
||||
#include <Adaptor3d_HOffsetCurve.hxx>
|
||||
#include <Adaptor3d_OffsetCurve.hxx>
|
||||
#include <Geom2d_BezierCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <gp.hxx>
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Dir2d.hxx>
|
||||
#include <gp_Elips2d.hxx>
|
||||
#include <gp_Hypr2d.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Parab2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <gp_VectorWithNullMagnitude.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <gp_Ax22d.hxx>
|
||||
#include <gp_Dir2d.hxx>
|
||||
#include <gp.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Adaptor3d_OffsetCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve()
|
||||
: myOffset(0.0),
|
||||
myFirst (0.0),
|
||||
|
205
src/Adaptor3d/Adaptor3d_OffsetCurve.hxx
Normal file
205
src/Adaptor3d/Adaptor3d_OffsetCurve.hxx
Normal file
@@ -0,0 +1,205 @@
|
||||
// Created on: 1993-04-15
|
||||
// Created by: Bruno DUMORTIER
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Adaptor3d_OffsetCurve_HeaderFile
|
||||
#define _Adaptor3d_OffsetCurve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <GeomAbs_CurveType.hxx>
|
||||
class Adaptor2d_HCurve2d;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_TypeMismatch;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
class gp_Lin2d;
|
||||
class gp_Circ2d;
|
||||
class gp_Elips2d;
|
||||
class gp_Hypr2d;
|
||||
class gp_Parab2d;
|
||||
class Geom2d_BezierCurve;
|
||||
class Geom2d_BSplineCurve;
|
||||
|
||||
|
||||
//! Defines an Offset curve (algorithmic 2d curve).
|
||||
class Adaptor3d_OffsetCurve : public Adaptor2d_Curve2d
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! The Offset is set to 0.
|
||||
Standard_EXPORT Adaptor3d_OffsetCurve();
|
||||
|
||||
//! The curve is loaded. The Offset is set to 0.
|
||||
Standard_EXPORT Adaptor3d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C);
|
||||
|
||||
//! Creates an OffsetCurve curve.
|
||||
//! The Offset is set to Offset.
|
||||
Standard_EXPORT Adaptor3d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real Offset);
|
||||
|
||||
//! Create an Offset curve.
|
||||
//! WFirst,WLast define the bounds of the Offset curve.
|
||||
Standard_EXPORT Adaptor3d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C, const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast);
|
||||
|
||||
//! Changes the curve. The Offset is reset to 0.
|
||||
Standard_EXPORT void Load (const Handle(Adaptor2d_HCurve2d)& S);
|
||||
|
||||
//! Changes the Offset on the current Curve.
|
||||
Standard_EXPORT void Load (const Standard_Real Offset);
|
||||
|
||||
//! Changes the Offset Curve on the current Curve.
|
||||
Standard_EXPORT void Load (const Standard_Real Offset, const Standard_Real WFirst, const Standard_Real WLast);
|
||||
|
||||
const Handle(Adaptor2d_HCurve2d)& Curve() const;
|
||||
|
||||
Standard_Real Offset() const;
|
||||
|
||||
Standard_Real FirstParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_Real LastParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
|
||||
|
||||
//! If necessary, breaks the curve in intervals of
|
||||
//! continuity <S>. And returns the number of
|
||||
//! intervals.
|
||||
Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Stores in <T> the parameters bounding the intervals
|
||||
//! of continuity <S>.
|
||||
//!
|
||||
//! The array must provide enough room to accomodate
|
||||
//! for the parameters. i.e. T.Length() > NbIntervals()
|
||||
Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a curve equivalent of <me> between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
Standard_EXPORT gp_Pnt2d Value (const Standard_Real U) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameter U on the curve.
|
||||
Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt2d& P) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameter U on the curve with its
|
||||
//! first derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C1.
|
||||
Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Returns the point P of parameter U, the first and second
|
||||
//! derivatives V1 and V2.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C2.
|
||||
Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! Returns the point P of parameter U, the first, the second
|
||||
//! and the third derivative.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not C3.
|
||||
Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
//! The returned vector gives the value of the derivative for the
|
||||
//! order of derivation N.
|
||||
//! Raised if the continuity of the current interval
|
||||
//! is not CN.
|
||||
//! Raised if N < 1.
|
||||
Standard_EXPORT gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the parametric resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the type of the curve in the current
|
||||
//! interval : Line, Circle, Ellipse, Hyperbola,
|
||||
//! Parabola, BezierCurve, BSplineCurve, OtherCurve.
|
||||
Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Lin2d Line() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Circ2d Circle() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Elips2d Ellipse() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Hypr2d Hyperbola() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Parab2d Parabola() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom2d_BezierCurve) Bezier() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Adaptor2d_HCurve2d) myCurve;
|
||||
Standard_Real myOffset;
|
||||
Standard_Real myFirst;
|
||||
Standard_Real myLast;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <Adaptor3d_OffsetCurve.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_OffsetCurve_HeaderFile
|
@@ -1,326 +0,0 @@
|
||||
-- Created on: 1993-03-31
|
||||
-- Created by: Bruno DUMORTIER
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
deferred class Surface from Adaptor3d
|
||||
|
||||
---Purpose: Root class for surfaces on which geometric algorithms work.
|
||||
-- An adapted surface is an interface between the
|
||||
-- services provided by a surface and those required of
|
||||
-- the surface by algorithms which use it.
|
||||
-- A derived concrete class is provided:
|
||||
-- GeomAdaptor_Surface for a surface from the Geom package.
|
||||
-- The Surface class describes the standard behaviour
|
||||
-- of a surface for generic algorithms.
|
||||
--
|
||||
-- The Surface can be decomposed in intervals of any
|
||||
-- continuity in U and V using the method
|
||||
-- NbIntervals. A current interval can be set. Most
|
||||
-- of the methods apply to the current interval.
|
||||
-- Warning: All the methods are virtual and implemented with a
|
||||
-- raise to allow to redefined only the methods realy
|
||||
-- used.
|
||||
uses
|
||||
Array1OfReal from TColStd,
|
||||
Shape from GeomAbs,
|
||||
SurfaceType from GeomAbs,
|
||||
Vec from gp,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
Pln from gp,
|
||||
Cone from gp,
|
||||
Cylinder from gp,
|
||||
Sphere from gp,
|
||||
Torus from gp,
|
||||
Ax1 from gp,
|
||||
BezierSurface from Geom,
|
||||
BSplineSurface from Geom,
|
||||
HSurface from Adaptor3d,
|
||||
HCurve from Adaptor3d
|
||||
|
||||
raises
|
||||
|
||||
OutOfRange from Standard,
|
||||
NoSuchObject from Standard,
|
||||
DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
--
|
||||
-- Global methods - Apply to the whole surface.
|
||||
--
|
||||
|
||||
FirstUParameter(me) returns Real
|
||||
is virtual;
|
||||
|
||||
LastUParameter(me) returns Real
|
||||
is virtual;
|
||||
|
||||
FirstVParameter(me) returns Real
|
||||
is virtual;
|
||||
|
||||
LastVParameter(me) returns Real
|
||||
is virtual;
|
||||
|
||||
UContinuity(me) returns Shape from GeomAbs
|
||||
is virtual;
|
||||
|
||||
VContinuity(me) returns Shape from GeomAbs
|
||||
is virtual;
|
||||
|
||||
NbUIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of U intervals for continuity
|
||||
-- <S>. May be one if UContinuity(me) >= <S>
|
||||
is virtual;
|
||||
|
||||
NbVIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of V intervals for continuity
|
||||
-- <S>. May be one if VContinuity(me) >= <S>
|
||||
is virtual;
|
||||
|
||||
UIntervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs )
|
||||
---Purpose: Returns the intervals with the requested continuity
|
||||
-- in the U direction.
|
||||
raises
|
||||
OutOfRange from Standard -- if the Length of the array does
|
||||
-- have enought slots to accomodate
|
||||
-- the result.
|
||||
is virtual;
|
||||
|
||||
VIntervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs )
|
||||
---Purpose: Returns the intervals with the requested continuity
|
||||
-- in the V direction.
|
||||
raises
|
||||
OutOfRange from Standard -- if the Length of the array does
|
||||
-- have enought slots to accomodate
|
||||
-- the result.
|
||||
is virtual;
|
||||
|
||||
UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
|
||||
---Purpose: Returns a surface trimmed in the U direction
|
||||
-- equivalent of <me> between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is virtual ;
|
||||
|
||||
VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
|
||||
---Purpose: Returns a surface trimmed in the V direction between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is virtual ;
|
||||
|
||||
IsUClosed(me) returns Boolean
|
||||
is virtual;
|
||||
|
||||
IsVClosed(me) returns Boolean
|
||||
is virtual;
|
||||
|
||||
IsUPeriodic(me) returns Boolean
|
||||
is virtual;
|
||||
|
||||
UPeriod(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is virtual;
|
||||
|
||||
IsVPeriodic(me) returns Boolean
|
||||
is virtual;
|
||||
|
||||
VPeriod(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is virtual;
|
||||
|
||||
Value (me; U, V : Real) returns Pnt from gp
|
||||
--- Purpose : Computes the point of parameters U,V on the surface.
|
||||
is virtual;
|
||||
|
||||
D0 (me; U, V : Real; P : out Pnt from gp)
|
||||
--- Purpose : Computes the point of parameters U,V on the surface.
|
||||
is virtual;
|
||||
|
||||
D1 (me; U, V : Real; P : out Pnt from gp; D1U, D1V : out Vec from gp)
|
||||
--- Purpose : Computes the point and the first derivatives on
|
||||
-- the surface.
|
||||
raises DomainError from Standard
|
||||
--- Purpose : Raised if the continuity of the current
|
||||
-- intervals is not C1.
|
||||
is virtual;
|
||||
|
||||
D2 (me; U, V : Real; P : out Pnt from gp; D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
|
||||
--- Purpose : Computes the point, the first and second
|
||||
-- derivatives on the surface.
|
||||
raises DomainError from Standard
|
||||
--- Purpose : Raised if the continuity of the current
|
||||
-- intervals is not C2.
|
||||
is virtual;
|
||||
|
||||
D3 (me; U, V : Real; P : out Pnt from gp;
|
||||
D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
|
||||
--- Purpose : Computes the point, the first, second and third
|
||||
-- derivatives on the surface.
|
||||
raises DomainError from Standard
|
||||
--- Purpose : Raised if the continuity of the current
|
||||
-- intervals is not C3.
|
||||
is virtual;
|
||||
|
||||
DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp
|
||||
--- Purpose : Computes the derivative of order Nu in the direction U and Nv
|
||||
-- in the direction V at the point P(U, V).
|
||||
raises DomainError from Standard,
|
||||
--- Purpose : Raised if the current U interval is not not CNu
|
||||
-- and the current V interval is not CNv.
|
||||
OutOfRange from Standard
|
||||
--- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
|
||||
is virtual;
|
||||
|
||||
UResolution(me; R3d : Real ) returns Real
|
||||
---Purpose : Returns the parametric U resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is virtual;
|
||||
|
||||
VResolution(me; R3d : Real ) returns Real
|
||||
---Purpose : Returns the parametric V resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is virtual;
|
||||
|
||||
GetType(me) returns SurfaceType from GeomAbs
|
||||
---Purpose: Returns the type of the surface : Plane, Cylinder,
|
||||
-- Cone, Sphere, Torus, BezierSurface,
|
||||
-- BSplineSurface, SurfaceOfRevolution,
|
||||
-- SurfaceOfExtrusion, OtherSurface
|
||||
is virtual;
|
||||
|
||||
--
|
||||
-- The following methods must be called when GetType returned
|
||||
-- the corresponding type.
|
||||
--
|
||||
|
||||
Plane(me) returns Pln from gp
|
||||
raises NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
Cylinder(me) returns Cylinder from gp
|
||||
raises NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
Cone(me) returns Cone from gp
|
||||
raises NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
Sphere(me) returns Sphere from gp
|
||||
raises NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
Torus(me) returns Torus from gp
|
||||
raises NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
UDegree(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
NbUPoles(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
VDegree(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
NbVPoles(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
NbUKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
NbVKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
IsURational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
IsVRational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
|
||||
Bezier(me) returns BezierSurface from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
BSpline(me) returns BSplineSurface from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is virtual;
|
||||
|
||||
AxeOfRevolution(me) returns Ax1 from gp
|
||||
raises
|
||||
NoSuchObject from Standard -- only for SurfaceOfRevolution
|
||||
is virtual;
|
||||
|
||||
Direction(me) returns Dir from gp
|
||||
raises
|
||||
NoSuchObject from Standard -- only for SurfaceOfExtrusion
|
||||
is virtual;
|
||||
|
||||
BasisCurve(me) returns HCurve from Adaptor3d
|
||||
raises
|
||||
NoSuchObject from Standard -- only for SurfaceOfExtrusion
|
||||
is virtual;
|
||||
|
||||
BasisSurface(me) returns HSurface from Adaptor3d
|
||||
raises
|
||||
NoSuchObject from Standard -- only for Offset Surface
|
||||
is virtual;
|
||||
|
||||
OffsetValue(me) returns Real from Standard
|
||||
raises
|
||||
NoSuchObject from Standard -- only for Offset Surface
|
||||
is virtual;
|
||||
|
||||
---C++: alias " Standard_EXPORT virtual ~Adaptor3d_Surface();"
|
||||
|
||||
end Surface;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -14,14 +14,30 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_Surface.ixx>
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Sphere.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : ~Adaptor3d_Surface
|
||||
//purpose : Destructor
|
||||
//=======================================================================
|
||||
|
||||
Adaptor3d_Surface::~Adaptor3d_Surface()
|
||||
{
|
||||
}
|
||||
|
233
src/Adaptor3d/Adaptor3d_Surface.hxx
Normal file
233
src/Adaptor3d/Adaptor3d_Surface.hxx
Normal file
@@ -0,0 +1,233 @@
|
||||
// Created on: 1993-03-31
|
||||
// Created by: Bruno DUMORTIER
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Adaptor3d_Surface_HeaderFile
|
||||
#define _Adaptor3d_Surface_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class Adaptor3d_HSurface;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class gp_Pln;
|
||||
class gp_Cylinder;
|
||||
class gp_Cone;
|
||||
class gp_Sphere;
|
||||
class gp_Torus;
|
||||
class Geom_BezierSurface;
|
||||
class Geom_BSplineSurface;
|
||||
class gp_Ax1;
|
||||
class gp_Dir;
|
||||
class Adaptor3d_HCurve;
|
||||
|
||||
|
||||
//! Root class for surfaces on which geometric algorithms work.
|
||||
//! An adapted surface is an interface between the
|
||||
//! services provided by a surface and those required of
|
||||
//! the surface by algorithms which use it.
|
||||
//! A derived concrete class is provided:
|
||||
//! GeomAdaptor_Surface for a surface from the Geom package.
|
||||
//! The Surface class describes the standard behaviour
|
||||
//! of a surface for generic algorithms.
|
||||
//!
|
||||
//! The Surface can be decomposed in intervals of any
|
||||
//! continuity in U and V using the method
|
||||
//! NbIntervals. A current interval can be set. Most
|
||||
//! of the methods apply to the current interval.
|
||||
//! Warning: All the methods are virtual and implemented with a
|
||||
//! raise to allow to redefined only the methods realy
|
||||
//! used.
|
||||
class Adaptor3d_Surface
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT virtual Standard_Real FirstUParameter() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real LastUParameter() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real FirstVParameter() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real LastVParameter() const;
|
||||
|
||||
Standard_EXPORT virtual GeomAbs_Shape UContinuity() const;
|
||||
|
||||
Standard_EXPORT virtual GeomAbs_Shape VContinuity() const;
|
||||
|
||||
//! Returns the number of U intervals for continuity
|
||||
//! <S>. May be one if UContinuity(me) >= <S>
|
||||
Standard_EXPORT virtual Standard_Integer NbUIntervals (const GeomAbs_Shape S) const;
|
||||
|
||||
//! Returns the number of V intervals for continuity
|
||||
//! <S>. May be one if VContinuity(me) >= <S>
|
||||
Standard_EXPORT virtual Standard_Integer NbVIntervals (const GeomAbs_Shape S) const;
|
||||
|
||||
//! Returns the intervals with the requested continuity
|
||||
//! in the U direction.
|
||||
Standard_EXPORT virtual void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
|
||||
|
||||
//! Returns the intervals with the requested continuity
|
||||
//! in the V direction.
|
||||
Standard_EXPORT virtual void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
|
||||
|
||||
//! Returns a surface trimmed in the U direction
|
||||
//! equivalent of <me> between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT virtual Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
|
||||
|
||||
//! Returns a surface trimmed in the V direction between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT virtual Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsUClosed() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsVClosed() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsUPeriodic() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real UPeriod() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsVPeriodic() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real VPeriod() const;
|
||||
|
||||
//! Computes the point of parameters U,V on the surface.
|
||||
Standard_EXPORT virtual gp_Pnt Value (const Standard_Real U, const Standard_Real V) const;
|
||||
|
||||
//! Computes the point of parameters U,V on the surface.
|
||||
Standard_EXPORT virtual void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const;
|
||||
|
||||
//! Computes the point and the first derivatives on
|
||||
//! the surface.
|
||||
//! Raised if the continuity of the current
|
||||
//! intervals is not C1.
|
||||
Standard_EXPORT virtual void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const;
|
||||
|
||||
//! Computes the point, the first and second
|
||||
//! derivatives on the surface.
|
||||
//! Raised if the continuity of the current
|
||||
//! intervals is not C2.
|
||||
Standard_EXPORT virtual void D2 (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) const;
|
||||
|
||||
//! Computes the point, the first, second and third
|
||||
//! derivatives on the surface.
|
||||
//! Raised if the continuity of the current
|
||||
//! intervals is not C3.
|
||||
Standard_EXPORT virtual void D3 (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) const;
|
||||
|
||||
//! Computes the derivative of order Nu in the direction U and Nv
|
||||
//! in the direction V at the point P(U, V).
|
||||
//! Raised if the current U interval is not not CNu
|
||||
//! and the current V interval is not CNv.
|
||||
//! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
|
||||
Standard_EXPORT virtual gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const;
|
||||
|
||||
//! Returns the parametric U resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT virtual Standard_Real UResolution (const Standard_Real R3d) const;
|
||||
|
||||
//! Returns the parametric V resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT virtual Standard_Real VResolution (const Standard_Real R3d) const;
|
||||
|
||||
//! Returns the type of the surface : Plane, Cylinder,
|
||||
//! Cone, Sphere, Torus, BezierSurface,
|
||||
//! BSplineSurface, SurfaceOfRevolution,
|
||||
//! SurfaceOfExtrusion, OtherSurface
|
||||
Standard_EXPORT virtual GeomAbs_SurfaceType GetType() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Pln Plane() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Cylinder Cylinder() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Cone Cone() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Sphere Sphere() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Torus Torus() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer UDegree() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer NbUPoles() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer VDegree() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer NbVPoles() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer NbUKnots() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer NbVKnots() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsURational() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsVRational() const;
|
||||
|
||||
Standard_EXPORT virtual Handle(Geom_BezierSurface) Bezier() const;
|
||||
|
||||
Standard_EXPORT virtual Handle(Geom_BSplineSurface) BSpline() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Ax1 AxeOfRevolution() const;
|
||||
|
||||
Standard_EXPORT virtual gp_Dir Direction() const;
|
||||
|
||||
Standard_EXPORT virtual Handle(Adaptor3d_HCurve) BasisCurve() const;
|
||||
|
||||
Standard_EXPORT virtual Handle(Adaptor3d_HSurface) BasisSurface() const;
|
||||
|
||||
Standard_EXPORT virtual Standard_Real OffsetValue() const;
|
||||
Standard_EXPORT virtual ~Adaptor3d_Surface();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_Surface_HeaderFile
|
@@ -1,332 +0,0 @@
|
||||
-- Created on: 1993-04-21
|
||||
-- Created by: Bruno DUMORTIER
|
||||
-- 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 SurfaceOfLinearExtrusion from Adaptor3d inherits Surface from Adaptor3d
|
||||
|
||||
--- Purpose: Generalised cylinder. This surface is obtained by sweeping a curve in a given
|
||||
-- direction. The parametrization range for the parameter U is defined
|
||||
-- with referenced the curve.
|
||||
-- The parametrization range for the parameter V is ]-infinite,+infinite[
|
||||
-- The position of the curve gives the origin for the
|
||||
-- parameter V.
|
||||
-- The continuity of the surface is CN in the V direction.
|
||||
|
||||
uses
|
||||
Array1OfReal from TColStd,
|
||||
Shape from GeomAbs,
|
||||
SurfaceType from GeomAbs,
|
||||
Vec from gp,
|
||||
Pnt from gp,
|
||||
Pln from gp,
|
||||
Cone from gp,
|
||||
Cylinder from gp,
|
||||
Sphere from gp,
|
||||
Torus from gp,
|
||||
Ax1 from gp,
|
||||
Dir from gp,
|
||||
BezierSurface from Geom,
|
||||
BSplineSurface from Geom,
|
||||
HSurface from Adaptor3d,
|
||||
HCurve from Adaptor3d
|
||||
|
||||
raises
|
||||
|
||||
OutOfRange from Standard,
|
||||
NoSuchObject from Standard,
|
||||
DomainError from Standard
|
||||
|
||||
is
|
||||
--
|
||||
-- Methods specific of SurfaceOfLinearExtrusion.
|
||||
--
|
||||
|
||||
Create returns SurfaceOfLinearExtrusion from Adaptor3d;
|
||||
|
||||
|
||||
Create(C : HCurve from Adaptor3d)
|
||||
returns SurfaceOfLinearExtrusion from Adaptor3d;
|
||||
---Purpose: The Curve is loaded.
|
||||
|
||||
Create(C : HCurve from Adaptor3d; V : Dir from gp)
|
||||
returns SurfaceOfLinearExtrusion from Adaptor3d;
|
||||
---Purpose: Thew Curve and the Direction are loaded.
|
||||
|
||||
|
||||
Load( me : in out ; C : HCurve from Adaptor3d)
|
||||
---Purpose: Changes the Curve
|
||||
is static;
|
||||
|
||||
Load( me : in out ; V : Dir from gp)
|
||||
---Purpose: Changes the Direction
|
||||
is static;
|
||||
|
||||
|
||||
--
|
||||
-- Implementation of Surface from Adaptor3d methods.
|
||||
--
|
||||
|
||||
--
|
||||
-- Global methods - Apply to the whole surface.
|
||||
--
|
||||
|
||||
FirstUParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
LastUParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
FirstVParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
LastVParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
UContinuity(me) returns Shape from GeomAbs
|
||||
is redefined static;
|
||||
|
||||
VContinuity(me) returns Shape from GeomAbs
|
||||
---Purpose: Return CN.
|
||||
is redefined static;
|
||||
|
||||
NbUIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of U intervals for continuity
|
||||
-- <S>. May be one if UContinuity(me) >= <S>
|
||||
is redefined static;
|
||||
|
||||
NbVIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of V intervals for continuity
|
||||
-- <S>. May be one if VContinuity(me) >= <S>
|
||||
is redefined static;
|
||||
|
||||
UIntervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs )
|
||||
---Purpose: Returns the intervals with the requested continuity
|
||||
-- in the U direction.
|
||||
|
||||
raises
|
||||
OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
|
||||
is redefined static;
|
||||
|
||||
VIntervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs )
|
||||
---Purpose: Returns the intervals with the requested continuity
|
||||
-- in the V direction.
|
||||
raises
|
||||
OutOfRange from Standard -- if Index < 1 or Index > NbIntervals
|
||||
is redefined static;
|
||||
|
||||
UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
|
||||
---Purpose: Returns a surface trimmed in the U direction
|
||||
-- equivalent of <me> between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is redefined static ;
|
||||
|
||||
VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
|
||||
---Purpose: Returns a surface trimmed in the V direction between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is redefined static ;
|
||||
|
||||
IsUClosed(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
IsVClosed(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
IsUPeriodic(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
UPeriod(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is redefined static;
|
||||
|
||||
IsVPeriodic(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
VPeriod(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is redefined static;
|
||||
|
||||
Value (me; U, V : Real) returns Pnt from gp
|
||||
--- Purpose : Computes the point of parameters U,V on the surface.
|
||||
is redefined static;
|
||||
|
||||
D0 (me; U, V : Real; P : out Pnt from gp)
|
||||
--- Purpose : Computes the point of parameters U,V on the surface.
|
||||
is redefined static;
|
||||
|
||||
D1 (me; U, V : Real; P : out Pnt from gp; D1U, D1V : out Vec from gp)
|
||||
--- Purpose : Computes the point and the first derivatives on
|
||||
-- the surface.
|
||||
raises DomainError from Standard
|
||||
--- Purpose : Raised if the continuity of the current
|
||||
-- intervals is not C1.
|
||||
is redefined static;
|
||||
|
||||
D2 (me; U, V : Real; P : out Pnt from gp; D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
|
||||
--- Purpose : Computes the point, the first and second
|
||||
-- derivatives on the surface.
|
||||
raises DomainError from Standard
|
||||
--- Purpose : Raised if the continuity of the current
|
||||
-- intervals is not C2.
|
||||
is redefined static;
|
||||
|
||||
D3 (me; U, V : Real; P : out Pnt from gp;
|
||||
D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
|
||||
--- Purpose : Computes the point, the first, second and third
|
||||
-- derivatives on the surface.
|
||||
raises DomainError from Standard
|
||||
--- Purpose : Raised if the continuity of the current
|
||||
-- intervals is not C3.
|
||||
is redefined static;
|
||||
|
||||
DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp
|
||||
--- Purpose : Computes the derivative of order Nu in the direction U and Nv
|
||||
-- in the direction V at the point P(U, V).
|
||||
raises DomainError from Standard,
|
||||
--- Purpose : Raised if the current U interval is not not CNu
|
||||
-- and the current V interval is not CNv.
|
||||
OutOfRange from Standard
|
||||
--- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
|
||||
is redefined static;
|
||||
|
||||
UResolution(me; R3d : Real ) returns Real
|
||||
---Purpose : Returns the parametric U resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is redefined static;
|
||||
|
||||
VResolution(me; R3d : Real ) returns Real
|
||||
---Purpose : Returns the parametric V resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is redefined static;
|
||||
|
||||
GetType(me) returns SurfaceType from GeomAbs
|
||||
---Purpose: Returns the type of the surface : Plane, Cylinder,
|
||||
-- Cone, Sphere, Torus, BezierSurface,
|
||||
-- BSplineSurface, SurfaceOfRevolution,
|
||||
-- SurfaceOfExtrusion, OtherSurface
|
||||
is redefined static;
|
||||
|
||||
--
|
||||
-- The following methods must be called when GetType returned
|
||||
-- the corresponding type.
|
||||
--
|
||||
|
||||
Plane(me) returns Pln from gp
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Cylinder(me) returns Cylinder from gp
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Cone(me) returns Cone from gp
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Sphere(me) returns Sphere from gp
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Torus(me) returns Torus from gp
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
UDegree(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
NbUPoles(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
VDegree(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
NbVPoles(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
NbUKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
NbVKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
IsURational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
IsVRational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
|
||||
Bezier(me) returns BezierSurface from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
BSpline(me) returns BSplineSurface from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
AxeOfRevolution(me) returns Ax1 from gp
|
||||
raises
|
||||
NoSuchObject from Standard -- only for SurfaceOfRevolution
|
||||
is redefined static;
|
||||
|
||||
Direction(me) returns Dir from gp
|
||||
raises
|
||||
NoSuchObject from Standard -- only for SurfaceOfExtrusion
|
||||
is redefined static;
|
||||
|
||||
BasisCurve(me) returns HCurve from Adaptor3d
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
-- Only for SurfaceOfExtrusion and SurfaceOfRevolution
|
||||
is redefined static;
|
||||
|
||||
fields
|
||||
|
||||
myBasisCurve : HCurve from Adaptor3d;
|
||||
myDirection : Dir from gp;
|
||||
|
||||
|
||||
|
||||
end SurfaceOfLinearExtrusion;
|
@@ -14,16 +14,32 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_SurfaceOfLinearExtrusion.ixx>
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_HSurfaceOfLinearExtrusion.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Adaptor3d_SurfaceOfLinearExtrusion.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <gp.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Sphere.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Adaptor3d_SurfaceOfLinearExtrusion
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Adaptor3d_SurfaceOfLinearExtrusion::Adaptor3d_SurfaceOfLinearExtrusion()
|
||||
{}
|
||||
|
||||
|
238
src/Adaptor3d/Adaptor3d_SurfaceOfLinearExtrusion.hxx
Normal file
238
src/Adaptor3d/Adaptor3d_SurfaceOfLinearExtrusion.hxx
Normal file
@@ -0,0 +1,238 @@
|
||||
// Created on: 1993-04-21
|
||||
// Created by: Bruno DUMORTIER
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Adaptor3d_SurfaceOfLinearExtrusion_HeaderFile
|
||||
#define _Adaptor3d_SurfaceOfLinearExtrusion_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Dir.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
class Adaptor3d_HCurve;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class gp_Dir;
|
||||
class Adaptor3d_HSurface;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class gp_Pln;
|
||||
class gp_Cylinder;
|
||||
class gp_Cone;
|
||||
class gp_Sphere;
|
||||
class gp_Torus;
|
||||
class Geom_BezierSurface;
|
||||
class Geom_BSplineSurface;
|
||||
class gp_Ax1;
|
||||
|
||||
|
||||
//! Generalised cylinder. This surface is obtained by sweeping a curve in a given
|
||||
//! direction. The parametrization range for the parameter U is defined
|
||||
//! with referenced the curve.
|
||||
//! The parametrization range for the parameter V is ]-infinite,+infinite[
|
||||
//! The position of the curve gives the origin for the
|
||||
//! parameter V.
|
||||
//! The continuity of the surface is CN in the V direction.
|
||||
class Adaptor3d_SurfaceOfLinearExtrusion : public Adaptor3d_Surface
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_SurfaceOfLinearExtrusion();
|
||||
|
||||
//! The Curve is loaded.
|
||||
Standard_EXPORT Adaptor3d_SurfaceOfLinearExtrusion(const Handle(Adaptor3d_HCurve)& C);
|
||||
|
||||
//! Thew Curve and the Direction are loaded.
|
||||
Standard_EXPORT Adaptor3d_SurfaceOfLinearExtrusion(const Handle(Adaptor3d_HCurve)& C, const gp_Dir& V);
|
||||
|
||||
//! Changes the Curve
|
||||
Standard_EXPORT void Load (const Handle(Adaptor3d_HCurve)& C);
|
||||
|
||||
//! Changes the Direction
|
||||
Standard_EXPORT void Load (const gp_Dir& V);
|
||||
|
||||
Standard_EXPORT Standard_Real FirstUParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real LastUParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real FirstVParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real LastVParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT GeomAbs_Shape UContinuity() const Standard_OVERRIDE;
|
||||
|
||||
//! Return CN.
|
||||
Standard_EXPORT GeomAbs_Shape VContinuity() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the number of U intervals for continuity
|
||||
//! <S>. May be one if UContinuity(me) >= <S>
|
||||
Standard_EXPORT Standard_Integer NbUIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the number of V intervals for continuity
|
||||
//! <S>. May be one if VContinuity(me) >= <S>
|
||||
Standard_EXPORT Standard_Integer NbVIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the intervals with the requested continuity
|
||||
//! in the U direction.
|
||||
Standard_EXPORT void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the intervals with the requested continuity
|
||||
//! in the V direction.
|
||||
Standard_EXPORT void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a surface trimmed in the U direction
|
||||
//! equivalent of <me> between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a surface trimmed in the V direction between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsUClosed() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsVClosed() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsUPeriodic() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real UPeriod() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsVPeriodic() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real VPeriod() const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameters U,V on the surface.
|
||||
Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameters U,V on the surface.
|
||||
Standard_EXPORT void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point and the first derivatives on
|
||||
//! the surface.
|
||||
//! Raised if the continuity of the current
|
||||
//! intervals is not C1.
|
||||
Standard_EXPORT void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point, the first and second
|
||||
//! derivatives on the surface.
|
||||
//! Raised if the continuity of the current
|
||||
//! intervals is not C2.
|
||||
Standard_EXPORT void D2 (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) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point, the first, second and third
|
||||
//! derivatives on the surface.
|
||||
//! Raised if the continuity of the current
|
||||
//! intervals is not C3.
|
||||
Standard_EXPORT void D3 (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) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the derivative of order Nu in the direction U and Nv
|
||||
//! in the direction V at the point P(U, V).
|
||||
//! Raised if the current U interval is not not CNu
|
||||
//! and the current V interval is not CNv.
|
||||
//! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
|
||||
Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the parametric U resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT Standard_Real UResolution (const Standard_Real R3d) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the parametric V resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT Standard_Real VResolution (const Standard_Real R3d) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the type of the surface : Plane, Cylinder,
|
||||
//! Cone, Sphere, Torus, BezierSurface,
|
||||
//! BSplineSurface, SurfaceOfRevolution,
|
||||
//! SurfaceOfExtrusion, OtherSurface
|
||||
Standard_EXPORT GeomAbs_SurfaceType GetType() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Pln Plane() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Cylinder Cylinder() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Cone Cone() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Sphere Sphere() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Torus Torus() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer UDegree() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbUPoles() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer VDegree() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbVPoles() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbUKnots() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbVKnots() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsURational() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsVRational() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom_BezierSurface) Bezier() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom_BSplineSurface) BSpline() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Ax1 AxeOfRevolution() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Dir Direction() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Adaptor3d_HCurve) BasisCurve() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Adaptor3d_HCurve) myBasisCurve;
|
||||
gp_Dir myDirection;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_SurfaceOfLinearExtrusion_HeaderFile
|
@@ -1,357 +0,0 @@
|
||||
-- Created on: 1993-04-21
|
||||
-- Created by: Bruno DUMORTIER
|
||||
-- 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 SurfaceOfRevolution from Adaptor3d inherits Surface from Adaptor3d
|
||||
|
||||
|
||||
--- Purpose : This class defines a complete surface of revolution.
|
||||
-- The surface is obtained by rotating a curve a complete revolution
|
||||
-- about an axis. The curve and the axis must be in the same plane.
|
||||
-- If the curve and the axis are not in the same plane it is always
|
||||
-- possible to be in the previous case after a cylindrical projection
|
||||
-- of the curve in a referenced plane.
|
||||
-- For a complete surface of revolution the parametric range is
|
||||
-- 0 <= U <= 2*PI. --
|
||||
-- The parametric range for V is defined with the revolved curve.
|
||||
-- The origin of the U parametrization is given by the position
|
||||
-- of the revolved curve (reference). The direction of the revolution
|
||||
-- axis defines the positive sense of rotation (trigonometric sense)
|
||||
-- corresponding to the increasing of the parametric value U.
|
||||
-- The derivatives are always defined for the u direction.
|
||||
-- For the v direction the definition of the derivatives depends on
|
||||
-- the degree of continuity of the referenced curve.
|
||||
-- Curve and Axis are coplanar.
|
||||
-- Curve doesn't intersect Axis.
|
||||
|
||||
|
||||
|
||||
uses
|
||||
Array1OfReal from TColStd,
|
||||
Shape from GeomAbs,
|
||||
SurfaceType from GeomAbs,
|
||||
Vec from gp,
|
||||
Pnt from gp,
|
||||
Pln from gp,
|
||||
Cone from gp,
|
||||
Cylinder from gp,
|
||||
Sphere from gp,
|
||||
Torus from gp,
|
||||
Ax3 from gp,
|
||||
Ax1 from gp,
|
||||
Dir from gp,
|
||||
BezierSurface from Geom,
|
||||
BSplineSurface from Geom,
|
||||
HSurface from Adaptor3d,
|
||||
HCurve from Adaptor3d
|
||||
|
||||
raises
|
||||
|
||||
OutOfRange from Standard,
|
||||
NoSuchObject from Standard,
|
||||
DomainError from Standard
|
||||
|
||||
is
|
||||
--
|
||||
-- Methods specific of SurfaceOfRevolution.
|
||||
--
|
||||
|
||||
Create returns SurfaceOfRevolution from Adaptor3d;
|
||||
|
||||
|
||||
Create(C : HCurve from Adaptor3d) returns SurfaceOfRevolution from Adaptor3d;
|
||||
---Purpose: The Curve is loaded.
|
||||
|
||||
Create(C : HCurve from Adaptor3d; V : Ax1 from gp)
|
||||
returns SurfaceOfRevolution from Adaptor3d;
|
||||
---Purpose: The Curve and the Direction are loaded.
|
||||
|
||||
|
||||
Load( me : in out ; C : HCurve from Adaptor3d)
|
||||
---Purpose: Changes the Curve
|
||||
is static;
|
||||
|
||||
Load( me : in out ; V : Ax1 from gp)
|
||||
---Purpose: Changes the Direction
|
||||
is static;
|
||||
|
||||
|
||||
AxeOfRevolution( me) returns Ax1 from gp
|
||||
is redefined static;
|
||||
|
||||
|
||||
--
|
||||
-- Implementation of Surface from Adaptor3d methods.
|
||||
--
|
||||
|
||||
--
|
||||
-- Global methods - Apply to the whole surface.
|
||||
--
|
||||
|
||||
FirstUParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
LastUParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
FirstVParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
LastVParameter(me) returns Real
|
||||
is redefined static;
|
||||
|
||||
UContinuity(me) returns Shape from GeomAbs
|
||||
is redefined static;
|
||||
|
||||
VContinuity(me) returns Shape from GeomAbs
|
||||
---Purpose: Return CN.
|
||||
is redefined static;
|
||||
|
||||
NbUIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of U intervals for continuity
|
||||
-- <S>. May be one if UContinuity(me) >= <S>
|
||||
is redefined static;
|
||||
|
||||
NbVIntervals(me; S : Shape from GeomAbs) returns Integer
|
||||
---Purpose: Returns the number of V intervals for continuity
|
||||
-- <S>. May be one if VContinuity(me) >= <S>
|
||||
is redefined static;
|
||||
|
||||
UIntervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs )
|
||||
---Purpose: Returns the intervals with the requested continuity
|
||||
-- in the U direction.
|
||||
raises
|
||||
OutOfRange from Standard -- if the Length of the array does
|
||||
-- have enought slots to accomodate
|
||||
-- the result.
|
||||
is redefined static ;
|
||||
|
||||
VIntervals(me; T : in out Array1OfReal from TColStd;
|
||||
S : Shape from GeomAbs )
|
||||
---Purpose: Returns the intervals with the requested continuity
|
||||
-- in the V direction.
|
||||
raises
|
||||
OutOfRange from Standard -- if the Length of the array does
|
||||
-- have enought slots to accomodate
|
||||
-- the result.
|
||||
is redefined static ;
|
||||
|
||||
UTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
|
||||
---Purpose: Returns a surface trimmed in the U direction
|
||||
-- equivalent of <me> between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is redefined static ;
|
||||
|
||||
VTrim(me; First, Last, Tol : Real) returns HSurface from Adaptor3d
|
||||
---Purpose: Returns a surface trimmed in the V direction between
|
||||
-- parameters <First> and <Last>. <Tol> is used to
|
||||
-- test for 3d points confusion.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: If <First> >= <Last>
|
||||
is redefined static ;
|
||||
|
||||
IsUClosed(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
IsVClosed(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
IsUPeriodic(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
UPeriod(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is redefined static;
|
||||
|
||||
IsVPeriodic(me) returns Boolean
|
||||
is redefined static;
|
||||
|
||||
VPeriod(me) returns Real
|
||||
raises
|
||||
DomainError from Standard -- if the curve is not periodic
|
||||
is redefined static;
|
||||
|
||||
Value (me; U, V : Real) returns Pnt from gp
|
||||
--- Purpose : Computes the point of parameters U,V on the surface.
|
||||
is redefined static;
|
||||
|
||||
D0 (me; U, V : Real; P : out Pnt from gp)
|
||||
--- Purpose : Computes the point of parameters U,V on the surface.
|
||||
is redefined static;
|
||||
|
||||
D1 (me; U, V : Real; P : out Pnt from gp; D1U, D1V : out Vec from gp)
|
||||
--- Purpose : Computes the point and the first derivatives on
|
||||
-- the surface.
|
||||
raises DomainError from Standard
|
||||
--- Purpose : Raised if the continuity of the current
|
||||
-- intervals is not C1.
|
||||
is redefined static;
|
||||
|
||||
D2 (me; U, V : Real;
|
||||
P : out Pnt from gp;
|
||||
D1U, D1V, D2U, D2V, D2UV : out Vec from gp)
|
||||
--- Purpose : Computes the point, the first and second
|
||||
-- derivatives on the surface.
|
||||
raises DomainError from Standard
|
||||
--- Purpose : Raised if the continuity of the current
|
||||
-- intervals is not C2.
|
||||
is redefined static;
|
||||
|
||||
D3 (me; U, V : Real;
|
||||
P : out Pnt from gp;
|
||||
D1U, D1V, D2U, D2V, D2UV, D3U, D3V, D3UUV, D3UVV : out Vec from gp)
|
||||
--- Purpose : Computes the point, the first, second and third
|
||||
-- derivatives on the surface.
|
||||
raises DomainError from Standard
|
||||
--- Purpose : Raised if the continuity of the current
|
||||
-- intervals is not C3.
|
||||
is redefined static;
|
||||
|
||||
DN (me; U, V : Real; Nu, Nv : Integer) returns Vec from gp
|
||||
--- Purpose : Computes the derivative of order Nu
|
||||
-- in the direction U and Nv in the direction V
|
||||
-- at the point P(U, V).
|
||||
raises DomainError from Standard,
|
||||
--- Purpose : Raised if the current U interval is not not CNu
|
||||
-- and the current V interval is not CNv.
|
||||
OutOfRange from Standard
|
||||
--- Purpose : Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
|
||||
is redefined static;
|
||||
|
||||
UResolution(me; R3d : Real ) returns Real
|
||||
---Purpose : Returns the parametric U resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is redefined static;
|
||||
|
||||
VResolution(me; R3d : Real ) returns Real
|
||||
---Purpose : Returns the parametric V resolution corresponding
|
||||
-- to the real space resolution <R3d>.
|
||||
is redefined static;
|
||||
|
||||
GetType(me) returns SurfaceType from GeomAbs
|
||||
---Purpose: Returns the type of the surface : Plane, Cylinder,
|
||||
-- Cone, Sphere, Torus, BezierSurface,
|
||||
-- BSplineSurface, SurfaceOfRevolution,
|
||||
-- SurfaceOfExtrusion, OtherSurface
|
||||
is redefined static;
|
||||
|
||||
--
|
||||
-- The following methods must be called when GetType returned
|
||||
-- the corresponding type.
|
||||
--
|
||||
|
||||
Plane(me) returns Pln from gp
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Cylinder(me) returns Cylinder from gp
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Cone(me) returns Cone from gp
|
||||
raises NoSuchObject from Standard
|
||||
---Purpose : Apex of the Cone = Cone.Position().Location()
|
||||
-- ==> ReferenceRadius = 0.
|
||||
is redefined static;
|
||||
|
||||
Sphere(me) returns Sphere from gp
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Torus(me) returns Torus from gp
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
UDegree(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
NbUPoles(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
VDegree(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
NbVPoles(me) returns Integer
|
||||
raises NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
NbUKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
NbVKnots(me) returns Integer
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
IsURational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
IsVRational(me) returns Boolean
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
|
||||
Bezier(me) returns BezierSurface from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
BSpline(me) returns BSplineSurface from Geom
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
is redefined static;
|
||||
|
||||
Axis(me) returns Ax3 from gp
|
||||
raises
|
||||
NoSuchObject from Standard -- only for SurfaceOfRevolution
|
||||
is static;
|
||||
|
||||
Direction(me) returns Dir from gp
|
||||
raises
|
||||
NoSuchObject from Standard -- only for SurfaceOfExtrusion
|
||||
is redefined static;
|
||||
|
||||
BasisCurve(me) returns HCurve from Adaptor3d
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
-- Only for SurfaceOfExtrusion and SurfaceOfRevolution
|
||||
is redefined static;
|
||||
fields
|
||||
|
||||
myBasisCurve : HCurve from Adaptor3d;
|
||||
myAxis : Ax1 from gp;
|
||||
myHaveAxis : Boolean from Standard;
|
||||
myAxeRev : Ax3 from gp;
|
||||
|
||||
|
||||
end SurfaceOfRevolution;
|
@@ -14,18 +14,34 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Adaptor3d_SurfaceOfRevolution.ixx>
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_HSurfaceOfRevolution.hxx>
|
||||
#include <Adaptor3d_SurfaceOfRevolution.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Ax3.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
#include <gp_Cylinder.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Sphere.hxx>
|
||||
#include <gp_Torus.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Adaptor3d_SurfaceOfRevolution
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Adaptor3d_SurfaceOfRevolution::Adaptor3d_SurfaceOfRevolution()
|
||||
:myHaveAxis(Standard_False)
|
||||
{}
|
||||
|
258
src/Adaptor3d/Adaptor3d_SurfaceOfRevolution.hxx
Normal file
258
src/Adaptor3d/Adaptor3d_SurfaceOfRevolution.hxx
Normal file
@@ -0,0 +1,258 @@
|
||||
// Created on: 1993-04-21
|
||||
// Created by: Bruno DUMORTIER
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Adaptor3d_SurfaceOfRevolution_HeaderFile
|
||||
#define _Adaptor3d_SurfaceOfRevolution_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <gp_Ax3.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
class Adaptor3d_HCurve;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_DomainError;
|
||||
class gp_Ax1;
|
||||
class Adaptor3d_HSurface;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class gp_Pln;
|
||||
class gp_Cylinder;
|
||||
class gp_Cone;
|
||||
class gp_Sphere;
|
||||
class gp_Torus;
|
||||
class Geom_BezierSurface;
|
||||
class Geom_BSplineSurface;
|
||||
class gp_Ax3;
|
||||
class gp_Dir;
|
||||
|
||||
|
||||
//! This class defines a complete surface of revolution.
|
||||
//! The surface is obtained by rotating a curve a complete revolution
|
||||
//! about an axis. The curve and the axis must be in the same plane.
|
||||
//! If the curve and the axis are not in the same plane it is always
|
||||
//! possible to be in the previous case after a cylindrical projection
|
||||
//! of the curve in a referenced plane.
|
||||
//! For a complete surface of revolution the parametric range is
|
||||
//! 0 <= U <= 2*PI. --
|
||||
//! The parametric range for V is defined with the revolved curve.
|
||||
//! The origin of the U parametrization is given by the position
|
||||
//! of the revolved curve (reference). The direction of the revolution
|
||||
//! axis defines the positive sense of rotation (trigonometric sense)
|
||||
//! corresponding to the increasing of the parametric value U.
|
||||
//! The derivatives are always defined for the u direction.
|
||||
//! For the v direction the definition of the derivatives depends on
|
||||
//! the degree of continuity of the referenced curve.
|
||||
//! Curve and Axis are coplanar.
|
||||
//! Curve doesn't intersect Axis.
|
||||
class Adaptor3d_SurfaceOfRevolution : public Adaptor3d_Surface
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_SurfaceOfRevolution();
|
||||
|
||||
//! The Curve is loaded.
|
||||
Standard_EXPORT Adaptor3d_SurfaceOfRevolution(const Handle(Adaptor3d_HCurve)& C);
|
||||
|
||||
//! The Curve and the Direction are loaded.
|
||||
Standard_EXPORT Adaptor3d_SurfaceOfRevolution(const Handle(Adaptor3d_HCurve)& C, const gp_Ax1& V);
|
||||
|
||||
//! Changes the Curve
|
||||
Standard_EXPORT void Load (const Handle(Adaptor3d_HCurve)& C);
|
||||
|
||||
//! Changes the Direction
|
||||
Standard_EXPORT void Load (const gp_Ax1& V);
|
||||
|
||||
Standard_EXPORT gp_Ax1 AxeOfRevolution() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real FirstUParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real LastUParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real FirstVParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real LastVParameter() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT GeomAbs_Shape UContinuity() const Standard_OVERRIDE;
|
||||
|
||||
//! Return CN.
|
||||
Standard_EXPORT GeomAbs_Shape VContinuity() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the number of U intervals for continuity
|
||||
//! <S>. May be one if UContinuity(me) >= <S>
|
||||
Standard_EXPORT Standard_Integer NbUIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the number of V intervals for continuity
|
||||
//! <S>. May be one if VContinuity(me) >= <S>
|
||||
Standard_EXPORT Standard_Integer NbVIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the intervals with the requested continuity
|
||||
//! in the U direction.
|
||||
Standard_EXPORT void UIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the intervals with the requested continuity
|
||||
//! in the V direction.
|
||||
Standard_EXPORT void VIntervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a surface trimmed in the U direction
|
||||
//! equivalent of <me> between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT Handle(Adaptor3d_HSurface) UTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a surface trimmed in the V direction between
|
||||
//! parameters <First> and <Last>. <Tol> is used to
|
||||
//! test for 3d points confusion.
|
||||
//! If <First> >= <Last>
|
||||
Standard_EXPORT Handle(Adaptor3d_HSurface) VTrim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsUClosed() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsVClosed() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsUPeriodic() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real UPeriod() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsVPeriodic() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Real VPeriod() const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameters U,V on the surface.
|
||||
Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point of parameters U,V on the surface.
|
||||
Standard_EXPORT void D0 (const Standard_Real U, const Standard_Real V, gp_Pnt& P) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point and the first derivatives on
|
||||
//! the surface.
|
||||
//! Raised if the continuity of the current
|
||||
//! intervals is not C1.
|
||||
Standard_EXPORT void D1 (const Standard_Real U, const Standard_Real V, gp_Pnt& P, gp_Vec& D1U, gp_Vec& D1V) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point, the first and second
|
||||
//! derivatives on the surface.
|
||||
//! Raised if the continuity of the current
|
||||
//! intervals is not C2.
|
||||
Standard_EXPORT void D2 (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) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the point, the first, second and third
|
||||
//! derivatives on the surface.
|
||||
//! Raised if the continuity of the current
|
||||
//! intervals is not C3.
|
||||
Standard_EXPORT void D3 (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) const Standard_OVERRIDE;
|
||||
|
||||
//! Computes the derivative of order Nu
|
||||
//! in the direction U and Nv in the direction V
|
||||
//! at the point P(U, V).
|
||||
//! Raised if the current U interval is not not CNu
|
||||
//! and the current V interval is not CNv.
|
||||
//! Raised if Nu + Nv < 1 or Nu < 0 or Nv < 0.
|
||||
Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the parametric U resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT Standard_Real UResolution (const Standard_Real R3d) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the parametric V resolution corresponding
|
||||
//! to the real space resolution <R3d>.
|
||||
Standard_EXPORT Standard_Real VResolution (const Standard_Real R3d) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the type of the surface : Plane, Cylinder,
|
||||
//! Cone, Sphere, Torus, BezierSurface,
|
||||
//! BSplineSurface, SurfaceOfRevolution,
|
||||
//! SurfaceOfExtrusion, OtherSurface
|
||||
Standard_EXPORT GeomAbs_SurfaceType GetType() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Pln Plane() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Cylinder Cylinder() const Standard_OVERRIDE;
|
||||
|
||||
//! Apex of the Cone = Cone.Position().Location()
|
||||
//! ==> ReferenceRadius = 0.
|
||||
Standard_EXPORT gp_Cone Cone() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Sphere Sphere() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Torus Torus() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer UDegree() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbUPoles() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer VDegree() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbVPoles() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbUKnots() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbVKnots() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsURational() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsVRational() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom_BezierSurface) Bezier() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Geom_BSplineSurface) BSpline() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT gp_Ax3 Axis() const;
|
||||
|
||||
Standard_EXPORT gp_Dir Direction() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Adaptor3d_HCurve) BasisCurve() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Adaptor3d_HCurve) myBasisCurve;
|
||||
gp_Ax1 myAxis;
|
||||
Standard_Boolean myHaveAxis;
|
||||
gp_Ax3 myAxeRev;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_SurfaceOfRevolution_HeaderFile
|
23
src/Adaptor3d/Adaptor3d_SurfacePtr.hxx
Normal file
23
src/Adaptor3d/Adaptor3d_SurfacePtr.hxx
Normal file
@@ -0,0 +1,23 @@
|
||||
// Created on: 1992-10-08
|
||||
// Created by: Isabelle GRIGNON
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_SurfacePtr_HeaderFile
|
||||
#define _Adaptor3d_SurfacePtr_HeaderFile
|
||||
|
||||
class Adaptor3d_Surface;
|
||||
typedef Adaptor3d_Surface* Adaptor3d_SurfacePtr;
|
||||
|
||||
#endif // _Adaptor3d_SurfacePtr_HeaderFile
|
@@ -1,282 +0,0 @@
|
||||
-- Created on: 1994-03-24
|
||||
-- Created by: model
|
||||
-- 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 TopolTool from Adaptor3d
|
||||
|
||||
---Purpose: This class provides a default topological tool,
|
||||
-- based on the Umin,Vmin,Umax,Vmax of an HSurface
|
||||
-- from Adaptor3d.
|
||||
-- All methods and fields may be redefined when
|
||||
-- inheriting from this class.
|
||||
-- This class is used to instantiate algorithmes
|
||||
-- as Intersection, outlines,...
|
||||
|
||||
|
||||
inherits TShared from MMgt
|
||||
|
||||
uses HSurface from Adaptor3d,
|
||||
HCurve2d from Adaptor2d,
|
||||
HVertex from Adaptor3d,
|
||||
HLine2d from Adaptor2d,
|
||||
Pnt2d from gp,
|
||||
Pnt from gp,
|
||||
State from TopAbs,
|
||||
Orientation from TopAbs,
|
||||
HArray1OfReal from TColStd,
|
||||
Array1OfReal from TColStd
|
||||
|
||||
raises DomainError from Standard
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
|
||||
returns TopolTool from Adaptor3d;
|
||||
|
||||
|
||||
Create(Surface: HSurface from Adaptor3d)
|
||||
|
||||
returns TopolTool from Adaptor3d;
|
||||
|
||||
|
||||
Initialize(me: mutable)
|
||||
is virtual;
|
||||
|
||||
Initialize(me: mutable; S: HSurface from Adaptor3d)
|
||||
is virtual;
|
||||
|
||||
|
||||
Initialize(me: mutable; Curve: HCurve2d from Adaptor2d)
|
||||
is virtual;
|
||||
|
||||
|
||||
|
||||
--- Arc iterator
|
||||
|
||||
|
||||
Init(me: mutable)
|
||||
is virtual;
|
||||
|
||||
|
||||
More(me: mutable)
|
||||
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Value(me: mutable)
|
||||
|
||||
returns HCurve2d from Adaptor2d
|
||||
raises DomainError from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Next(me: mutable)
|
||||
is virtual;
|
||||
|
||||
|
||||
--- Vertex iterator
|
||||
|
||||
|
||||
InitVertexIterator(me: mutable)
|
||||
is virtual;
|
||||
|
||||
|
||||
MoreVertex(me: mutable)
|
||||
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Vertex(me: mutable)
|
||||
|
||||
returns HVertex from Adaptor3d
|
||||
raises DomainError from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
NextVertex(me: mutable)
|
||||
is virtual;
|
||||
|
||||
|
||||
--- Other methods
|
||||
|
||||
Classify(me: mutable;
|
||||
P: Pnt2d from gp;
|
||||
Tol: Real from Standard;
|
||||
ReacdreOnPeriodic: Boolean from Standard = Standard_True)
|
||||
|
||||
returns State from TopAbs
|
||||
is virtual;
|
||||
|
||||
IsThePointOn(me: mutable;
|
||||
P: Pnt2d from gp;
|
||||
Tol: Real from Standard;
|
||||
ReacdreOnPeriodic: Boolean from Standard = Standard_True)
|
||||
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Orientation(me: mutable; C: HCurve2d from Adaptor2d)
|
||||
|
||||
---Purpose: If the function returns the orientation of the arc.
|
||||
-- If the orientation is FORWARD or REVERSED, the arc is
|
||||
-- a "real" limit of the surface.
|
||||
-- If the orientation is INTERNAL or EXTERNAL, the arc is
|
||||
-- considered as an arc on the surface.
|
||||
|
||||
returns Orientation from TopAbs
|
||||
is virtual;
|
||||
|
||||
|
||||
Orientation(me: mutable; V: HVertex from Adaptor3d)
|
||||
|
||||
---Purpose: Returns the orientation of the vertex V.
|
||||
-- The vertex has been found with an exploration on
|
||||
-- a given arc. The orientation is the orientation
|
||||
-- of the vertex on this arc.
|
||||
|
||||
returns Orientation from TopAbs
|
||||
is virtual;
|
||||
|
||||
|
||||
Identical(me: mutable; V1,V2: HVertex from Adaptor3d)
|
||||
|
||||
---Purpose: Returns True if the vertices V1 and V2 are identical.
|
||||
-- This method does not take the orientation of the
|
||||
-- vertices in account.
|
||||
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Has3d(me)
|
||||
---Purpose: answers if arcs and vertices may have 3d representations,
|
||||
-- so that we could use Tol3d and Pnt methods.
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Tol3d(me; C: HCurve2d from Adaptor2d)
|
||||
---Purpose: returns 3d tolerance of the arc C
|
||||
returns Real from Standard
|
||||
raises DomainError from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Tol3d(me; V: HVertex from Adaptor3d)
|
||||
---Purpose: returns 3d tolerance of the vertex V
|
||||
returns Real from Standard
|
||||
raises DomainError from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
Pnt(me; V: HVertex from Adaptor3d)
|
||||
---Purpose: returns 3d point of the vertex V
|
||||
returns Pnt from gp
|
||||
raises DomainError from Standard
|
||||
is virtual;
|
||||
|
||||
|
||||
--- sample points tools
|
||||
|
||||
ComputeSamplePoints(me: mutable)
|
||||
is virtual;
|
||||
|
||||
|
||||
NbSamplesU(me: mutable)
|
||||
---Purpose: compute the sample-points for the intersections algorithms
|
||||
returns Integer from Standard
|
||||
is virtual;
|
||||
|
||||
NbSamplesV(me: mutable)
|
||||
---Purpose: compute the sample-points for the intersections algorithms
|
||||
returns Integer from Standard
|
||||
is virtual;
|
||||
|
||||
NbSamples(me: mutable)
|
||||
---Purpose: compute the sample-points for the intersections algorithms
|
||||
returns Integer from Standard
|
||||
is virtual;
|
||||
|
||||
UParameters(me; theArray: out Array1OfReal from TColStd);
|
||||
---Purpose: return the set of U parameters on the surface
|
||||
-- obtained by the method SamplePnts
|
||||
|
||||
VParameters(me; theArray: out Array1OfReal from TColStd);
|
||||
---Purpose: return the set of V parameters on the surface
|
||||
-- obtained by the method SamplePnts
|
||||
|
||||
SamplePoint(me: mutable; Index: Integer from Standard;
|
||||
P2d : out Pnt2d from gp;
|
||||
P3d : out Pnt from gp)
|
||||
is virtual;
|
||||
|
||||
DomainIsInfinite(me: mutable)
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
--modified by NIZNHY-PKV Mon Apr 23 15:54:51 2001 f
|
||||
Edge (me)
|
||||
returns Address from Standard
|
||||
is virtual;
|
||||
--modified by NIZNHY-PKV Mon Apr 23 15:54:46 2001 t
|
||||
|
||||
--modified by NIZNHY-IFV Mon Sep 16 16:01:38 2005 f
|
||||
|
||||
SamplePnts(me: mutable; theDefl: Real from Standard; theNUmin, theNVmin: Integer from Standard)
|
||||
---Purpose: compute the sample-points for the intersections algorithms
|
||||
-- by adaptive algorithm for BSpline surfaces. For other surfaces algorithm
|
||||
-- is the same as in method ComputeSamplePoints(), but only fill arrays of U
|
||||
-- and V sample parameters;
|
||||
-- theDefl is a requred deflection
|
||||
-- theNUmin, theNVmin are minimal nb points for U and V.
|
||||
is virtual;
|
||||
|
||||
BSplSamplePnts(me: mutable; theDefl: Real from Standard; theNUmin, theNVmin: Integer from Standard)
|
||||
---Purpose: compute the sample-points for the intersections algorithms
|
||||
-- by adaptive algorithm for BSpline surfaces - is used in SamplePnts
|
||||
-- theDefl is a requred deflection
|
||||
-- theNUmin, theNVmin are minimal nb points for U and V.
|
||||
is virtual;
|
||||
|
||||
IsUniformSampling(me)
|
||||
---Purpose: Returns true if provide uniform sampling of points.
|
||||
returns Boolean from Standard
|
||||
is virtual;
|
||||
|
||||
fields
|
||||
|
||||
nbRestr : Integer from Standard;
|
||||
idRestr : Integer from Standard;
|
||||
Uinf : Real from Standard;
|
||||
Usup : Real from Standard;
|
||||
Vinf : Real from Standard;
|
||||
Vsup : Real from Standard;
|
||||
myRestr : HLine2d from Adaptor2d [4];
|
||||
nbVtx : Integer from Standard;
|
||||
idVtx : Integer from Standard;
|
||||
myVtx : HVertex from Adaptor3d [2];
|
||||
|
||||
myS : HSurface from Adaptor3d is protected;
|
||||
myNbSamplesU : Integer from Standard is protected;
|
||||
myNbSamplesV : Integer from Standard is protected;
|
||||
|
||||
myUPars : HArray1OfReal from TColStd is protected;
|
||||
myVPars : HArray1OfReal from TColStd is protected;
|
||||
|
||||
end TopolTool;
|
@@ -11,14 +11,21 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Adaptor3d_TopolTool.ixx>
|
||||
#include <Precision.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
|
||||
#include <Adaptor2d_HCurve2d.hxx>
|
||||
#include <Adaptor2d_HLine2d.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_HVertex.hxx>
|
||||
#include <Adaptor3d_TopolTool.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <gp_Cone.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Trsf.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#define myInfinite Precision::Infinite()
|
||||
|
||||
|
198
src/Adaptor3d/Adaptor3d_TopolTool.hxx
Normal file
198
src/Adaptor3d/Adaptor3d_TopolTool.hxx
Normal file
@@ -0,0 +1,198 @@
|
||||
// Created on: 1994-03-24
|
||||
// Created by: model
|
||||
// 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.
|
||||
|
||||
#ifndef _Adaptor3d_TopolTool_HeaderFile
|
||||
#define _Adaptor3d_TopolTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Address.hxx>
|
||||
class Adaptor2d_HLine2d;
|
||||
class Adaptor3d_HVertex;
|
||||
class Adaptor3d_HSurface;
|
||||
class Standard_DomainError;
|
||||
class Adaptor2d_HCurve2d;
|
||||
class gp_Pnt2d;
|
||||
class gp_Pnt;
|
||||
|
||||
|
||||
class Adaptor3d_TopolTool;
|
||||
DEFINE_STANDARD_HANDLE(Adaptor3d_TopolTool, MMgt_TShared)
|
||||
|
||||
//! This class provides a default topological tool,
|
||||
//! based on the Umin,Vmin,Umax,Vmax of an HSurface
|
||||
//! from Adaptor3d.
|
||||
//! All methods and fields may be redefined when
|
||||
//! inheriting from this class.
|
||||
//! This class is used to instantiate algorithmes
|
||||
//! as Intersection, outlines,...
|
||||
class Adaptor3d_TopolTool : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Adaptor3d_TopolTool();
|
||||
|
||||
Standard_EXPORT Adaptor3d_TopolTool(const Handle(Adaptor3d_HSurface)& Surface);
|
||||
|
||||
Standard_EXPORT virtual void Initialize();
|
||||
|
||||
Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_HSurface)& S);
|
||||
|
||||
Standard_EXPORT virtual void Initialize (const Handle(Adaptor2d_HCurve2d)& Curve);
|
||||
|
||||
Standard_EXPORT virtual void Init();
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean More();
|
||||
|
||||
Standard_EXPORT virtual Handle(Adaptor2d_HCurve2d) Value();
|
||||
|
||||
Standard_EXPORT virtual void Next();
|
||||
|
||||
Standard_EXPORT virtual void InitVertexIterator();
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean MoreVertex();
|
||||
|
||||
Standard_EXPORT virtual Handle(Adaptor3d_HVertex) Vertex();
|
||||
|
||||
Standard_EXPORT virtual void NextVertex();
|
||||
|
||||
Standard_EXPORT virtual TopAbs_State Classify (const gp_Pnt2d& P, const Standard_Real Tol, const Standard_Boolean ReacdreOnPeriodic = Standard_True);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsThePointOn (const gp_Pnt2d& P, const Standard_Real Tol, const Standard_Boolean ReacdreOnPeriodic = Standard_True);
|
||||
|
||||
//! If the function returns the orientation of the arc.
|
||||
//! If the orientation is FORWARD or REVERSED, the arc is
|
||||
//! a "real" limit of the surface.
|
||||
//! If the orientation is INTERNAL or EXTERNAL, the arc is
|
||||
//! considered as an arc on the surface.
|
||||
Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor2d_HCurve2d)& C);
|
||||
|
||||
//! Returns the orientation of the vertex V.
|
||||
//! The vertex has been found with an exploration on
|
||||
//! a given arc. The orientation is the orientation
|
||||
//! of the vertex on this arc.
|
||||
Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor3d_HVertex)& V);
|
||||
|
||||
//! Returns True if the vertices V1 and V2 are identical.
|
||||
//! This method does not take the orientation of the
|
||||
//! vertices in account.
|
||||
Standard_EXPORT virtual Standard_Boolean Identical (const Handle(Adaptor3d_HVertex)& V1, const Handle(Adaptor3d_HVertex)& V2);
|
||||
|
||||
//! answers if arcs and vertices may have 3d representations,
|
||||
//! so that we could use Tol3d and Pnt methods.
|
||||
Standard_EXPORT virtual Standard_Boolean Has3d() const;
|
||||
|
||||
//! returns 3d tolerance of the arc C
|
||||
Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor2d_HCurve2d)& C) const;
|
||||
|
||||
//! returns 3d tolerance of the vertex V
|
||||
Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor3d_HVertex)& V) const;
|
||||
|
||||
//! returns 3d point of the vertex V
|
||||
Standard_EXPORT virtual gp_Pnt Pnt (const Handle(Adaptor3d_HVertex)& V) const;
|
||||
|
||||
Standard_EXPORT virtual void ComputeSamplePoints();
|
||||
|
||||
//! compute the sample-points for the intersections algorithms
|
||||
Standard_EXPORT virtual Standard_Integer NbSamplesU();
|
||||
|
||||
//! compute the sample-points for the intersections algorithms
|
||||
Standard_EXPORT virtual Standard_Integer NbSamplesV();
|
||||
|
||||
//! compute the sample-points for the intersections algorithms
|
||||
Standard_EXPORT virtual Standard_Integer NbSamples();
|
||||
|
||||
//! return the set of U parameters on the surface
|
||||
//! obtained by the method SamplePnts
|
||||
Standard_EXPORT void UParameters (TColStd_Array1OfReal& theArray) const;
|
||||
|
||||
//! return the set of V parameters on the surface
|
||||
//! obtained by the method SamplePnts
|
||||
Standard_EXPORT void VParameters (TColStd_Array1OfReal& theArray) const;
|
||||
|
||||
Standard_EXPORT virtual void SamplePoint (const Standard_Integer Index, gp_Pnt2d& P2d, gp_Pnt& P3d);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean DomainIsInfinite();
|
||||
|
||||
Standard_EXPORT virtual Standard_Address Edge() const;
|
||||
|
||||
//! compute the sample-points for the intersections algorithms
|
||||
//! by adaptive algorithm for BSpline surfaces. For other surfaces algorithm
|
||||
//! is the same as in method ComputeSamplePoints(), but only fill arrays of U
|
||||
//! and V sample parameters;
|
||||
//! theDefl is a requred deflection
|
||||
//! theNUmin, theNVmin are minimal nb points for U and V.
|
||||
Standard_EXPORT virtual void SamplePnts (const Standard_Real theDefl, const Standard_Integer theNUmin, const Standard_Integer theNVmin);
|
||||
|
||||
//! compute the sample-points for the intersections algorithms
|
||||
//! by adaptive algorithm for BSpline surfaces - is used in SamplePnts
|
||||
//! theDefl is a requred deflection
|
||||
//! theNUmin, theNVmin are minimal nb points for U and V.
|
||||
Standard_EXPORT virtual void BSplSamplePnts (const Standard_Real theDefl, const Standard_Integer theNUmin, const Standard_Integer theNVmin);
|
||||
|
||||
//! Returns true if provide uniform sampling of points.
|
||||
Standard_EXPORT virtual Standard_Boolean IsUniformSampling() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Adaptor3d_TopolTool,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Handle(Adaptor3d_HSurface) myS;
|
||||
Standard_Integer myNbSamplesU;
|
||||
Standard_Integer myNbSamplesV;
|
||||
Handle(TColStd_HArray1OfReal) myUPars;
|
||||
Handle(TColStd_HArray1OfReal) myVPars;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Integer nbRestr;
|
||||
Standard_Integer idRestr;
|
||||
Standard_Real Uinf;
|
||||
Standard_Real Usup;
|
||||
Standard_Real Vinf;
|
||||
Standard_Real Vsup;
|
||||
Handle(Adaptor2d_HLine2d) myRestr[4];
|
||||
Standard_Integer nbVtx;
|
||||
Standard_Integer idVtx;
|
||||
Handle(Adaptor3d_HVertex) myVtx[2];
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Adaptor3d_TopolTool_HeaderFile
|
48
src/Adaptor3d/FILES
Normal file
48
src/Adaptor3d/FILES
Normal file
@@ -0,0 +1,48 @@
|
||||
Adaptor3d_Curve.cxx
|
||||
Adaptor3d_Curve.hxx
|
||||
Adaptor3d_CurveOnSurface.cxx
|
||||
Adaptor3d_CurveOnSurface.hxx
|
||||
Adaptor3d_CurveOnSurfacePtr.hxx
|
||||
Adaptor3d_CurvePtr.hxx
|
||||
Adaptor3d_GenHCurve.gxx
|
||||
Adaptor3d_GenHCurve.lxx
|
||||
Adaptor3d_GenHSurface.gxx
|
||||
Adaptor3d_GenHSurface.lxx
|
||||
Adaptor3d_HCurve.cxx
|
||||
Adaptor3d_HCurve.hxx
|
||||
Adaptor3d_HCurve.lxx
|
||||
Adaptor3d_HCurveOnSurface.hxx
|
||||
Adaptor3d_HCurveOnSurface_0.cxx
|
||||
Adaptor3d_HIsoCurve.hxx
|
||||
Adaptor3d_HIsoCurve_0.cxx
|
||||
Adaptor3d_HOffsetCurve.hxx
|
||||
Adaptor3d_HOffsetCurve_0.cxx
|
||||
Adaptor3d_HSurface.cxx
|
||||
Adaptor3d_HSurface.hxx
|
||||
Adaptor3d_HSurface.lxx
|
||||
Adaptor3d_HSurfaceOfLinearExtrusion.hxx
|
||||
Adaptor3d_HSurfaceOfLinearExtrusion_0.cxx
|
||||
Adaptor3d_HSurfaceOfRevolution.hxx
|
||||
Adaptor3d_HSurfaceOfRevolution_0.cxx
|
||||
Adaptor3d_HSurfaceTool.cxx
|
||||
Adaptor3d_HSurfaceTool.hxx
|
||||
Adaptor3d_HSurfaceTool.lxx
|
||||
Adaptor3d_HVertex.cxx
|
||||
Adaptor3d_HVertex.hxx
|
||||
Adaptor3d_InterFunc.cxx
|
||||
Adaptor3d_InterFunc.hxx
|
||||
Adaptor3d_IsoCurve.cxx
|
||||
Adaptor3d_IsoCurve.hxx
|
||||
Adaptor3d_IsoCurve.lxx
|
||||
Adaptor3d_OffsetCurve.cxx
|
||||
Adaptor3d_OffsetCurve.hxx
|
||||
Adaptor3d_OffsetCurve.lxx
|
||||
Adaptor3d_Surface.cxx
|
||||
Adaptor3d_Surface.hxx
|
||||
Adaptor3d_SurfaceOfLinearExtrusion.cxx
|
||||
Adaptor3d_SurfaceOfLinearExtrusion.hxx
|
||||
Adaptor3d_SurfaceOfRevolution.cxx
|
||||
Adaptor3d_SurfaceOfRevolution.hxx
|
||||
Adaptor3d_SurfacePtr.hxx
|
||||
Adaptor3d_TopolTool.cxx
|
||||
Adaptor3d_TopolTool.hxx
|
Reference in New Issue
Block a user