Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:09

0001 // Created on: 1993-01-28
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IntPatch_PrmPrmIntersection_HeaderFile
0018 #define _IntPatch_PrmPrmIntersection_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <IntPatch_SequenceOfLine.hxx>
0022 #include <IntSurf_ListOfPntOn2S.hxx>
0023 
0024 class Adaptor3d_TopolTool;
0025 class IntPatch_Polyhedron;
0026 class IntPatch_PrmPrmIntersection_T3Bits;
0027 class IntSurf_LineOn2S;
0028 
0029 //! Implementation of the Intersection between two bi-parametrised surfaces.
0030 //!
0031 //! To avoid multiple constructions of the approximated
0032 //! polyhedron of the surfaces, the algorithm can be
0033 //! called with the two surfaces and their associated polyhedron.
0034 class IntPatch_PrmPrmIntersection 
0035 {
0036 public:
0037 
0038   DEFINE_STANDARD_ALLOC
0039 
0040   
0041   //! Empty Constructor
0042   Standard_EXPORT IntPatch_PrmPrmIntersection();
0043   
0044   //! Performs the intersection between <Caro1>  and
0045   //! <Caro2>.  Associated Polyhedrons <Polyhedron1>
0046   //! and <Polyhedron2> are given.
0047   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const IntPatch_Polyhedron& Polyhedron1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const IntPatch_Polyhedron& Polyhedron2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment);
0048   
0049   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const IntPatch_Polyhedron& Polyhedron1, const Handle(Adaptor3d_TopolTool)& Domain1, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment);
0050   
0051   //! Performs the intersection between <Caro1>  and
0052   //! <Caro2>. The method computes the polyhedron on
0053   //! each surface.
0054   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, const Standard_Boolean ClearFlag = Standard_True);
0055   
0056   //! Performs the intersection between <Caro1>  and
0057   //! <Caro2>. The method computes the polyhedron on
0058   //! each surface.
0059   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment, IntSurf_ListOfPntOn2S& ListOfPnts);
0060   
0061   //! Performs the intersection between <Caro1>  and
0062   //! <Caro2>. The method computes the polyhedron on
0063   //! each surface.
0064   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment);
0065   
0066   //! Performs the intersection between <Caro1>  and
0067   //! <Caro2>. The method computes the polyhedron on
0068   //! each surface.
0069   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment);
0070   
0071   //! Performs  the intersection between <Caro1> and
0072   //! <Caro2>.
0073   //!
0074   //! The polyhedron which approximates     <Caro2>,
0075   //! <Polyhedron2> is given. The other one is
0076   //! computed.
0077   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const IntPatch_Polyhedron& Polyhedron2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment);
0078   
0079   //! Performs  the intersection between <Caro1> and
0080   //! <Caro2>.
0081   //!
0082   //! The polyhedron which approximates     <Caro1>,
0083   //! <Polyhedron1> is given. The other one is
0084   //! computed.
0085   Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& Caro1, const IntPatch_Polyhedron& Polyhedron1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Caro2, const Handle(Adaptor3d_TopolTool)& Domain2, const Standard_Real TolTangency, const Standard_Real Epsilon, const Standard_Real Deflection, const Standard_Real Increment);
0086   
0087   //! Returns true if the calculus was successful.
0088     Standard_Boolean IsDone() const;
0089   
0090   //! Returns true if the is no intersection.
0091     Standard_Boolean IsEmpty() const;
0092   
0093   //! Returns the number of intersection lines.
0094     Standard_Integer NbLines() const;
0095   
0096   //! Returns the line of range Index.
0097   //! An exception is raised if Index<=0 or Index>NbLine.
0098     const Handle(IntPatch_Line)& Line (const Standard_Integer Index) const;
0099   
0100   //! Computes about <NbPoints>  Intersection Points  on
0101   //! the Line <IndexLine> between  the Points of  Index
0102   //! <LowPoint> and <HighPoint>.
0103   //!
0104   //! All  the points  of the line  of index <IndexLine>
0105   //! with an index  between <LowPoint>  and <HighPoint>
0106   //! are in the returned  line. New Points are inserted
0107   //! between existing points  if  those  points are not
0108   //! too closed.
0109   //!
0110   //! An exception is raised if Index<=0 or Index>NbLine.
0111   //! or if IsDone returns False
0112   Standard_EXPORT Handle(IntPatch_Line) NewLine (const Handle(Adaptor3d_Surface)& Caro1, const Handle(Adaptor3d_Surface)& Caro2, const Standard_Integer IndexLine, const Standard_Integer LowPoint, const Standard_Integer HighPoint, const Standard_Integer NbPoints) const;
0113   
0114     Standard_Integer GrilleInteger (const Standard_Integer ix, const Standard_Integer iy, const Standard_Integer iz) const;
0115   
0116     void IntegerGrille (const Standard_Integer t, Standard_Integer& ix, Standard_Integer& iy, Standard_Integer& iz) const;
0117   
0118     Standard_Integer DansGrille (const Standard_Integer t) const;
0119   
0120     Standard_Integer NbPointsGrille() const;
0121   
0122   Standard_EXPORT void RemplitLin (const Standard_Integer x1, const Standard_Integer y1, const Standard_Integer z1, const Standard_Integer x2, const Standard_Integer y2, const Standard_Integer z2, IntPatch_PrmPrmIntersection_T3Bits& Map) const;
0123   
0124   Standard_EXPORT void RemplitTri (const Standard_Integer x1, const Standard_Integer y1, const Standard_Integer z1, const Standard_Integer x2, const Standard_Integer y2, const Standard_Integer z2, const Standard_Integer x3, const Standard_Integer y3, const Standard_Integer z3, IntPatch_PrmPrmIntersection_T3Bits& Map) const;
0125   
0126   Standard_EXPORT void Remplit (const Standard_Integer a, const Standard_Integer b, const Standard_Integer c, IntPatch_PrmPrmIntersection_T3Bits& Map) const;
0127   
0128   Standard_Integer CodeReject (const Standard_Real x1, const Standard_Real y1, const Standard_Real z1, const Standard_Real x2, const Standard_Real y2, const Standard_Real z2, const Standard_Real x3, const Standard_Real y3, const Standard_Real z3) const;
0129   
0130   Standard_EXPORT void PointDepart (Handle(IntSurf_LineOn2S)& LineOn2S, const Handle(Adaptor3d_Surface)& S1, const Standard_Integer SU1, const Standard_Integer SV1, const Handle(Adaptor3d_Surface)& S2, const Standard_Integer SU2, const Standard_Integer SV2) const;
0131 
0132 
0133 
0134 
0135 protected:
0136 
0137 
0138 
0139 
0140 
0141 private:
0142 
0143 
0144 
0145   Standard_Boolean done;
0146   Standard_Boolean empt;
0147   IntPatch_SequenceOfLine SLin;
0148 
0149 
0150 };
0151 
0152 
0153 #include <IntPatch_PrmPrmIntersection.lxx>
0154 
0155 
0156 
0157 
0158 
0159 #endif // _IntPatch_PrmPrmIntersection_HeaderFile