move vertices down to surface  Topic is solved

General discussion related to SketchUp Pro and Make

move vertices down to surface

Postby pbacot » Mon May 13, 2019 10:00 am

I want to move the edge vertices down to the surface below (in z direction). So it would be nice if I can select along an edge and have all the vertices of selected edges move to the nearest face below. Is there a plugin that does this? The two surfaces are in different contexts.

I can do this pretty well one by one manually, but I have a number of them to do. Just wondering.
0
MacOSX Mojave ShetchUp Pro v19 Twilight Pro v2 M2 Kerkythea PowerCADD
User avatar
pbacot 
Top SketchUcator
 

Re: move vertices down to surface

Postby ecati » Mon May 13, 2019 12:52 pm

If I understand correctly. If the bottom surface is flat, the Projection plugin. If not, you can use the Sandbox Drape.

Projection plugin: https://extensions.sketchup.com/en/cont ... uide-tools
0
User avatar
ecati 
 

Re: move vertices down to surface  Topic is solved

Postby sdmitch » Mon May 13, 2019 3:59 pm

Code: Select all
mod = Sketchup.active_model
ent = mod.entities
sel = mod.selection
SKETCHUP_CONSOLE.clear
edgs = sel.grep(Sketchup::Edge)
if edgs[0]
  vers = edgs.map{|e|e.vertices}.flatten.uniq;
  vecs = []; vrts = []; axis = [0,0,-1]
  for v in vers
    p=v.position;
    h=mod.raytest([p,axis]);
    if h
      vrts << v;
      vecs << p.vector_to(h[0])
    end
  end
  ent.transform_by_vectors(vrts,vecs)
else
  puts "select edge(s)"
end

1
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: move vertices down to surface

Postby pbacot » Mon May 13, 2019 6:30 pm

when I saw sdmitch on the link I got excited! Let me check it out. Thanks!

ecati. Thanks! I don't want to copy but just move the vertices, modifying the upper surface edge. No, the lower surface is not flat at all.
0
MacOSX Mojave ShetchUp Pro v19 Twilight Pro v2 M2 Kerkythea PowerCADD
User avatar
pbacot 
Top SketchUcator
 

Re: move vertices down to surface

Postby pbacot » Mon May 13, 2019 8:00 pm

sdmitch: It worked awesomely. Thank you! What can I do in return?
0
MacOSX Mojave ShetchUp Pro v19 Twilight Pro v2 M2 Kerkythea PowerCADD
User avatar
pbacot 
Top SketchUcator
 

Re: move vertices down to surface

Postby sdmitch » Mon May 13, 2019 8:55 pm

pbacot wrote:sdmitch: It worked awesomely. Thank you! What can I do in return?


You're welcome. Nothing.
3
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: move vertices down to surface

Postby pbacot » Mon May 13, 2019 9:10 pm

Great skilz! Thanks!
0
MacOSX Mojave ShetchUp Pro v19 Twilight Pro v2 M2 Kerkythea PowerCADD
User avatar
pbacot 
Top SketchUcator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to SketchUp Pro & Make Discussions

Who is online

Users browsing this forum: Bing [Bot] and 5 guests

Visit our sponsors: