1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
|
// File generated by CPPExt (Value)
//
// Copyright (C) 1991 - 2000 by
// Matra Datavision SA. All rights reserved.
//
// Copyright (C) 2001 - 2004 by
// Open CASCADE SA. All rights reserved.
//
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.
#ifndef _GeomAPI_IntCS_HeaderFile
#define _GeomAPI_IntCS_HeaderFile
#ifndef _Handle_Geom_Curve_HeaderFile
#include <Handle_Geom_Curve.hxx>
#endif
#ifndef _IntCurveSurface_HInter_HeaderFile
#include <IntCurveSurface_HInter.hxx>
#endif
#ifndef _Handle_Geom_Surface_HeaderFile
#include <Handle_Geom_Surface.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Quantity_Parameter_HeaderFile
#include <Quantity_Parameter.hxx>
#endif
class Geom_Curve;
class StdFail_NotDone;
class Standard_OutOfRange;
class Geom_Surface;
class gp_Pnt;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
//! This class implements methods for <br>
//! computing intersection points and segments between a <br>
class GeomAPI_IntCS {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
//
//! Creates an empty object. Use the <br>
//! function Perform for further initialization of the algorithm by <br>
//! the curve and the surface. <br>
Standard_EXPORT GeomAPI_IntCS();
//! Computes the intersections between <br>
//! the curve C and the surface S. <br>
//! Warning <br>
//! Use function IsDone to verify that the intersections are computed successfully. <br>
Standard_EXPORT GeomAPI_IntCS(const Handle(Geom_Curve)& C,const Handle(Geom_Surface)& S);
//! This function Initializes an algorithm with the curve C and the <br>
//! surface S and computes the intersections between C and S. <br>
//! Warning <br>
//! Use function IsDone to verify that the intersections are computed successfully. <br>
Standard_EXPORT void Perform(const Handle(Geom_Curve)& C,const Handle(Geom_Surface)& S) ;
//! Returns true if the intersections are successfully computed. <br>
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns the number of Intersection Points <br>
//! if IsDone returns True. <br>
//! else NotDone is raised. <br>
Standard_EXPORT Standard_Integer NbPoints() const;
//! Returns the Intersection Point of range <Index>in case of cross intersection. <br>
//! Raises NotDone if the computation has failed or if <br>
//! the computation has not been done <br>
//! raises OutOfRange if Index is not in the range <1..NbPoints> <br>
Standard_EXPORT const gp_Pnt& Point(const Standard_Integer Index) const;
//! Returns parameter W on the curve <br>
//! and (parameters U,V) on the surface of the computed intersection point <br>
//! of index Index in case of cross intersection. <br>
//! Exceptions <br>
//! StdFail_NotDone if intersection algorithm fails or is not initialized. <br>
//! Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where <br>
//! NbPoints is the number of computed intersection points. <br>
Standard_EXPORT void Parameters(const Standard_Integer Index,Quantity_Parameter& U,Quantity_Parameter& V,Quantity_Parameter& W) const;
//! Returns the number of computed <br>
//! intersection segments in case of tangential intersection. <br>
//! Exceptions <br>
//! StdFail_NotDone if the intersection algorithm fails or is not initialized. <br>
Standard_EXPORT Standard_Integer NbSegments() const;
//! Returns the computed intersection <br>
//! segment of index Index in case of tangential intersection. <br>
//! Intersection segment is a portion of the initial curve tangent to surface. <br>
//! Exceptions <br>
//! StdFail_NotDone if intersection algorithm fails or is not initialized. <br>
//! Standard_OutOfRange if Index is not in the range [ 1,NbSegments ], <br>
//! where NbSegments is the number of computed intersection segments. <br>
Standard_EXPORT Handle_Geom_Curve Segment(const Standard_Integer Index) const;
//! Returns the parameters of the first (U1,V1) and the last (U2,V2) points <br>
//! of curve's segment on the surface in case of tangential intersection. <br>
//! Index is the number of computed intersection segments. <br>
//! Exceptions <br>
//! StdFail_NotDone if intersection algorithm fails or is not initialized. <br>
//! Standard_OutOfRange if Index is not in the range [ 1,NbSegments ], <br>
//! where NbSegments is the number of computed intersection segments. <br>
Standard_EXPORT void Parameters(const Standard_Integer Index,Quantity_Parameter& U1,Quantity_Parameter& V1,Quantity_Parameter& U2,Quantity_Parameter& V2) const;
protected:
// Methods PROTECTED
//
// Fields PROTECTED
//
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
Handle_Geom_Curve myCurve;
IntCurveSurface_HInter myIntCS;
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif
|