-
Notifications
You must be signed in to change notification settings - Fork 282
Feature Request: Text for Dimensions, Callouts, Title Blocks, etc. #133
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
Comments
Thanks for the feedback @joenewstrom. Have you seen the "show path names" feature in the playground? In SVG it's a simplistic text placed at the center of a path. Adding dimensions can become quite elaborate. Can you attach a concept sketch? |
SVG has good support of text, but not maker.js |
This project is really awesome, but the lack of dimensions is a deal breaker. We are mfg company cutting plasma and laser and it is mandatory for machine operator to get a scale (dimensions) before he nests them on a sheet of metal. I know DXF Dimensions are not easy to implement, but it would be so cool. |
Thanks for the feedback everyone. To get a better idea of the community needs, it would be helpful to know some more specifics:
Architecturally speaking, this sounds like it may be a separate project which takes a dependency on the Maker.js core, because it is a focused scenario. |
I would have 2 different use cases for maker.js First, plasma/laser cutting. DXF is required and dimensions on the drawing are required. Machine operator would have a printed drawing and when he brings dxf to nest, he uses paper drawing to verify dimensions for the part he is cutting. The way to not confuse nesting program with dimensions is to use two different layers, one for cutting shape, other for dimensions. Second, maybe even more important use case would be general parametric CAD. Just like the front page demo with spoked pulley, user would be able to specify outside diameter, inside diameter, spoke count and offset and would get svg with those dimensions shown. In most cases only svg and pdf would be required. There would be no cutting in this scenario Thanks |
Dimension text would be amazing. I'm currently using a 10 year old php script I wrote to produce glass cutting sheets for frameless glass shower doors. Here's an example. Obviously this has a lot of drawbacks (server side, fixed image, no DXF capability), so I'm rewriting the program using maker.js example which has many benefits (to scale, DXF output, clientside, realtime modification using vue.js) Currently when I send the glass manufacturer a cutting sheet, it will be the first example, and customer service will use templates and drop the dimension numbers in. This is fast and efficient, but doesn't work for anything odd, where they will either get a CAD operator to manually draw the piece, or use a DXF I create and export it to the CNC software. The customer service person will however need all the dimensions supplied as a PDF for pricing, and they get annoyed if I just send them an undimensioned DXF file, as the CAD operator has to go and manually dimension the piece and print it out for customer service. I also need dimensions on the job sheets our installers get, so they can check the received piece of glass has been produced correctly. Currently it looks like I'll need to use opentype to draw bezier text for all my preview and PDF print dimensions, which is cumbersome (have to use a hacky single line CAD style font, write functions to create dimension lead lines and arrows etc) but doable (the first example uses php to do the same thing), however if I were to export a dimensioned DXF file, every bit of text is made up of curves, and a lot of crazy lines rather than simple DXF dimensions. I can mitigate a lot of the issues by placing dimensions on a separate layer, but it would be absolutely fantastic if this library could implement it the right way. Here's an image of a dimensioned DXF file using autocad to do it manually |
Another reason to have text in DXF : To label individual parts. For example, I might have 3 different mirrors in one DXF file, each with a different identifying number, and instructions for the processor such as '4mm Mirror Flat Polish All Edges'. This is going to be very difficult to do with faked text. Just a thought. I'll probably leave all text off DXF files, and send the processing info as an attached PDF. |
Hi there, |
Hi @HeinzSchrot, I myself have not done any work, other than some thought, towards this. I don't believe anyone in the community has either. Here's my thoughts so far:
|
I took a quick look at LebreCAD's dimension menu: And the corresponding DXF doc It seems tractable to implement this. |
this is what im doing at the moment It's just using the native lines and bezier curve text to output via svg, which is extremely inefficient :) |
@innominata - cool that you found a workaround 😃 but sorry that it's inefficient. It's a good case for the "native" text feature. We'd need to find a way to rationalize the text feature in a way that works for DXF, PDF, and SVG. |
@innominata very nice! svg would be absolutely good enough. You're right. There is no need for dimensions in dxf, since the part is 1:1 a CAD/CAM will show it correct. I'll need dimensions just for display in the canvas. |
Hi, is there any progress on this topic, or are you @innominata willing to share? |
@HeinzSchrot I stopped working on it a while ago due to laziness, but I think I wrote an adapter from makerjs coordinates to svg.js and used that for my user facing display. My memory is terrible, but I believe It's only using makerjs for dxf output now. |
@innominata
and I get the following error Could you please show how do you do it ? |
Dimensioning is critical to my use case too. I'd like to use MakerJS to produce parametric architectural drawings. A primitive example is this: https://jsfiddle.net/crumpled/rypgdLde/. I have a project with much more complexity, and I'm not sure if I want to use MakerJS if I have to draw dimensions like I did before. A dimension object like this might be a conversation starter. |
@crumpled what is your desired output format - SVG or DXF? |
Hi folks, I started digging into this and a couple of question arose.
Curious what people think. Maybe there is an elegant solution, but I haven't had time to devote to just this. |
@danmarshall :) |
Thanks everyone for the discussion. This is now underway, in the first of 2 stages.
I will probably only be building the popular dimensions:
|
Drawing text is a critical component in most CAD-involved projects (in order to add dimensions, callouts, title blocks, etc.). Adding text to SVG outputs is trivial but adding text to other options such as DFX may not be without some documentation and possibly shim methods. This is a great project and by adding the ability to include dimensions and so forth without having to dig into source code, it would be even more useful.
The text was updated successfully, but these errors were encountered: