Mac User? | Join the Rayscaper Beta for Mac 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
  • Saving an reloading a material from an attribut

    18
    0 Szavazatok
    18 Hozzászólások
    1k Megtekintések
    K
    me again... i don't know why, but the attribut "ablauf", "material" always receives a new value, even if the face's material is included in the array caled invalid_material. i'll post the code, because i realy don't know how to fix it. ents.each{|e| if e.typename == "Face" start = e.get_attribute "ablauf", "baubeginn" ende = e.get_attribute "ablauf", "bauende" if (e.material) invalid_materials = ['bau_mat', 'fertig_mat', 'inplanung'] unless invalid_materials.include?( e.material.name ) mat_vorher = e.material.name e.set_attribute("ablauf", "material", mat_vorher) end end if @woche.to_i >= start.to_i && @woche.to_i < ende.to_i e.material = bau_mat end if @woche.to_i >= ende.to_i e.material =fertig_mat end if @woche.to_i < start.to_i e.material = inplanung end end } end #now the code that reloads the material def mat_back mod = Sketchup.active_model ents = mod.entities mats = mod.materials default_mat = mats.add "standardwert" default_mat.color = [50,250,50] ents.each{|e| if e.typename == "Face" if (e.get_attribute "ablauf", "material") mat_temp=e.get_attribute "ablauf", "material" e.material=mats[mat_temp] else e.material=default_mat end end } end
  • Cannot understand exported UV coordinates format

    7
    0 Szavazatok
    7 Hozzászólások
    979 Megtekintések
    J
    I have the standard DLL that exports to XSI. So I just File > Export > 3D Model.. and choose XSI and press Export. I read this XSI file into my app. The coords I've given you are from OBJ so its easier to understand (more readable) Would this be the reason for me getting bad data. Does someone have a simple C++/Ruby script that exports all models, their textures and vertices/UV coordinates? .. I can use this alternatively.
  • Jpg textures in *.skp

    34
    0 Szavazatok
    34 Hozzászólások
    5k Megtekintések
    S
    thanks , I now see that about it there are topics in the forum...
  • When (and why) might "file_loaded?" be needed?

    3
    0 Szavazatok
    3 Hozzászólások
    369 Megtekintések
    TIGT
    It's there to stop more than one instance of the plugin loading into the menu/context-menu etc. If you hadn't added this trap then this might happen if you typed load "MyPlugin.rb" after you have already got it loaded - e.g. automatically at startup. It's not going to have to stop these potential duplicate menu items unless you try to 'load' the script more than once - e.g. while you are testing it, or perhaps when you have a script in a sub-folder that doesn't auto-load, but it might be loaded by another script [that is itself already loaded] under certain circumstances, and potentially these circumstances might occur more than once in that session - but you only want the one menu/context/toolbar item...
  • Save selected plugin?

    7
    0 Szavazatok
    7 Hozzászólások
    3k Megtekintések
    TIGT
    If I [or you for that matter!!] could have been arsed to do a simple search on this forum you'd have got this 'export by selection' = http://forums.sketchucation.com/viewtopic.php?p=183756#p183756 OR this one that does it by 'export by layer' = http://forums.sketchucation.com/viewtopic.php?p=183609#p183609
  • Alternative for webdialogs

    7
    0 Szavazatok
    7 Hozzászólások
    769 Megtekintések
    J
    @l.frisken said: would fxruby or qtruby be other options? There would be little difference between these and wxsu. Maybe we should ask the OP about their goals and expectation?
  • Toolbar restore bug

    2
    0 Szavazatok
    2 Hozzászólások
    477 Megtekintések
    Dan RathbunD
    I talked about this in another toolbar topic. I wonder if it would help if the 0.1 sec delay was just "cooked into" the restore() method itself ?? Then you would not need to modify a bunch of plugins and re-release them. <span class="syntaxdefault"><br />class UI</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Toolbar<br />  alias_method</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">;</span><span class="syntaxdefault">orig_restore</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">;</span><span class="syntaxdefault">restore </span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">  def restore</span><span class="syntaxkeyword">()<br /></span><span class="syntaxdefault">    UI</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">start_timer</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">0.1</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> false</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">{<br /></span><span class="syntaxdefault">      orig_restore<br />    </span><span class="syntaxkeyword">}<br /></span><span class="syntaxdefault">  end </span><span class="syntaxcomment">#def<br /></span><span class="syntaxdefault">end </span><span class="syntaxcomment">#class<br /></span><span class="syntaxdefault"> </span>
  • Problem with copy multiple and entity observer

    2
    0 Szavazatok
    2 Hozzászólások
    339 Megtekintések
    thomthomT
    Is it not something you are doing within the observer events that interfere? I was trying all kinds of things with observer when I was working on the DoubleCut plugin - but I don't think I remember this one. But I do remember that handling the multiple copy events was a challenge.
  • Weird bug with WebDialog and Flash

    10
    0 Szavazatok
    10 Hozzászólások
    1k Megtekintések
    V
    I've just noticed, that the problem still remains with the 'Enter' key. Though it works in IE, but it doesn't if it's opened via Sketchup web dialog. Any ideas?
  • Looping through components in a script?

    5
    0 Szavazatok
    5 Hozzászólások
    645 Megtekintések
    M
    Okay, it looks like I'm getting close to what I want with the Export CI ID plugin : http://www.scriptspot.com/sketchup/scripts/export-ci-id Now to figure out a quick way of hiding everything not selected as I loop through. Thanks again for the help here - I am appreciative. Regards, Matt
  • Application Observer

    7
    0 Szavazatok
    7 Hozzászólások
    699 Megtekintések
    Dan RathbunD
    @thomthom said: @dan rathbun said: seems like an API feature request for a onStartup() callback is in order (for the Sketchup::AppObserver class.) Why? Just ensure a method is called when the plugin loads. Because I'm thinking that the calback would get called AFTER all other plugins and extensions are loaded. Just an idea.
  • Programing menu icons

    3
    0 Szavazatok
    3 Hozzászólások
    351 Megtekintések
    honoluludesktopH
    Didier, Thanks, This will speed up access to one of my tools. Addenda: Wow, that was too easy to do.
  • Working around "location=", for debugging

    16
    0 Szavazatok
    16 Hozzászólások
    1k Megtekintések
    RichMorinR
    @dan rathbun said: I was under the impression that the code block of show() and show_modal() did not work on the Mac. Has this been fixed on SU 8.x ?? Dunno, in general, but a quick experiment worked for me. Then again, I was only setting a single variable. -r
  • Open layers from Custom Toolbar

    2
    0 Szavazatok
    2 Hozzászólások
    441 Megtekintések
    thomthomT
    UI.show_inspector('Layers') http://code.google.com/apis/sketchup/docs/ourdoc/ui.html#show_inspector
  • FaceMe - Ruby\SU bug?

    2
    0 Szavazatok
    2 Hozzászólások
    278 Megtekintések
    K
    Something similar happens when you create a new group inside an existing group that consists of existing components. See this thread: http://forums.sketchucation.com/viewtopic.php?f=180&t=31443&p=276973&hilit=kwalkerman#p276860
  • Transformations

    29
    0 Szavazatok
    29 Hozzászólások
    4k Megtekintések
    C
    @zitoun said: I have no clue what these are yet, but I guess I somehow can retrieve my rotation matrix from such component... Note that a transformation has the .to_a method as well which gives you exactly the information you're looking for. The array it returns is 16 floats for the four by four matrix which defines the transformation from the components defining coordinate system to the current coordinate system. Since you mentioned quaternions I'll assume you're familiar with with the essentials of matrices and linear transformations. First, we can interpret the scaling and rotation of a component as the action of a matrix on the basis vectors of the component definition. Say for example you define your component relative to the standard basis of x=[1,0,0], y=[0,1,0], z=[0,0,1]. Rather than keeping these vectors separately, you can just encode them as the 3x3 identity matrix, and then define all the entities in the component relative to this matrix. From here, any sort of rotation/scaling can be interpreted as a change of basis. The trouble of course is that any linear transformation preserves the zero vector, so you can't model a translation in this way. This means to fully describe the relative coordinates you require a an equation of the form Ax + b where A is an invertible 3x3 change of basis matrix and b is the translation vector with x being the "defining" vector of some entity internal to the component. This is where the clever bit comes in. You can model an affine transformation of the form Ax + b as a single matrix transformation by embedding it into a space with one higher dimension. This is why the transformation.to_a method returns a 16 entry array, it's a 4x4 matrix with the first four entries being the first column, the second four entries being the second column and so on. It's easy enough to extract the original 3x3 matrix and the translation vector as well, the "upper-left" 3x3 block matrix is exactly the change of basis matrix A, and the final column vector is of the form [b, 1] where b is the translation vector. From here extracting the rotation matrix is a simple matter of matrix algebra since any change of basis matrix A can be decomposed as A = QS where Q is a rotation matrix and S is a diagonal matrix representing the scaling of each axis. It's worth getting to know the 4x4 representation if you haven't before since it's also the way the OpenGL standard models the objects. The ability to model vector addition as matrix multiplication is only one of the reason they do it, the other being that when you're rendering perspective views rather than simply orthographic views the value of the bottom right entry plays an important role in correcting the scale of the transformation after applying the perspective matrix.
  • Customized 3D Warehouse link

    5
    0 Szavazatok
    5 Hozzászólások
    1k Megtekintések
    Al HartA
    I presume part of the cookie must specify the SketchUp version - so users don't try to download components they cannot load. I will be interested if there ideas can turn into a way to select and download components. What I would like to do it have a dialog which starts at a specific collection in the 3D Warehouse - such as this one - so users can download trees: http://sketchup.google.com/3dwarehouse/cldetails?mid=dfd59a8e2e744892e05349688101e4b4 or else starts with a search, such as http://sketchup.google.com/3dwarehouse/search?q=IRender+nXt&styp=c [image: IRender nXt Plants2.jpg]
  • Selecting All Visible Faces

    17
    0 Szavazatok
    17 Hozzászólások
    7k Megtekintések
    thomthomT
    @gude said: I couldnt understand the way they did it here http://forums.cgsociety.org/archive/index.php/t-197347.html That is the method I mentioned earlier - it selects the faces which normal is pointing towards the camera - but it doesn't take into account other faces blocking the view.
  • Duplicate "edit component" with api methods.

    11
    0 Szavazatok
    11 Hozzászólások
    975 Megtekintések
    honoluludesktopH
    Thanks, fellows. Sometimes it's not as simple as I think, then after I'm done, its simpler then I think:-) Tig, That's neat, didn't know I could do that. The reverse face application requires the faces to be in Sketchup.active_model.entities. The faces are picked in terms of it's pixel location on the monitor. Maybe I first have to group the loose entities, then process all the groups, and components one at a time. Sometimes I write this stuff, just to see if I can. It doesn't take that much more work to open each component manually, and run the plugin Reverse_Backfaces each time.
  • Intercept UI::Command.new ?

    7
    0 Szavazatok
    7 Hozzászólások
    630 Megtekintések
    PixeroP
    Very interesting. Awaiting your TT_toolbarTool...

Advertisement