1 -- File: BRepAlgo_NormalProjection.cdl
2 -- Created: Mon Oct 13 16:14:20 1997
3 -- Author: Roman BORISOV
4 -- <rbv@velox.nnov.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1997
7 class NormalProjection from BRepAlgo
9 ---Purpose: This class makes the projection of a wire on a
13 uses Shape from TopoDS,
17 ListOfShape from TopTools,
18 DataMapOfShapeShape from TopTools,
19 DataMapOfShapeListOfShape from TopTools
22 raises ConstructionError from Standard,
23 NoSuchObject from Standard,
30 returns NormalProjection;
33 Create(S: Shape from TopoDS)
35 returns NormalProjection;
38 Init(me: in out; S: Shape from TopoDS)
42 Add(me: in out; ToProj: Shape from TopoDS)
43 ---Purpose: Add an edge or a wire to the list of shape to project
45 raises ConstructionError from Standard
48 SetParams(me : in out; Tol3D, Tol2D : Real from Standard;
49 InternalContinuity : Shape from GeomAbs;
50 MaxDegree , MaxSeg : Integer from Standard)
51 ---Purpose: Set the parameters used for computation
52 -- Tol3d is the requiered tolerance between the 3d projected
53 -- curve and its 2d representation
54 -- InternalContinuity is the order of constraints
55 -- used for approximation.
56 -- MaxDeg and MaxSeg are the maximum degree and the maximum
57 -- number of segment for BSpline resulting of an approximation.
61 SetDefaultParams(me : in out)
62 ---Purpose: Set the parameters used for computation
63 -- in their default values
67 SetMaxDistance(me: in out; MaxDist: Real from Standard)
68 ---Purpose: Sets the maximum distance between target shape and
69 -- shape to project. If this condition is not satisfied then
70 -- corresponding part of solution is discarded.
71 -- if MaxDist < 0 then this method does not affect the algorithm
75 Compute3d(me: in out; With3d: Boolean from Standard = Standard_True)
76 ---Purpose: if With3d = Standard_False the 3dcurve is not computed
77 -- the initial 3dcurve is kept to build the resulting edges.
80 SetLimit(me : in out; FaceBoundaries: Boolean from Standard = Standard_True)
81 ---Purpose: Manage limitation of projected edges.
82 --By default edges are limited by face boundaries,
83 --else they are limited by supporting surface boundaries.
87 ---Purpose: Builds the result as a compound.
91 returns Boolean from Standard
96 ---Purpose: returns the result
97 returns Shape from TopoDS
99 raises NotDone from StdFail
103 Ancestor(me; E: Edge from TopoDS)
104 ---Purpose: For a resulting edge, returns the corresponding initial edge.
106 returns Shape from TopoDS
107 ---C++: return const&
108 raises NotDone from StdFail,
109 NoSuchObject from Standard
112 Couple(me; E: Edge from TopoDS)
113 ---Purpose: For a projected edge, returns the corresponding initial face.
115 returns Shape from TopoDS
116 ---C++: return const&
117 raises NotDone from StdFail,
118 NoSuchObject from Standard
121 Generated (me: in out; S : Shape from TopoDS)
122 ---Purpose: Returns the list of shapes generated from the
124 ---C++: return const &
125 returns ListOfShape from TopTools;
128 IsElementary(me; C: Curve from Adaptor3d)
129 returns Boolean from Standard
132 BuildWire(me; Liste : out ListOfShape from TopTools)
133 returns Boolean from Standard
135 --- Purpose : build the result as a list of wire if possible in --
136 -- a first returns a wire only if there is only a wire.
142 myShape : Shape from TopoDS;
143 myIsDone : Boolean from Standard;
144 myTol3d : Real from Standard;
145 myTol2d : Real from Standard;
146 myMaxDist : Real from Standard;
147 myWith3d : Boolean from Standard;
148 myContinuity : Shape from GeomAbs;
149 myMaxDegree : Integer from Standard;
150 myMaxSeg : Integer from Standard;
151 myFaceBounds : Boolean from Standard;
152 myToProj : Shape from TopoDS;
153 myAncestorMap : DataMapOfShapeShape from TopTools;
154 myCorresp : DataMapOfShapeShape from TopTools;
155 myDescendants : DataMapOfShapeListOfShape from TopTools;
156 myRes : Shape from TopoDS;
158 end NormalProjection;