0
$\begingroup$

I want to be able to move a face, edge or vertex along an orientation and snap it to the intersecting point of another orientation. Is this possible in blender currently? enter image description here

$\endgroup$
  • $\begingroup$ The easiest way could be to move edge along normals of the top plane so that they intersect (e.g. with it selected press G twice and then Alt), confirm that and intersect geometry with Ctrl+F> Knife. This won't snap rather than create new vertices at intersection $\endgroup$ – Mr Zak Nov 13 '17 at 23:34
0
$\begingroup$

I have two ideas.

first one summarized in this image, using local transformations and face snap. moving using 3d cursor transformation or moving first the center point to edge.

idea

the second is use some script like this:

import bpy

from mathutils import Vector, geometry
from math import sqrt

print("#"*20)

#"object names"
n1 ="Plane"
n2 = "a" #this is the object to move

#data object 1
object = bpy.data.objects[n1]
object.select = True

bpy.context.scene.objects.active = object

v11,v12,v13, v14 = [(object.matrix_world*v.co) for v in object.data.vertices]

ob1_normal = geometry.normal(v11,v12,v13)

print(v11,v12,v13,ob1_normal)

bpy.ops.object.select_all(action='DESELECT')

#data object 2

object = bpy.data.objects[n2]
object.select = True

bpy.context.scene.objects.active = object

v21,v22,v23, v24 = [(object.matrix_world*v.co) for v in object.data.vertices]

ob2_normal = geometry.normal(v21,v22,v23)

#print(v21,v22,v23,ob2_normal)

##############################intersection point


int = geometry.intersect_plane_plane(v11, ob1_normal, v22, ob2_normal)
#bpy.context.scene.cursor_location = int[0]

#print("new",int)
distance = (v22 - int[0]).length  #distance vertice and intersection point
#print("distance ", distance)

### translate the object

bpy.ops.transform.translate(value=(distance, 0, 0), constraint_axis=(True, False, False), constraint_orientation='LOCAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True, use_accurate=False)

script example

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.