Hi @dale and @stevebaer, below are 3 examples to make Rhino for Mac SR14 crash. Please open _EditPythonScript
and run it from there:
import Rhino
import scriptcontext as sc
import System
import rhinoscriptsyntax as rs
pdf = Rhino.FileIO.FilePdf.Create()
dpi = 300
size = System.Drawing.Size(8.5*dpi,11*dpi)
settings = Rhino.Display.ViewCaptureSettings(sc.doc.Views.ActiveView, size, dpi)
settings.OutputColor = Rhino.Display.ViewCaptureSettings.ColorMode.DisplayColor
settings.RasterMode = False
pdf.AddPage(settings)
fixed_doc = pdf.PdfDocumentImplementation()
# this line crashes
print fixed_doc.GetType().BaseType.Assembly.Xfinium
It seems above crashes right after using fixed_doc.GetType()
so i’ve tried an alternative eg:
import Rhino
import scriptcontext as sc
import System
import rhinoscriptsyntax as rs
import clr
pdf = Rhino.FileIO.FilePdf.Create()
dpi = 300
size = System.Drawing.Size(8.5*dpi,11*dpi)
settings = Rhino.Display.ViewCaptureSettings(sc.doc.Views.ActiveView, size, dpi)
settings.OutputColor = Rhino.Display.ViewCaptureSettings.ColorMode.DisplayColor
settings.RasterMode = False
pdf.AddPage(settings)
fixed_doc = pdf.PdfDocumentImplementation()
# this line crashes too
print clr.GetClrType(type(fixed_doc))
The best crash i had today is actually this one, it seems to run fine at first:
import Rhino
import scriptcontext as sc
import System
import rhinoscriptsyntax as rs
pdf = Rhino.FileIO.FilePdf.Create()
dpi = 300
size = System.Drawing.Size(8.5*dpi,11*dpi)
settings = Rhino.Display.ViewCaptureSettings(sc.doc.Views.ActiveView, size, dpi)
settings.OutputColor = Rhino.Display.ViewCaptureSettings.ColorMode.DisplayColor
settings.RasterMode = False
pdf.AddPage(settings)
fixed_doc = pdf.PdfDocumentImplementation()
print fixed_doc
after you’ve run it, try to type this below the last line in the editor:
print type(fixed_doc)
without running it, it crashes exactly after entering the first bracket. I can repeat all 3 examples and sent the last one through the bug reporting dialog. Please let me know if you can repeat it on Mac Rhino 7 SR14. All 3 work fine under Windows.
Thanks ! If you could add equivalents to PdfPen.DashPattern
, PdfPen.LineType
and DrawBezier
it would be a big help. Btw. the reason why i want to write the beziers on my own is that ViewCapture
(Rhino 7 Windows) for some reason sometimes outputs polylines even when the input where degree 3 curves. I have not figured out yet why this happens on some curves.
I thought for legacy version, this would not matter and welcome any new additions to do it the regular way using RhinoCommon. There are so many goodies in Xfinium i would like to use…
_
c.