1 -- Created on: 1995-04-19
2 -- Created by: Yves FRICAUD
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class OffsetWire from BRepFill
25 ---Purpose: Constructs a Offset Wire to a spine (wire or face)
26 -- on the left of spine.
32 JoinType from GeomAbs,
33 ListOfShape from TopTools,
34 DataMapOfShapeShape from TopTools,
35 IndexedDataMapOfOrientedShapeListOfShape from BRepFill,
36 BisectingLocus from BRepMAT2d,
37 LinkTopoBilo from BRepMAT2d
40 ConstructionError from Standard,
41 NoSuchObject from Standard
45 Create returns OffsetWire from BRepFill;
47 Create ( Spine : Face from TopoDS;
48 Join : JoinType from GeomAbs = GeomAbs_Arc)
49 returns OffsetWire from BRepFill;
52 Spine : Face from TopoDS;
53 Join : JoinType from GeomAbs = GeomAbs_Arc)
54 ---Purpose: Initialize the evaluation of Offseting.
56 ConstructionError from Standard
60 Offset : Real from Standard;
61 Alt : Real from Standard = 0.0)
62 ---Purpose: Performs an OffsetWire at an altitude <Alt> from
63 -- the face ( According to the orientation of the
66 ConstructionError from Standard
69 PerformWithBiLo (me : in out;
70 WSP : Face from TopoDS;
71 Offset : Real from Standard;
72 Locus : BisectingLocus from BRepMAT2d;
73 Link : in out LinkTopoBilo from BRepMAT2d;
74 Join : JoinType from GeomAbs = GeomAbs_Arc;
75 Alt : Real from Standard = 0.0)
76 ---Purpose: Performs an OffsetWire
78 ConstructionError from Standard
82 returns Boolean from Standard
86 returns Face from TopoDS
87 ---C++: return const &
91 Shape(me) returns Shape from TopoDS
92 ---Purpose: returns the generated shape.
93 ---C++ : return const &
96 GeneratedShapes (me : in out ; SpineShape : Shape from TopoDS)
97 ---Purpose: Returns the shapes created from a subshape
98 -- <SpineShape> of the spine.
99 -- Returns the last computed Offset.
101 ---C++ : return const &
102 returns ListOfShape from TopTools
105 JoinType (me) returns JoinType from GeomAbs
108 Generated (me : in out )
110 returns IndexedDataMapOfOrientedShapeListOfShape from BRepFill
113 PrepareSpine (me : in out)
114 ---Purpose: Prepare the spine as follow
115 -- - Cut the spine-Edges at the extrema of curvature and
116 -- at the inflexion points.
119 Add(me : in out; Other : OffsetWire from BRepFill)
120 ---Purpose: Add the OffsetWire <Other> to <me> and update <myMap>
123 MakeWires (me : in out)
124 ---Purpose: Constructs the wires with the trimmed offset edges.
127 FixHoles (me : in out)
128 ---Purpose: Fix holes between open wires where it is possible
133 mySpine : Face from TopoDS;
134 myWorkSpine : Face from TopoDS;
135 myOffset : Real from Standard; -- >0 ;
136 myShape : Shape from TopoDS;
137 myIsDone : Boolean from Standard;
138 myJoinType : JoinType from GeomAbs;
139 myMap : IndexedDataMapOfOrientedShapeListOfShape from BRepFill;
140 myBilo : BisectingLocus from BRepMAT2d;
141 myLink : LinkTopoBilo from BRepMAT2d;
142 myMapSpine : DataMapOfShapeShape from TopTools;
143 myCallGen : Boolean from Standard;