-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
render as engineering drawing (with title block etc.) #21
Comments
To be sure sdfx has been written as a modelling library for 2d /3d signed distance fields- it's not really a blueprint producing 2d cad program. Having said that.... Since you seem to be in the realm of DXF files, I'd probaby aim for some code that given name, page, number, date, designer, etc. produced a frame of the correct size and slapped the 2d polygon from marching squares in the middle of it. ie- a version of RenderDXF with more control parameters. |
Yeah, I also don't need traditional engineering drawings myself -- I prefer tool chains that go from model all the way to material without the human intervention that a drawing implies. But I'm being driven to generate drawings by more traditional folks I need to interact with. It's been a persistent demand for years, one that I'd always assumed I'd eventually get around to via either openscad or python scripting of freecad -- paradoxically enough, I think sdfx is better suited. I'm not even wedded to DXF -- SVG would allow rendering in browser, etc. I think we're thinking the same thing about rendering code path for the frame and title block. Just need to suss out the right way to handle lettering. Still experimenting. |
So sdfx uses the yofu/dxf package. The flow is something like 2d sdf -> 2d polygon -> dxf output file. |
Adding this to my "todo" checklist above: Does anyone know of an existing implementation of the openscad projection() function for sdfx? I spent some time this weekend looking around in the code, closest I've found so far is the Cut3D() stuff. |
Encouraging that yofu/dxf includes a DXF parser -- that would allow reading the boilerplate from a template file. |
func Slice2D(sdf SDF3, a V3, n V3) SDF2 |
Hey all I also have the same need did this move forward in anyone’s repo. I think I could build a gui for doing this actually in golang
This is all read only. But it should be possible to extend it to editing also I think but it would need to be talking to the 3d model golang api |
I don't know that anybody has done it. My suggestion was that it could be a parameter passed to the DXF render. ie - page size, title, date, version, etc. - and then just add them to the dxf output using the dxf primitives. |
Hey all I am using Deck to allow making Technical drawings it golang and can produce a pdf and other formats. https://github.com/ajstarks/deck Wondering if SDF software output 2 d or 3d view in a raater or Vector Format ? Cause I can then use that with Deck . Deck can model vector cad as 2d btw. Lines , Text, curves. It’s very stable too in general with good maintenance |
Can SDF do DXF out ? |
sdfx can generate dxf output for 2d signed distance fields. It uses marching squares with no post consolidation of line segments so the dxf will consists of many short line segments. Line 104 in 1a71e40
|
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:
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.
The text was updated successfully, but these errors were encountered: