Commit | Line | Data |
---|---|---|

b311480e | 1 | -- Created on: 1995-09-18 |

2 | -- Created by: Bruno DUMORTIER | |

3 | -- Copyright (c) 1995-1999 Matra Datavision | |

973c2be1 | 4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |

b311480e | 5 | -- |

973c2be1 | 6 | -- This file is part of Open CASCADE Technology software library. |

b311480e | 7 | -- |

d5f74e42 | 8 | -- This library is free software; you can redistribute it and/or modify it under |

9 | -- the terms of the GNU Lesser General Public License version 2.1 as published | |

973c2be1 | 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. | |

b311480e | 13 | -- |

973c2be1 | 14 | -- Alternatively, this file may be used under the terms of Open CASCADE |

15 | -- commercial license or contractual agreement. | |

7fd59977 | 16 | |

17 | class MakeEvolved from BRepOffsetAPI inherits MakeShape from BRepBuilderAPI | |

18 | ||

19 | ---Purpose: Describes functions to build evolved shapes. | |

20 | -- An evolved shape is built from a planar spine (face or | |

21 | -- wire) and a profile (wire). The evolved shape is the | |

22 | -- unlooped sweep (pipe) of the profile along the spine. | |

23 | -- Self-intersections are removed. | |

24 | -- A MakeEvolved object provides a framework for: | |

25 | -- - defining the construction of an evolved shape, | |

26 | -- - implementing the construction algorithm, and | |

27 | -- - consulting the result. | |

28 | -- Computes an Evolved by | |

29 | -- 1 - sweeping a profil along a spine. | |

30 | -- 2 - removing the self-intersections. | |

31 | -- | |

32 | -- The profile is defined in a Referential R. The position of | |

33 | -- the profile at the current point of the spine is given by | |

34 | -- confusing R and the local referential given by ( D0, D1 | |

35 | -- and the normal of the Spine) | |

36 | -- | |

37 | -- If the Boolean <AxeProf> is true, R is O,X,Y,Z | |

38 | -- else R is defined as the local refential at the nearest | |

39 | -- point of the profil to the spine. | |

40 | -- | |

41 | -- if <Solid> is TRUE the Shape result is completed to be a | |

42 | -- solid or a compound of solids. | |

43 | ||

44 | ||

45 | ||

46 | uses | |

47 | Evolved from BRepFill, | |

48 | ListOfShape from TopTools, | |

49 | Shape from TopoDS, | |

50 | Face from TopoDS, | |

51 | Wire from TopoDS, | |

52 | JoinType from GeomAbs | |

53 | ||

54 | is | |

55 | Create returns MakeEvolved from BRepOffsetAPI; | |

56 | ||

57 | Create( Spine : Wire from TopoDS; | |

58 | Profil : Wire from TopoDS; | |

59 | Join : JoinType from GeomAbs = GeomAbs_Arc; | |

60 | AxeProf : Boolean from Standard = Standard_True; | |

61 | Solid : Boolean from Standard = Standard_False; | |

62 | ProfOnSpine: Boolean from Standard = Standard_False; | |

63 | Tol : Real from Standard = 0.0000001) | |

64 | ---Purpose: | |

65 | ---Level: Public | |

66 | returns MakeEvolved from BRepOffsetAPI; | |

67 | ||

68 | Create( Spine : Face from TopoDS; | |

69 | Profil : Wire from TopoDS; | |

70 | Join : JoinType from GeomAbs = GeomAbs_Arc; | |

71 | AxeProf : Boolean from Standard = Standard_True; | |

72 | Solid : Boolean from Standard = Standard_False; | |

73 | ProfOnSpine: Boolean from Standard = Standard_False; | |

74 | Tol : Real from Standard = 0.0000001) | |

75 | ---Purpose: These constructors construct an evolved shape by sweeping the profile | |

76 | -- Profile along the spine Spine. | |

77 | -- The profile is defined in a coordinate system R. | |

78 | -- The coordinate system is determined by AxeProf: | |

79 | -- - if AxeProf is true, R is the global coordinate system, | |

80 | -- - if AxeProf is false, R is computed so that: | |

81 | -- - its origin is given by the point on the spine which is | |

82 | -- closest to the profile, | |

83 | -- - its "X Axis" is given by the tangent to the spine at this point, and | |

84 | -- - its "Z Axis" is the normal to the plane which contains the spine. | |

85 | -- The position of the profile at the current point of the | |

86 | -- spine is given by making R coincident with the local | |

87 | -- coordinate system given by the current point, the | |

88 | -- tangent vector and the normal to the spine. | |

89 | -- Join defines the type of pipe generated by the salient | |

90 | -- vertices of the spine. The default type is GeomAbs_Arc | |

91 | -- where the vertices generate revolved pipes about the | |

92 | -- axis passing along the vertex and the normal to the | |

93 | -- plane of the spine. At present, this is the only | |

94 | -- construction type implemented. | |

95 | returns MakeEvolved from BRepOffsetAPI; | |

96 | ||

97 | Evolved(me) returns Evolved from BRepFill | |

98 | ---C++: return const & | |

99 | ---Level: Advanced | |

100 | is static; | |

101 | ||

102 | Build(me : in out) | |

103 | is redefined; | |

104 | ---Purpose: Builds the resulting shape (redefined from MakeShape). | |

105 | ---Level: Public | |

106 | ||

107 | GeneratedShapes (me ; | |

108 | SpineShape : Shape from TopoDS; | |

109 | ProfShape : Shape from TopoDS) | |

110 | ---Purpose: Returns the shapes created from a subshape | |

111 | -- <SpineShape> of the spine and a subshape | |

112 | -- <ProfShape> on the profile. | |

113 | ---C++ : return const & | |

114 | returns ListOfShape from TopTools | |

115 | is static; | |

116 | ||

117 | Top (me) returns Shape from TopoDS | |

118 | ---Purpose: Return the face Top if <Solid> is True in the constructor. | |

119 | ---C++ : return const & | |

120 | is static; | |

121 | ||

122 | Bottom (me) returns Shape from TopoDS | |

123 | ---Purpose: Return the face Bottom if <Solid> is True in the constructor. | |

124 | ---C++ : return const & | |

125 | is static; | |

126 | ||

127 | fields | |

128 | myEvolved : Evolved from BRepFill; | |

129 | ||

130 | end MakeEvolved; |