1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _IntPatch_WLineTool_HeaderFile
15 #define _IntPatch_WLineTool_HeaderFile
17 #include <Standard_DefineAlloc.hxx>
19 #include <IntPatch_SequenceOfLine.hxx>
20 #include <IntPatch_WLine.hxx>
21 #include <NCollection_List.hxx>
23 class Adaptor3d_TopolTool;
25 //! IntPatch_WLineTool provides set of static methods related to walking lines.
26 class IntPatch_WLineTool
33 //! Removes equal points (leave one of equal points) from theWLine
34 //! and recompute vertex parameters.
37 //! Removes point out of borders in case of non periodic surfaces.
40 //! Removes exceed points using tube criteria:
41 //! delete 7D point if it lies near to expected lines in 2d and 3d.
42 //! Each task (2d, 2d, 3d) have its own tolerance and checked separately.
44 //! Returns new WLine or null WLine if the number
45 //! of the points is less than 2.
46 Standard_EXPORT static
47 Handle(IntPatch_WLine) ComputePurgedWLine(const Handle(IntPatch_WLine) &theWLine,
48 const Handle(Adaptor3d_HSurface) &theS1,
49 const Handle(Adaptor3d_HSurface) &theS2,
50 const Handle(Adaptor3d_TopolTool) &theDom1,
51 const Handle(Adaptor3d_TopolTool) &theDom2);
53 //! Joins all WLines from theSlin to one if it is possible and records
54 //! the result into theSlin again. Lines will be kept to be split if:
55 //! a) they are separated (has no common points);
56 //! b) resulted line (after joining) go through seam-edges or surface boundaries.
58 //! In addition, if points in theSPnt lies at least in one of the line in theSlin,
59 //! this point will be deleted.
60 Standard_EXPORT static void JoinWLines(IntPatch_SequenceOfLine& theSlin,
61 IntPatch_SequenceOfPoint& theSPnt,
62 Handle(Adaptor3d_HSurface) theS1,
63 Handle(Adaptor3d_HSurface) theS2,
64 const Standard_Real theTol3D);
66 //! Extends every line from theSlin (if it is possible) to be started/finished
67 //! in strictly determined point (in the place of joint of two lines).
68 //! As result, some gaps between two lines will vanish.
69 //! The Walking lines are supposed (algorithm will do nothing for not-Walking line)
70 //! to be computed as a result of intersection. Both theS1 and theS2
71 //! must be quadrics. Other cases are not supported.
72 //! theArrPeriods must be filled as follows (every value must not be negative;
73 //! if the surface is not periodic the period must be equal to 0.0 strictly):
74 //! {<U-period of 1st surface>, <V-period of 1st surface>,
75 //! <U-period of 2nd surface>, <V-period of 2nd surface>}.
76 //! theListOfCriticalPoints must contain 3D-points where joining is disabled.
77 Standard_EXPORT static void
78 ExtendTwoWLines(IntPatch_SequenceOfLine& theSlin,
79 const Handle(Adaptor3d_HSurface)& theS1,
80 const Handle(Adaptor3d_HSurface)& theS2,
81 const Standard_Real theToler3D,
82 const Standard_Real* const theArrPeriods,
83 const Bnd_Box2d& theBoxS1,
84 const Bnd_Box2d& theBoxS2,
85 const NCollection_List<gp_Pnt>& theListOfCriticalPoints);
87 //! Max angle to concatenate two WLines to avoid result with C0-continuity
88 static const Standard_Real myMaxConcatAngle;