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

    Ellipser

    @Ellipser

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

    Ellipser Unfollow Follow
    registered-users

    Latest posts made by Ellipser

    • RE: How do I get Mathn.rb to work?

      @tt_su said:

      Are you just doing computations? Or are you generating geometry?
      For computations adding more Ruby code (ie another Ruby library) won't speed things up. I've had to resort to writing Ruby C Extensions to do calculations fast. For just doing math C/C++ isn't that scary. We got examples of projects in Visual Studio and Xcode on GitHub that have everything set up to toy around.
      If it's generating geometry there might be ways to get better performance - bulk operations etc.

      Do you have some code to look at - that way we would know exactly what we're dealing with here?

      I'm generating geometry on this plugin:http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=57790

      I took a class in C++, so I can do that, and have done a significant amount of C++ for embedded microcontrollers.

      I'd like to learn how to interface C++ with Sketchup, so I can speed things up. Basically my problem is that I need a road-map of sorts to get there.
      First thing is, what C++ compiler should I use? Visual Studio? I don't want to pay Bill Gates $500 for just hobbyist work that I'm doing. I used DevC++ before. I'm not at all familiar with Xcode, so I guess I'll Google that after I'm done writing this post.

      I've seen the SDK code on the Trimble site, but, what next? Step 1 would be of course to download a C++ compiler. Then what? Where do I put all the header files? Could you recommend a tutorial if there is one?

      Ultimately, I'm going to interface Sketchup with my 3D printer, which is in the final stages of being made. (It already does plotting when provided G-code). Next step is mounting the extrusion head and generating G-code from a Sketchup file. Also, with just using the Dremel mount I have, I can do milling. I want to do some Celtic designs created in Sketchup and then milled into wood.

      Thanks for you time, btw.

      posted in Developers' Forum
      E
      Ellipser
    • RE: How do I get Mathn.rb to work?

      @tt_su said:

      @ellipser said:

      Thanks. I'm going to upgrade to 2014. I'm using it for its complex numbers functions. That spirograph plugin I made crashes the system with relatively simple designs, and I am going to re-do it using complex numbers with the hope that it uses less system resources and averts a crash.

      Right, I doubt you crash for the reasons you think. If that's your motivation to use it then I don't really think it'll pay off.
      When you crash, you get a BugSplat dialog, right? Did you submit these? Did you enter any info in them that we can look up? We might be able to help you pin-point the source of your crash and find a workaround with less guessing.

      I guess I'm not using the right terminology. It really doesn't crash, it just takes a long time to process, so long that I resort to a ctrl-alt-delete after about 5 minutes of waiting. I guess part of this is that I'm using a slow computer. Sometimes when I use that plugin, it says, "Sketchup is not responding" but if I wait long enough, it eventually completes the process.

      So, really there is no crash, just that I'm using a slow computer. I never really thought that a crash is different than a process that takes too long and you get a Microsoft-level error message.

      posted in Developers' Forum
      E
      Ellipser
    • RE: How do I get Mathn.rb to work?

      Thanks. I'm going to upgrade to 2014. I'm using it for its complex numbers functions. That spirograph plugin I made crashes the system with relatively simple designs, and I am going to re-do it using complex numbers with the hope that it uses less system resources and averts a crash.

      I'll post the plugin when I'm done with it.

      Thanks for all the info too. Some of those questions were just wondering out loud.

      When I really get good at Sketchup Ruby, I'll be able to make all the designs in the little booklet that comes with the kit. It's some really cool symmetry I think.


      Sprirograph in 4 way.jpg

      posted in Developers' Forum
      E
      Ellipser
    • How do I get Mathn.rb to work?

      I'm trying to simplify my code by using Mathn, this is of course a ruby program that is an add-on. It works when I'm just using straight Ruby by itself, not involving Sketchup at all. (I can tell that Sketchup is using a different version of Ruby, when I do a query).

      When I use Mathn on Sketchup's Ruby, it doesn't work. Why is that? What do I need to do to get Mathn to work? Is there some additional plugin I need to put somewhere? Is there some "require" line of code I need to use? Can I have my code somehow use the "external" ruby software that I have outside of Sketchup and I play with using Notepad++? But, if I do this, it would make my plugin program a lot more complicated if someone else wants to use it.

      Anyway, if someone out there knows how to use "Mathn" in a plugin, please inform. TYIA.

      And, btw, I went looking in the Sketchup file to see where it keeps a copy of Ruby. I couldn't find it, so perhaps it's deeply embedded in the code and non-accessible? Just out of curiosity, does anyone know where Sketchup keeps the Ruby interpreter?

      posted in Developers' Forum
      E
      Ellipser
    • RE: [Plugin] 2.5D CAM Plugin 20121202

      Thanks for making this file. It worked for me first time.

      posted in Plugins
      E
      Ellipser
    • RE: My First Plugin: Spirograph

      For people just getting started with plug-ins, here's how you use one:

      1. Download the plug-in attached to the thread's first post.

      2. Click/drag it onto your desktop.

      3. Open any folder, and go look for where Sketchup's plugin file is kept on your computer. On mine it's in C:\Program Files (x86)\SketchUp\SketchUp 2013\Plugins
        This is also called a "path" in computer lingo.

      Your path should be something similar. This is where you get to add features to your copy of Sketchup.

      1. Drop the Spirograph.rb file from step 2 into that folder. You have to re-start Sketchup to use it, because Sketchup only loads plugins at start-up.

      2. You should see a Plugin called "Spirograph". Try some settings like:

      16
      8
      7
      20

      and have fun.

      You can easily crash your system if you over-burden it with too many segments. Every curve can be reduced to line-segments, and "segments" is the setting you change to get a smoother effect. Too much smoothing will result in a system crash. It's sort of like that sandbox tool. It doesn't take too much to crash the system if you have an average-speed computer like mine. (For you pros using a graphics card of something, that probably doesn't apply.)

      20 is a good number for reasonable smoothness for segments.

      Anything above about 30 for the fixed radius is a bit much too. You don't end up with a nice design anyway, but a dense mat of lines/edges.

      At some point it may be possible to use some C++ code to do the heavy multiplications internally done in the plugin to reduce crashes, but for now, I'm using the convenience of Ruby at the expense of system resources.

      Pretty cool, huh? Takes you back to when you were a wee-lad and using those sharp-pins that held down the fixed radius. They wouldn't allow any sharp edges in any toy today, now would they?

      posted in Plugins
      E
      Ellipser
    • RE: My First Plugin: Spirograph

      The plugin is still in beta. I guess you guys are the beta testers and didn't know it πŸ˜„ .

      Unfortunately, large settings crash your system. I'll have to put in some sort of limit to what you can put in. I tried to get around the problem by making one curving segment, and then using a rotation matrix to just rotate the segment to save memory, but that hogs up as much memory as just doing the design in one fell-swoop.

      Also, I'm using groups, but what I should be doing is using edges. This way it will be easier to add colors using the paint brush. For the examples below, I cheated 😳 by PrintScreen and then adding colors in Paint.

      For now, look at the pretty colors. Someone out there might want to use it for a kid's room or something playful.


      Sprirograph examples.jpg

      posted in Plugins
      E
      Ellipser
    • My First Plugin: Spirograph

      There is a certain condition when it makes a double line. That needs to be corrected, but for now, this is just something to play with.


      Spirograph.rb

      posted in Plugins
      E
      Ellipser
    • RE: Rule no.1 in Sketchup for 3d printing

      I thought rule number one is to make sure you are using volume objects, not just surfaces. If you have a cube with just one face missing, the software will think it's just infinitely thin surfaces and print nothing.

      I'm just getting started with 3d printing, so I may be wrong.

      posted in SketchUp for 3D Printing
      E
      Ellipser
    • RE: Getting Started with Sketchup's SDK

      @icehuli said:

      Hi Ellipser,

      You can do so, but it is not easy.
      Currently, as tt_su said, there is no real time inter-program API of SketchUp.
      What you can do is:
      Create a C or C++ extension, lets call it ApiBridge, and load ApiBridge in a ruby file that loaded by SketchUp.
      In ApiBridge you need to

      1. implement a C/C++ API wrapper to the Ruby API your self,
      2. maintain a communication to another program within a new thread.
        Then you can do real time interaction with SketchUp through the ApiBridge.
        For example, you can send/receive message/data to/from ApiBridge to do/get stuff to/from the SketchUp model.

      Thanks for your reply. If I understand this right, a C++ extension is something that would go inside a Ruby file. I guess I'd have to look up the syntax for writing a C++ file that goes inside a Ruby file.

      Then, well, would you be so kind as to explain what an API wrapper is? API means "Application Programming Interface", so I'm guessing a wrapper would be the method that you use to grab data from another file?

      This is going to take a while for me. I'm going to have to become an expert Ruby user first if you call this not easy and you are experienced.

      Isn't there some way to "cheat"? I mean the command line is already there in Ruby console, all I'd have to do is find someway of accessing that command line from an external program. I'm wondering if there is some sort of command-line prompt that could be used.

      posted in Developers' Forum
      E
      Ellipser