Overture  Version 25
MappingsFromCAD.h
Go to the documentation of this file.
1 #ifndef MAPPINGS_FROM_CAD_H
2 #define MAPPINGS_FROM_CAD_H
3 
4 // This class is used to build Overture Mapping's from CAD files.
5 
6 #include "MappingRC.h"
7 //#include "GL_GraphicsInterface.h"
9 #include "MappingInformation.h"
10 #include "NurbsMapping.h"
11 
12 class IgesReader;
13 
14 class
16 {
17 public:
18 
21 
22  int
23  readMappings(MappingInformation & mapInfo, aString fName = nullString, bool chooseAll = FALSE);
24 
25  void
26  fileContents(aString fileName, IgesReader * &iges_, int & numberOfNurbs, int & numberOfFiniteElements,
27  int & numberOfNodes, int & status );
28 
30  readSomeNurbs( MappingInformation & mapInfo, IgesReader *iges_, int startMap, int endMap,
31  int numberOfNurbs, int & status );// numberOfNurbs should be stored in the IgesReader class
32 
33  static int getTransformationMatrix(const int & item, IgesReader & iges, RealArray & rotation, RealArray & translation);
34 
35 protected:
36 
37  enum LineTypes
38  {
42  };
43 
45  {
48  coons13LeftRight, // coons patch formed from curves 1 and 3
49  coons13BottomTop, // coons patch formed from curves 1 and 3
50  coons24LeftRight, // coons patch formed from curves 2 and 4
51  coons24BottomTop, // coons patch formed from curves 2 and 4
52  coons // coons patch formed from 4 curves
53  } boundaryType;
54 
55 
56  int createCompositeCurve(const int & item,
57  IgesReader & iges,
58  int & maximumNumberOfSubCurves,
59  int & numberOfSubCurves,
60  Mapping ** & mapPointer,
61  Mapping *surf,
62  RealArray & surfaceParameterScale,bool scaleTheCurve=true,
63  bool expectPhysicalSpaceCurve=false );
64 
65  int createCurveOnAParametricSurface(const int & item,
66  IgesReader & iges,
67  Mapping *surf,
68  Mapping *&mapPointer,
69  int & maximumNumberOfSubCurves,
70  Mapping ** & subCurve,
71  RealArray & surfaceParameterScale);
72 
73 
74  int
75  createIgesReader( GenericGraphicsInterface & gi, aString & fileName, IgesReader * &iges, FILE * &fp,
76  bool useGivenFileName = FALSE);
77 
78  int createSurface(int surface,
79  IgesReader & iges,
80  Mapping *&mapPointer,
81  RealArray & surfaceParameterScale = Overture::nullRealArray() );
82 
83  int createTrimmedSurface(const int & item,
84  IgesReader & iges,
85  Mapping *&mapPointer);
86 
87  int isUntrimmedSurface(IgesReader & iges, int item );
88 
89  int readFiniteElements(IgesReader & iges );
90 
91 
92  int readOneCurve(int curve,
93  IgesReader & iges,
94  Mapping * & mapPointer,
95  RealArray & curveParameterScale);
96 
97  int scaleCurve( Mapping & mapping, Mapping & surf, RealArray & surfaceParameterScale);
98 
99  int createBoundaryEntity(const int & item,
100  IgesReader & iges,
101  const int & untrimmedSurfSeq,
102  NurbsMapping *&mapPointer,
103  RealArray & curveParameterScale);
104 
105  int readOneCurveAsNURBS(int curve,
106  IgesReader &iges,
107  NurbsMapping *&mapPointer,
108  RealArray & curveParameterScale);
109 
110  int createBoundedSurface(int entity, IgesReader &iges, Mapping *&mapPointer);
111 
112  int createManifoldSolidBRepObject(int entity, IgesReader &iges,
113  MappingInformation & mapInfo, IntegerArray & mapNumber,
114  int & numberOfMapsCreated, int & visibleItem);
115 
119 
120 
121  // kkc 12/10/01 the following 2 variables were made dynamic
122  // int lineType[20]; // for an error on dec-linux-compaq
123  //real subCurveBound[2][20]; // bounds on sub curves
124 
125  int *lineType;
127 
128  real curveBound[2][2]; // bounds on composite curve
129 
131 
132 };
133 
134 
135 #endif
136