sketchucation logo sketchucation
    • Login
    1. Home
    2. cjthompson
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    C
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 19
    • Posts 151
    • Groups 1

    Topics

    • C

      Hiding edges with fill_from_mesh

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      13
      0 Votes
      13 Posts
      448 Views
      thomthomT
      That would either be using Entities.add_faces_from_mesh for each mesh - if its ok to merge them in the Entities collection. Otherwise you need to iterate one mesh and add all the polygons to the other.
    • C

      Switch direction of edge?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      325 Views
      C
      TIG's method of getting the vertices of a face worked for me. Thanks everyone for the replies.
    • C

      Trouble triggering javascript event from sketchup

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      14
      0 Votes
      14 Posts
      681 Views
      thomthomT
      @unknownuser said: button.attachEvent. Yes -that jogged my memory - attachEvent was the IE way. (imagined that later IE (IE7 or IE8) used addEventListener as it's part of the DOM standard. But maybe I was wrong. ...or maybe it depends on the doctype....
    • C

      Model.edit_transform for parent

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      11
      0 Votes
      11 Posts
      480 Views
      C
      sorry, I must be really tired today. I meant you can't use a pickhelper outside of the current context. so If you you have two instances in the model, and you double click one, you can't use the pickhelper on it's sibling.
    • C

      Way to lock component definition

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      140 Views
      thomthomT
      hmm.... I thought you could lock any entity... but looking at the API - it'd appear only groups and instances can be locked...
    • C

      Difference between 4 % 2 and 4 %2

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      163 Views
      R
      Id guess its to do with how ruby expects to receive arguments for the method. If you put brackets around it it should work, i.e. 4%(2) and 2.to_f-(1)
    • C

      Adding observers to a group of entities

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      140 Views
      C
      Here is an abridged version: class EntityObserver def onChangeEntity(entity) puts entity.to_s + " changed" end end $entityObserver = EntityObserver.new def addObserver Sketchup.active_model.selection.each{|entity| entity.add_observer($entityObserver)} end def removeObserver Sketchup.active_model.selection.each{|entity| entity.remove_observer($entityObserver)} end If you have one entity selected, it adds and removes fine, but if you have more than one entity selected, it only removes the first entity in the selection.
    • C

      Layout to dxf or dwg

      Watching Ignoring Scheduled Pinned Locked Moved LayOut Discussions layout
      6
      0 Votes
      6 Posts
      2k Views
      R
      Thanks Gaieus. That should help me a lot
    • C

      Scope of class.initialize

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      877 Views
      J
      @cjthompson said: The reason I was asking was in regards to this post: http://forums.sketchucation.com/viewtopic.php?f=180&t=22567 Is it possible that the bounding box's initialize was interfering with the web dialog's? I don't think so because I have seen invalid dialogs aldo, and I'm fairly certain I have not redefined initialize at the top-level. I see invalid dialogs through variables that reference a dialog that has been closed. I've added some example code here.
    • C

      Core ruby policies

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      446 Views
      C
      @chris fullmer said: There is a good chance they are part of the Dynamic Components. yeah. they are part of dcutils.rbs
    • C

      Invalid Web Dialog

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      2k Views
      J
      Or just recreate the dialog every time... def create_dialog @dlg = UI;;WebDialog.new( ... ) @dlg.show { } end
    • C

      Parametric entities

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      555 Views
      BepB
      There is a plugin ,driving dimensions ,maybe its a start towards what you are looking for. http://drivingdimensions.com/SketchUp/faq.php Bep
    • C

      Moving component axes

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      363 Views
      takesh hT
      Not sure if this is what you want to do... Select the component, context-click and [Save as], save it to a folder as a new component file. Open the saved file, [select all] - [Cut] - [Paste] Now your cursor is at the corner of the new volume, click at the origin point and paste it there. Save the file and close it. Go back to the file you were previously working on, context-click the component and [Reload], select the saved component file and you're done. Everything your component had as its definitions should be inherited to the reloaded component.
    • C

      ASP web interface

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      283 Views
      C
      Well, I haven't had many replies, although I do have another question. When you use ASP in the web dialog, as far as I can tell, the ASP post-back doesn't work. I've gotten it to work in the development server. Do I need to use javascript post-back, or am I just missing something?
    • C

      What is the best way to find the type of an entity

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      1k Views
      thomthomT
      Think I need to look over my scripts again. Review the ruby code.
    • C

      Problem with Observers

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      198 Views
      C
      thanks for the quick replies. after reading the articles, I tried to use a selection observer, but there seems to be some "gotchas" with it. for example, if you manually select something, it won't trigger the "onSelectionAdd" event, but if it is automatically selected, then it will. any ideas?
    • C

      A bunch of Ruby questions

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      245 Views
      thomthomT
      @cjthompson said: Is there any way to find the opposite face of a rectangular block without using a raytest? I made a function in my Selection Toys plugin that selects the opposite face. Doesn't use ray testing though. I lops over the connected geometry and finds the nearest opposite face. You can poke around in the code for that if you like.
    • C

      Creating a slot on a face

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      262 Views
      TIGT
      Name : slot.2.rb Description : This file creates a 2D slot. Parameters : The slot width and length. Menu Item : Draw -> Slot Context Menu: NONE Usage : N/A Date : 8/14/2006 Author : Doug Herrmann Probably available on Didier's Library Site ?
    • C

      Transformations to faces

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      177 Views
      Chris FullmerC
      You can use a transformation object on face and edge entities if you use the entities.transform_entities method: http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#transform_entities That makes it easier to just scale and rotate and stuff. Chris
    • 1 / 1