Jump to content

rmi

Member
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

4 Neutral

Personal Information

  • Country
    DE

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. take a look at OpenSCADReader.importParts, the temporary scad files are created around line 145 EDIT: none obvious. preRead already scans and parses all the comment sections and keeps the result in self.parts such that read only needs iterate over self.parts. This is preparation for the future as I'd like to show dialog after preRead that allows the user to choose which objects to import. I agree, my code(ing style) is messy :) I'm all up for refactoring it. The parser for the comments is already in it's own class, but I'd it like to see a cleaner separation of concerns in importParts as deals with many different tasks; generate all the meshes, create the hierarchy (groups) and assign the per object settings. I'm not sure about all the other Cad integration plugins, but maybe there is some overlap that CommonReader could handle.
  2. @thopiekar sorry for the silence, just updated the pull request @ehubin If you don't want to wait for the release, you can pull the code from here: https://github.com/rmie/CuraOpenSCADPlugin I'm not sure how it works with windows, but for linux just copy everything into e.g $HOME/.local/share/cura/3.6/plugins and (re)start Cura
  3. I started to merge my work into your framework but can't find a repository for your OpenSCADIntegration plugin to send a pull request. As of now only the parser and basic import functions are merged, but nevertheless I guess that it makes a good starting point for a more detailed discussion. -- Roland
  4. @thopiekar The issue with OpenSCAD is that it only allows to export one mesh at a time. Print jobs that require multiple meshes (multi extrusion, support meshes etc.) becoming increasingly difficult (at least for me). What I'm aiming for are comment sections in the OpenSCAD file itself to describe the composition of meshes that make up a print job. What I have so far (but doesn't yet work with 3.4) is: - a parser for such comments (lex, yacc) - a dialog to import only a subset of all objects - tracking imported objects and saving changes to OpenSCAD whenever GCode is exported or printed etc. I already took a lot of "inspirations" from your plugins and would be happy to reuse your "CadIntegrationUtils" framework, if that is ok for you. wrt. to the Customizer syntax, yes that would be a desirable feature as well. Roland
  5. You are the first expressing interest, maybe a good time to wrap up my code and release it. It will take a couple of days, as there are still some rough edges and I need to test with the latest version of Cura. Roland
  6. just toyed a bit around with support_mesh and infill_mesh. support_mesh allows you to selectively define areas that should have support structures. infill_mesh allows you to overwrite change slicer settings for some parts of your model. Consider the following part (view from bottom), eg. a simple mount plate that is fasten with four screws. The volume around the screws should be reinforced, 100% infill under the screw head and 75% infill in the volume around. The cross in the center should have support, but the ring around the screw holes not, because ... This requires a total of four meshes. One for the part, two to define to reinforcement and a forth for the selective support. See code and how the plugin could be used to define this complex arrangements of meshes: /*cura { 'baseplate()': { 'extruder': 'toolchanger_0 #2', 'infill_sparse_density': 25}, 'reinforcment(d = 14)': { 'extruder': 'toolchanger_0 #2', 'infill_mesh': True, 'infill_mesh_order': 1, 'infill_sparse_density': 100, 'top_bottom_thickness': 0, 'wall_thickness': 0.0}, 'reinforcment(d = 24)': { 'extruder': 'toolchanger_0 #2', 'infill_mesh': True, 'infill_mesh_order': 2, 'infill_sparse_density': 50, 'top_bottom_thickness': 0, 'wall_thickness': 0.0}, 'support()': {'extruder': 'toolchanger_0 #2', 'support_mesh': True}} */ module relief(ri = 10, ro = 12, h = 3) { difference() { cylinder(r = ro, h = h); translate([0, 0, -0.01]) cylinder(r = ri, h = h + 0.02); } } module nosupport(x = 50, y = 50, d = { centers(x, y, -0.01) relief(ri = d/2 + 4, ro = d/2 + ; } module centers(x, y, z = 0) { for(tx = [-x/2, x/2], ty = [-y/2, y/2]) translate([tx, ty, z]) children(); } module baseplate(x = 50, y = 50, d = 8, h = 10) { difference() { hull() centers(x, y) cylinder(r = 2 * d, h = h); centers(x, y, -0.01) cylinder(r = d/2, h = h + 0.02); support(x, y, d); nosupport(x, y); } } module reinforcment(x = 50, y = 50, d = 8, h = 10) { centers(x, y) cylinder(r = d/2, h = h); } module support(x = 50, y = 50) { translate([0, 0, 2.5]) { cube([x - 10, 10, 5.01], center = true); cube([10, y - 10, 5.01], center = true); } } baseplate(); %color([0.5, 0, 0, 0.75]) reinforcment(d = 14, h = 10.2); %color([0.5, 0.25, 0.25, 0.75]) reinforcment(d = 24, h = 10.1); %color([0.75, 0.75, 1.0, 0.5]) support(); Cura Layer view, without further changes. The cross has support, but the rings not. A bit further to the top, the area close around the hole is 100% filled than 50% and than 25%, the default for the model.
  7. It seems like we are working on similar topics Cura <-> OpenSCAD integration. I'm curious what your plugin is doing (and how), but as I understand it requires Windows and SolidWorks, so I can't take a look myself. Is there a description of your plugin available?
  8. Hi, I'm building a a somewhat unusual 3D printer. It uses 3 hotends at the moment, but the final goal is to have 6. While slowly exploring the world of dual/multiextrusion with my tools of choice, OpenSCAD and Cura, I wanted to have a better integration between both. Current Issues: * OpenSCAD exports only one mesh at a time. No big deal with single extrusion, but multi extrusion part often require changes to multiple meshes. Right now I'm using '*' or '!' in OpenSCAD to control which parts of a design are rendered and then exported. The whole process is error prone and tedious. * Some of my designs require special slicer settings, like wall thickness, top/bottom layer etc. It happened a few times that I forget these changes when I had to print another part after a few weeks. * Features like 'anti overhang mesh', 'support mesh', etc. are really hard to use as they require even more meshes to be exported for a single part. I started to work on a Cura plugin some days ago (alpha stage at best right now), to see if it is possible to overcome some of these limitations. The Idea is to embed export and slicer settings as comments in OpenSCAD files and have a FileReader plugin that opens a file, scans for such comments, renders the objects via openscad and uses 'Per Object Settings' to override profile defaults on the imported objects. The slicer settings are written back to the OpenSCAD file whenever G-Code is saved. Examples: /*cura{'ring(30, 20, 10)': {'extruder': 'toolchanger_0 #2', 'speed_print': 120}}*/ This would create the object 'ring(30, 20, 10)' from the imported SCAD file, assign the created mesh to extruder 0 and change the print speed to 120mm/s for this object. /*cura{ 'ring(10, 5, 6)': { 'extruder': 'toolchanger_0 #2', 'top_bottom_thickness': 1.6}, 'ring(15, 10, 5)': {'extruder': 'toolchanger_2 #2', 'wall_thickness': 1.6}}*/ Same here, but two meshes are created, assigned to different extruders and grouped into a single object. Please note that there is no need to remember the syntax and slicer parameters. Adding a comment like /*cura {'ring(10, 5, 6)': {}}*/ is sufficient to get it imported in Cura and all the settings are written once the G-Code is saved. Clearly missing is a feature to keep track of the global state of the printer, like material assigned to extruders, loaded profil and unsaved changes to the profile and to show a warning after import. One significant drawback is render time. OpenSCAD only allows one mesh to be exported, this means that internal mesh caches are not preserved between the render processes. I haven't yet tested with anti_overhang or cutting_mesh an the like, but have no doubt that it could be used for this purpose as well. If I sparked your interest, don't hold your breath. The plugin will take some time till release. But I'm curious for your feedback. Am I missing obvious enhancements to the process? While talking about and in case one of the devs just reads this. Some really useful settings are not available per model, most notable are all the "use extruder X for feature Y' options (like outer_wall_extruder).
  9. why are there 5 hotend temperature variables in cura is kinda the answer to your question. Make initial printing temp, final printing temp and standby temperature visible in the material section to change the values.
  10. The plugin code below hasn't been tested extensively, but works for me. #Name: Fix E value for Sailfish Firmware#Info: Compute E value per extruder.#Help: TBD#Depend: GCode#Type: postprocessE = [0.0, 0.0]lastE = 0.0tool = 0with open(filename, "r") as f: lines = f.readlines()with open(filename, "w") as f: for line in lines: code = list(line.split(";"))[0] if code.startswith("T0") or code.startswith("M135 T0"): E[0] = lastE - E[tool] tool = 0 f.write(line) elif code.startswith("T1") or code.startswith("M135 T1"): E[1] = lastE - E[tool] tool = 1 f.write(line) elif code.startswith("G0") or code.startswith("G1"): for part in code.split(" "): if part.endswith("\n"): part = part[:-1] if part.startswith("E"): lastE = float(part[1:]) f.write('E{0} '.format(lastE - E[tool])) else: f.write('{0} '.format(part)) f.write('; {1} {2} {3} {4}\n'.format(part[:-1], tool, lastE, E[0], E[1])) elif code.startswith("G92"): for part in code.split(" "): if part.startswith("E"): lastE = float(part[1:]) E[tool] = lastE f.write(line) else: f.write(line)
×
×
  • Create New...

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!