⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Irritating Class methods modification

    3
    0 Szavazatok
    3 Hozzászólások
    494 Megtekintések
    AdamBA
    Operator overloading in any language is a lot of rope to hang yourself with. And its always the guy who just discovered that language feature that goes postal with it. On a related note, I got caught badly while writing some Ruby C extension last month whereby on Win32, ruby.h quietly #defines fopen() and fclose() to be something completely different! Just insane. Adam
  • Ruby interpreter

    2
    0 Szavazatok
    2 Hozzászólások
    393 Megtekintések
    T
    I haven't tried it. Why don't you and let us know.
  • Shorcutting a Double Click

    5
    0 Szavazatok
    5 Hozzászólások
    568 Megtekintések
    CadFatherC
    due to harcoding i guess.. pity because it could be useful for those task.. remains to check whether some mouse tweaking programs can do that, you never know
  • Error loading file

    7
    0 Szavazatok
    7 Hozzászólások
    954 Megtekintések
    TIGT
    Although the SUp Ruby API doesn't stress it, I think it's safer to put things into () after a method: So UI.messagebox "A message..." becomes UI.messagebox("A message..."), you are then more likely to spot errors like missing quote closing. If you are using Notepad++ (I do too) then set up your Ruby format defaults to say have any strings in red - then if you miss off a closing " everything afterwards is coloured red and stands out as wrong...
  • Java Script <> Ruby array transfer

    5
    0 Szavazatok
    5 Hozzászólások
    1k Megtekintések
    J
    I was just looking at ruby-json. I noticed there were 2 ways to use it: one c-language extension, and one called "pure". Unfortunately, the "pure" is not so pure. It requires platform specific libraries also.
  • TextTag.rb

    8
    0 Szavazatok
    8 Hozzászólások
    2k Megtekintések
    TIGT
    @stuartb said: dxf export still WIP TIG? IMPORTING - sorted! I am trialling Deep Exploration at the moment. It converts dwg to skp complete with text! (something Sketchup cant do currently) so I am happy that I can now get dwg into Sketchup. EXPORTING - still a problem! Sketchup - exports skp to dwg (inc dimensions) but no text-tag! Deep Exploration - exports skp to dwg (inc text-tag) but no dimensions! I need to use text-tag because 'normal' text wont stay flat . . but I cant give copies of drawings to other consultants as dwg without losing text or dimensions. Oh I do wish the SU team would sort this mess out. The DXF Export of TextTags is still WIP. Needs a long stint of effort to read TextTags' attributes and make into MText definition and then add that to a DXF file etc... SketchUp DOES Export TextTags as dwg or dxf (They come in as blocks - but are shapes rather than text - so later editing is NOT possible), BUT if you have the 'filled' version (without visible edges) they don't show up in some AutoCAD view style settings. To help with this I have adjusted the 'Filled' setting for TextTags to Yes= filled, with NO edges; Yes+Edges= filled, WITH edges and No= Edges and NO faces... Then they do show up in the exported dwg in most 'styles' if they have edges set... ...For new version see... http://www.sketchucation.com/forums/scf/viewtopic.php?p=47399#p47399
  • TIG: Default all Layers

    8
    0 Szavazatok
    8 Hozzászólások
    1k Megtekintések
    S
    I can definitely use this! Thanks so much!
  • What Font do you use?

    4
    0 Szavazatok
    4 Hozzászólások
    550 Megtekintések
    J
    Thanks guys, Courier New looks good (size 10.) The default was Terminal (ack.) I also am trying out color schemes. The image I posted is a little washed-out compared to the real thing, for some reason? [image: ss.jpg]
  • Right-click

    3
    0 Szavazatok
    3 Hozzászólások
    500 Megtekintések
    R
    It could be put at the bottom of the list via ruby. Putting it at the top of the list would be a feature request best directed to the folks at Google.
  • Change Color of a model

    5
    0 Szavazatok
    5 Hozzászólások
    679 Megtekintések
    T
    Try this: w = 2500.mm d = 2000.mm h = 1000.mm pts = [[0,0,h-40.mm], [w,0,h-40.mm], [w,d,h-40.mm], [0,d,h-40.mm]] group = Sketchup.active_model.entities.add_group container = group.entities ; base = container.add_face pts h = -h if base.normal.dot(Z_AXIS) < 0.0 base.pushpull 40.mm group.material = "red" ; Todd
  • Create your own sky and ground?

    14
    0 Szavazatok
    14 Hozzászólások
    6k Megtekintések
    AdamBA
    I initially implemented skyboxes in pure Ruby in SU. # skybox functionality class MyViewObserver < Sketchup;;ViewObserver def initialize(stub) .. build a definition using 'stub' as filepath skybox = Sketchup.active_model.definitions[dname] @skybox = Sketchup.active_model.entities.add_instance skybox, Geom;;Transformation.new @skybox.locked= true end def onViewChanged (view) @skybox.locked= false @skybox.move! view.camera.eye @skybox.locked= true end def remove @skybox.locked= false Sketchup.active_model.entities.erase_entities @skybox end end def add_skybox $skybox = MyViewObserver.new("~projects/Ruby/skybox/space1") Sketchup.active_model.active_view.add_observer($skybox) end ie Sketchup will move the skybox along with your camera. Works OK - only let down by SU crazily aggressive bounds on Z when it draws. Adam @alan fraser said: Texture Maker will generate a cgi landscape and sky and export it in a variety of formats...including a skybox. Screenshot and result attached below. Sky boxes are used extensively in games and work very well. They can be used well in SU, as Adam says, but only really from a very fixed viewpoint....that being the centre of the cube. Games get around this by locking the skybox to the viewer. As you move through a first person perspective shoot-em-up the skybox moves with you, so always appears in the correct perspective and always infinitely distant. This obviously isn't the case in SU. I realise this thread has drifted slightly away from Ruby, but there's a challenge for somebody. Skyboxes can work well in SU, but generally only if you move a few feet...or catch a glimpse out of a window, not up and down streets. Of course you can make them really huge, so that any novement by the viewer is very slight in comparison...but then you get clipping problems. The simplest solution is simply to map a panoramic image around a cylinder. Here is a very old thread from the old forum, now transferred to Google Groups. So old, in fact, that it predates SU's ability to map around cylinders, so I had to do it by slicing the image into sections...but the resulting skps still work ok for most situations.
  • Shuffle-ruby script?

    15
    0 Szavazatok
    15 Hozzászólások
    2k Megtekintések
    M
    For my purpose/need this density function is just perfect. Thanks again GreyHead! But right now I can't think any other way to benefit from this function when using MatrixProximity script. I will be fine with this unofficial version.
  • Array along a Path

    4
    0 Szavazatok
    4 Hozzászólások
    1k Megtekintések
    W
    I think it is now called PathCopy.rb and can be found on the Smustard website. Bob
  • TIG's Volume Calculator

    4
    0 Szavazatok
    4 Hozzászólások
    610 Megtekintések
    W
    Dear TIG, Many thanks for replying. It is a non-urgent request as your V1.8 seems to work fine and is accurate to the stated tolerances. FYI, the model is that of a machine base that is to be cast from polymer concrete. The volume gives me the mass (density 2,300 kg/m^3), and an estimate of the cost. Kind regards, Bob
  • Save As (exporting geometry)

    6
    0 Szavazatok
    6 Hozzászólások
    616 Megtekintések
    W
    I also want a script to export dwg file with select entities.
  • @ TIG: default layers question

    2
    0 Szavazatok
    2 Hozzászólások
    334 Megtekintések
    TIGT
    I could give you the complex answer or the simple one... To be honest it's a simple typo !!! Should be "if NOT selection" etc... Sorry... Another typo crept in too ! In the menu so v1.2 is now here... I've re-re-loaded the script here: http://www.sketchucation.com/forums/scf/viewtopic.php?p=46829#p46829 The original thread(s) are deleted...
  • Shadow study using SU2WEB

    2
    0 Szavazatok
    2 Hozzászólások
    445 Megtekintések
    F
    that's pretty cool, Wikii.
  • The Homer Button

    3
    0 Szavazatok
    3 Hozzászólások
    544 Megtekintések
    Alan FraserA
    Well you can start with this one, Jim. The wav file is still in the SU code, last time I checked...from an old Easter Egg...but the link has been disabled. ElmerFudd.zip
  • Ruby Community Project Suggestions

    11
    0 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    J
    @unknownuser said: no. the JS is hard to modify. I would go with this one TBD, looks good, too - let's go with it. Here are the specifications that the image exporter will need: @unknownuser said: The image file names/paths must be carefully prepared to work with the rotation. The names must match the pattern: imgPrefix_α_βimgExt Where α is the rotation step, and β is the tilt angle. You will need combinations of every rotation step and tilt angle that you are using. If you want to use panning, you must make sure that you number the images in the correct direction. Tilt angles assume that 1 is the view from the top (or the highest viewing perspective), and rotation steps assume that progressing from 1 to 2 is motion in a clockwise direction, etc. It is assumed that the rotation steps make a complete circle around the subject. @unknownuser said: You will need numRot x numtilt images in total. My demonstration here use 6 x 3 = 18 images - around 117 KB. For 30 rotation steps, and 15 tilt angles (for a very fluid effect), you would need 450 images (so let's hope you have a good relationship with your camera) 450 images? Ouch, but I would also estimate that is correct.
  • Script Search

    5
    0 Szavazatok
    5 Hozzászólások
    616 Megtekintések
    Dave RD
    Actually, I think I solved the syntax errors but the script doesn't seem to do what I would like to have happen. Thanks anyway, TIG. Dave

Advertisement