1 -- File: ShapeCustom.cdl
2 -- Created: Wed Jun 3 12:40:02 1998
3 -- Author: data exchange team
4 -- <det@loufox.nnov.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1998
10 ---Purpose: This package is intended to
11 -- convert geometrical objects and topological. The
12 -- modifications of one geometrical object to another
13 -- (one) geometrical object are provided. The supported
14 -- modifications are the following:
15 -- conversion of BSpline and Bezier surfaces to analytical form,
16 -- conversion of indirect elementary surfaces (with left-handed
17 -- coordinate systems) into direct ones,
18 -- conversion of elementary surfaces to surfaces of revolution,
19 -- conversion of surface of linear extrusion, revolution, offset
20 -- surface to bspline,
21 -- modification of parameterization, degree, number of segments of bspline
22 -- surfaces, scale the shape.
45 class RestrictionParameters;
47 class DirectModification;
49 private class TrsfModification;
50 private class BSplineRestriction;
51 private class ConvertToRevolution;
52 private class SweptToElementary;
53 private class ConvertToBSpline;
55 ApplyModifier(S : Shape from TopoDS;
56 M : Modification from BRepTools;
57 context: in out DataMapOfShapeShape from TopTools;
58 MD : in out Modifier from BRepTools)
60 returns Shape from TopoDS;
61 ---Purpose: Applies modifier to shape and checks sharing in the case assemblies.
63 DirectFaces(S: Shape from TopoDS) returns Shape from TopoDS;
64 ---Purpose: Returns a new shape without indirect surfaces.
66 ScaleShape (S: Shape from TopoDS; scale: Real) returns Shape from TopoDS;
67 ---Purpose: Returns a new shape which is scaled original
69 BSplineRestriction(S : Shape from TopoDS;
71 MaxDegree, MaxNbSegment : Integer;
72 Continuity3d, Continuity2d: Shape from GeomAbs;
75 aParameters : RestrictionParameters from ShapeCustom)
76 returns Shape from TopoDS;
77 ---Purpose: Returns a new shape with all surfaces, curves and pcurves
78 -- which type is BSpline/Bezier or based on them converted
79 -- having Degree less than <MaxDegree> or number of spans less
80 -- than <NbMaxSegment> in dependence on parameter priority <Degree>.
81 -- <GmaxDegree> and <GMaxSegments> are maximum possible degree
82 -- and number of spans correspondingly.
83 -- These values will be used in those cases when approximation with
84 -- specified parameters is impossible and one of GmaxDegree or
85 -- GMaxSegments is selected in dependence on priority.
86 -- Note that even if approximation is impossible with <GMaxDegree>
87 -- then number of spans can exceed specified <GMaxSegment>
88 -- <Rational> specifies if to convert Rational BSpline/Bezier into
89 -- polynomial B-Spline.
90 -- If flags ConvOffSurf,ConvOffCurve3d,ConvOffCurve2d are Standard_True there are means
91 -- that Offset surfaces , Offset curves 3d and Offset curves 2d are converted to BSPline
94 ConvertToRevolution (S: Shape from TopoDS) returns Shape from TopoDS;
95 ---Purpose: Returns a new shape with all elementary periodic surfaces converted
96 -- to Geom_SurfaceOfRevolution
98 SweptToElementary (S: Shape from TopoDS) returns Shape from TopoDS;
99 ---Purpose: Returns a new shape with all surfaces of revolution and linear extrusion
100 -- convert to elementary periodic surfaces
102 ConvertToBSpline (S : Shape from TopoDS;
103 extrMode : Boolean; revolMode: Boolean;
104 offsetMode: Boolean; planeMode: Boolean = Standard_False)
105 returns Shape from TopoDS;
106 ---Purpose: Returns a new shape with all surfaces of linear extrusion, revolution,
107 -- offset, and planar surfaces converted according to flags to
108 -- Geom_BSplineSurface (with same parameterisation).