1 -- Created on: 1997-11-20
2 -- Created by: Philippe MANGIN
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Sweep from GeomFill
19 ---Purpose: Geometrical Sweep Algorithm
23 SectionLaw from GeomFill,
24 LocationLaw from GeomFill,
25 ApproxStyle from GeomFill,
30 HArray1OfCurve from TColGeom2d,
31 HArray2OfReal from TColStd
39 Create(Location : LocationLaw from GeomFill;
40 WithKpart : Boolean = Standard_True)
41 returns Sweep from GeomFill;
43 SetDomain(me : in out; First, Last : Real;
44 SectionFirst, SectionLast : Real);
45 ---Purpose: Set parametric information
46 -- [<First>, <Last>] Sets the parametric bound of the
47 -- sweeping surface to build.
48 -- <SectionFirst>, <SectionLast> gives coresponding
49 -- bounds parameter on the section law of <First> and <Last>
51 -- V-Iso on Sweeping Surface S(u,v) is defined by
52 -- Location(v) and Section(w) where
53 -- w = SectionFirst + (v - First) / (Last-First)
54 -- * (SectionLast - SectionFirst)
56 -- By default w = v, and First and Last are given by
57 -- First and Last parameter stored in LocationLaw.
59 SetTolerance(me : in out;
61 BoundTol : Real = 1.0;
62 Tol2d : Real = 1.0e-5;
63 TolAngular : Real = 1.0);
64 ---Purpose: Set Approximation Tolerance
65 -- Tol3d : Tolerance to surface approximation
66 -- Tol2d : Tolerance used to perform curve approximation
67 -- Normaly the 2d curve are approximated with a
68 -- tolerance given by the resolution method define in
69 -- <LocationLaw> but if this tolerance is too large Tol2d
71 -- TolAngular : Tolerance (in radian) to control the angle
72 -- beetween tangents on the section law and
73 -- tangent of iso-v on approximed surface
75 SetForceApproxC1(me : in out;
76 ForceApproxC1 : Boolean from Standard);
77 ---Purpose: Set the flag that indicates attempt to approximate
78 -- a C1-continuous surface if a swept surface proved
82 ---Purpose: returns true if sections are U-Iso
83 -- This can be produce in some cases when <WithKpart> is True.
84 returns Boolean from Standard
88 ---Purpose: returns true if Parametrisation sens in U is inverse of
89 -- parametrisation sens of section (or of path if ExchangeUV)
90 returns Boolean from Standard
94 ---Purpose: returns true if Parametrisation sens in V is inverse of
95 -- parametrisation sens of path (or of section if ExchangeUV)
96 returns Boolean from Standard
101 Section : SectionLaw from GeomFill;
102 Methode : ApproxStyle = GeomFill_Location;
103 Continuity : Shape = GeomAbs_C2;
104 Degmax : Integer = 10;
105 Segmax : Integer = 30)
106 ---Purpose: Build the Sweeep Surface
107 -- ApproxStyle defines Approximation Strategy
108 -- - GeomFill_Section : The composed Function : Location X Section
109 -- is directly approximed.
110 -- - GeomFill_Location : The location law is approximed, and the
111 -- SweepSurface is build algebric composition
112 -- of approximed location law and section law
113 -- This option is Ok, if Section.Surface() methode
115 -- Continuity : The continuity in v waiting on the surface
116 -- Degmax : The maximum degree in v requiered on the surface
117 -- Segmax : The maximum number of span in v requiered on
120 -- raise If Domain are infinite or Profile not Setted.
121 raises ConstructionError;
137 BuildProduct(me:in out;
144 BuildKPart(me:in out)
149 ---Purpose: Tells if the Surface is Buildt.
153 ---Purpose: Gets the Approximation error.
156 ErrorOnRestriction(me; IsFirst : Boolean;
157 UError, VError : out Real)
158 ---Purpose: Gets the Approximation error.
161 ErrorOnTrace(me; IndexOfTrace : Integer;
162 UError, VError : out Real)
163 ---Purpose: Gets the Approximation error.
164 raises NotDone, OutOfRange;
167 returns Surface from Geom
170 Restriction(me; IsFirst : Boolean)
171 returns Curve from Geom2d
177 Trace(me; IndexOfTrace : Integer)
178 returns Curve from Geom2d
179 raises NotDone, OutOfRange;
185 Tol3d, BoundTol, Tol2d, TolAngular : Real;
187 myForceApproxC1 : Boolean;
189 myLoc : LocationLaw from GeomFill;
190 mySec : SectionLaw from GeomFill;
191 mySurface : Surface from Geom;
192 myCurve2d : HArray1OfCurve from TColGeom2d;
193 CError : HArray2OfReal from TColStd;
196 myExchUV : Boolean from Standard;
197 isUReversed : Boolean;
198 isVReversed : Boolean;
199 myKPart : Boolean from Standard;