1 -- Created on: 1997-10-13
2 -- Created by: Roman BORISOV
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
9 -- under the terms of the GNU Lesser General Public 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 NormalProjection from BRepAlgo
19 ---Purpose: This class makes the projection of a wire on a
23 uses Shape from TopoDS,
27 ListOfShape from TopTools,
28 DataMapOfShapeShape from TopTools,
29 DataMapOfShapeListOfShape from TopTools
32 raises ConstructionError from Standard,
33 NoSuchObject from Standard,
40 returns NormalProjection;
43 Create(S: Shape from TopoDS)
45 returns NormalProjection;
48 Init(me: in out; S: Shape from TopoDS)
52 Add(me: in out; ToProj: Shape from TopoDS)
53 ---Purpose: Add an edge or a wire to the list of shape to project
55 raises ConstructionError from Standard
58 SetParams(me : in out; Tol3D, Tol2D : Real from Standard;
59 InternalContinuity : Shape from GeomAbs;
60 MaxDegree , MaxSeg : Integer from Standard)
61 ---Purpose: Set the parameters used for computation
62 -- Tol3d is the requiered tolerance between the 3d projected
63 -- curve and its 2d representation
64 -- InternalContinuity is the order of constraints
65 -- used for approximation.
66 -- MaxDeg and MaxSeg are the maximum degree and the maximum
67 -- number of segment for BSpline resulting of an approximation.
71 SetDefaultParams(me : in out)
72 ---Purpose: Set the parameters used for computation
73 -- in their default values
77 SetMaxDistance(me: in out; MaxDist: Real from Standard)
78 ---Purpose: Sets the maximum distance between target shape and
79 -- shape to project. If this condition is not satisfied then
80 -- corresponding part of solution is discarded.
81 -- if MaxDist < 0 then this method does not affect the algorithm
85 Compute3d(me: in out; With3d: Boolean from Standard = Standard_True)
86 ---Purpose: if With3d = Standard_False the 3dcurve is not computed
87 -- the initial 3dcurve is kept to build the resulting edges.
90 SetLimit(me : in out; FaceBoundaries: Boolean from Standard = Standard_True)
91 ---Purpose: Manage limitation of projected edges.
92 --By default edges are limited by face boundaries,
93 --else they are limited by supporting surface boundaries.
97 ---Purpose: Builds the result as a compound.
101 returns Boolean from Standard
106 ---Purpose: returns the result
107 returns Shape from TopoDS
108 ---C++: return const&
109 raises NotDone from StdFail
113 Ancestor(me; E: Edge from TopoDS)
114 ---Purpose: For a resulting edge, returns the corresponding initial edge.
116 returns Shape from TopoDS
117 ---C++: return const&
118 raises NotDone from StdFail,
119 NoSuchObject from Standard
122 Couple(me; E: Edge from TopoDS)
123 ---Purpose: For a projected edge, returns the corresponding initial face.
125 returns Shape from TopoDS
126 ---C++: return const&
127 raises NotDone from StdFail,
128 NoSuchObject from Standard
131 Generated (me: in out; S : Shape from TopoDS)
132 ---Purpose: Returns the list of shapes generated from the
134 ---C++: return const &
135 returns ListOfShape from TopTools;
138 IsElementary(me; C: Curve from Adaptor3d)
139 returns Boolean from Standard
142 BuildWire(me; Liste : out ListOfShape from TopTools)
143 returns Boolean from Standard
145 --- Purpose : build the result as a list of wire if possible in --
146 -- a first returns a wire only if there is only a wire.
152 myShape : Shape from TopoDS;
153 myIsDone : Boolean from Standard;
154 myTol3d : Real from Standard;
155 myTol2d : Real from Standard;
156 myMaxDist : Real from Standard;
157 myWith3d : Boolean from Standard;
158 myContinuity : Shape from GeomAbs;
159 myMaxDegree : Integer from Standard;
160 myMaxSeg : Integer from Standard;
161 myFaceBounds : Boolean from Standard;
162 myToProj : Shape from TopoDS;
163 myAncestorMap : DataMapOfShapeShape from TopTools;
164 myCorresp : DataMapOfShapeShape from TopTools;
165 myDescendants : DataMapOfShapeListOfShape from TopTools;
166 myRes : Shape from TopoDS;
168 end NormalProjection;