|
||||
File indexing completed on 2025-01-18 10:03:13
0001 // Created on: 1993-07-06 0002 // Created by: Yves FRICAUD 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 _BRepMAT2d_BisectingLocus_HeaderFile 0018 #define _BRepMAT2d_BisectingLocus_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <MAT2d_Tool2d.hxx> 0025 #include <MAT2d_DataMapOfBiIntInteger.hxx> 0026 #include <Standard_Integer.hxx> 0027 #include <MAT_Side.hxx> 0028 #include <GeomAbs_JoinType.hxx> 0029 #include <MAT_DataMapOfIntegerBasicElt.hxx> 0030 class MAT_Graph; 0031 class BRepMAT2d_Explorer; 0032 class MAT_BasicElt; 0033 class Geom2d_Geometry; 0034 class gp_Pnt2d; 0035 class MAT_Node; 0036 class Bisector_Bisec; 0037 class MAT_Arc; 0038 0039 0040 //! BisectingLocus generates and contains the Bisecting_Locus 0041 //! of a set of lines from Geom2d, defined by <ExploSet>. 0042 //! 0043 //! If the set of lines contains closed lines: 0044 //! ------------------------------------------ 0045 //! These lines cut the plane in areas. 0046 //! One map can be computed for each area. 0047 //! 0048 //! Bisecting locus computes a map in an area. 0049 //! The area is defined by a side (MAT_Left,MAT_Right) 0050 //! on one of the closed lines. 0051 //! 0052 //! If the set of lines contains only open lines: 0053 //! -------------------------------------------- 0054 //! the map recovers all the plane. 0055 //! 0056 //! Warning: Assume the orientation of the closed lines are 0057 //! compatible. 0058 //! 0059 //! Assume the explo contains only lines located in the 0060 //! area where the bisecting locus will be computed. 0061 //! 0062 //! Assume a line don't cross itself or an other line. 0063 //! 0064 //! Remark: 0065 //! the curves coming from the explorer can be 0066 //! decomposed in different parts. It the case for the 0067 //! curves other than circles or lines. 0068 //! 0069 //! The map of bisecting locus is described by a graph. 0070 //! - The BasicsElements correspond to elements on 0071 //! the figure described by the Explorer from BRepMAT2d. 0072 //! - The Arcs correspond to the bisectors. 0073 //! - The Nodes are the extremities of the arcs. 0074 class BRepMAT2d_BisectingLocus 0075 { 0076 public: 0077 0078 DEFINE_STANDARD_ALLOC 0079 0080 0081 Standard_EXPORT BRepMAT2d_BisectingLocus(); 0082 0083 //! Computation of the Bisector_Locus in a set of Lines 0084 //! defined in <anExplo>. 0085 //! The bisecting locus are computed on the side <aSide> 0086 //! from the line <LineIndex> in <anExplo>. 0087 Standard_EXPORT void Compute (BRepMAT2d_Explorer& anExplo, const Standard_Integer LineIndex = 1, const MAT_Side aSide = MAT_Left, const GeomAbs_JoinType aJoinType = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False); 0088 0089 //! Returns True if Compute has succeeded. 0090 Standard_EXPORT Standard_Boolean IsDone() const; 0091 0092 //! Returns <theGraph> of <me>. 0093 Standard_EXPORT Handle(MAT_Graph) Graph() const; 0094 0095 //! Returns the number of contours. 0096 Standard_EXPORT Standard_Integer NumberOfContours() const; 0097 0098 //! Returns the number of BasicElts on the line 0099 //! <IndLine>. 0100 Standard_EXPORT Standard_Integer NumberOfElts (const Standard_Integer IndLine) const; 0101 0102 //! Returns the number of sections of a curve. 0103 //! this curve is the Indexth curve in the IndLineth contour 0104 //! given by anExplo. 0105 Standard_EXPORT Standard_Integer NumberOfSections (const Standard_Integer IndLine, const Standard_Integer Index) const; 0106 0107 //! Returns the BasicElts located at the position 0108 //! <Index> on the contour designed by <IndLine>. 0109 //! Remark: the BasicElts on a contour are sorted. 0110 Standard_EXPORT Handle(MAT_BasicElt) BasicElt (const Standard_Integer IndLine, const Standard_Integer Index) const; 0111 0112 //! Returns the geometry linked to the <BasicElt>. 0113 Standard_EXPORT Handle(Geom2d_Geometry) GeomElt (const Handle(MAT_BasicElt)& aBasicElt) const; 0114 0115 //! Returns the geometry of type <gp> linked to 0116 //! the <Node>. 0117 Standard_EXPORT gp_Pnt2d GeomElt (const Handle(MAT_Node)& aNode) const; 0118 0119 //! Returns the geometry of type <Bissec> 0120 //! linked to the arc <ARC>. 0121 //! <Reverse> is False when the FirstNode of <anArc> 0122 //! correspond to the first point of geometry. 0123 Standard_EXPORT Bisector_Bisec GeomBis (const Handle(MAT_Arc)& anArc, Standard_Boolean& Reverse) const; 0124 0125 0126 0127 0128 protected: 0129 0130 0131 0132 0133 0134 private: 0135 0136 0137 Standard_EXPORT void Fusion(); 0138 0139 Standard_EXPORT void RenumerationAndFusion (const Standard_Integer IndexLine, const Standard_Integer LengthLine, Standard_Integer& IndexLast, MAT_DataMapOfIntegerBasicElt& NewMap); 0140 0141 0142 Handle(MAT_Graph) theGraph; 0143 MAT2d_Tool2d theTool; 0144 Standard_Boolean isDone; 0145 MAT2d_DataMapOfBiIntInteger nbSect; 0146 Standard_Integer nbContours; 0147 0148 0149 }; 0150 0151 0152 0153 0154 0155 0156 0157 #endif // _BRepMAT2d_BisectingLocus_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |