Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-03 09:17:30

0001 // Created on: 1998-06-03
0002 // Created by: data exchange team
0003 // Copyright (c) 1998-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 _ShapeUpgrade_HeaderFile
0018 #define _ShapeUpgrade_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <Geom_BoundedCurve.hxx>
0026 #include <NCollection_Sequence.hxx>
0027 #include <NCollection_HSequence.hxx>
0028 #include <Geom2d_BoundedCurve.hxx>
0029 class Geom_BSplineCurve;
0030 class Geom2d_BSplineCurve;
0031 
0032 //! This package provides tools for splitting and converting shapes by some criteria.
0033 //! It provides modifications of the kind when one topological
0034 //! object can be converted or split in to several ones.
0035 //! In particular this package contains high level API classes which perform:
0036 //! converting geometry of shapes up to given continuity,
0037 //! splitting revolutions by U to segments less than given value,
0038 //! converting to beziers, splitting closed faces.
0039 class ShapeUpgrade
0040 {
0041 public:
0042   DEFINE_STANDARD_ALLOC
0043 
0044   //! Unifies same domain faces and edges of specified shape
0045   Standard_EXPORT static bool C0BSplineToSequenceOfC1BSplineCurve(
0046     const occ::handle<Geom_BSplineCurve>&                               BS,
0047     occ::handle<NCollection_HSequence<occ::handle<Geom_BoundedCurve>>>& seqBS);
0048 
0049   //! Converts C0 B-Spline curve into sequence of C1 B-Spline curves.
0050   //! This method splits B-Spline at the knots with multiplicities equal to degree,
0051   //! i.e. unlike method GeomConvert::C0BSplineToArrayOfC1BSplineCurve
0052   //! this one does not use any tolerance and therefore does not change the geometry of B-Spline.
0053   //! Returns True if C0 B-Spline was successfully split,
0054   //! else returns False (if BS is C1 B-Spline).
0055   Standard_EXPORT static bool C0BSplineToSequenceOfC1BSplineCurve(
0056     const occ::handle<Geom2d_BSplineCurve>&                               BS,
0057     occ::handle<NCollection_HSequence<occ::handle<Geom2d_BoundedCurve>>>& seqBS);
0058 };
0059 
0060 #endif // _ShapeUpgrade_HeaderFile