sketchucation logo sketchucation
    • Login
    1. Home
    2. noelwarr
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    N
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 63
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Sketchup CNC

      I'm guessing you're pointing to the Vistii article in CatchUp. Although Vistii and miniVistii share names (and developers), they are quite different. Fyi:

      miniVistii is open-source, not at all user-friendly but functional. It alows you to declare edges as toolpaths and then convert them to Gcode. It is basically waiting for someone to come along and contribute. That said, I do 90% of my CNC manufacturing with it.

      Vistii is a manufacturing service (Though this may change). It allows for no manual creation of toolpaths as they are all automatically generated. Vistii also simmulates the machining of the workpiece creating a kind of "print-preview" of what the end product will look like.

      posted in Woodworking
      N
      noelwarr
    • RE: Sketchup is Inacurrate???

      I wouldn't say SketchUp is a digital machine. Rather, it runs on one. Obviously floats and doubles have limited accuracy and indeed can cause all sorts of problems, especially in geometry. There are libraries that can work with arbitrary precision though. Checkout http://gmplib.org/ and its quotient class. It has no theoretical limit in accuracy.

      Also, even though you can't create an infinitely long edge in SketchUp, Ruby does support the concept of infinity. Try 1/0.to_f

      posted in SketchUp Discussions
      N
      noelwarr
    • RE: Exporting solids & reversed faces

      No, just lines and using methods like Geom::intersect_line_plane and then checking weather the intersection lies withing the face itself. It's complicated and error prone (When lines intersect edges instead of faces) but can be made to work.

      posted in Developers' Forum
      N
      noelwarr
    • RE: Exporting solids & reversed faces

      Cheers TIG. I did do a bit of SKF ploghing but obviously not enough.

      This is all part of a plugin I've been developing (http://www.vistii.com) which relies on users supplying the solids. It seems a little cumbersome to keep telling users that their solids are not valid for some reason or another. It would be much nicer to clean up after them.

      So, if you don't mind, I'll be mimicking your code. I don't want to take it "as is" since I don't want to monkey patch the Face class. Thanks for the help.

      posted in Developers' Forum
      N
      noelwarr
    • Exporting solids & reversed faces

      I'm using a third party library that takes triangulated manifold polyhedra as input. I have a SketchUp plugin that iterates through a solid's Faces, creates PolygonMeshes from them and then does a bit of cleaning up to link these PolygonMeshes together. No big deal.

      Problem is when I reverse one of the faces inside SketchUp. Sketchup still considers this to be a solid but the PolygonMesh my script creates is also reversed and my thrird party library throws an error.

      I know of two possible solutions to this but they are both heavy duty and a but ugly. I was hoping someone might have a better suggestion. The two I am aware of are:

      1. Draw lines along the normals of each face (From the face, outwards). Count the number of faces it intersects. Reverse if even, do nothing if odd.

      2)Take one face as a reference. Make sure all adjacent faces are aligned similarly by checking the order of it's vertices. Iterate through the structure until all faces have been checked. If construction of polyhedron fails, reverse all faces.

      posted in Developers' Forum
      N
      noelwarr
    • RE: Does someone feel fit to adjust CGAL for usage out of ruby?

      I've been toying around on AWS today and I realised something. One of the RGAL's dependencies is Qt3. The precompiled CGAL library in the Ubuntu repository is NOT compiled with Qt3. This means that you have to compile CGAL yourself which is always a hassle. I don't know about other platforms though. It's possible that mac's precompiled CGAL works a charm

      If bootstrap fails at rb_Nef_polyhedron_3.cpp because it can't find qapplication.h, you have two options.
      *Either comment out the show method in the cpp file (dont forget to comment out the rice refference to it at the bottom of the file) and the two lines (qapplication and Qt_widget) in the rb_Nef_polyhedron_3.h file
      *Or get your act together and compile CGAL from scratch remembering to set the Qt3 flag to true.

      Ideally, it would be nice to have the Nef_polyhedron return a qt_widget object that ruby can then put in its own qt application. I have the feeling that that just isn't possible though.

      posted in Developers' Forum
      N
      noelwarr
    • RE: Does someone feel fit to adjust CGAL for usage out of ruby?

      Here is is. Bare in mind it is work in progress. I've been working on it for months and spend a good few hours on it everyday. If anyone wants to contribute please let me know as there are a number of things that should be made clear before you get stuck in. I've made a lame attempt at documenting it. If anyone is seriously interested in using this they are gonna have to plough their way through cpp code. While the're doing this they might as well add to the documentation. I'm using comments and rdoc to automatically generate the docs. Have a look at ruby/Aff_transformation_3.rb to see how it works.

      As far as dependencies go: cgal, gmp, mpfr, boost, qt3 and rice are necessary (I no longer use geomview)

      http://noelwarr.github.com/rgal

      DISCLAIMER: There is another project http://code.google.com/p/cgal-bindings/ that is writing language agnostic wrappers for CGAL using SWIG. The geometry factory is actively involved in this project, but I have too say it's rate of growth leaves much to be desired. It makes more sense to go in that direction but I found SWIG too complex to use.

      posted in Developers' Forum
      N
      noelwarr
    • RE: Does someone feel fit to adjust CGAL for usage out of ruby?

      @Aerilius Yes, I believe you do need to compile it under windows/mac. I think though that once someone has done that, the dll can then be used on other similar operating systems. The project I am working on doesn't interact with Sketchup directly. I have a Sketchup plugin that reads the Sketchup model and uploads it to a server. It is on the server that I have this library performing various geometric tasks. The result is then fed back into the Sketchup model. The library is indeed Sketchup independant. CGAL won't know what to do with a Sketchup::Point You'd have to do something like...
      p = Sketchup::Point3d(1,2,3) CGAL::Point_3::build(p.to_a)

      @Dan Those aren't the class names. Just a list of my cpp files that I copied and pasted. Rice takes care of creating the classes for me. I don't know what it does "under the hood" though.

      posted in Developers' Forum
      N
      noelwarr
    • RE: Does someone feel fit to adjust CGAL for usage out of ruby?

      I'll publish it when I have a moment. Its still in development and no documentation. A couple more months should do the trick. These are the classes I've wrapped so far.

      rb_Offset_polygon_2
      rb_Point_2
      rb_Iso_cuboid_3
      rb_Nef_polyhedron_3
      rb_Polygon_with_holes_2
      rb_Polygon_2
      rb_Halffacet
      rb_X_monotone_curve_2
      rb_Offset_polygon_with_holes_2
      rb_SVertex
      rb_Aff_transformation_3
      rb_SHalfedge
      rb_Polygon_set_2
      rb_Lazy_exact_nt
      rb_Vertex
      rb_Point_3

      To compile it you'll need ruby, cgal and rice installed on your system. I'm on linux but if you get a windows or mac version compiled I'll post it too.

      If you can't wait, checkout my first shot at it (http://code.google.com/p/rgal/). Don't get used to the structure, though. I've changed most of how it works

      posted in Developers' Forum
      N
      noelwarr
    • RE: Does someone feel fit to adjust CGAL for usage out of ruby?

      FOUR YEARS LATER!

      I have something in this direction working. Let me know if you're still interested.

      posted in Developers' Forum
      N
      noelwarr
    • RE: Sketchup CNC

      Great to know you can read it! There are a few recursive methods there that are so obfuscated that even I can't figure out how they work! πŸ˜„ Wish I had commented them

      I don't think you'll have much of a problem with speed. Apart from general good practices there are a few Sketchup specific ones too. Off the top of my head...

      1. Interact with the model as little as possible.
      2. Don't use
        my_entity.typename == "Edge"
        instead use
        my_entity.is_a?(Sketchup::Edge)

      If you have to perform "serious" stuff there are always c extensions. But I wouldn't head down that path if I were you.

      Keep me posted on how you get on. I'm at gmail with this username.

      posted in Woodworking
      N
      noelwarr
    • RE: Sketchup CNC

      Ah! I misread your earlier post. You're right. There is little our scripts can do for one another. Good luck writing it. Ruby is a great language and has a great community.

      I wish I had commented my code. The code of the project I am working on now has little or nothing to do with my first plugin. I really feel I have come a long way. But still I don't comment it. 😳 I have no excuse.

      I don't want to seem pedantic but if you were surprised about inheretance (MyClass < Array) make sure you get used to working with blocks...

      my_array.each{|obj| obj.do_something }

      I consider them to be the most ruby thing about ruby. A good sign that you're doing things the ruby way is if you have no for/while/until loops in your code. But he coolest thing about ruby is you can do things any way you want. So if you like loops, go for it! πŸ˜„

      posted in Woodworking
      N
      noelwarr
    • RE: Sketchup CNC

      Cheers Anthony.

      Just last week I got mailed by someone else working on another CNC plugin. (http://sketchucation.com/forums/viewtopic.php?f=180&t=48781&p=439028#p438163) I got sent a screen shot and it looks quite promising.

      It might be interesting to form a kind of common language between all of our plugins. A standard of sorts. I have a rough idea of how that might work. Would you be willing to work together a little?

      posted in Woodworking
      N
      noelwarr
    • RE: Sketchup CNC

      Well, I'm not sure what you mean by "directly". There is nothing automatic about the process. All toolpaths have to be specified. But yes, it's all done within the Sketchup UI. From Sketchup to CNC.

      posted in Woodworking
      N
      noelwarr
    • RE: Sketchup CNC

      100% Sketchup CAM. 100% minivistii


      IMG-20120518-WA0001.jpg


      IMG-20120518-WA0002.jpg

      posted in Woodworking
      N
      noelwarr
    • RE: Sketchup CNC

      Hey guys. Well, this is really starting to come together. I guess you could say that we now have a solid foundation upon which to build. I'd bore you to bits with what the plugin does, how it does it and what it could do but I think I'll just sit back for the time being and wait for the questions to come.

      There are a few minor issues with it not being an extention and not propperly integrated into the toolbar but I think I've earned a rest. The point is it works and I am now doing ALL my CNC work with it.

      Big shout out to Scott for the icons and look forward to answering any questions. I'll be posting photos of CNC jobs on my Google+ stream so you know where to find me

      todo list
      ..make it an extention
      ..improve ui (show/hide toolpaths, etc)
      ..get more files into the cnc folder (Especially a template one)
      ..get assemblies working (I tried but my head exploded)
      ..automatic toolpath/hole generation

      posted in Woodworking
      N
      noelwarr
    • RE: Sketchup CNC

      My head's about to explode.

      posted in Woodworking
      N
      noelwarr
    • RE: One-liners

      I've actually gone and changed my first post so that semi colons are allowed, and have modified your magic formula so the 3 steps are all in one line. I wanted no semicolons to avoid people going crazy with them (you could essentially write a whole program with them in one line of text). How about 3 semi colons maximum?

      posted in Developers' Forum
      N
      noelwarr
    • RE: Sketchup CNC

      Looking good AND retro!


      icons.png

      posted in Woodworking
      N
      noelwarr
    • RE: One-liners

      Why not...

      Sketchup.active_model.active_view.zoom(1.052)

      Or to include the zoom extents...

      Sketchup.active_model.active_view.zoom_extents.zoom(1.052)

      Don't know how to activate the parallel projection though. Anyone?

      posted in Developers' Forum
      N
      noelwarr
    • 1 / 1