⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Aliasing UI::messagebox ?

    4
    0 Votes
    4 Posts
    480 Views
    Dan RathbunD
    @unknownuser said: ... I tried various flavors of the alias and alias_method keywords, but those don't seem to work with modules. I'm certain there's a way to do it, but I thought I'd ask here before diving into my Ruby books. Yes.. it's weird that alias doesn't work with modules. But this is even weirder. To alias modules, you instead use the object= method. Example aliasing of Sketchup module: (At Ruby Console type the following, where ">>" is resulting output.) Sketchup.class >> Module Sketchup.object_id >> 43353420 # remember this id... # now alias the module SU = Sketchup >> Sketchup SU.class >> Module SU.object_id >> 43353420 # it's the SAME exact id # test it... SU.version >> 7.1.6087 I would think that we must be careful what namespace the alias constant is declared within. If the above statement "SU = Skecthup" was declared inside a module, or a class, it would only be accessible within that namespace, or must be qualified to be accessed. For example, say you used that alias assignment within a module named "Configurator", in order to access the alias from outside, you'd need to qualify it with: Configurator::SU.methodcall However.. if you wished the alias to have global public access, you'd need to declare it outside ALL modules, in the objectspace. (Similar to typing it at the console.) BUT... what if for control purposes (ie, conditional loading,) you needed to have the statement inside a class or module? I think in this case, remember the Kernel.eval() method, and the fact that module Kernel is included in every object. That means that the containing module has it's own copy of eval. So you cannot call just eval (unqualified,) because you'd be calling the local module's copy of eval. To do it from within a module (or class,) you must qualify the call: if situation then Kernel.eval("SU = Sketchup"); Then the alias constant is global.
  • Engineering toolbox - how does it work?

    3
    0 Votes
    3 Posts
    913 Views
    D
    It looks like it inserts components from data(length, width, etc.) that you specify...similar to a dynamic component. Looks useful! From your link... @unknownuser said: How to use the Engineering ToolBox After loading Sketchup and the Engineering ToolBox from the menu - navigate to the wanted component in the navigation menu above - and select "insert" to add the wanted component to your SketchUp model. Note! The SketchUp Engineering Toolbox is an online resource updated continuously. You need an internet connection to operate. For some components parameters like length, color, offset and more can be modified before insertion. Customized components can be inserted by changing parameters in the dialog boxes at the end of the component lists - and clicking "custom!" Selected objects in the model can be manipulated - rotated, moved, colors changed and more - from the Tools section. Assistant objects like lines, horizontal and vertical planes can be added.
  • Skp to off format... plugin

    6
    0 Votes
    6 Posts
    654 Views
    V
    can anyone write the plugin and give me... i am a newbie to both ruby and sketchup api... thanks..
  • How to draw rectangles on a cylinder

    3
    0 Votes
    3 Posts
    408 Views
    P
    @thomthom said: Tools on Surface: http://forums.sketchucation.com/viewtopic.php?f=323&t=11212 Thanks a lot. I don't understand why, but I lost it. Hans
  • Tool History Dialog/Recall?

    2
    0 Votes
    2 Posts
    270 Views
    Dan RathbunD
    @earthmover said: Would it be possible to create a dialog window that shows the a running tab of the last 10 or so tools or plugins used and allow you to recall them? The $" array holds a list of every ruby script that was loaded by the require command, but those scripts are usually ones we only wish to load once anyway. (Which is the purpose of the array in the first place, require checks the array so as not to reload scripts that have already been loaded.) I say this because, the feature you desire would need a similar array, but it must have all files loaded by the load command, except those that are in the $" array. (Tricky because require passes it's file argument to load if it decides a script needs to be loaded.) I hate to think about this, but one solution would be to override load; not desirable because it's already been overriden by Google to handle the .rbsfiles. It may be better to create a new run command, that mantains the 'history' array and then passes the filename argument on to load. So the 'rule' would be if you want a script in the history, use run, if not use load directly. A webdialog could be made easily once the maintenance of the history array was solved. Heck.. even a Inputbox with a dropdown list would work, but a webdialog would be better (single click and it could remain open, the list could be updated continuously. An Inputbox would be 3-click, open it choose script, click OK.)
  • Problems with Sketchup Classes

    4
    0 Votes
    4 Posts
    468 Views
    L
    Thanks for the replies guys! @unknownuser said: That is correct. Most methods of classes are instance methods. You should be able to call them from inside the class (ie another method of the same class,) using it as a private method. Yes it is an instance method, but it seems to have no effect on objects created in the sketchup ui, presumably because they have their own read-only/inaccessible templates/classe for creating objects? And yet I still fail to see why rewriting the instance variable declaration (if that's what it's called!) for x, y, z has an effect on yaml. Have they not already been declared? I just have a funny feeling that something weird is going on under the hood. I actually had no real purpose when extending those classes, except to try and get them to expose x, y, z values to yaml. It worked in that instnce, I have no Idea how, and was unable to do anything similar for other types. The workaround only partially worked (ie, it does not work on objects created in the sketchup ui). @unknownuser said: You can do anything you want FOR YOUR OWN USE. BUT Google OWNS the Sketchup, UI, and Geom Namespaces. The Terms of use prevent you from causing other people's installations of Sketchup to be degraded or broken or such. The license agreement is at: http://sketchup.google.com/intl/en/download/license.html At the very least, if you wanted to extend Sketchup classes (and release those extensions,) you'd need to have Google Sketchup Team consent AND Sketchup Developer Community approval. You might join the SKX project, or monitor the SKX forum. Normally I would have given up trying to get yaml to work and come up with my own alternative way of transmitting the object information via text through stdio, but I have thought of another interesting concept, the possibility of using other languages such as python or java with sketchup... with yaml. If there is no interest in that, and I can't find a quick fix to this problem I have with yaml, then I'll drop that Idea! I think I need to learn how yaml works (on the inside) in order to find out why it struggles with sketchup. I did have one Idea for a work around, and that was to deep copy the objects created in sketchup to what I have dubbed (if my theory is correct) a "True Ruby Object" and then use the .extend method to append the yaml methods on the objects. In order to do this I guess it would be easiest to make the change to the way yaml works (otherwise I may as well just copy all the attributes manually!). By having my own copy of the objects, and then using the .extend method will I still be voiding this license aggreement? A big problem I think I can see with that Idea is performance. Having a copy of every object doesn't seem like good, common sense to me!
  • Questrion for script developers on textures

    3
    0 Votes
    3 Posts
    274 Views
    TIGT
    I don't know of a script to do this, but if your tiles are faces or groups / component instances with an applied material, then there is a built-in way. Select one with that material. Right click and in the context-menu choose 'Select' and 'All with Same Material'. Right click again and in the context-menu choose 'Entity Info'. The dialog that opens will report the number of things now selected with that material. If the objects are faces it also reports their area in current units. If the things are 'instances' it will only report their number. If the tiles are instances of a component with the material applied 'internally', then you can count the number of them in the model this way... Open the Component Browser and click the Model-tab [small-house] and right-click over the tile component you want. In the context-menu choose 'Select Instances'. All instances of that component are now selected. 'Entity Info' will again give the count of those tiles now selected. [Of course this might all be different wording in your 'locale' version] I'm guessing you are Spanish? Don't worry, your English is quite good... Merry Christmas
  • Unit Testing, Test-Driven Development?

    7
    0 Votes
    7 Posts
    509 Views
    Dan RathbunD
    @jim said: ... but how to incorporate it into the development cycle without imposing a performance penalty in the release version? Definately, any Test or Debug module would be something we would ONLY load during testing. We should not expect someone (ie the average user,) to have those modules loaded when they are just running and using Sketchup and the plugin (once it passes tests and is released.) If you were testing a plugin on a model that was very big and had alot of textures, I'm sure performance would be reduced. That's only during testing tho. Another option, is to cut up a Test or Debug module into smaller modulettes so only that which a tester needs is loaded. Perhaps take advantage of the autoload method, to do it automatically.
  • How to detect duplicate edges?

    7
    0 Votes
    7 Posts
    449 Views
    TIGT
    @richmorin said: TIG- If you'll look at my code extract, you'll see that I'm already doing what you suggest. pph is a hash of "point pairs", indexed by the vertex positions (encoded as strings, to avoid object issues). However, my code isn't detecting any clashes, even though SU does (later) when it tries to save the model. That's why I suggested instead of inspecting the points you inspect the edges already made...
  • Can we improve ExtrudeEdgebyRails? (add options)

    21
    0 Votes
    21 Posts
    2k Views
    D
    hi Tig, just a thought, I and it seems quite a few people use fredo's polyline segmentor before using eebyrails, loft, blend, etc.. so, would it be possible to simply call up that tool from within EER2 if a potential problem is found? john
  • ExtJs Dialogs in Podium 2 Beta

    2
    0 Votes
    2 Posts
    217 Views
    thomthomT
    hm.. I've been using jQuery... never seen this lib before. interesting.
  • Wire frame to pipe?

    4
    0 Votes
    4 Posts
    531 Views
    TIGT
    PipeAlongPath with inner/outer radius== or TubeAlongPath will make a 'tube' along a set of connected edges BUT they can't branch - however, the 'ends' junctions are tidied up. You'd need to selected a number of connected edges/curves [end-to-end] and use the tool several times to make a partially tidied frame. Lines2Cyl etc will make all selected edges into separate cylinders... Some manual tidying up will be inevitable with branching forms...
  • Problem plugins/rubys-scrips su7 OSX 10.5

    2
    0 Votes
    2 Posts
    214 Views
    jeff hammondJ
    @b-o said: am i doing something wrong? any clue what i can try? SketchUp.app/Contents/plugins is where google places it's exporters. the proper location for ruby plugins is in the following location: MachintoshHD/Library/Application Support/Google SketchUp 7/SketchUp/plugins try placing the .rb file there instead then restart sketchup
  • New to Ruby / Sketchup

    2
    0 Votes
    2 Posts
    292 Views
    thomthomT
    You must URL encode the data you put into URLs. Not all charactered are allowed.
  • Feasibility of this occurring?

    3
    0 Votes
    3 Posts
    296 Views
    Dan RathbunD
    I posted an informative reply on this topic at the Sketchup Developer's Google group. (I guess I'll just Carbon Copy it here.) @unknownuser said: Is there any possibility of using Google Sketchup within a website ...? GoogleGroup Topic: To Run Google sketchup within website I believe you must export models as Collada(.DAE) files for use on websites. The website would use Google O3D pluginto VIEW the model. Visitors would need to download and install the plugin. Interaction can be done on the model by the website visitors, thru Javascriptprogramming. Such as changing colors, or materials, moving objects around, etc. But all these things I think must be drawn in Sketchup. There is no basic editing / modeling capability in O3D. Only manipulation of components. O3D Technical Overview http://code.google.com/apis/o3d/docs/techoverview.html O3D Developer's Guide http://code.google.com/apis/o3d/docs/devguideintro.html Working Webpage Examples: Smart Designer by SmartFurniture.com http://www.smartfurniture.com/smartdesigner Smart Designer is a new online application that enables consumers and businesses to design and order their own furniture products. They can then interact with those customized products in the context of a 3D space that simulates their homes or offices. Home Configurator (Firefox only) http://o3d.googlecode.com/svn/trunk/samples/home-configurators/homedesigner.html .
  • Where's my circle's face?

    3
    0 Votes
    3 Posts
    246 Views
    TIGT
    The add_circle returns an array of its edges, so circles_edges=entities.add_circle(......), to make a face simply use circles_edges[0].find_faces...........
  • "Tell me what's goin' on. I ain't got a clue!"

    28
    0 Votes
    28 Posts
    1k Views
    TIGT
    'Above' in this context is on the side of the face's front. If the face is flat and it were facing upwards your hand would be above it. The that face were facing downwards then your hand would be underneath it...
  • Copy Array Along Path tool...have a look.

    46
    0 Votes
    46 Posts
    119k Views
    simon le bonS
    Hi NotaReal! You are greatly helping me for my first feet steps with Kerkythea. Here are some renders dedicated to you [image: clay_tstD003_th.jpg] [image: clay_tstD004_th.jpg] [image: clay_tstD005_th.jpg] [image: clay_tstD006_th.jpg] [image: clay_tstD007_th.jpg] [image: SuspBridge003_th.jpg] ++simon
  • Plugins Clash - LibFredo6 / Smustard Organizer

    4
    0 Votes
    4 Posts
    886 Views
    fredo6F
    For whatever reason, Organizer prevents LibFredo6 to load (hence all the messages from the other scripts). I am not familiar with Organizer (I don't have it actually), so I don't know what exactly it does under the hood. I understand that normally you must execute a command on each script you want to put into the Organizer context, and that this command may alter the code of the targeted script. If so, then, it is normal that it does not work, since LibFredo6 and my other scripts rely on their own loading environment. Thanks to advise if what I described is correct. Anyway, maybe Rick could have a quick check to the problem, if you describe how you apply Organizer to LibFredo and my other scripts. Fredo
  • ASCII format for .skm?

    10
    0 Votes
    10 Posts
    556 Views
    J
    It would be a sibling (neighbor?) of the Plugins folder on Windows.

Advertisement