Example #1
0
		internal static IfcShapeRepresentation CreateRepresentation(IfcRepresentationItem ri)
		{
			if (ri == null)
				return null;
			IfcBooleanResult br = ri as IfcBooleanResult;
			if (br != null)
				return new IfcShapeRepresentation(br);
			IfcCurve c = ri as IfcCurve;
			if (c != null)
				return new IfcShapeRepresentation(c);
			IfcCsgPrimitive3D csg = ri as IfcCsgPrimitive3D;
			if (csg != null)
				return new IfcShapeRepresentation(csg);
			IfcCsgSolid csgs = ri as IfcCsgSolid;
			if (csgs != null)
				return new IfcShapeRepresentation(csgs);
			IfcExtrudedAreaSolid eas = ri as IfcExtrudedAreaSolid;
			if (eas != null)
				return new IfcShapeRepresentation(eas);
			IfcFacetedBrep fb = ri as IfcFacetedBrep;
			if (fb != null)
				return new IfcShapeRepresentation(fb);
			IfcFaceBasedSurfaceModel fbs = ri as IfcFaceBasedSurfaceModel;
			if (fbs != null)
				return new IfcShapeRepresentation(fbs);
			IfcGeometricSet gs = ri as IfcGeometricSet;
			if (gs != null)
				return new IfcShapeRepresentation(gs);
			IfcPoint p = ri as IfcPoint;
			if (p != null)
				return new IfcShapeRepresentation(p);
			IfcSectionedSpine ss = ri as IfcSectionedSpine;
			if (ss != null)
				return new IfcShapeRepresentation(ss);
			IfcShellBasedSurfaceModel sbs = ri as IfcShellBasedSurfaceModel;
			if (sbs != null)
				return new IfcShapeRepresentation(sbs);
			IfcSurface s = ri as IfcSurface;
			if (s != null)
				return new IfcShapeRepresentation(s);
			IfcSweptAreaSolid sas = ri as IfcSweptAreaSolid;
			if (sas != null)
				return new IfcShapeRepresentation(sas);
			IfcSweptDiskSolid sds = ri as IfcSweptDiskSolid;
			if (sds != null)
				return new IfcShapeRepresentation(sds);
			IfcAdvancedBrep b = ri as IfcAdvancedBrep;
			if (b != null)
				return new IfcShapeRepresentation(b);
			IfcTessellatedItem ti = ri as IfcTessellatedItem;
			if (ti != null)
				return new IfcShapeRepresentation(ti);
			IfcMappedItem mi = ri as IfcMappedItem;
			if (mi != null)
				return new IfcShapeRepresentation(mi);
			ri.mDatabase.logError("XXX Error in identiying " + ri.ToString() + " as shape representation, please contact Jon!");
			return null;
		}