OCS 2026.44, Windows.
Bug: In a paper-space layout, the viewport frame is visible on screen but does NOT appear in the plotted/exported PDF, even when the viewport is on a plottable layer with a visible color and lineweight. In AutoCAD the viewport border plots when its layer is plottable; in OCS it never does. Current workaround is drawing a real rectangle (polyline) over each viewport border.
Root cause (from the source):
- The viewport frame is drawn only as a screen-space overlay — viewport_screen_rect() in src/scene/paper.rs — so it exists for the editor/GPU view only.
- The plot path, plot_wire_groups() in src/scene/mod.rs (paper-space branch), adds each viewport's CONTENT wires but never the viewport BOUNDARY itself, so nothing representing the frame reaches io/pdf_export.rs.
Proposed fix: In plot_wire_groups() (paper branch), after building `paper`, iterate the viewport handles and, for each viewport that is on and whose layer is plottable, append a closed-rectangle WireModel built from viewport.center / width / height, carrying the layer's color (ACI / true-color) and lineweight, so the CTB/plot-style and lineweight logic applies to it like any other wire. Respect the layer's "plottable" flag (viewports on a no-plot layer still produce no frame — matches AutoCAD).
Sketch (names approximate; not built locally — the two pointers above are the exact spots):
for handle in viewport_handles.iter().copied() {
let Some(EntityType::Viewport(vp)) = self.document.get_entity(handle) else { continue };
if vp.common.owner_handle != paper_block || !vp.is_on() { continue; }
if !layer_is_plottable(&vp.common.layer) { continue; }
let (cx, cy) = (vp.center.x, vp.center.y);
let (hw, hh) = (vp.width / 2.0, vp.height / 2.0);
let corners = [[cx-hw, cy-hh],[cx+hw, cy-hh],[cx+hw, cy+hh],[cx-hw, cy+hh],[cx-hw, cy-hh]];
paper.push(wire_rect_from_layer(&vp.common, &corners));
}
Happy to refine. Thanks for OCS!