ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Java Script <> Ruby array transfer

    5
    0 Votes
    5 Posts
    1k Views
    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 Votes
    8 Posts
    2k Views
    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 Votes
    8 Posts
    1k Views
    S
    I can definitely use this! Thanks so much!
  • What Font do you use?

    4
    0 Votes
    4 Posts
    503 Views
    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 Votes
    3 Posts
    477 Views
    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 Votes
    5 Posts
    615 Views
    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 Votes
    14 Posts
    6k Views
    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 Votes
    15 Posts
    2k Views
    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 Votes
    4 Posts
    977 Views
    W
    I think it is now called PathCopy.rb and can be found on the Smustard website. Bob
  • TIG's Volume Calculator

    4
    0 Votes
    4 Posts
    571 Views
    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 Votes
    6 Posts
    533 Views
    W
    I also want a script to export dwg file with select entities.
  • @ TIG: default layers question

    2
    0 Votes
    2 Posts
    320 Views
    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 Votes
    2 Posts
    423 Views
    F
    that's pretty cool, Wikii.
  • The Homer Button

    3
    0 Votes
    3 Posts
    504 Views
    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 Votes
    11 Posts
    891 Views
    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 Votes
    5 Posts
    566 Views
    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
  • NoTwist using Joint PP

    19
    0 Votes
    19 Posts
    2k Views
    D
    erikB Glad to help Of course a no-twist extrude along path would be the real answer but jointPP will work pretty well and glad to have it dtr
  • Eliminate Bluriness on 3D Text

    7
    0 Votes
    7 Posts
    525 Views
    G
    Gaieus, I thank you for your advice. I resolved the problem by defining a new style and setting the line profiles to 1 pixel. Greg
  • Why this error...?

    6
    0 Votes
    6 Posts
    773 Views
    L
    Thanks Didier, I may just unload this puppy unitil I can get a fix.
  • Radius All Cube Edges - Fillet all 12 edges

    9
    0 Votes
    9 Posts
    2k Views
    GaieusG
    Well, if we have already gone off-topic, one would most probably think that a name like "Csaba" (ending with A - generally a sign of female gender in many Indoeuropean languages*) is a female name. I've had experiences... There are exceptions - like Andrea in Italian - but they are generally derivatives of other names (like the Greek Andreas in this case). Oh well, I hope Jim won't notice this OT behaviour...

Advertisement