Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2000-02-07
0002 // Created by: data exchange team
0003 // Copyright (c) 2000-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _ShapeAlgo_AlgoContainer_HeaderFile
0017 #define _ShapeAlgo_AlgoContainer_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <Standard_Transient.hxx>
0023 #include <TColGeom_SequenceOfCurve.hxx>
0024 #include <TColGeom2d_SequenceOfCurve.hxx>
0025 #include <TColGeom_HSequenceOfBoundedCurve.hxx>
0026 #include <TColGeom2d_HSequenceOfBoundedCurve.hxx>
0027 #include <GeomAbs_Shape.hxx>
0028 #include <Standard_Integer.hxx>
0029 class ShapeAlgo_ToolContainer;
0030 class ShapeAnalysis_Wire;
0031 class ShapeExtend_WireData;
0032 class Geom_BSplineCurve;
0033 class Geom2d_BSplineCurve;
0034 class TopoDS_Shape;
0035 class Geom_BSplineSurface;
0036 class Geom_Surface;
0037 class TopoDS_Wire;
0038 class TopoDS_Face;
0039 class Geom_Curve;
0040 
0041 
0042 class ShapeAlgo_AlgoContainer;
0043 DEFINE_STANDARD_HANDLE(ShapeAlgo_AlgoContainer, Standard_Transient)
0044 
0045 
0046 class ShapeAlgo_AlgoContainer : public Standard_Transient
0047 {
0048 
0049 public:
0050 
0051   
0052   //! Empty constructor
0053   Standard_EXPORT ShapeAlgo_AlgoContainer();
0054   
0055   //! Sets ToolContainer
0056     void SetToolContainer (const Handle(ShapeAlgo_ToolContainer)& TC);
0057   
0058   //! Returns ToolContainer
0059     Handle(ShapeAlgo_ToolContainer) ToolContainer() const;
0060   
0061   //! Finds the best way to connect and connects <nextsewd> to already
0062   //! built <sewd> (in <saw>).
0063   //! Returns False if <nextsewd> cannot be connected, otherwise - True.
0064   //! <maxtol> specifies the maximum tolerance with which <nextsewd> can
0065   //! be added.
0066   //! <distmin> is used to receive the minimum distance between <nextsewd>
0067   //! and <sewd>.
0068   //! <revsewd>   is True if <sewd>     has been reversed before connecting.
0069   //! <revnextwd> is True if <nextsewd> has been reversed before connecting.
0070   //! Uses functionality of ShapeAnalysis_Wire.
0071   Standard_EXPORT virtual Standard_Boolean ConnectNextWire (const Handle(ShapeAnalysis_Wire)& saw, const Handle(ShapeExtend_WireData)& nextsewd, const Standard_Real maxtol, Standard_Real& distmin, Standard_Boolean& revsewd, Standard_Boolean& revnextsewd) const;
0072   
0073   Standard_EXPORT virtual void ApproxBSplineCurve (const Handle(Geom_BSplineCurve)& bspline, TColGeom_SequenceOfCurve& seq) const;
0074   
0075   Standard_EXPORT virtual void ApproxBSplineCurve (const Handle(Geom2d_BSplineCurve)& bspline, TColGeom2d_SequenceOfCurve& seq) const;
0076   
0077   Standard_EXPORT virtual Standard_Boolean C0BSplineToSequenceOfC1BSplineCurve (const Handle(Geom_BSplineCurve)& BS, Handle(TColGeom_HSequenceOfBoundedCurve)& seqBS) const;
0078   
0079   //! Converts C0 B-Spline curve into sequence of C1 B-Spline curves.
0080   //! Calls ShapeUpgrade::C0BSplineToSequenceOfC1BSplineCurve.
0081   Standard_EXPORT virtual Standard_Boolean C0BSplineToSequenceOfC1BSplineCurve (const Handle(Geom2d_BSplineCurve)& BS, Handle(TColGeom2d_HSequenceOfBoundedCurve)& seqBS) const;
0082   
0083   //! Converts a shape on C0 geometry into the shape on C1 geometry.
0084   Standard_EXPORT virtual TopoDS_Shape C0ShapeToC1Shape (const TopoDS_Shape& shape, const Standard_Real tol) const;
0085   
0086   //! Converts a surface to B-Spline.
0087   //! Uses ShapeConstruct.
0088   Standard_EXPORT virtual Handle(Geom_BSplineSurface) ConvertSurfaceToBSpline (const Handle(Geom_Surface)& surf, const Standard_Real UF, const Standard_Real UL, const Standard_Real VF, const Standard_Real VL) const;
0089   
0090   //! Return 2 wires with the same number of edges. The both Edges
0091   //! number i of these wires have got the same ratio between
0092   //! theirs parameter lengths and their wire parameter lengths.
0093   Standard_EXPORT virtual Standard_Boolean HomoWires (const TopoDS_Wire& wireIn1, const TopoDS_Wire& wireIn2, TopoDS_Wire& wireOut1, TopoDS_Wire& wireOut2, const Standard_Boolean byParam) const;
0094   
0095   //! Returns the outer wire on the face <Face>.
0096   Standard_EXPORT virtual TopoDS_Wire OuterWire (const TopoDS_Face& face) const;
0097   
0098   //! Converts surface to periodic form.
0099   //! Calls ShapeCustom_Surface.
0100   Standard_EXPORT virtual Handle(Geom_Surface) ConvertToPeriodic (const Handle(Geom_Surface)& surf) const;
0101   
0102   //! Computes exact UV bounds of all wires on the face
0103   Standard_EXPORT virtual void GetFaceUVBounds (const TopoDS_Face& F, Standard_Real& Umin, Standard_Real& Umax, Standard_Real& Vmin, Standard_Real& Vmax) const;
0104   
0105   //! Convert Geom_Curve to Geom_BSplineCurve
0106   Standard_EXPORT virtual Handle(Geom_BSplineCurve) ConvertCurveToBSpline (const Handle(Geom_Curve)& C3D, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol3d, const GeomAbs_Shape Continuity, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree) const;
0107 
0108 
0109 
0110 
0111   DEFINE_STANDARD_RTTIEXT(ShapeAlgo_AlgoContainer,Standard_Transient)
0112 
0113 protected:
0114 
0115 
0116 
0117 
0118 private:
0119 
0120 
0121   Handle(ShapeAlgo_ToolContainer) myTC;
0122 
0123 
0124 };
0125 
0126 
0127 #include <ShapeAlgo_AlgoContainer.lxx>
0128 
0129 
0130 
0131 
0132 
0133 #endif // _ShapeAlgo_AlgoContainer_HeaderFile