1 -- Created on: 1995-04-19
2 -- Created by: Yves FRICAUD
3 -- Copyright (c) 1995-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 OffsetWire from BRepFill
19 ---Purpose: Constructs a Offset Wire to a spine (wire or face)
20 -- on the left of spine.
26 JoinType from GeomAbs,
27 ListOfShape from TopTools,
28 DataMapOfShapeShape from TopTools,
29 IndexedDataMapOfOrientedShapeListOfShape from BRepFill,
30 BisectingLocus from BRepMAT2d,
31 LinkTopoBilo from BRepMAT2d
34 ConstructionError from Standard,
35 NoSuchObject from Standard
39 Create returns OffsetWire from BRepFill;
41 Create ( Spine : Face from TopoDS;
42 Join : JoinType from GeomAbs = GeomAbs_Arc)
43 returns OffsetWire from BRepFill;
46 Spine : Face from TopoDS;
47 Join : JoinType from GeomAbs = GeomAbs_Arc)
48 ---Purpose: Initialize the evaluation of Offseting.
50 ConstructionError from Standard
54 Offset : Real from Standard;
55 Alt : Real from Standard = 0.0)
56 ---Purpose: Performs an OffsetWire at an altitude <Alt> from
57 -- the face ( According to the orientation of the
60 ConstructionError from Standard
63 PerformWithBiLo (me : in out;
64 WSP : Face from TopoDS;
65 Offset : Real from Standard;
66 Locus : BisectingLocus from BRepMAT2d;
67 Link : in out LinkTopoBilo from BRepMAT2d;
68 Join : JoinType from GeomAbs = GeomAbs_Arc;
69 Alt : Real from Standard = 0.0)
70 ---Purpose: Performs an OffsetWire
72 ConstructionError from Standard
76 returns Boolean from Standard
80 returns Face from TopoDS
81 ---C++: return const &
85 Shape(me) returns Shape from TopoDS
86 ---Purpose: returns the generated shape.
87 ---C++ : return const &
90 GeneratedShapes (me : in out ; SpineShape : Shape from TopoDS)
91 ---Purpose: Returns the shapes created from a subshape
92 -- <SpineShape> of the spine.
93 -- Returns the last computed Offset.
95 ---C++ : return const &
96 returns ListOfShape from TopTools
99 JoinType (me) returns JoinType from GeomAbs
102 Generated (me : in out )
104 returns IndexedDataMapOfOrientedShapeListOfShape from BRepFill
107 PrepareSpine (me : in out)
108 ---Purpose: Prepare the spine as follow
109 -- - Cut the spine-Edges at the extrema of curvature and
110 -- at the inflexion points.
113 Add(me : in out; Other : OffsetWire from BRepFill)
114 ---Purpose: Add the OffsetWire <Other> to <me> and update <myMap>
117 MakeWires (me : in out)
118 ---Purpose: Constructs the wires with the trimmed offset edges.
121 FixHoles (me : in out)
122 ---Purpose: Fix holes between open wires where it is possible
127 mySpine : Face from TopoDS;
128 myWorkSpine : Face from TopoDS;
129 myOffset : Real from Standard; -- >0 ;
130 myShape : Shape from TopoDS;
131 myIsDone : Boolean from Standard;
132 myJoinType : JoinType from GeomAbs;
133 myMap : IndexedDataMapOfOrientedShapeListOfShape from BRepFill;
134 myBilo : BisectingLocus from BRepMAT2d;
135 myLink : LinkTopoBilo from BRepMAT2d;
136 myMapSpine : DataMapOfShapeShape from TopTools;
137 myCallGen : Boolean from Standard;