sketchucation logo sketchucation
    • Login
    1. Home
    2. noelwarr
    ℹ️ 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

    noelwarr

    @noelwarr

    10
    Reputation
    1
    Profile views
    63
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    noelwarr Unfollow Follow
    registered-users

    Latest posts made by noelwarr

    • 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