| 1 | -- Created on: 1997-04-14 |
| 2 | -- Created by: Olga PILLOT |
| 3 | -- Copyright (c) 1997-1999 Matra Datavision |
| 4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
| 5 | -- |
| 6 | -- This file is part of Open CASCADE Technology software library. |
| 7 | -- |
| 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. |
| 13 | -- |
| 14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
| 15 | -- commercial license or contractual agreement. |
| 16 | |
| 17 | class MakeLinearForm from BRepFeat inherits RibSlot from BRepFeat |
| 18 | ---Purpose: Builds a rib or a groove along a developable, planar surface. |
| 19 | -- The semantics of mechanical features is built around |
| 20 | -- giving thickness to a contour. This thickness can either |
| 21 | -- be symmetrical - on one side of the contour - or |
| 22 | -- dissymmetrical - on both sides. As in the semantics of |
| 23 | -- form features, the thickness is defined by construction of |
| 24 | -- shapes in specific contexts. |
| 25 | -- The development contexts differ, however, in case of |
| 26 | -- mechanical features. Here they include extrusion: |
| 27 | -- - to a limiting face of the basis shape |
| 28 | -- - to or from a limiting plane |
| 29 | -- - to a height. |
| 30 | |
| 31 | uses Shape from TopoDS, |
| 32 | Face from TopoDS, |
| 33 | Wire from TopoDS, |
| 34 | Edge from TopoDS, |
| 35 | DataMapOfShapeListOfShape from TopTools, |
| 36 | Dir from gp, |
| 37 | Vec from gp, |
| 38 | DataMapOfShapeShape from TopTools, |
| 39 | ListOfShape from TopTools, |
| 40 | SequenceOfCurve from TColGeom, |
| 41 | Curve from Geom, |
| 42 | Plane from Geom, |
| 43 | Pnt from gp, |
| 44 | StatusError from BRepFeat |
| 45 | |
| 46 | raises ConstructionError from Standard |
| 47 | |
| 48 | is |
| 49 | |
| 50 | |
| 51 | Create |
| 52 | |
| 53 | returns MakeLinearForm from BRepFeat; |
| 54 | ---Purpose: initializes the linear form class |
| 55 | ---C++: inline |
| 56 | |
| 57 | Create(Sbase : Shape from TopoDS; |
| 58 | W : Wire from TopoDS; |
| 59 | P : Plane from Geom; |
| 60 | Direction : Vec from gp; |
| 61 | Direction1: Vec from gp; |
| 62 | Fuse : Integer from Standard; |
| 63 | Modify : Boolean from Standard) |
| 64 | |
| 65 | ---Purpose: contour W, a shape Sbase and a |
| 66 | -- plane P are initialized to serve as the basic |
| 67 | -- elements in the construction of the rib or groove. |
| 68 | -- Direction and Direction1 give The vectors for |
| 69 | -- defining the direction(s) in which thickness will be built up. |
| 70 | -- Fuse offers a choice between: |
| 71 | -- - removing matter with a Boolean cut using the |
| 72 | -- setting 0 in case of the groove |
| 73 | -- - adding matter with Boolean fusion using the |
| 74 | -- setting 1 in case of the rib. |
| 75 | ---C++: inline |
| 76 | returns MakeLinearForm from BRepFeat; |
| 77 | |
| 78 | |
| 79 | Init(me: in out; Sbase : Shape from TopoDS; |
| 80 | W : Wire from TopoDS; |
| 81 | P : Plane from Geom; |
| 82 | Direction : Vec from gp; |
| 83 | Direction1: Vec from gp; |
| 84 | Fuse : Integer from Standard; |
| 85 | Modify : Boolean from Standard) |
| 86 | |
| 87 | is static; |
| 88 | ---Purpose: Initializes this construction algorithm. |
| 89 | -- A contour W, a shape Sbase and a plane P are |
| 90 | -- initialized to serve as the basic elements in the |
| 91 | -- construction of the rib or groove. The vectors for |
| 92 | -- defining the direction(s) in which thickness will be built |
| 93 | -- up are given by Direction and Direction1. |
| 94 | -- Fuse offers a choice between: |
| 95 | -- - removing matter with a Boolean cut using the setting |
| 96 | -- 0 in case of the groove |
| 97 | -- - adding matter with Boolean fusion using the setting 1 |
| 98 | -- in case of the rib. |
| 99 | |
| 100 | Add(me: in out; E: Edge from TopoDS; OnFace: Face from TopoDS) |
| 101 | |
| 102 | ---Purpose: Indicates that the edge <E> will slide on the face |
| 103 | -- <OnFace>. |
| 104 | -- Raises ConstructionError if the face does not belong to the |
| 105 | -- basis shape, or the edge to the prismed shape. |
| 106 | raises ConstructionError from Standard |
| 107 | |
| 108 | is static; |
| 109 | |
| 110 | |
| 111 | |
| 112 | Perform(me: in out) |
| 113 | |
| 114 | is static; |
| 115 | ---Purpose: Performs a prism from the wire to the plane along the |
| 116 | -- basis shape Sbase. Reconstructs the feature topologically. |
| 117 | |
| 118 | TransformShapeFU(me: in out; flag: Integer from Standard) |
| 119 | |
| 120 | is static; |
| 121 | ---Purpose: Limits construction of the linear form feature by using |
| 122 | -- one of the following three semantics: |
| 123 | -- - from a limiting plane |
| 124 | -- - to a limiting plane |
| 125 | -- - from one limiting plane to another. |
| 126 | -- The setting is provided by a flag, flag, which can be set |
| 127 | -- to from and/or until. The third semantic possibility above |
| 128 | -- is selected by showing both from and until at the same time. |
| 129 | |
| 130 | Propagate(me: in out; L: in out ListOfShape from TopTools; |
| 131 | F: Face from TopoDS; |
| 132 | FPoint, LPoint: Pnt from gp; |
| 133 | falseside : in out Boolean from Standard) |
| 134 | returns Boolean from Standard |
| 135 | is static; |
| 136 | |
| 137 | |
| 138 | fields |
| 139 | |
| 140 | myCrv : Curve from Geom; |
| 141 | myDir : Vec from gp; |
| 142 | myDir1 : Vec from gp; |
| 143 | myPln : Plane from Geom; |
| 144 | myBnd : Real from Standard; |
| 145 | mySlface : DataMapOfShapeListOfShape from TopTools; |
| 146 | myListOfEdges : ListOfShape from TopTools; |
| 147 | myTol : Real from Standard; |
| 148 | |
| 149 | end MakeLinearForm; |
| 150 | |
| 151 | |
| 152 | |