1 // Copyright (c) 2020 OPEN CASCADE SAS 2 // 3 // This file is part of the examples of the Open CASCADE Technology software library. 4 // 5 // Permission is hereby granted, free of charge, to any person obtaining a copy 6 // of this software and associated documentation files (the "Software"), to deal 7 // in the Software without restriction, including without limitation the rights 8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 // copies of the Software, and to permit persons to whom the Software is 10 // furnished to do so, subject to the following conditions: 11 // 12 // The above copyright notice and this permission notice shall be included in all 13 // copies or substantial portions of the Software. 14 // 15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE 21 22 #ifndef GEOMETRYSAMPLES_H 23 #define GEOMETRYSAMPLES_H 24 25 #include "BaseSample.h" 26 27 //! Implements Geometry samples 28 class GeometrySamples : public BaseSample 29 { DEFINE_STANDARD_RTTI_INLINE(GeometrySamples,BaseSample)30 DEFINE_STANDARD_RTTI_INLINE(GeometrySamples, BaseSample) 31 public: 32 33 GeometrySamples (const TCollection_AsciiString& theSampleSourcePath, 34 const Handle(AIS_InteractiveContext)& theContext) 35 : BaseSample(theSampleSourcePath, theContext) {} 36 37 protected: 38 virtual void ExecuteSample (const TCollection_AsciiString& theSampleName) Standard_OVERRIDE; 39 40 private: 41 void DisplayPnt (const gp_Pnt& thePnt, const TCollection_AsciiString& theText, 42 Aspect_TypeOfMarker theMarker = Aspect_TOM_PLUS, 43 Standard_Real theDistance = 5.0); 44 void DisplayPnt (const gp_Pnt2d& thePnt2d, const TCollection_AsciiString& theText, 45 Aspect_TypeOfMarker theMarker = Aspect_TOM_PLUS, 46 Standard_Real theDistance = 5.0); 47 48 // One function for every sample 49 void ZeroDimensionObjects3dSample(); 50 void Vectors3dSample(); 51 void InfinityLines3dSample(); 52 void SecondOrderCurves3dSample(); 53 void PlaneSurfaces3dSample(); 54 void SecondOrderSurfaces3dSample(); 55 void ZeroDimensionObjects2dSample(); 56 void Vectors2dSample(); 57 void InfinityLines2dSample(); 58 void SecondOrderCurves2dSample(); 59 void BarycenterPoint3dSample(); 60 void RotatedVector3dSample(); 61 void MirroredLine3dSample(); 62 void ScaledEllipse3dSample(); 63 void TransformedCylinder3dSample(); 64 void TranslatedTorus3dSample(); 65 void ConjugateObjects3dSample(); 66 void ProjectionOfPoint3dSample(); 67 void MinimalDistance3dSample(); 68 void Intersection3dSample(); 69 void TranslatedPoint2dSample(); 70 void RotatedDirection2dSample(); 71 void MirroredAxis2dSample(); 72 void TransformedEllipse2dSample(); 73 void ConjugateObjects2dSample(); 74 void Tangent2dSample(); 75 void ProjectionOfPoint2dSample(); 76 void MinimalDistance2dSample(); 77 void Intersection2dSample(); 78 void PointInfo3dSample(); 79 void EllipseInfo3dSample(); 80 void PointInfo2dSample(); 81 void CircleInfo2dSample(); 82 void FreeStyleCurves3dSample(); 83 void AnalyticalSurfaces3dSample(); 84 void FreeStyleSurfaces3dSample(); 85 void FreeStyleCurves2dSample(); 86 void TrimmedCurve3dSample(); 87 void OffsetCurve3dSample(); 88 void BSplineFromCircle3dSample(); 89 void TrimmedSurface3dSample(); 90 void OffsetSurface3dSample(); 91 void ExtrusionSurface3dSample(); 92 void RevolutionSurface3dSample(); 93 void TrimmedCurve2dSample(); 94 void OffsetCurve2dSample(); 95 void BoundingBoxOfSurface3dSample(); 96 void BoundingBoxOfCurves3dSample(); 97 void BoundingBoxOfCurves2dSample(); 98 void DumpCircleInfoSample(); 99 void DumpBSplineCurveInfoSample(); 100 }; 101 102 #endif //GEOMETRYSAMPLES_H 103