Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:52

0001 // Created on: 1992-02-18
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1992-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 _HLRBRep_PolyAlgo_HeaderFile
0018 #define _HLRBRep_PolyAlgo_HeaderFile
0019 
0020 #include <BRepAdaptor_Surface.hxx>
0021 #include <BRepAdaptor_Curve.hxx>
0022 #include <BRepAdaptor_Curve2d.hxx>
0023 #include <GeomAbs_Shape.hxx>
0024 #include <HLRAlgo_Array1OfTData.hxx>
0025 #include <HLRAlgo_Array1OfPISeg.hxx>
0026 #include <HLRAlgo_Array1OfPINod.hxx>
0027 #include <HLRAlgo_ListOfBPoint.hxx>
0028 #include <HLRAlgo_PolyAlgo.hxx>
0029 #include <HLRAlgo_PolyInternalNode.hxx>
0030 #include <HLRAlgo_Projector.hxx>
0031 #include <TColStd_Array1OfInteger.hxx>
0032 #include <TopTools_IndexedMapOfShape.hxx>
0033 #include <TopTools_ListOfShape.hxx>
0034 #include <TopTools_MapOfShape.hxx>
0035 #include <TopTools_SequenceOfShape.hxx>
0036 
0037 class Geom_Surface;
0038 class TopoDS_Edge;
0039 class HLRAlgo_PolyInternalData;
0040 class HLRAlgo_EdgeStatus;
0041 struct HLRAlgo_TriangleData;
0042 
0043 class HLRBRep_PolyAlgo;
0044 DEFINE_STANDARD_HANDLE(HLRBRep_PolyAlgo, Standard_Transient)
0045 
0046 //! to remove Hidden lines on Shapes with Triangulations.
0047 //! A framework to compute the shape as seen in
0048 //! a projection plane. This is done by calculating
0049 //! the visible and the hidden parts of the shape.
0050 //! HLRBRep_PolyAlgo works with three types of entity:
0051 //! -   shapes to be visualized (these shapes must
0052 //! have already been triangulated.)
0053 //! -   edges in these shapes (these edges are
0054 //! defined as polygonal lines on the
0055 //! triangulation of the shape, and are the basic
0056 //! entities which will be visualized or hidden), and
0057 //! -   triangles in these shapes which hide the edges.
0058 //! HLRBRep_PolyAlgo is based on the principle
0059 //! of comparing each edge of the shape to be
0060 //! visualized with each of the triangles produced
0061 //! by the triangulation of the shape, and
0062 //! calculating the visible and the hidden parts of each edge.
0063 //! For a given projection, HLRBRep_PolyAlgo
0064 //! calculates a set of lines characteristic of the
0065 //! object being represented. It is also used in
0066 //! conjunction with the HLRBRep_PolyHLRToShape extraction
0067 //! utilities, which reconstruct a new, simplified
0068 //! shape from a selection of calculation results.
0069 //! This new shape is made up of edges, which
0070 //! represent the shape visualized in the projection.
0071 //! HLRBRep_PolyAlgo works with a polyhedral
0072 //! simplification of the shape whereas
0073 //! HLRBRep_Algo takes the shape itself into
0074 //! account. When you use HLRBRep_Algo, you
0075 //! obtain an exact result, whereas, when you use
0076 //! HLRBRep_PolyAlgo, you reduce computation
0077 //! time but obtain polygonal segments.
0078 //! An HLRBRep_PolyAlgo object provides a framework for:
0079 //! -   defining the point of view
0080 //! -   identifying the shape or shapes to be visualized
0081 //! -   calculating the outlines
0082 //! -   calculating the visible and hidden lines of the shape.
0083 //! Warning
0084 //! -   Superimposed lines are not eliminated by this algorithm.
0085 //! -   There must be no unfinished objects inside the shape you wish to visualize.
0086 //! -   Points are not treated.
0087 //! -   Note that this is not the sort of algorithm
0088 //! used in generating shading, which calculates
0089 //! the visible and hidden parts of each face in a
0090 //! shape to be visualized by comparing each
0091 //! face in the shape with every other face in the same shape.
0092 class HLRBRep_PolyAlgo : public Standard_Transient
0093 {
0094 
0095 public:
0096 
0097   
0098   //! Constructs an empty framework for the
0099   //! calculation of the visible and hidden lines of a shape in a projection.
0100   //! Use the functions:
0101   //! -   Projector to define the point of view
0102   //! -   Load to select the shape or shapes to be  visualized
0103   //! -   Update to compute the visible and hidden lines of the shape.
0104   //! Warning
0105   //! The shape or shapes to be visualized must have already been triangulated.
0106   Standard_EXPORT HLRBRep_PolyAlgo();
0107   
0108   Standard_EXPORT HLRBRep_PolyAlgo(const Handle(HLRBRep_PolyAlgo)& A);
0109   
0110   Standard_EXPORT HLRBRep_PolyAlgo(const TopoDS_Shape& S);
0111   
0112   Standard_Integer NbShapes() const { return myShapes.Length(); }
0113 
0114   Standard_EXPORT TopoDS_Shape& Shape (const Standard_Integer I);
0115   
0116   //! remove the Shape of Index <I>.
0117   Standard_EXPORT void Remove (const Standard_Integer I);
0118   
0119   //! return the index of the Shape <S> and  return 0 if
0120   //! the Shape <S> is not found.
0121   Standard_EXPORT Standard_Integer Index (const TopoDS_Shape& S) const;
0122   
0123   //! Loads the shape S into this framework.
0124   //! Warning S must have already been triangulated.
0125   void Load (const TopoDS_Shape& theShape) { myShapes.Append (theShape); }
0126 
0127   const Handle(HLRAlgo_PolyAlgo)& Algo() const { return myAlgo; }
0128 
0129   //! Sets the parameters of the view for this framework.
0130   //! These parameters are defined by an HLRAlgo_Projector object,
0131   //! which is returned by the Projector function on a Prs3d_Projector object.
0132   const HLRAlgo_Projector& Projector() const { return myProj; }
0133 
0134   void Projector (const HLRAlgo_Projector& theProj) { myProj = theProj; }
0135   
0136   Standard_Real TolAngular() const { return myTolAngular; }
0137 
0138   void TolAngular (const Standard_Real theTol) { myTolAngular = theTol; }
0139 
0140   Standard_Real TolCoef() const { return myTolSta; }
0141   
0142   void TolCoef (const Standard_Real theTol)
0143   {
0144     myTolSta = theTol;
0145     myTolEnd = 1.0 - theTol;
0146   }
0147 
0148   //! Launches calculation of outlines of the shape
0149   //! visualized by this framework. Used after setting the point of view and
0150   //! defining the shape or shapes to be visualized.
0151   Standard_EXPORT void Update();
0152 
0153   void InitHide() { myAlgo->InitHide(); }
0154 
0155   Standard_Boolean MoreHide() const { return myAlgo->MoreHide(); }
0156 
0157   void NextHide() { myAlgo->NextHide(); }
0158 
0159   Standard_EXPORT HLRAlgo_BiPoint::PointsT& Hide (
0160     HLRAlgo_EdgeStatus& status,
0161     TopoDS_Shape& S,
0162     Standard_Boolean& reg1,
0163     Standard_Boolean& regn,
0164     Standard_Boolean& outl,
0165     Standard_Boolean& intl);
0166 
0167   void InitShow() { myAlgo->InitShow(); }
0168 
0169   Standard_Boolean MoreShow() const { return myAlgo->MoreShow(); }
0170 
0171   void NextShow() { myAlgo->NextShow(); }
0172 
0173   Standard_EXPORT HLRAlgo_BiPoint::PointsT& Show (TopoDS_Shape& S, Standard_Boolean& reg1, Standard_Boolean& regn, Standard_Boolean& outl, Standard_Boolean& intl);
0174   
0175   //! Make a shape  with  the internal outlines in  each
0176   //! face.
0177   Standard_EXPORT TopoDS_Shape OutLinedShape (const TopoDS_Shape& S) const;
0178 
0179   Standard_Boolean Debug() const { return myDebug; }
0180 
0181   void Debug (const Standard_Boolean theDebug) { myDebug = theDebug; }
0182 
0183   DEFINE_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,Standard_Transient)
0184 
0185 private:
0186   
0187   Standard_EXPORT TopoDS_Shape MakeShape() const;
0188   
0189   Standard_EXPORT Standard_Integer InitShape (const TopoDS_Shape& Shape, Standard_Boolean& IsoledF, Standard_Boolean& IsoledE);
0190 
0191   Standard_EXPORT void StoreShell (const TopoDS_Shape& theShape,
0192                                    Standard_Integer& theIShell,
0193                                    NCollection_Array1<Handle(HLRAlgo_PolyShellData)>& theShell,
0194                                    const Standard_Boolean theIsoledF,
0195                                    const Standard_Boolean theIsoledE,
0196                                    TColStd_Array1OfInteger& theES,
0197                                    NCollection_Array1<Handle(HLRAlgo_PolyData)>& thePD,
0198                                    NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
0199                                    TopTools_MapOfShape& theShapeMap1,
0200                                    TopTools_MapOfShape& theShapeMap2);
0201 
0202   Standard_EXPORT Standard_Boolean Normal (const Standard_Integer theINode,
0203                                            HLRAlgo_PolyInternalNode::NodeIndices& theNodIndices,
0204                                            HLRAlgo_PolyInternalNode::NodeData& theNod1RValues,
0205                                            HLRAlgo_Array1OfTData& theTData,
0206                                            HLRAlgo_Array1OfPISeg& thePISeg,
0207                                            HLRAlgo_Array1OfPINod& thePINod,
0208                                            const Standard_Boolean orient) const;
0209 
0210   Standard_EXPORT Standard_Boolean AverageNormal (const Standard_Integer theINode,
0211                                                   HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices,
0212                                                   HLRAlgo_Array1OfTData& theTData,
0213                                                   HLRAlgo_Array1OfPISeg& thePISeg,
0214                                                   HLRAlgo_Array1OfPINod& thePINod,
0215                                                   Standard_Real& theX,
0216                                                   Standard_Real& theY,
0217                                                   Standard_Real& theZ) const;
0218 
0219   Standard_Boolean AverageNormal (const Standard_Integer theINode,
0220                                   HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices,
0221                                   HLRAlgo_Array1OfTData& theTData,
0222                                   HLRAlgo_Array1OfPISeg& thePISeg,
0223                                   HLRAlgo_Array1OfPINod& thePINod,
0224                                   gp_XYZ& theNormal) const
0225   {
0226     return AverageNormal (theINode, theNodeIndices, theTData, thePISeg, thePINod,
0227                           theNormal.ChangeCoord(1), theNormal.ChangeCoord(2), theNormal.ChangeCoord(3));
0228   }
0229 
0230   Standard_EXPORT void AddNormalOnTriangle (const Standard_Integer theITri,
0231                                             const Standard_Integer theINode,
0232                                             Standard_Integer& theJNode,
0233                                             HLRAlgo_Array1OfTData& theTData,
0234                                             HLRAlgo_Array1OfPINod& thePINod,
0235                                             Standard_Real& theX,
0236                                             Standard_Real& theY,
0237                                             Standard_Real& theZ,
0238                                             Standard_Boolean& theOK) const;
0239 
0240   Standard_EXPORT void InitBiPointsWithConnexity (const Standard_Integer theIEdge,
0241                                                   TopoDS_Edge& theEdge,
0242                                                   HLRAlgo_ListOfBPoint& theList,
0243                                                   NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
0244                                                   TopTools_ListOfShape& theLS,
0245                                                   const Standard_Boolean theIsConnex);
0246 
0247   Standard_EXPORT void Interpolation (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices1, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices2, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1) const;
0248   
0249   Standard_EXPORT void Interpolation (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, const GeomAbs_Shape rg, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_PolyInternalNode::NodeIndices& Nod21Indices, HLRAlgo_PolyInternalNode::NodeData& Nod21RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod22Indices, HLRAlgo_PolyInternalNode::NodeData& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, HLRAlgo_Array1OfTData*& TData2, HLRAlgo_Array1OfPISeg*& PISeg2, HLRAlgo_Array1OfPINod*& PINod2) const;
0250   
0251   Standard_EXPORT Standard_Boolean Interpolation (const Standard_Real U1, const Standard_Real U2, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, Standard_Real& X3, Standard_Real& Y3, Standard_Real& Z3, Standard_Real& XT3, Standard_Real& YT3, Standard_Real& ZT3, Standard_Real& coef3, Standard_Real& U3, Standard_Boolean& mP3P1) const;
0252   
0253   Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Integer flag) const;
0254   
0255   Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_PolyInternalNode::NodeIndices& Nod21Indices, HLRAlgo_PolyInternalNode::NodeData& Nod21RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod22Indices, HLRAlgo_PolyInternalNode::NodeData& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, HLRAlgo_Array1OfTData*& TData2, HLRAlgo_Array1OfPISeg*& PISeg2, HLRAlgo_Array1OfPINod*& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Integer flag) const;
0256   
0257   Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_PolyInternalNode::NodeIndices& Nod21Indices, HLRAlgo_PolyInternalNode::NodeData& Nod21RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod22Indices, HLRAlgo_PolyInternalNode::NodeData& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, HLRAlgo_Array1OfTData*& TData2, HLRAlgo_Array1OfPISeg*& PISeg2, HLRAlgo_Array1OfPINod*& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Real X4, const Standard_Real Y4, const Standard_Real Z4, const Standard_Real XT4, const Standard_Real YT4, const Standard_Real ZT4, const Standard_Real coef4, const Standard_Real U4, const Standard_Boolean insP4, const Standard_Boolean mP4P1, const Standard_Integer flag) const;
0258 
0259   Standard_EXPORT void InsertOnOutLine (NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID);
0260 
0261   Standard_EXPORT void CheckFrBackTriangles (HLRAlgo_ListOfBPoint& theList,
0262                                              NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID);
0263 
0264   Standard_EXPORT void FindEdgeOnTriangle (const HLRAlgo_TriangleData& theTriangle, const Standard_Integer ip1, const Standard_Integer ip2, Standard_Integer& jtrouv, Standard_Boolean& isDirect) const;
0265 
0266   Standard_EXPORT void ChangeNode (const Standard_Integer theIp1,
0267                                    const Standard_Integer theIp2,
0268                                    HLRAlgo_PolyInternalNode::NodeIndices& theNod1Indices,
0269                                    HLRAlgo_PolyInternalNode::NodeData& theNod1RValues,
0270                                    HLRAlgo_PolyInternalNode::NodeIndices& theNod2Indices,
0271                                    HLRAlgo_PolyInternalNode::NodeData& theNod2RValues,
0272                                    const Standard_Real theCoef1,
0273                                    const Standard_Real theX3,
0274                                    const Standard_Real theY3,
0275                                    const Standard_Real theZ3,
0276                                    const Standard_Boolean theIsFirst,
0277                                    HLRAlgo_Array1OfTData& theTData,
0278                                    HLRAlgo_Array1OfPISeg& thePISeg,
0279                                    HLRAlgo_Array1OfPINod& thePINod) const;
0280 
0281   Standard_EXPORT void UpdateAroundNode (const Standard_Integer theINode,
0282                                          HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices,
0283                                          HLRAlgo_Array1OfTData& theTData,
0284                                          HLRAlgo_Array1OfPISeg& thePISeg,
0285                                          HLRAlgo_Array1OfPINod& thePINod) const;
0286 
0287   Standard_EXPORT void OrientTriangle (const Standard_Integer iTri, HLRAlgo_TriangleData& theTriangle, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices1, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices2, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices3, HLRAlgo_PolyInternalNode::NodeData& Nod3RValues) const;
0288   
0289   Standard_EXPORT Standard_Boolean Triangles (const Standard_Integer ip1, const Standard_Integer ip2, HLRAlgo_PolyInternalNode::NodeIndices& Nod1Indices, HLRAlgo_Array1OfPISeg*& PISeg, Standard_Integer& iTri1, Standard_Integer& iTri2) const;
0290   
0291   Standard_EXPORT Standard_Boolean NewNode (HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, Standard_Real& coef1, Standard_Boolean& moveP1) const;
0292   
0293   Standard_EXPORT void UVNode (HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, const Standard_Real coef1, Standard_Real& U3, Standard_Real& V3) const;
0294   
0295   Standard_EXPORT void CheckDegeneratedSegment (HLRAlgo_PolyInternalNode::NodeIndices& Nod1Indices, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod2Indices, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues) const;
0296 
0297   Standard_EXPORT void UpdateOutLines (HLRAlgo_ListOfBPoint& theList,
0298                                        NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID);
0299 
0300   Standard_EXPORT void UpdateEdgesBiPoints (HLRAlgo_ListOfBPoint& theList,
0301                                             const NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
0302                                             const Standard_Boolean theIsClosed);
0303 
0304   Standard_EXPORT void UpdatePolyData (NCollection_Array1<Handle(HLRAlgo_PolyData)>& thePD,
0305                                        NCollection_Array1<Handle(HLRAlgo_PolyInternalData)>& thePID,
0306                                        const Standard_Boolean theClosed);
0307 
0308   Standard_EXPORT void TMultiply (Standard_Real& X, Standard_Real& Y, Standard_Real& Z, const Standard_Boolean VecPartOnly = Standard_False) const;
0309 
0310   void TMultiply(gp_XYZ& thePoint, const Standard_Boolean VecPartOnly = Standard_False) const
0311   {
0312     TMultiply(thePoint.ChangeCoord(1), thePoint.ChangeCoord(2), thePoint.ChangeCoord(3), VecPartOnly);
0313   }
0314 
0315   Standard_EXPORT void TTMultiply (Standard_Real& X, Standard_Real& Y, Standard_Real& Z, const Standard_Boolean VecPartOnly = Standard_False) const;
0316 
0317   void TTMultiply (gp_XYZ& thePoint, const Standard_Boolean VecPartOnly = Standard_False) const
0318   {
0319     TTMultiply(thePoint.ChangeCoord(1), thePoint.ChangeCoord(2), thePoint.ChangeCoord(3), VecPartOnly);\
0320   }
0321 
0322   Standard_EXPORT void TIMultiply (Standard_Real& X, Standard_Real& Y, Standard_Real& Z, const Standard_Boolean VecPartOnly = Standard_False) const;
0323 
0324   void TIMultiply (gp_XYZ& thePoint, const Standard_Boolean VecPartOnly = Standard_False) const
0325   {
0326     TIMultiply(thePoint.ChangeCoord(1), thePoint.ChangeCoord(2), thePoint.ChangeCoord(3), VecPartOnly);
0327   }
0328 
0329 private:
0330 
0331   HLRAlgo_Projector myProj;
0332   Standard_Real TMat[3][3];
0333   Standard_Real TLoc[3];
0334   Standard_Real TTMa[3][3];
0335   Standard_Real TTLo[3];
0336   Standard_Real TIMa[3][3];
0337   Standard_Real TILo[3];
0338   TopTools_SequenceOfShape myShapes;
0339   TopTools_IndexedMapOfShape myEMap;
0340   TopTools_IndexedMapOfShape myFMap;
0341   Handle(HLRAlgo_PolyAlgo) myAlgo;
0342   Standard_Boolean myDebug;
0343   Standard_Real myTolSta;
0344   Standard_Real myTolEnd;
0345   Standard_Real myTolAngular;
0346   Handle(Geom_Surface) myGSurf;
0347   BRepAdaptor_Surface myBSurf;
0348   BRepAdaptor_Curve myBCurv;
0349   BRepAdaptor_Curve2d myPC;
0350 
0351 };
0352 
0353 #endif // _HLRBRep_PolyAlgo_HeaderFile