/// <summary> /// Export a non-empty solid. /// </summary> bool ExportSolid( IJtFaceEmitter emitter, Document doc, Solid solid, Color color, int transparency) { Material m; Color c; int t; foreach (Face face in solid.Faces) { m = doc.GetElement( face.MaterialElementId) as Material; c = (null == m) ? color : m.Color; t = (null == m) ? transparency : m.Transparency; emitter.EmitFace(face, (null == c) ? DefaultColor : c, t); } return(true); }
/// <summary> /// Export a non-empty solid. /// </summary> bool ExportSolid( IJtFaceEmitter emitter, Document doc, Solid solid, Color color, int transparency ) { Material m; Color c; int t; foreach( Face face in solid.Faces ) { m = doc.GetElement( face.MaterialElementId ) as Material; c = ( null == m ) ? color : m.Color; t = ( null == m ) ? transparency : m.Transparency; emitter.EmitFace( face, (null == c) ? DefaultColor : c, t ); } return true; }