1 -- Created on: 1998-06-03
2 -- Created by: data exchange team
3 -- Copyright (c) 1998-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.
25 ---Purpose: This package is intended to
26 -- convert geometrical objects and topological. The
27 -- modifications of one geometrical object to another
28 -- (one) geometrical object are provided. The supported
29 -- modifications are the following:
30 -- conversion of BSpline and Bezier surfaces to analytical form,
31 -- conversion of indirect elementary surfaces (with left-handed
32 -- coordinate systems) into direct ones,
33 -- conversion of elementary surfaces to surfaces of revolution,
34 -- conversion of surface of linear extrusion, revolution, offset
35 -- surface to bspline,
36 -- modification of parameterization, degree, number of segments of bspline
37 -- surfaces, scale the shape.
60 class RestrictionParameters;
62 class DirectModification;
64 private class TrsfModification;
65 private class BSplineRestriction;
66 private class ConvertToRevolution;
67 private class SweptToElementary;
68 private class ConvertToBSpline;
70 ApplyModifier(S : Shape from TopoDS;
71 M : Modification from BRepTools;
72 context: in out DataMapOfShapeShape from TopTools;
73 MD : in out Modifier from BRepTools)
75 returns Shape from TopoDS;
76 ---Purpose: Applies modifier to shape and checks sharing in the case assemblies.
78 DirectFaces(S: Shape from TopoDS) returns Shape from TopoDS;
79 ---Purpose: Returns a new shape without indirect surfaces.
81 ScaleShape (S: Shape from TopoDS; scale: Real) returns Shape from TopoDS;
82 ---Purpose: Returns a new shape which is scaled original
84 BSplineRestriction(S : Shape from TopoDS;
86 MaxDegree, MaxNbSegment : Integer;
87 Continuity3d, Continuity2d: Shape from GeomAbs;
90 aParameters : RestrictionParameters from ShapeCustom)
91 returns Shape from TopoDS;
92 ---Purpose: Returns a new shape with all surfaces, curves and pcurves
93 -- which type is BSpline/Bezier or based on them converted
94 -- having Degree less than <MaxDegree> or number of spans less
95 -- than <NbMaxSegment> in dependence on parameter priority <Degree>.
96 -- <GmaxDegree> and <GMaxSegments> are maximum possible degree
97 -- and number of spans correspondingly.
98 -- These values will be used in those cases when approximation with
99 -- specified parameters is impossible and one of GmaxDegree or
100 -- GMaxSegments is selected in dependence on priority.
101 -- Note that even if approximation is impossible with <GMaxDegree>
102 -- then number of spans can exceed specified <GMaxSegment>
103 -- <Rational> specifies if to convert Rational BSpline/Bezier into
104 -- polynomial B-Spline.
105 -- If flags ConvOffSurf,ConvOffCurve3d,ConvOffCurve2d are Standard_True there are means
106 -- that Offset surfaces , Offset curves 3d and Offset curves 2d are converted to BSPline
109 ConvertToRevolution (S: Shape from TopoDS) returns Shape from TopoDS;
110 ---Purpose: Returns a new shape with all elementary periodic surfaces converted
111 -- to Geom_SurfaceOfRevolution
113 SweptToElementary (S: Shape from TopoDS) returns Shape from TopoDS;
114 ---Purpose: Returns a new shape with all surfaces of revolution and linear extrusion
115 -- convert to elementary periodic surfaces
117 ConvertToBSpline (S : Shape from TopoDS;
118 extrMode : Boolean; revolMode: Boolean;
119 offsetMode: Boolean; planeMode: Boolean = Standard_False)
120 returns Shape from TopoDS;
121 ---Purpose: Returns a new shape with all surfaces of linear extrusion, revolution,
122 -- offset, and planar surfaces converted according to flags to
123 -- Geom_BSplineSurface (with same parameterisation).