Skip to content

render as engineering drawing (with title block etc.) #21

@stevegt

Description

@stevegt

Overview

I'm working on being able to generate 2D engineering drawings (with title block etc.) from sdfx. It looks like, in order to do this, I'd need to:

  • Be able to generate filled fonts rather than the outline fonts that TextSDF2() generates right now.
  • Generate lines or boxes for the title block, any specification tables, etc.
  • Find or implement some equivalent of the openscad projection() function to convert 3D models to 2D views or slices.

Does anyone have any ideas for how to best deal with the fonts? Looking at text.go and render.go right now, I suspect that I'd have to render in some way other than the existing marching squares (I think). It might even be better to skip that code path and render text as a <text> element in SVG or a TEXT entity for DXF.

I'm not as worried about the title block and tables -- am assuming that if I for some reason can't use boxes to build those I'll use Line{] or Line2{} directly.

Any opinions, and has anyone else had a go at this yet?

Architecture

Based on feedback below, so far I'm tentatively thinking the font bits might go in sdf/render.go, but the frame and title block, as well as any projection() function, might better fit in something like an sdf/view.go file or even a separate library. Am entirely open to suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions