Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:25

0001 // Created on: 1993-06-17
0002 // Created by: Jean Yves LEBEY
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 _TopOpeBRepBuild_WireEdgeClassifier_HeaderFile
0018 #define _TopOpeBRepBuild_WireEdgeClassifier_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <gp_Pnt2d.hxx>
0026 #include <BRepClass_Edge.hxx>
0027 #include <BRepClass_FacePassiveClassifier.hxx>
0028 #include <TopoDS_Shape.hxx>
0029 #include <TopOpeBRepBuild_CompositeClassifier.hxx>
0030 #include <TopAbs_State.hxx>
0031 class TopOpeBRepBuild_BlockBuilder;
0032 class TopOpeBRepBuild_Loop;
0033 
0034 
0035 
0036 //! Classify edges and wires.
0037 //! shapes are Wires, Element are Edge.
0038 class TopOpeBRepBuild_WireEdgeClassifier  : public TopOpeBRepBuild_CompositeClassifier
0039 {
0040 public:
0041 
0042   DEFINE_STANDARD_ALLOC
0043 
0044   
0045   //! Creates a classifier on edge <F>.
0046   //! Used to compare edges and wires on the edge <F>.
0047   Standard_EXPORT TopOpeBRepBuild_WireEdgeClassifier(const TopoDS_Shape& F, const TopOpeBRepBuild_BlockBuilder& BB);
0048   
0049   Standard_EXPORT virtual TopAbs_State Compare (const Handle(TopOpeBRepBuild_Loop)& L1, const Handle(TopOpeBRepBuild_Loop)& L2) Standard_OVERRIDE;
0050   
0051   Standard_EXPORT TopoDS_Shape LoopToShape (const Handle(TopOpeBRepBuild_Loop)& L);
0052   
0053   //! classify wire <B1> with wire <B2>
0054   Standard_EXPORT TopAbs_State CompareShapes (const TopoDS_Shape& B1, const TopoDS_Shape& B2) Standard_OVERRIDE;
0055   
0056   //! classify edge <E> with wire <B>
0057   Standard_EXPORT TopAbs_State CompareElementToShape (const TopoDS_Shape& E, const TopoDS_Shape& B) Standard_OVERRIDE;
0058   
0059   //! prepare classification involving wire <B>
0060   //! calls ResetElement on first edge of <B>
0061   Standard_EXPORT void ResetShape (const TopoDS_Shape& B) Standard_OVERRIDE;
0062   
0063   //! prepare classification involving edge <E>
0064   //! define 2D point (later used in Compare()) on first vertex of edge <E>.
0065   Standard_EXPORT void ResetElement (const TopoDS_Shape& E) Standard_OVERRIDE;
0066   
0067   //! Add the edge <E> in the set of edges used in 2D point
0068   //! classification.
0069   Standard_EXPORT Standard_Boolean CompareElement (const TopoDS_Shape& E) Standard_OVERRIDE;
0070   
0071   //! Returns state of classification of 2D point, defined by
0072   //! ResetElement, with the current set of edges, defined by Compare.
0073   Standard_EXPORT TopAbs_State State() Standard_OVERRIDE;
0074 
0075 
0076 
0077 
0078 protected:
0079 
0080 
0081 
0082 
0083 
0084 private:
0085 
0086 
0087 
0088   Standard_Boolean myFirstCompare;
0089   gp_Pnt2d myPoint2d;
0090   BRepClass_Edge myBCEdge;
0091   BRepClass_FacePassiveClassifier myFPC;
0092   TopoDS_Shape myShape;
0093 
0094 
0095 };
0096 
0097 
0098 
0099 
0100 
0101 
0102 
0103 #endif // _TopOpeBRepBuild_WireEdgeClassifier_HeaderFile