sketchucation logo sketchucation
    • Login
    1. Home
    2. mcglk
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Groups 1

    Posts

    Recent Best Controversial
    • New to SketchUp; need some guidance on writing a plugin.

      I was asked to put together some instructions for a feral-cat shelter by the agency I volunteer for, and I thought SketchUp would be perfect. I have some background in drafting, and so I'm treating this as a set of 3D blueprints, as it were.

      The problem: I would like to write a tool that allows me to drill holes through a solid or a set of solids, or drill part-way through.

      The tentative plan: Create a Drill tool that uses the VCD to accept the bit diameter, and optionally the depth. More about this in a bit. (Edit: No pun intended. Honest.)

      This might be a little ambitious for a first plugin, but I've dusted off my Ruby knowledge and I'm gradually picking up the API. The pieces I don't have are: best practices for writing Ruby plugins (how to avoid namespace collisions, whether people prefer plugins grouped by author or not, and so on), how to make a tool cursor that can display the OnFace, OnEdge, Intersection and other such markers (particularly the latter, since I'm trying to make this an easy-to-use precision-capable tool), and how flexibly I can accept input.

      The trick: I'd like to be able to drill through a solid (or solids) obliquely, or through a solid (or solids) whose opposing faces are not parallel. Because of this, the push/pull tool will not do. My initial thought was to create a cylinder and intersect it with the shape, removing any geometry that would be "drilled out."

      For the sake of precision in future projects, I thought about adding a drill-point angle (defaulting to 118°) for drilling to a specific depth, but then I'm making cones and adding them to cylinders and doing the intersections and trying to figure out what to remove . . . and I'd rather solve the basic problem first (though I would love to solve this, too).

      Since I came up with this little learning project, I found that one isn't confined to using the VCD; entire UI panels can be designed. This means that I could (in theory) allow the user to create and keep a library of "drill bits", which could be very useful for these sorts of diagrams. But I don't know what the usual preference is here.

      Anybody willing to help me work through this thing?

      Thanks.

      posted in Newbie Forum sketchup
      M
      mcglk
    • 1 / 1