ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Drop.rb doesn't work

    3
    0 Votes
    3 Posts
    358 Views
    W
    AHA !!! thank you
  • CALLING ALL MATRIX GURUS, HELP! , please :)

    11
    0 Votes
    11 Posts
    1k Views
    J
    jzer7, Thanks so much, but no luck. I going to post a section of the script i am parsing this data from, maybe it will help... import Blender from Blender import Camera, Object, Scene, NMesh from Blender import Mathutils from Blender.Mathutils import * cur = Scene.getCurrent() #Camera Parameters c0001 = Camera.New('persp') c0001.lens = 49.739047 o0001 = Object.New('Camera') o0001.name = "voodoo_cam1" o0001.setMatrix(Mathutils.Matrix([0.999938,0.001129,-0.011103,0.000000], [0.001072,-0.999986,-0.005202,0.000000], [-0.011108,0.005189,-0.999925,0.000000], [1.054297,1.571880,-8.966838,1.000000])) o0001.link(c0001) cur.link(o0001) c0002 = Camera.New('persp') c0002.lens = 49.739047 o0002 = Object.New('Camera') o0002.name = "voodoo_cam2" o0002.setMatrix(Mathutils.Matrix([0.999943,0.001132,-0.010635,0.000000], [0.001076,-0.999985,-0.005294,0.000000], [-0.010641,0.005282,-0.999929,0.000000], [1.071295,1.559580,-8.822482,1.000000])) o0002.link(c0002) cur.link(o0002) ################################################## # [snip] # many, many more cams are created and then comes # some IPO curve data ################################################# #Render camera animated with IpoCurves crender = Camera.New('persp') crender.lens = 35.0 crender.setDrawSize(1.0) orender = Object.New('Camera') orender.name = "voodoo_render_cam" orender.link(crender) cur.link(orender) cur.setCurrentCamera(orender) ipo = Blender.Ipo.New('Object','render_cam_objipo') orender.setIpo(ipo) locx = ipo.addCurve('LocX') locx.setInterpolation('Linear') locy = ipo.addCurve('LocY') locy.setInterpolation('Linear') locz = ipo.addCurve('LocZ') locz.setInterpolation('Linear') rotx = ipo.addCurve('RotX') rotx.setInterpolation('Linear') roty = ipo.addCurve('RotY') roty.setInterpolation('Linear') rotz = ipo.addCurve('RotZ') rotz.setInterpolation('Linear') camipo = Blender.Ipo.New('Camera','render_cam_camipo') crender.setIpo(camipo) lenscurve = camipo.addCurve('Lens') lenscurve.setInterpolation('Linear') locx.addBezier((1,o0001.LocX)) locy.addBezier((1,o0001.LocY)) locz.addBezier((1,o0001.LocZ)) rotx.addBezier((1,o0001.RotX*18/3.141593)) roty.addBezier((1,o0001.RotY*18/3.141593)) rotz.addBezier((1,o0001.RotZ*18/3.141593)) lenscurve.addBezier((1,c0001.lens)) locx.addBezier((2,o0002.LocX)) locy.addBezier((2,o0002.LocY)) locz.addBezier((2,o0002.LocZ)) rotx.addBezier((2,o0002.RotX*18/3.141593)) roty.addBezier((2,o0002.RotY*18/3.141593)) rotz.addBezier((2,o0002.RotZ*18/3.141593)) lenscurve.addBezier((2,c0002.lens)) ############################################ # [snip] # many more lines of IPO # the only thing left is "point cloud" data # which i am leaving out. # The last thing in the script is this... ########################################### # Scene Helper Object scene_dummy= Object.New('Empty','voodoo_scene') scene_dummy.setLocation(0.0,0.0,0.0) cur.link(scene_dummy) scene_dummy.makeParent([orender,ob]) scene_dummy.setEuler((-3.141593/2, 0.0, 0.0)) scene_dummy.SizeX=0.2 scene_dummy.SizeY=0.2 scene_dummy.SizeZ=0.2 Maybe this helps, maybe not ?? the lines don't wrap correctly in the code tags so it mucks up the code a bit
  • Get current OS information

    3
    0 Votes
    3 Posts
    221 Views
    F
    Tks, worked fine. Fernando.
  • Must Have Plugin

    10
    0 Votes
    10 Posts
    2k Views
    K
    Fantastic Thread! We can all learn from this. By the way, I think we need to say a big 'Thank You' to Didier Bur , as Sketchup wouldn't be the same without the Crai.fr ruby resource website. Next to 3D warehouse, it is one of the best features of Sketchup. Really! It is strange that Google themselves never set up their own ruby resource site, or did I miss that?
  • Screen won't update

    4
    0 Votes
    4 Posts
    280 Views
    T
    Yes, view.invalidate is designed to work with Tools.
  • Odd Ruby Error

    6
    0 Votes
    6 Posts
    419 Views
    T
    Since you are getting it when right clicking on a axis, then the failing code is most assuredly a proc for displaying a right click context menu for a script. You can narrow your search down to any scripts you have that generate context menu selections.
  • Double rotations

    3
    0 Votes
    3 Posts
    526 Views
    chrisglasierC
    Fixed [flash=425,344:3qp1491i]http://www.youtube.com/v/TL8q17qSKrk[/flash:3qp1491i]
  • SU script / Ruby book for beginners

    8
    0 Votes
    8 Posts
    743 Views
    A
    @remus said: I had a quick look at the website, and the rd edition deals with ruby 1.9, perhaps SU uses 1.8? Exactly. Sketchup uses a real old Ruby (1.8.0). Most of the Ruby programmers use 1.8.6 (or 1.8.7) at the moment. Betwenn 1.8.6 and 1.8.7 they made some changes influenced by the development of 1.9.0 (and 1.9.1). But alos betwenn 1.8.7 and 1.9.0 (1.9.1) there are a lot changes. azuby
  • Coming Soon:Profile Builder

    97
    0 Votes
    97 Posts
    14k Views
    P
    It's released. http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=15538&p=120193#p120193
  • File dialog

    3
    0 Votes
    3 Posts
    362 Views
    thomthomT
    errh... The what what? ... ...can't believe I didn't notice those methods...
  • LOOP SELECTION PLUGIN?

    16
    0 Votes
    16 Posts
    3k Views
    Y
    Wow visit.
  • Looking for Extrude Line.rb

    2
    0 Votes
    2 Posts
    912 Views
    J
    Didier Bur posted his Extrude Line plugin here: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=1523 (Thanks, Extension Index!)
  • Grouping a selection of component instances

    4
    0 Votes
    4 Posts
    252 Views
    chrisglasierC
    Yes the explode works as well. Thanks Chris
  • Create and move between muti cameras

    8
    0 Votes
    8 Posts
    649 Views
    J
    Thanks a lot Phil, Although i may try to write a flight path script myself. I am very interested in completing my study of the Ruby API, and things are coming along faster every day! I love this program!
  • Fxruby

    2
    0 Votes
    2 Posts
    720 Views
    J
    Hi and Welcome italian, Is this for a SketchUp extension? I didn't know you could use FxRuby for SketchUp dialogs. Why not use a WebDialog, or wxSU?
  • Ruby translator example

    2
    0 Votes
    2 Posts
    407 Views
    J
    I use Kerkythea, which happens to have a nice exporter (SU2KT). You can install the exporter (without needing Kerkythea) and then look at the code. Basically, it looks at all entities in your Sketchup model and exports them as an XML file. One challenge I see is that Sketchup entities are edges and faces. I would assume that you need volumes to perform the FE analysis. Once you are done with your analysis, to put elements back into SU, you might be able to use something like the Cloud V6 plugin, which represents data as x,y,z points. There is also an STL format but I am less familiar with it. Juan
  • Help on ICONS

    3
    0 Votes
    3 Posts
    343 Views
    M
    thanks a lot, a friend of mine did it for me yesterday.
  • Holding variables

    4
    0 Votes
    4 Posts
    222 Views
    J
    @azuby said: Use an instance variable. At the moment, your code should be in a class. Initialize your instance variable (i. e. @clicks - the @ is neeeded) in the initialize method of your class and use the variable in the code which is executed by clicking on your button. azuby Thanks, but this is too complex for me, I started studying Ruby yesterday, I'm still at "copy&modify&paste" level... This is my source: def MoveLeft model = Sketchup.active_model entities=model.active_entities sp=entities[1] plane=sp.get_plane pos += 1 plane=[Geom;;Point3d.new(pos,0,0),Geom;;Vector3d.new(1,0,0)] sp.set_plane plane end def MoveRight model = Sketchup.active_model entities=model.active_entities sp=entities[1] plane=sp.get_plane pos -= 1 plane=[Geom;;Point3d.new(pos,0,0),Geom;;Vector3d.new(1,0,0)] sp.set_plane plane end pos=0 toolbar = UI;;Toolbar.new "Sections" cmdSectionLeft = UI;;Command.new($tStrings.GetString("Test")) { MoveLeft } cmdSectionLeft.tooltip = $tStrings.GetString("Move section to left") cmdSectionLeft.status_bar_text = $tStrings.GetString("Move section to left") cmdSectionLeft.menu_text = $tStrings.GetString("Move left") toolbar = toolbar.add_item cmdSectionLeft cmdSectionRight = UI;;Command.new($tStrings.GetString("Test")) { MoveRight } cmdSectionRight.tooltip = $tStrings.GetString("Move section to Right") cmdSectionRight.status_bar_text = $tStrings.GetString("Move section to Right") cmdSectionRight.menu_text = $tStrings.GetString("Move Right") toolbar = toolbar.add_item cmdSectionRight toolbar.show How do I hold value for I among various button presses?
  • How do I save a screenshot?

    3
    0 Votes
    3 Posts
    523 Views
    J
    thanks a lot, I'll try it.
  • Any info about DCL_Technology for SU used in RPTOOLS

    3
    0 Votes
    3 Posts
    395 Views
    Al HartA
    @wikii said: Thank you very much for the info, AI! Is it possible to show me a little demo rb_file about how to use RpTools.dll to load a dcl file? Pardon me,if you feel my request is unreasonable,for I want to know more about it eagerly. I put some samples on the Render Plus Forum if you want to try some things out:

Advertisement