//-------------------------------------------------------------------------------------------------- #endregion #region IVectorExporter bool IVectorExporter.DoExport(string fileName, VectorExportTemplate template, VectorExportLayer[] layers) { bool result; using (new ProcessingScope(null, "Exporting vector to SVG")) { SvgVectorExporter.DotsPerInch = Settings.DotsPerInch; result = _WriteToFile(fileName, SvgVectorExporter.Export(template, layers)); } return(result); }
//-------------------------------------------------------------------------------------------------- #region Helper MemoryStream RunExporter(bool useTriangulation, Ax3 projection, TopoDS_Shape[] shapes) { var helper = new DrawingExportHelper(useTriangulation, projection); helper.IncludeEdgeType(HlrEdgeType.VisibleSharp); helper.IncludeEdgeType(HlrEdgeType.VisibleOutline); helper.IncludeEdgeType(HlrEdgeType.VisibleSmooth); helper.IncludeEdgeType(HlrEdgeType.HiddenSharp); helper.IncludeEdgeType(HlrEdgeType.HiddenOutline); var layers = helper.PrepareExportLayers(shapes); if (layers == null || layers.Length == 0) { return(new MemoryStream("!HLRExporterError!".ToUtf8Bytes())); } return(SvgVectorExporter.Export(VectorExportTemplate.Drawing, layers)); }