This article will cover some CAD programs, such as Blender, FreeCAD, SketchUp. They are not the best choice for fully fledged STL editing due to some differences in the way they represent some shapes. They weren't originally developed with 3D printing in mind, although they are pretty useful for this workflow. These programs aim for covering engineering and construction modeling purposes, providing precise measurements and solid modeling tools. There are two types of programs that allow users to edit STL files: There are STL editors that help users with that. In other cases, you would need to edit or repair it. Sometimes, the pre-downloaded STL file or your own model is good enough. It must be an Sketchup:Entity or array of Sketchup:Entity objects.At some point any 3D printing hobbyist will wonder how to edit STL files. The second should not be Sketchup::Entities - that will fail. (I'm a bit surprised it worked by feeding it a Sketchup::Group object.) The first one should be a Sketchup::Entities object where the intersected objects should appear. Note about the Entities.intersect_with description - the current docs doesn't explain well all the arguments. (See this article on instances and definitions in SketchUp: )Īlso, if you want faces to fill the hole between the inner and outer skin you need to intersect that part as well. That way the group definition is at a much bigger scale. If you really want 360 segment circles you can scale the content of the group up - while you scale the group instance down. # (Could also collect these earlier before intersecting byĬircles = (Sketchup::Edge).select # earlier (including the ones push-pulled). # Find all the edges that belong to the Circle elements drawn # (Do you really need such a high mesh density anyway?) # I reduced the curve segments from 360 to 180. # If you has Edge Outline style enabled you could see that # you drew it they where pushing the boundary of how small # (!) You created a circle with so many edges that at the scale However, is you are not using SketchUp 8 Pro or newer then you won't have these methods available.Īlternative solution - avoiding the Solid Tools methods of the Pro version: entities = Sketchup.active_model.entities # draw the intersection lines and erase the hole punchĮntities.intersect_with true, hole_ansformation, tube, ansformation, true, hole_punchĭetermining the correct faces to erase after intersecting can be very tricky.īut since you are working with cylinder shapes - which are solids - I would recommend you use the solid boolean operations that was introduced in SketchUp 8 Pro. # make a cylinder that punches through the wall What am I doing wrong? entities = Sketchup.active_model.entities You should be able to run the following script in the ruby console and see what I mean. Currently I am stuck with it drawing incomplete circles on the tube, so I am unable to find the face and erase it. So far, though, I haven't been able to make it work with a script. This works if I do it with the mouse, but I found it difficult to be precise about placement and measurement with the mouse. I want to make a tube and and then cylinders which poke through the tube, draw the intersection lines between the tube and the cylinders, then erase the cylinders, leaving circles to cut out of the tube. I'm writing a script to make a simple flute in SketchUp (free version, Mac).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |