🚨 Skimp | 25% Off until March 30 Buy Now

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
  • Push/pull (or drag) with increment ?

    3
    0 Szavazatok
    3 Hozzászólások
    1k Megtekintések
    T
    Thank you ! Exactly as I wanted to be.
  • SketchUp Command Line Switches

    7
    0 Szavazatok
    7 Hozzászólások
    6k Megtekintések
    TIGT
    SketchUp always includes its own Tools folder [and the nested Ruby folders] and your user Plugins folder in it load-path [ $:] You can include addition plugins folders in the load-path array, and any scripts in there will load as SketchUp starts. Fredo wrote a clever extension to do this for you. https://sketchucation.com/pluginstore?pln=000_AdditionalPluginFolders Read its More Info... pages for usage etc...
  • SKP 2017 - saving component to file via ruby

    3
    0 Szavazatok
    3 Hozzászólások
    2k Megtekintések
    artmusicstudioA
    hi tig, thanx for replying, i just red your code and suppose, that every skp-file, you call, will be opened in the viewport and resaved as another version - correct? so it cannot be used as a background task within (under) a running sketchup session (maybe a parallel skp-session opens..... ), have to try it out later this evening. what is a big help for me, is the declaration <<ver=Sketchup::Model::VERSION_2016>>, i must have missed it in the api-doc. the rest is clear. but: so there is no way to declare the skp-version when saving a compo to a file, i guess... thanx stan
  • Pushpull face on a cube

    6
    0 Szavazatok
    6 Hozzászólások
    2k Megtekintések
    TIGT
    As I already explained... And you can see this when it's done 'manually' too... If a rectangle face is wholly within another planar face and none of its edges are shared with any other faces, then the PushPull leaves a hole where the original face was. If a rectangle face has any edges shared with other faces - as in the case you have where the face is on the corner of the form and one edge has another non-planar face - then the PushPull can leave the original face behind in the new geometry...
  • Ruby Observer Existence Check

    6
    0 Szavazatok
    6 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    @tig said: You can set @obs = ... within a module, outside of any of its methods and that then persists thereafter. This is true because, a module is an instance of class Module. @hank said: Have not gotten very advanced with Classes etc. so just a simple module. The Class class is the direct child class of class Module. So classes inherit all of Module's functionality, and get a little bit of their own (ie, a few extra methods and the ability to have many instance copies of themselves, that can hold their own instance variable values.)
  • Copying files using &quot;ftools.rb&quot; library

    5
    0 Szavazatok
    5 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    @mgate said: require 'ftools.rb' > ... > folder = File.dirname( __FILE__ ) > resources = "Resources" > resource_name= "XXXXXX AT Template.skp" > resource_file = File.join(folder, resources, resource_name).tr("\\","/") > ... > Problem here. The "Resources" folder is not in a sub-folder of the "Plugins" folder, nor in a sub-folder of YOUR extension sub-folder (which should be in a sub-folder of "Plugins".) This should return the correct path: resource_path = Sketchup.find_support_file("Resources") The above script certainly creates the copy in the correct folder but SU crashes afterwards.[/quote] Do you get a BugSplat!, or is a Windows Error Report (WER) generated (ie, check Event Viewer) ? Secondly, your rescue clauses are not telling you what error is happening. Do something like this: begin # file operation rescue => e puts e.inspect # or UI.messagebox(e.inspect) else # change to more meaningful message; puts "file operation success!" end Thirdly, we used to tell users to run SketchUp as administrator because all users needed read and write permissions on folder in the SketchUp application's program path. (This can cause file drag and drop to stop working for SketchUp.) The alternative is to set permissions for SketchUp and all it's program sub-folders to allow all users full permissions.
  • Getting group's dimensions

    7
    0 Szavazatok
    7 Hozzászólások
    1k Megtekintések
    S
    Thank you, I will work on this.
  • How to implement entity selection &quot;wizard&quot;

    5
    0 Szavazatok
    5 Hozzászólások
    1k Megtekintések
    Dan RathbunD
    ... and new for SketchUp vers 2016 and higher is a rectangular window picking method: http://ruby.sketchup.com/Sketchup/PickHelper.html#window_pick-instance_method You should download the SketchUp Team's Examples extension to see how Tools are written. http://extensions.sketchup.com/en/content/example-ruby-scripts
  • Beginning Ruby - Array and other Questions

    5
    0 Szavazatok
    5 Hozzászólások
    1k Megtekintések
    TIGT
    You can't rely on the ordering of a selection or an entities collection. Also you should never 'loop' through a selection or an entities collection, IF your code will affect the selection or collection - since it's references will 'shift' - use .to_a to free it as an array if you must do this... If you are adding several faces you make a simple empty array at the start: faces = [] Then every time you make a face you can add that into that array. ... face = ... faces << face ... Later on you can access the faces array and its ordering will remain constant. You can only add geometry into an entities context - so that's either the model.entities [the lowest base level - even if not currently active], model.active_entities [current active context - which might be any collection], or any group.entities or definition.entities ... In passing, a group is just a special subset of a component. They both have a definition [so does an Image, but we'll not go there yet]. A definition can have instances - placed into some entities context. A component definition can have several instances - changing one changes the others. You can make an instance unique so that editing does not affect its relatives. A group definition can have several instances, BUT editing one of them automatically makes it unique. When iterating a definitions collection you can filter its members using defn.image? and defn.group? to choose or avoid those types...
  • Erratic Duplication of Dynamic Components?

    3
    0 Szavazatok
    3 Hozzászólások
    1k Megtekintések
    H
    Thanks @pcmoor I see what you are saying... The WALL DC has only dumb objects in it with no parameters. The OPENING DC has sub objects that use parameters. But this seems insane! You mean, the second you take advantage of parameters for your sub-objects you loose the ability to have central command of your DCs?!!! Perhaps you can explain your modeling techniques more? So you have a DC you copy around a bunch of times the explode it? Doesn't that kill any link you have to the original definition?
  • Polygon Positioning Tool

    13
    0 Szavazatok
    13 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    @medeek said: ... so I went back to my basic Windows Notepad, ... How do you know what encoding it saves the file it ? How do you know what type of line ending characters it uses ? These are things easily set with a real code editor. In addition code editors use color lexing to help you spell keywords correctly, match up the begins and ends of code blocks, etc. They also can use autocomplete features to help fillout method calls.
  • Boolean Subtraction or ???

    12
    0 Szavazatok
    12 Hozzászólások
    3k Megtekintések
    medeekM
    I'm still digging through the code you sent me. It may take a week but I will attempt to figure out how this actually works. Its amazing how much you are able to compress into such a small body of code.
  • Need some development help.

    9
    0 Szavazatok
    9 Hozzászólások
    2k Megtekintések
    S
    Wow! okay. This is totally awesome. This is quite a few levels above what I am capable of writing. This may take me like a week just to figure out. Sdmitch, you have saved me hundreds of hours of treachery. I want to buy you a beer, but I think you deserve a whole keg. This is way better then what I was plugging away at. Tig had got me thinking in the right direction about what I was trying for better ideas, and I had a feeling bounds was the answer to locating the foobar. I changed line 65 to some regex (=~/^[Ff]oo/) I learned from Tig back in the day to solve for a couple foos that were made unique and I left out the selection bits. This should be the example to anyone trying to get components out of their parents and gathered into their own. I want to thank the community here for being so awesome and living up to the name Sketchucation. I have learned so much from guys like Dan Rathbun, Thom Thom, TIG, sdmitch and too many others to list. Thanks & Cheers!
  • How to retrieve the version of the model

    2
    0 Szavazatok
    2 Hozzászólások
    928 Megtekintések
    TIGT
    You need to read in the first part of the binary file SKP and see what version it says... ໿SketchUp Model೿{17.0.18899}䖯挢べ仪躯蘚䆤寸ÿ... In Ruby try something like this: vv=File.open(skp_path, 'rb'){|f| f.read }.unpack('m*').pack('m').gsub(/SketchUpModel/,'').to_i.to_s;if vv[0].chr=='1';v=vv[0].chr+vv[1].chr;else;v=vv[0].chr;end skp_path is the full path to the SKP you are trying to find the version of. vv is the long version number, as a string [e.g. "17018899"] v is the short version number, as a string [e.g. "17"] If you want more details parse vv differently...
  • Copy a Group within a Component in Ruby, preserve location

    8
    0 Szavazatok
    8 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    @hank said: **@Dan Rathbun:**I am just using the layer as an easy selector for the groups I want within the component. This is fine. Ie, using the layer property as a filter. @hank said: Do you recommend another way? I recommend rereading what I wrote. It was just general information (triggered by incorrect terminology you chose to use in an earlier post.)
  • What does it take to write a commertial plugin?

    3
    0 Szavazatok
    3 Hozzászólások
    1k Megtekintések
    A
    Alright, thank you! I assume it's all legal unless I'm planning to write a new softwate/app.
  • Component that can not be made unique

    4
    0 Szavazatok
    4 Hozzászólások
    958 Megtekintések
    S
    If you want each copy to be unique, why not use Groups? The Group#copy method automatically clones the associated ComponentDefinition and hooks the new copy to the new clone. That is, each copy is "unique" right from the start.
  • Right and Left Handedness

    6
    0 Szavazatok
    6 Hozzászólások
    1k Megtekintések
    TIGT
    The pushpull direction is still important. As you will always be going to push the face down, then all you need to do is to make all of your faces look upwards. Rather than worry about the loop ccw/cw-ness [which will fail at z=0 as a ccw face will swap to look downwards anyway !] - instead just add the flat face [its loop-direct unimportant], then face.reverse! if face.normal==Z_AXIS.reverse Again you need to do a -ve pushpull, so that the top face [now always looking upwards' is retained as the form extrudes downwards... You seem to be making this more convoluted than it needs to be...
  • Adding edges to manual selection following a snake pattern.

    2
    0 Szavazatok
    2 Hozzászólások
    872 Megtekintések
    Dan RathbunD
    phpBB engined forums uses BBcode. Please wrap program code in code tags like: [pre:3asokg6p][ code ] code here [ /code ][/pre:3asokg6p]There is a "code" button on the post edit toolbar (2nd row, 3rd button) Read help on BBcode: http://sketchucation.com/forums/faq.php?mode=bbcode
  • Are Swig generated Ruby bindings compatible with Sketchup?

    13
    0 Szavazatok
    13 Hozzászólások
    3k Megtekintések
    D
    @metasim said: Success! I hope someone else finds this useful. I'm glad I don't have to resort to a client/server type implementation and associated headaches. Simeon Hello, I've taken the time to register in SketchEducation just to be able to thank you for this excellent tip. Thanks to you I've been able to succeed after many headaches with my .bundle Swig/CMake generated Ruby/Sketchup extension files causing segfaults every time I used "require" to load them. Linking against the Sketchup 2016 embedded Ruby library solved the problems and now I can use the extension!! It was extremely useful. Thank you very much!

Advertisement