Align to surface.

Next
 From:  Barry-H
10070.1 
Hi Michael,
is it possible to take the align to surface which is part of array along curve and make a standalone script of this feature.
I know we have the orient tool but I'm thinking when an object is moved by bounding box centre it snaps to surface but does not align.
Cheers
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
10070.2 In reply to 10070.1 
Hi Barry, well the move tool is intended to only do translation, not rotation. The Transform > Orient tool is the one that does translation and also rotation.

Would a "Bounding box center" option for Transform > Orient do what you are describing? If not I think I'll need more information.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
10070.3 In reply to 10070.1 
Surface normals at points on surface are now available by methods.
- B
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
10070.4 In reply to 10070.3 
Reading the v4 beta release notes:

10/10/2019, face.evaluateNormal(uv).
The normal is a vector.

1/22/2020, face.dropPoint(pt), yields 2D uv of surface point, closest to input pt.
So pt just has to be close to surface, or could be a point on an isoline.

I figure that a point (say the center point of a circle), could be acted on by a force, either attractive or repulsive, move to pt2, and a new point on surface found, with new circle aligned to new surface normal. What is the time overhead?

- Brian

EDITED: 20 Dec 2020 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
10070.5 In reply to 10070.2 
Hi Michael,
<<Would a "Bounding box center" option for Transform> Orient do what you are describing? If not I think I'll need more information.>>
Yes that's what I'm after.
Perhaps the photo illustrates what I mean better.
Cheers
Barry


Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
10070.6 In reply to 10070.4 
Hi Brian,

re:
> 1/22/2020, face.dropPoint(pt), yields 2D uv of surface point, closest to input pt.
> So pt just has to be close to surface, or could be a point on an isoline.

The point given to face.dropPoint() can actually be anywhere, it will find the closest point on the surface from the input point.


> I figure that a point (say the center point of a circle), could be acted on by a force, either
> attractive or repulsive, move to pt2, and a new point on surface found, with new circle
> aligned to new surface normal. What is the time overhead?

Well it depends a lot on the complexity of the surface and also the complexity of the trimming boundaries. It does have to do quite a bit of work but you could probably do a few hundred calls.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
10070.7 In reply to 10070.5 
Hi Barry, please try the attached plugin command.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
10070.8 In reply to 10070.6 
Thank you Michael. The surface would have to be locally flat-ish, relative to the radius of the circle. Circle centerpoints that are 2D far away would have to be 3d far away, (no nearby folding). D3- force has the force equations, but only does boundaries for 2d constant x or 2d constant y. Or huge 2d arc boundaries, with external centers. The only way to repel from a surface curve boundary, AFAIK, would be to replace boundary curve with lots of fixed points, close together relative to circle radius...which drives up overhead.. Or many small arcs with external centers.. And boundary curves need to be "reasonable". Surfaces with internal boundaries, (e.g. holes) similarly. Have not located efficient boundary curve repulsion algorithm.

Re surfaces, points on curve (e.g. isocurve), on surface, can be used to get normals, for alignment to surface.

Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
10070.9 In reply to 10070.8 
Maybe dropPoint could be used on boundary curves to advantage?

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Barry-H
10070.10 In reply to 10070.7 
Hi Michael,
thank you that works fine.
Have a good Xmas.
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All