-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add support for QCAD/CAM #17
Comments
Thank you for bringing this to my attention! Currently, elements without the "c" attribute are treated as errors by QSketchMetric Validator. I understand your point about potentially treating these elements not as errors but as parts of the drawing to be simply moved and ignored. I must admit that I have never worked with QCAD/CAM, but I am open to gaining a better understanding of what you're suggesting. I can look into adding an option to ignore such elements. Perhaps something like a flag I appreciate your input and look forward to exploring this further! |
Hi, With QCAD/CAM, it saves config info (much like normal config) in the DXF. It also creates layers with a set of entities that mirror the paths you want to cut. They're organised on layers for rapid movements, normal paths etc. There may also be objects imported from an optional template. Potentially a lot of entities! The CAM processor uses the entityId of the source entity (as I understand), as an attribute on the corresponding CAM entities. That then means if you move any entities around - so long as the entityId isn't changed - the CAM will "follow" the new position, and update the paths accordingly. I wouldn't want any empty entities moved; just ignored and left where they are. It works well to use a point as an anchor, or adding additional graph elements to align parametric entities to page frames, or 0,0 etc. I see the "c" attribute as being the opt-in, which QSketchMetric processes; ignoring the rest. Thanks! |
I've been exploring QCAD/CAM and now understand the complexity of the issue. It's not just about the "c" attribute; the problem is more complex. Let me break it down step by step:
In summary, the CAM processor in QCAD uses a proprietary data structure based on DXF native blocks and layers. While not complex, integrating support for it requires more than just ignoring entities without a "c" attribute. To implement support for the CAM data structure, we need to:
I plan to change the issue title from "Error when an entity doesn't have a 'c' attribute" to "Add support for QCAD/CAM." This revision more accurately reflects our discussion. |
I've never had the need to use QCAD/CAM, as the CNC machine operator in our setup approached similar challenges differently. In the original CNC software, he would assign specific tools and their properties to designated layers (colors). We had various layers like 'cutting', 'slow_cutting', 'perforation', etc., which made the process quite straightforward with QSketchMetric. Moreover, with the use of QSketchMetric Validator, even non-coders could easily parametrize DXF drawings, eliminating the need for a developer's involvement in this aspect. |
Okay, so QSketchMetric creates a new document and draws new elements there? I thought it updated the original file, and then deleted the "VIRTUAL_LAYER" layer at the end... Would it be easier to use the original document and update positions of entities marked "c", then creating a new document? |
As of now, this is the architecture: Reading → Processing Graph → Rendering New Document. So, the answer to your first question is 'yes.' Regarding the second question, that approach might indeed be easier to add CAM support (saying this off the top of my head). It would require some refactoring. Additionally, there is another method we could consider: simply overwriting handlers in the newly rendered drawing |
Hi,
Does the library skip elements that don't have the "c" attribute?
I've just tried adding CAM data from QCAD/CAM, and getting an error (line 142; xdata parsing).
I've not properly gone through the code, but cursory glance, doesn't seem to be a reason to intentionally fail when elements don't have the "c" attribute? It seems like a nice potential feature, that elements that don't have "c" are not constrained and should be ignored altogether and left alone.
I can see quite a few potential benefits, the biggest is being able to have CAM prepared, so that the rendered file just needs the CAM exporting (it'll regenerate the new path positions), vs having to start from scratch, setting up config, tools, paths and then generating. As I assume paths are moved, but not replaced (so they have their original ID's), anything referencing elements will continue to work after rendering. Another is to have a frame, or other finished elements on different layers... using a point reference, or even graph elements, you could then lay out parametric elements on a finished CAD drawing etc, without ever having to touch the non-parametric elements.
The text was updated successfully, but these errors were encountered: