CommitLineData
42cf5bc1 1// Created on: 1993-01-09
2// Created by: CKY / Contract Toubro-Larsen ( Kiran )
3// Copyright (c) 1993-1999 Matra Datavision
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Integer.hxx>
24#include <IGESGeom_HArray1OfCurveOnSurface.hxx>
25#include <IGESData_IGESEntity.hxx>
26#include <Standard_Boolean.hxx>
27class IGESData_IGESEntity;
28class IGESGeom_CurveOnSurface;
29class Standard_OutOfRange;
30
31
32class IGESGeom_TrimmedSurface;
33DEFINE_STANDARD_HANDLE(IGESGeom_TrimmedSurface, IGESData_IGESEntity)
34
35//! defines IGESTrimmedSurface, Type <144> Form <0>
36//! in package IGESGeom
37//! A simple closed curve in Euclidean plane divides the
38//! plane in to two disjoint, open connected components; one
39//! bounded, one unbounded. The bounded one is called the
40//! interior region to the curve. Unbounded component is called
41//! exterior region to the curve. The domain of the trimmed
42//! surface is defined as the interior of the outer boundaries
43//! and exterior of the inner boundaries and includes the
44//! boundary curves.
45class IGESGeom_TrimmedSurface : public IGESData_IGESEntity
46{
47
48public:
49
50
51 Standard_EXPORT IGESGeom_TrimmedSurface();
52
53 //! This method is used to set the fields of the class
54 //! TrimmedSurface
55 //! - aSurface : Surface to be trimmed
56 //! - aFlag : Outer boundary type
57 //! False = The outer boundary is the boundary of
58 //! rectangle D which is the domain of the
59 //! surface to be trimmed
60 //! True = otherwise
61 //! - anOuter : Closed curve which constitutes outer boundary
62 //! - allInners : Array of closed curves which constitute the
63 //! inner boundary
64 Standard_EXPORT void Init (const Handle(IGESData_IGESEntity)& aSurface, const Standard_Integer aFlag, const Handle(IGESGeom_CurveOnSurface)& anOuter, const Handle(IGESGeom_HArray1OfCurveOnSurface)& allInners);
65
66 //! returns the surface to be trimmed
67 Standard_EXPORT Handle(IGESData_IGESEntity) Surface() const;
68
69 //! returns True if outer contour exists
70 Standard_EXPORT Standard_Boolean HasOuterContour() const;
71
72 //! returns the outer contour of the trimmed surface
73 Standard_EXPORT Handle(IGESGeom_CurveOnSurface) OuterContour() const;
74
75 //! returns the outer contour type of the trimmed surface
76 //! 0 : The outer boundary is the boundary of D
77 //! 1 : otherwise
78 Standard_EXPORT Standard_Integer OuterBoundaryType() const;
79
80 //! returns the number of inner boundaries
81 Standard_EXPORT Standard_Integer NbInnerContours() const;
82
83 //! returns the Index'th inner contour
84 //! raises exception if Index <= 0 or Index > NbInnerContours()
85 Standard_EXPORT Handle(IGESGeom_CurveOnSurface) InnerContour (const Standard_Integer Index) const;
86
87
88
89
92efcf78 90 DEFINE_STANDARD_RTTIEXT(IGESGeom_TrimmedSurface,IGESData_IGESEntity)
42cf5bc1 91
92protected:
93
94
95
96
97private:
98
99
100 Handle(IGESData_IGESEntity) theSurface;
101 Standard_Integer theFlag;
102 Handle(IGESGeom_CurveOnSurface) theOuterCurve;
103 Handle(IGESGeom_HArray1OfCurveOnSurface) theInnerCurves;
104
105
106};
107
108
109
110
111
112
113