Sketchucation Tools 5.0.7 | Licensing improvements and bug fixes Learn More

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Rotation interface with Ruby extension -- possible?

    6
    0 Szavazatok
    6 Hozzászólások
    511 Megtekintések
    A
    @chris fullmer said: I would imagine that it is possible. Are you interested in learning Ruby? This is a great place to learn it. Chris I did a little Ruby tutorial a few years ago, but it kept crashing on me at a certain point. So I guess I know the reeeaal basics. (ooooooor.. could quickly remember them if I seem em again!) If you could give me some ideas (like methods, functions, etc.) of how I can make this thing work with a Ruby plugin, that'd be great.
  • Control Projected Textures via the API?

    2
    0 Szavazatok
    2 Hozzászólások
    288 Megtekintések
    T
    Google seems to be deaf to our requests. There is no built-in method for recognising if a face has a projected texture or not. It can be done through writing a texture to a Texturewriter of especially created temporary face with no distortion and then writing a texture of a face being examined. If the number of textures in TW increases it means the face has a photomatched texture. I have seen a texturewritter2 in the SU SDK, but it is not reflected in Ruby. I haven't tried to control a position of a projected texture, but I am afraid it can be pretty hard. Mostly because we have no sample code that would show how to do basic modification. Tomasz
  • Su slow to open

    12
    0 Szavazatok
    12 Hozzászólások
    911 Megtekintések
    R
    You should be ok as long as you dont add all of them
  • Observer Usage

    4
    0 Szavazatok
    4 Hozzászólások
    288 Megtekintések
    Chris FullmerC
    Hanks, lots of us are going through it. There is a thread at the top of this forum called API typos and something or another. If you have suggestions for the API, put it in that thread. The Google guys who write the API and SketchUp Ruby watch that thread and incorporate the suggestions and typos that are posted there. If it was confusing to you, it probably will be for someone else! Chris
  • It is about installing plug-in

    6
    0 Szavazatok
    6 Hozzászólások
    309 Megtekintések
    Chris FullmerC
    Well, to give credit where credit is due, Great job Gaieus! and a big thank you! Chris
  • Edges problem

    6
    0 Szavazatok
    6 Hozzászólások
    426 Megtekintések
    J
    Is there maybe a way to divide an object into triangles? because the add_face instruction can draw traingles.. is there a function for this? thanks
  • Can something cancel observer events?

    8
    0 Szavazatok
    8 Hozzászólások
    580 Megtekintések
    thomthomT
    I was going to look into the Transaction events. I've been avoiding them so far due to the warming in the docs. And you answered a question I had actually; "can you do stuff in onTransactionCommit?" Another thing I tried was to wrap the transformation change into a transparent start_operation. Tried start_operation 'TTDC - Change', true, false, true and start_operation 'TTDC - Change', true, true, false and start_operation 'TTDC - Change', true, true, true in hopes that would prevent the cancellation of events. But no luck there.
  • OpenURL and/or ShellExecute on Vista

    8
    0 Szavazatok
    8 Hozzászólások
    1k Megtekintések
    Al HartA
    I'll have to look at my other Vista machines and see if they have open as a default. Perhaps a Photo program I downloaded changed the settings. (Or I have read that the setting may depend on your default Internet Browser) In Googleing around I see where others are having similar problems with Shell Execute in Vista. I need a solution which will work for lots of users everywhere, with lots of different Windows settings. What I did was to create a function to call UI.openURL, and then if it fails use ShellExecute with the NULL verb. This seems to work. (I'm not sure why I call openURL first - just to be friendly to the SketchUp Ruby API I guess) def launch_file(sfile) trace("Launch; %s", sfile) # Try SketchUp call first if (UI.openURL(sfile)) return end#if # try shell_execute if openURL fails shell_execute(sfile) require 'Win32API' shell = Win32API.new("shell32","ShellExecute", ['L','P','P','P','P','L'], 'L' ) #shell.call(handle, verb, file, params, folder, showCmd) iret = shell.call(0, 0, sfile, 0, 0, 1) if (iret == 42) return true end#if do_error("Cannot Open file; '%s' - return value; %s", sfile, iret) return(false) end#def
  • Ruby equivalent for edit/delete guides?

    3
    0 Szavazatok
    3 Hozzászólások
    236 Megtekintések
    TIGT
    I've made various - search for 'ConsDeleteContext.rb' as one set for a context-menu right-click that differentiate between points and lines and all or just in active context etc... 'Guides' are often referred to as 'Construction' Lines/Points... their 'old name'... Search for those too...
  • Frustrated with rubies

    47
    0 Szavazatok
    47 Hozzászólások
    7k Megtekintések
    R
    @baz said: @unknownuser said: Have you looked into Organizer? Thanks Rick, tho it seems a bit complicated for my poor brain. I can see myself getting in lots of trouble trying to organise subfolders, especially considering the apparent dependency of various rubies on each other. baz Two things: Organizer can do a simple test and notify you if you move any required files, letting you know you need to put them back in the Plugins folder. Also, creating a backup of your Plugins folder prior to using Organizer can save you some headaches. I do offer support for all my scripts, so if you have questions, just ask
  • Catching Console errors upon crash

    6
    0 Szavazatok
    6 Hozzászólások
    420 Megtekintések
    thomthomT
    It's odd that it happens on the second File->New as in the first one, nothing is done. And yes, I do have quite a few observers and references. Though, I thought I was resetting everything onNewModel. I think I'll have to release a developers alpha, see if anyone can spot the culprit in my code. What I'm building is a plugin that allows cutout components to also cut through an opposite faced face. It does taht by creating a new invisible cutout. That's the simple stuff. The complicated stuff is making sure the extra cutout syncs with move,rotate,edits etc. That required allot more work than expected. Especially since I ran into so many bugs in the SU Ruby API requiring workaround upon workaround.
  • DefinitionObserver doesn't trigger

    16
    0 Szavazatok
    16 Hozzászólások
    2k Megtekintések
    thomthomT
    I looks like it's some wires crossed in the backend. I made a typo when I wanted a DefinitionsObserver, where I instead wrote DefinitionObserver. But the code still worked. So while the DefinitionObserver doesn't trigger the events it's supposed to, it triggers all of DefinitionsObserver's events. Example code: class TestDefinitionsObserver < Sketchup;;DefinitionsObserver def onComponentPropertiesChanged(definitions, definition) puts 'DefinitionsObserver - onComponentPropertiesChanged' end def onComponentRemoved(definitions, definition) puts 'DefinitionsObserver - onComponentRemoved' end def onComponentAdded(definitions, definition) puts 'DefinitionsObserver - onComponentAdded' end end class TestDefinitionObserver < Sketchup;;DefinitionObserver def onComponentPropertiesChanged(definitions, definition) puts 'DefinitionObserver - onComponentPropertiesChanged' end def onComponentRemoved(definitions, definition) puts 'DefinitionObserver - onComponentRemoved' end def onComponentAdded(definitions, definition) puts 'DefinitionObserver - onComponentAdded' end end module TestDefOb def self.test r = Sketchup.active_model.definitions.add_observer(TestDefinitionObserver.new) puts 'Sketchup;;DefinitionObserver - ' + r.to_s r = Sketchup.active_model.definitions.add_observer(TestDefinitionsObserver.new) puts 'Sketchup;;DefinitionsObserver - ' + r.to_s end end Type TestDefOb.test in the console and add/remove some component definitions. Notice how both observers trigger.
  • Drawing line based on fed coordinates

    4
    0 Szavazatok
    4 Hozzászólások
    728 Megtekintések
    TIGT
    @jderekito said: Thanks TIG, The defaulting to inches explains it. For now I am just trying to draw a single line. If I just drawing a single line does it still need the face and edges. Thanks again for you assistance as I am still learning my way around SU. Derek 'Line' and 'Edge' are interchangeable in this context... A line [edge] is just a line. edge=entities.add_line(pt1,pt2) for one line, edges=add_edges(pt1,pt2,pt3); edge0=edges[0]; edge1=edges[1] for multiple lines [edges] strung between the list of points - if you use .add_edges you get an array of edges - if there's only one you still need to use edges[0] to find it, if you .add_line you get just the one edge [line]. A face needs at least 3 edges with common vertices. More edges also have to be coplanar. face=entities.add_face(xxxxx) takes a 'list/array of points', it then makes new edges with a new face, or a 'list/array of edges', or a 'closed-curve' - it then makes a new face to these existing edges So there are several ways: Make the points and then make the edges and face in one go - probably what you want - face=entities.add_face(pointsList) Make the edges from the points and add the face to them - useful if some edges pre-exist - edges=entities.add_edges(pointsList); face=entities.add_face(edges) Make the edges and then 'find_faces' that they can have - useful if it's a set of 3D edges - edges=entities.add_edges(pointsList); edges[0].find_faces it returns only the number of faces that it's made - if you want to find the face itself then you then need to use face=edges[0].faces[0] additionally...
  • Soap Skin and Bubble

    7
    0 Szavazatok
    7 Hozzászólások
    1k Megtekintések
    pilouP
    Cool news Here the link [image: Wi5Y_bubble1.jpg]
  • Moving children parallel to parent components

    6
    0 Szavazatok
    6 Hozzászólások
    504 Megtekintések
    TIGT
    Why not write us one...
  • Fastest way to select component by definition.name

    10
    0 Szavazatok
    10 Hozzászólások
    2k Megtekintések
    H
    Hello TIG, Again many thanks for the hint. sel_def.instances[0].add_entities(MySubCompArray) does the job for me. Now I can use the imported dummy-block from autocad as the hierarchy-master instead of creating a separate new group. Will keep the outliner structure more readable. I also use now Jim's togglewindows.rb to keep the outliner close during execution.
  • How do you catch &quot;Make Unique&quot;?

    3
    0 Szavazatok
    3 Hozzászólások
    270 Megtekintések
    thomthomT
    The onContentsModified event is broken...
  • Removing observers

    4
    0 Szavazatok
    4 Hozzászólások
    311 Megtekintések
    thomthomT
    Ok. Found the problem. I was using model.active_path to cache the last path. When the last path was the model itself it'd return an empty array.
  • Selection Tool that works like the Eraser?

    13
    0 Szavazatok
    13 Hozzászólások
    1k Megtekintések
    fredo6F
    @aceshigh said: well, I am certainly getting depressed for the lack of the plugin Maybe this could help you to fill 'un-depressed' (and therefore 'pressed') http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18916#p155058 Fredo
  • HELP with COMPONENTS LIST

    9
    0 Szavazatok
    9 Hozzászólások
    513 Megtekintések
    TIGT
    NO. Use Plugins >> Component Report++++

Advertisement