![]() I appreciate the tips for additional scripts to look at. If the 2D DXF is not subsequently edited to change the segments to smooth curves, the CAM software typically stops and starts at the endpoints of each segment causing wasted machine time and excessive tool wear :/ It's a polygonal modeler, and while it maintains some internal data about each curve which allows you to change the number of segments used to represent each curve inside your 3D model, SketchUp's 2D output to DXF is always the segmented representation. Unfortunately, that is the standard for SketchUp. You mean curved lines that are approximated with line segments. If there is indeed a pattern in it the way back to curved is much easier. Just key "query" in the classes search field will reveal a multitude of queries to choose from.Ī file or different files, small and handy, with some example would be nice. ![]() Getting lists from the resources is usually "get" or "query". It is the other way around that is quite another story.Ī lot off scripts are included in compiled form.Ī fairly complete source apart from PRO scripts is github : Īll the classes are documented here. Tile2Hatch is an addon that converts a tile to a hatch pattern and it starts with approximating all to line segments. ![]() The fourth one is in development and is a different story on its own. I would see 'to segments' as an optional output method for an old CNC setup.ģ scripts of mine in the open take a selection.Įncrypted by a completely uneducated idle starting with no knowledge of the language, the object oriented nature and the QCAD framework.ġ- FlexPainter + there is a ton of do and don'ts in the script file itself.ġ is already for some time a part of a standard installation. I'd generate icons and psuedo-code the behavior logic I'd like to see, as well as handling edge cases and error conditions, and whatever else I can write. If anyone with experience wants to go at this together, I'm all ears. Then write the other 99% of the code that makes it usable I'm an old-school developer, but this has been on my to-do list for waaayyyyyy too long because it's always hardest to jump into a framework and gain familiarity before you can actually be constructive, and I just haven't done that yet :/ I pulled the source and have browsed through many of the scripts for the native tools (like the ShapeAlgorithms class), but I haven't found a good example script to jump-off from that does something with a user selection of existing entities (can anyone suggest an appropriate existing script?) It looks like I would use quer圜ontainedEntities() and then work with the returned set of entities, then create an RArcEntity or RCircleEntity and insert it into the document tree, deleting the original contained entities. The tessellated geometry is always quite clean. Of course there are inaccuracies and edge-cases to automating anything, but 99% of the scenarios can be covered with really simlpe logic and minimal error checking. ![]() If the points all share two entities, you have a complete circle and can generate a two point circle, again deleting the original selection and selecting the newly generated circle. So, I have been mulling writing a plug-in to take a user selection of line segments, order the endpoints, pick the start and end points and one near the middle (depends on odd or even number of segments if you have a midpoint), then generate a three-point arc, delete the original selection and select the newly generated arc so the user has visual confirmation. Because there is now overlapping geometry, I find it best to drag a selection box across part of the arc/circle (without selecting the arc/circle) and delete those segments then drag a selection box across the remaining segments to delete them. So it's common practice for me to use three-point arcs and two point circles to replace the tessellated geometry, which goes fairly quickly but the deletion of the existing line segments is the tedious and error prone part. This tessellated output doesn't work well with CNC machines because the tool path generation can create stops and starts as it randomly sees fit, or the automatic conversion to smooth curves just flat out sucks and a perfect 24 segment circle gets converted to three or four bezier curves that are no longer accurate. I work regularly with DXF files generated from SketchUp, and the problem is that SketchUp generates tessellated arc and circles in all 2D output. I would love to have a feature/tool/script/plug-in added to QCAD.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |