πŸ’‘ LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering Download Trial
  • Zomadicam: A SketchUp to Shopbot Partfile Generator

    11
    0 Votes
    11 Posts
    5k Views
    N

    I'm working on some different samples of basic Sketchup files for the plugin. Uploading to the site soon.

    The number of segments you'll want in a curve will depend on the size of the arc and the overall dimension.

    I've hardly made a science out of it but I find that cutting from circles of 360 segments or arcs of 90 segments yields "perfect" results.

    That is to say, other factors affecting edge quality off the cnc machine are greater than the segmentation effect. I suppose the goal would be that the peaks between any two chords along the curve should be less than 1/32nd or maybe 1/64th.

    As a simple exercise, one should be able create a partfile to cut a circle by following these steps

    Draw the circle on the red-green plane and make a component out of it. Set the z-zero to your material thickness: menu select Plugins->Zomadic Tools->Zomadicam->set z-zero Select the circle component and menu select Plugins-> Zomadic Tools-> Zomadicam-> Transform selected Geometry to Toolpath Select the new toolpath group generated from step 3 and menu select Plugins-> Zomadic Tools-> Zomadicam-> write selected Toolpath Geometry to partfile

    I'm working on incorporating Shopbot's built in curve commands for arccurves when appropriate but it's tricky when the curve has been scaled in some fashion.

    [Rob]

  • Metrics or inches

    6
    0 Votes
    6 Posts
    1k Views
    M

    Thanks Todd, I'll look into it in case I'm going to need it (likely) but Didier already solved it for this script.

    [Maggy]

  • Width, Depth and Length of Component Instance

    6
    0 Votes
    6 Posts
    1k Views
    daikuD

    TIG:

    Unfortunately, that won't work for all cases. Here's another example.
    The result I want in this case is 10" x 10" x about 11'. But this one does not have a "horizontal" face. The "bottom" face has bounds of ~7' x ~7'. I know how to "lay it down". But I think the next step is to recursively explode it, and then un-explode it again and take the bounds of the new object. But I have no idea how to un-explode.

    This all works perfectly if I do it manually, but how to do it from ruby?

    Seems like I've been here before... CB.

    http://www.sketchucation.com/forums/scf/sas/Ruby/rafter_example.skp

  • Made a Skript ready for V6

    3
    0 Votes
    3 Posts
    1k Views
    BurkhardB

    Nice to meet you here.
    You have two mails from your blog. I thought you have had enough πŸ˜†

    It is the old script_loader.rb Ruby console say true, window opens but nothings happend

    Got it , but thanks for the offer
    Burkhard

  • New Script: SelectionMemory2; and update to SelectAtStartup

    6
    0 Votes
    6 Posts
    1k Views
    R

    SelectionMemory2 and SelectAtStartup both rely on Observers, a new ruby feature exclusive to SketchUp 6.

    Sorry...

    But thanks for the question - I need to put that on the website.

  • Β½ PIPE ALONG PATH

    12
    0 Votes
    12 Posts
    3k Views
    CadFatherC

    no but seriously (insert seriously smiley) - all these geniuses... the @last folks came up with follow me, stamp and create mesh...great ideas, remember?

    now i think the kindness and generosity of these masters has been beyond words.. ...very... grateful

    ..to have a 'driveby' plugin where you can lay a path on a terrain and have a profile follow it while keeping the car flat on the ground... wuooh (missing a smiley again)

    ...to see some of these sirs work together to such achievement... TIG, Didier, Hal Rick and all those others...perhaps we could organise a ruby base camp in a warm resort where they would work in leasure (while we make sure they don't just go surfing)

    the labourer deserves his/her wages ...who would buy this tool?

  • A 'non destructive' beveling ruby.

    8
    0 Votes
    8 Posts
    2k Views
    Y

    I too am looking for an easy and quick way to bevel, fillet chamfer. I've downloaded the chamfer ruby but for the life of me can't figure out how to use it.

    Desperately want a good fillet/chamfer ruby!

  • Weird behaviour

    9
    0 Votes
    9 Posts
    1k Views
    R

    Or from the direct link in TIG's post. It's that line of text that's bluish in color.
    πŸ˜‰

  • Reduction Ruby

    3
    0 Votes
    3 Posts
    1k Views
    N

    While somebody might be able to create a script to do this [which would be nice] I don't really see the need. Blender [free] already has an excellent feature to do this [decimate] and can be done without needing to learn blender interface.

    Work process like this:

    export .obj from sketchup
    import to blender
    right click object to select, add decimate modifier
    set to whatever level [say .25] and apply
    export from blender as .3ds
    import back into sketchup

    I'm a huge fan of sketchup, but when there's a better tool for the job...

    [dsarchs]

  • Is there a minimum rotation for components?

    5
    0 Votes
    5 Posts
    916 Views
    KrisidiousK

    nice thinking outside the box or radian as it were... Rick

  • Ruby Console doesn't load (two monitor mis-hap)

    4
    0 Votes
    4 Posts
    1k Views
    KrisidiousK

    lol good point

  • Reporting API bugs

    3
    0 Votes
    3 Posts
    965 Views
    J

    @craigd said:

    Hi Jim, here is the link to the new Ruby Discussions Group:

    http://groups.google.com/group/sketchupruby/topics

    Cheers,

    CraigD

    Craig, I've been a regular reader and contributor since the group's inception - in fact, I was the one who asked for a Ruby forum. I never did understand why they named it "Ruby Ideas." Anyway, it never occurred to me to post there, but I'll try.

  • Eliminating un-needed faces

    4
    0 Votes
    4 Posts
    1k Views
    D

    It sounds a very good idea for a script though if one is not available. I would definately use it!

  • Creating Ruby Scripts Question

    2
    0 Votes
    2 Posts
    923 Views
    R

    Primarily, do research to learn about ruby. It helped me that I'd learned BASIC back in the day. [When I learned, there was no DOS because there was no Disk - our first computer loaded software from cassette tapes, and the OS was hard-wired. I still remember going with my dad to have the RAM upgraded from 16K to 64K (no joke!), and then coming home from school another time to find two large gray boxes next to the monitor. They happened to be floppy drives (the big 5.25" kind). So much faster than tapes! Then there was that MOdulator-DEModulator to allow computers to connect over phone lines (a "MODEM", it was called). And there was no such thing as a mouse...]

    Anyway, I digress. Having any background is helpful, but ruby is easy enough to learn even without a programming background. See http://www.ruby-doc.org/docs/ProgrammingRuby/ for a good introduction and research resource for ruby programming.

    Then study the ruby help files for how SketchUp adds its own objects and methods to ruby.

    Then study other scripts to see how they are constructed, what methods they use, etc.

    Some starting points:

    In ruby, the application is referred to as "Sketchup", the model is "Sketchup.active_model", and the geometry is "Sketchup.active_model.entities" (base-level geometry) or "Sketchup.active_model.active_entities" (base- or nested-level geometry).

    Any of these things can be assigned to variables:
    model=Sketchup.active_model
    entities=model.active_entities (because 'model' has been assigned to "Sketchup.active_model", then this assignment is the same as saying "entities=Sketchup.active_model.active_entities")
    selection=model.selection

    So, there's lesson one. Have fun learning!

  • Texture exporting from SU

    4
    0 Votes
    4 Posts
    1k Views
    jujuJ

    Whaat, good to see you here at SketchUcation.

  • How the RUBY apply a dimension(with label, dimension line wi

    6
    0 Votes
    6 Posts
    2k Views
    TIGT

    There is a trick that could do this...

    I'll use 'metres' in the example below but you can adjust this to suit whatever units you want...

    Make a 1m long dimension (X) against a horizontal edge - in a 'flat' XY orientation, with a 1m long leader offset (Y).
    Highlight the dim and make it into a component - called let's say 'Dim'.
    Save it externally as its own 'skp' - into a logical folder path.
    In a model, your script then inserts an instance of Dim.skp from the folder.
    In your model/script you have the required edge...
    The edge has a knowable length (let's say 2.1m), so your script transform scales the instance proportionately by x2.1 in X.
    The figured dimension will automatically adjust to 2.1m to suit.
    You can also adjust the leader scale (Y).
    Transform the instance location and rotation to suit the edge's.
    You now have a dimension that reflects the edge's length and orientation. You can also use this method to script a 'dimension' between any two known points...

    You might also be able to change the 'orphaned dim' colour to match the normal dim's colour ? Not sure how to access/set this ???

    The dim's arrow heads will scale in the X... too so you might want to make a set of Dim skps - say 1-100mm, 100mm-1m, 1m-3m, 3m-10m etc and then insert instances of them to match nearest to the edge's length - so that the subsequent scaling of them wouldn't distort the dim-compo's arrow heads too much...

    You could also 'connect' the edge and component-dim using attributes and observers, so if the particular edge changed, then the associated dim-compo could be adjusted automatically to suit... It would then behave very much like a normal associated dimension.
    This could be all very convoluted to achieve, BUT it's still possible...

  • Is instancing possible?

    11
    0 Votes
    11 Posts
    3k Views
    K

    TIG,
    Thanks for all this support.
    I will try that method right away.

    Regards,
    kwistenbiebel

  • Anyone able to write 3D XML importer?

    10
    0 Votes
    10 Posts
    7k Views
    M

    First of all, one piece of good news is that I found out that not Dassault, but actually Lattice developed 3DXML, an extention of their own Lattice XML. On websites about Lattice XML I also find the extension XVL bud have not yet found out what that is.

    One site that looked interesting to me at first sight is http://www.sns.gov/APGroup/appProg/xal/xalDoc/gov/sns/xal/model/xml/LatticeXmlTest.html but perhaps it has nothing to do with this subject. After all it won't do us much good that there are zillions of sites about ordinary XML either.

    And the best news so far is that I received a quick and dirty triangle only to .obj converter in Python script. So if any of you can read Python (my fav. scripting language, use it a lot in Paintshop) and change it into ruby, that would probably be all we need.
    -Jim Foltz created an .obj importer for SU, is on scriptspot
    -I guess most geometry that we would ever like to capture will probably be triangulated
    -I believe all textures in 3DXML are stored either in their native format or as BMP. Finding binary blocks of data, copying, saving should be easy with any hex editor.

    [Maggy]

  • Vector.angle_between() -- Direction?

    8
    0 Votes
    8 Posts
    3k Views
    R

    Yeah, sorry about that. I suppose I shoul give it its own spot for developer use πŸ˜„

  • How can I assign a keyboard key as a SketchUp shortcut

    4
    0 Votes
    4 Posts
    6k Views
    TIGT

    It IS possible to modify and add shorcuts to the PC registry using SketchUp Ruby methods [search other recent threads on this] BUT I would not recommend it unless it's for 'in-house' use only. As TBD says imagine the chaos it'd cause if your script messed up everyones pre-set shortcuts...

    IF you want to do this then at least offer the choice - make your script with an installer [part] which checks to see if the shortcut has already been used, and with a dialog that asks something like, "Would you like to assign 'Q' as the shortcut key for this tool ?" and if it's already pre-set, "\nNote that 'Q' is currently used for xxxxxxxxxx."; Yes/No. If Yes then you make / change the shortcut. The installer only auto-runs once - on exiting the dialog it also writes something into the registry that is checked by it when it's about to run again, and if that's found then doesn't even ask.

    This way the user has the option - and at least then knows that a key has been assigned...

Advertisement