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

    Posts

    Recent Best Controversial
    • RE: Collaborative Sketchup

      Phil> That video was what I had in mind when I made the 'Sketchup-Life' statement.

      I see we have some people working on it, and some older threads about it. I like the mock-up, but I would allow each user to have their own view, and just use an arrow to approximate other views for other users, also a color-based highlight showing who has what selected....

      Just from my journeys through the documentation, I believe it's well doable with sketchup as it is now, to a great extent. Even things like the texture sharing can be done with ruby and javascript. Most of it can be done with just ruby, but the webdialog would give us a nice update timer, and an easy to do chat interface.

      Anyway, it's after atleast 2 other scripts I gotta write.... so I can't work on it just yet 😞

      I hope one of you other guys gets something up soon, and open source is always nice πŸ˜‰ If not, I'll get to it eventually πŸ˜›

      posted in Developers' Forum
      S
      Scienthsine
    • Collaborative Sketchup

      So, from what I can see... sketchup has enough observer classes, and scripting power to be able to detect almost any change, and replicate it... and ruby has a full featured networking library... (Or javascript could be used, or a combination of both.)

      So, one of the script ideas I've had is 'Collaborative Sketchup'. Allow to computers running sketchup to connect via tcp, and on a change, replicate this change on the other.

      A few ideas regarding this:
      -WebDialog chat window for communication.
      -Some sort of graphical representation of the other users view, and current selection.

      Going off on a tangent... Using this idea, and a similar idea to the 'game in sketchup' thing, a mini Sketchup-Life πŸ˜‰ could be created...

      Anyway I think it'd be pretty easy to do, and could be useful. If using sketchup for game levels, or scenes, each person could be working on a different part of the 'world' at the same time, with realtime changes.

      Anyway, this is one of my sketchup script ideas, but it's pretty far back on the list. I decided I'd post it and see what people think, maybe someone with more time could get a start on it. πŸ˜„

      posted in Developers' Forum
      S
      Scienthsine
    • Adding data or attributes to the model.

      What's the recommended way of doing this?

      As I believe it, I can add values to any object in ruby, so if I wanted to a specific edge a value, I should be able to... but does this work well with sketchup? ie: Will this data be saved in the sketchup file format? Will this data be lost with a delete/undo operation? etc...

      I see there is an AttributeDictionary class that facilitates adding values to sketchup entities. This seems to be what I want, and I would expect this to be saved in the file format, work with undo/redo, etc... Right?

      I just need some edges to have special attributes for my scripts, and that they save with the model preferably.

      posted in Developers' Forum
      S
      Scienthsine
    • RE: SketchUp and Rubies on Linux (yes, it works)

      Yep, exactly, it's hacky... but desperate times πŸ˜‰

      That would be good, I have alot to do this weekend, so I haven't installed it on my linux drive yet... but I don't expect to have the same problem, having a radeon. We'll see...

      posted in Developers' Forum
      S
      Scienthsine
    • RE: SketchUp and Rubies on Linux (yes, it works)

      If other people don't have a problem with the view not refreshing from some things, then it's probley your video drivers... which is likely considering the shape the nvidia and ati drivers for linux are in atm.

      However, this might be easily fixable. It sounds to me like it just doesn't refresh in some places where it should, and so you get no change until an action forces a refresh. It's unlikely that the operation is actually waiting, although I guess this could be possible if the events are somehow getting sent to sketchup late... but I don't think this is it.

      So, we just need to try to force the view to refresh. Maybe one or a few of the observer classes can watch for changes, and invalidate the view? As a last resort we could launch a non-modal web dialog thing and have a javascript timeout that invalidates the view... but I think this would mean that we couldn't use another script with web-dialogs... right? (Haven't used one in my scripts yet, and haven't used anyone elses scripts either... but I assume that you can only have one running at a time?)

      I might attempt to install via wine tonight, as I actually just reinstalled windows on a 10 gig drive a few weeks ago for sketchup... it's the only thing I boot windows for. (Well and starcraft... but if I can run sketchup under wine, I'll bite the bullet and run starcraft in wine also.)

      [Edit] Also it could be wine in combination with a driver... anyway, we need to report it to wine and if it's not their problem, report it to your video driver people.

      posted in Developers' Forum
      S
      Scienthsine
    • RE: [Solved] Translate along a plane, or from Plane to Plane

      Lol, kinda the opposite of what your plugin says it does... isn't it? πŸ˜›

      Still not what I need however, I need to be able to do this in a ruby script, but I think I got it down.

      Gotta give your plugin, and a few others a try sometime. There are some very good ideas being worked on around here.

      [Edit] Ohh and from what I can see in the pictures there, your tool creates shapes on a parallel plane, I need them on the same plane, just not necessarily within the face selected.

      posted in Developers' Forum
      S
      Scienthsine
    • RE: [Solved] What's a ray?

      @unknownuser said:

      Comments

      A ray is a two element array containing a point and a vector [Geom::Point3d(), Geom::Vector3d()]. The point defines the start point of the ray and the vector defines the direction.

      This is what I was looking for, guess my google search tags didn't work...

      Would be nice if they put that explanation on the View->pickray documentation also, would have avoided this whole mess πŸ˜›

      Ok, got the info I needed, thanks again πŸ˜„

      posted in Developers' Forum
      S
      Scienthsine
    • RE: [Solved] What's a ray?

      Lol... poor ray.... πŸ˜›

      plot-paris> Yes, this is what rays are used for most commonly in 3d, I think. Infact, it's what they're used for in Sketchup. I don't need to 'pick' something that this ray intersects, I need to use it for other purposes...

      I'll create some lines later tonight and test, but from the numbers, I believe that this function: http://download.sketchup.com/OnlineDoc/gsu6_ruby/Docs/ruby-view.html#pickray returns a point where a ray from the camera eye intersects the square in 3d space that is our viewport, at our cursor location, and a vector which is the difference from the eye position to said intersection... extended to some huge number. (Maybe the far clipping plane?) This would make sense, and is how I expect it to work... I just like to be completely sure of everything before I go coding around it. I'm just a bit annoyed that the documentation simply says it 'returns a ray', and never defines -exactly- what the data represents or more accurately what format we can expect it in. Now... by definition a ray is a point and a vector, which the data seems to be also... but it's just a simple array. It's never used in any other part of the documentation as far as I can tell, which is probley why it's a simple array and doesn't have it's own class.

      Idk, probley making too much of a big deal about it. I guess I'd be happy if they just added something telling us that 'a ray' is an array in the form of (xPos,yPos,zPos)(xVec,yVec,zVec).

      Blah... just rambling... what do you all think?

      posted in Developers' Forum
      S
      Scienthsine
    • RE: [Solved] Translate along a plane, or from Plane to Plane

      Ya, that is actually a test, the final script is completely different but it needs to be able to do something similar in one operation.

      Thanks for the compliment, we'll see how I do with the final script πŸ˜›

      posted in Developers' Forum
      S
      Scienthsine
    • [Solved] What's a ray?

      The 'View' class has a method called 'pickray', which returns 'a ray'. I can't find anything that actually tells me what this ray is. I print it out, and it seems to be an array with a position and a vector, but I'm new to all of this, and would like to know for sure. πŸ˜›

      So, any imformation, or conformation would be cool.

      posted in Developers' Forum
      S
      Scienthsine
    • RE: [Solved] Translate along a plane, or from Plane to Plane

      W00t

      Ok, got a small script made that tests out the general idea. The attached image shows the results of it, all of the circles where created by the script, having run it with the each square selected.

      May not be much, but it's my first script! (aside from 'UI.messagebox "Hello World"')

      Thanks for the help, both of you helped me wrap my head around what I wanted to do, and how to do it, conceptually.

      Hopefully it'll be the start of many scripts, in an attempt to mold Sketchup to my liking. πŸ˜„


      w00t (Medium).jpg

      posted in Developers' Forum
      S
      Scienthsine
    • RE: [Solved] Translate along a plane, or from Plane to Plane

      @adamb said:

      You have a point in the plane and a plane normal, right.
      So just generate 2 orthogonal vectors that define your 2d plane and you have the 'origin' from the point the user selected in the plane.

      Now you've generated the affine transform just like 'align axis' does. ie you've got a x axis, a y axis and z axis and a translation.

      And yes, I know, you're going to say you'd like some Ruby code.. πŸ˜„ Got some other stuff to do, but I'll come back to this later.

      Adam

      Lol, well you sound like you've been around a few coding forums before. I don't think I need you to go through the trouble for the code though. I kinda had figured out something that would work, along those same lines (pun unintended). I found the transformation.axes method, which is exactly what I want if I could get the parameters for it. I was stuck trying to get the 2 orthogonal vectors from the plane, not knowing a whole lot of 3d maths myself. I eventually realized that I can (at the very least... will make it more decisive than this in practice) pick any two connected edges of this face and use their difference in vertex positions to get the 2 axes along the plane, and ofcourse the normal for the face is the third.... So, ya think I've got it figured out. Hold off on that code for a while, and let me see if I can get it myself. πŸ˜„

      If not, I'll be back.... ... ..

      posted in Developers' Forum
      S
      Scienthsine
    • RE: [Solved] Translate along a plane, or from Plane to Plane

      Ya, I think that might work exactly how I need, however, I would like to be able to do it all from within a Ruby script.

      posted in Developers' Forum
      S
      Scienthsine
    • RE: [Solved] Translate along a plane, or from Plane to Plane

      That's a pretty cool bunch of scripts, but I don't think it's what I'm looking for.

      Another example: I want the user to be able to select a face, and then with ruby, I want to be able to have a script draw another set of faces that have the same normal as the selected one. Like, the user selects a square that is somewhere out in modeling space, and the script generates some circles, squares, and other shapes, that are on the same plane.

      If it's possible to draw within a set of local axes defined by the plane, that would work. If there is a way to set the global axes in ruby, then I think I could use the plane normal to set the global axes in a position where the surface of the plane lies on two of the axes, and the normal of the plane is the remaining axis. This would allow me to easily do my stuff.

      So... can't look atm, but if anyone knows how to do any of the things above, please post. πŸ˜„ If not, I'll work on it more myself tonight.

      Thanks

      posted in Developers' Forum
      S
      Scienthsine
    • [Solved] Translate along a plane, or from Plane to Plane

      I need to use a script to 'draw' some lines that lie on a plane. So the user selects a face, or two lines, or anything I can get a plane from, then I need to be able to draw something in 2Dish cordinates, and translate that so that the points lie on said plane.

      I'm going to go look at how planes are defined more closely and try to think up the maths incase there isn't a simple method.

      This is my first post btw πŸ˜›

      EDIT: Also, I guess my actual question is how to take a set of lines or points that lie on one plane, and translate them to another...

      posted in Developers' Forum
      S
      Scienthsine
    • 1 / 1