I like to make different transportation zone models and I will play a lot with this plugin! If there will be a road and cars version it could just make me happy
Latest posts made by nick9111
-
RE: [Plugin] Eneroth Railroad System (v 0.1.21)
-
RE: Followme with distance
Thanks to all who tried to help me. I'm just new to ruby and Sketchup API, but digging some deeper into it I solved this problem by myself now.
-
RE: Followme with distance
Also I've made a ruby which splits this curve to smaller curves (for the case if there is no way for 'followme by distance') by drawing lines from one point to all insertion/end points (and then erases this lines). How can I automatically select these smaller curves 1 over 1 with ruby code (on picture I selected them manually)
-
RE: Followme with distance
@mitcorb said:
Or use TIGs Pipe Along Path for that bend, but temporarily break the path for the distance of the result. Use 0 distance for inside diameter if you prefer.
I'm not trying to do just a dashed pipe. I want to use it with any kind of face. I have tried some plugins like 'Profile Builder', 'Follow me and keep', 'Shape Bender', 'Upright extruder' but it seems none of them can make a dashed object from selected curve.
P.S. 'Profile Builder' can make unique members along each edge, but
- when I split my long curve to small curves it's too hard to select all needed manually
- with this option PBuilder also splits each of these small curves to separate edges:
-
Followme with distance
I've searched different topics and didn't find if is there a way do to 'followme' in ruby with not full length of the egde. With my code I can place faces along curve with some step and then I want to follow'em for some distance (I'm trying to do "dashed" 3d object).
Maybe I should place new edges to the same points but in this case don't know what to do if some edges lies on turning of curve (see picture) thats why I'm looking for 'followme' by specified length
-
RE: Rename texture image file inside *.skp
So there is a ruby plugin I've done (based on TIG's post). It renames all texture files in model with a template.
module VNV def VNV.rename_textures UI.messagebox("All texture file names will be changed with a template - mat000") model = Sketchup.active_model model.start_operation('Rename texture files', true) tw = Sketchup.create_texture_writer temp_path = File.expand_path( ENV['TMPDIR'] || ENV['TMP'] || ENV['TEMP'] ) temp_folder = File.join( temp_path, 'Sketchup_tmp_mtl' ) unless File.exist?( temp_folder ) Dir.mkdir( temp_folder ) end group = model.active_entities.add_group() Sketchup.active_model.materials.each_with_index{ |m,i| if m.texture then group.material = m tw.load(group) path_to_png = File.join(temp_folder, "mat#{'%03d' % i}"+".png") tw.write(group, path_to_png) w = m.texture.width h = m.texture.height m.texture = path_to_png m.texture.size = [w, h] File.delete(path_to_png) end } group.erase! model.commit_operation end # def end # module if (!file_loaded?(__FILE__)) menu = UI.menu("Plugins") menu.add_item("Rename texture files") { VNV;;rename_textures } # Let Ruby know we have loaded this file file_loaded(__FILE__) end
-
RE: Rename texture image file inside *.skp
Thanks TIG, I'll check out this method
@tt_su said:
May I query why you want to change the filename property of a Texture object?
I am working with a 3rd party program which directly imports *.skp files. My skp files have many textures with non-English letters in their file names. Program can't see those textures.
-
RE: Rename texture image file inside *.skp
@aerilius said:
Export it to the new filename (in a temporary folder), import it again to the material (
material.texture=
), delete the temporary file.Thank you for a quick answer, but I always do this work manually for many times and wondering if there's a way to rename it just with ruby command/routine
-
Rename texture image file inside *.skp
Is there a way to rename texture image file inside *.skp? For example I can get name of such file using
Sketchup.active_model.materials[0].texture.filename
and when the result is filename with no path how to rename it and if it is possible keep association with material which using it?
-
RE: Reading and drawing textures
Hi, I am new to the community and also have a thing I don't understand how it should be done. For example, I can get filename of texture which is saved inside .skp file using
Sketchup.active_model.materials[0].texture.filename
Is there a way to rename it? (and keep reference of associated material to it)