Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Simulate Project along vector

dinocoglitore
Advocate

Simulate Project along vector

dinocoglitore
Advocate
Advocate

Hi all, I’m looking for some Api and simple examples that help me to create a script that simulate the behavior of the Projection of curves to faces that can be easily done through the Fusion UI:

Projection_Api.png   

I need to define the project direction.

Thanks

Dino

0 Likes
Reply
Accepted solutions (1)
1,109 Views
10 Replies
Replies (10)

sgraves
Enthusiast
Enthusiast

Isn't a projection to a face along the normal to the face by definition.  I am trying to visualize what it would mean to "project" along a different vector.  If you want a different vector then objects that can give vector-like information are lines, edges etc.  You would need to select objects of that type.

0 Likes

dinocoglitore
Advocate
Advocate

Hi sgraves, thank you for the reply.

 

Projecting Along Vector allows to choose a direction to project toward a Face of a body. In the Fusion User Interface is an easy function in which I use an axis that give me the right direction to project. I can select the face and the curve to project.

But my issue is not in the UI, it is in the scripting.

 

By now I am using these few code line to find the projection direction.

 

line3D_var = adsk.core.Line3D.create(point1, point2)

infiniteLine3D_var = line3D_var.asInfiniteLine()

axisDir = infiniteLine3D_var.direction

 

But I can’t find a Api that can project a curve along that direction.

Thanks

Dino

0 Likes

sgraves
Enthusiast
Enthusiast

I am still struggling with the concept.  To me a projection is on a 2 dimensional surface.  The projection is the components of the curve normal to the surface.  Perhaps what you want is a projection onto a plane that is normal to your projection vector and then a projection from that plane to your face.  In that case, you construct a plane normal to your vector (along the normal to your face?) and create a sketch on it.  You can project to the sketch using the "project" method.  Then since you created the plane along the normal to your face, you can create a sketch on the face and project the curve you just projected from the original curve.

 

I think you are asking for the "shadow" of the curve that a light traveling along your vector would cast on your face.  I believe this sequence of operations will do that.

0 Likes

sgraves
Enthusiast
Enthusiast

To say what I said before more succinctly.  The "project" method of the sketch is the API way to project onto a 2D surface.  Some sequence of projections on sketches are going to get you what you want.

0 Likes

sgraves
Enthusiast
Enthusiast

After thinking about this some more, I don't think the sketch project method alone will get you what you want.  If you are looking for the "shadow" effect the projection typically would be bigger than the original curve.  The sketch project will always give you something the same or smaller.  I think what you are looking for is the intersection between the extrusion of the projection of the curve on the normal plane (assuming it is a closed curve) and the face.

0 Likes

ekinsb
Alumni
Alumni
Accepted solution

We're working on exposing this through the API.  The only workaround I can seen now is that you create a second sketch in the direction of the project vector that is the same as the first sketch and then create a loft between the two sketches and then intersect the lofted surface with the sketch you want to project the original sketch onto.  It would be a lot of work but it would be an accurate result.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
1 Like

dinocoglitore
Advocate
Advocate

Hi sgraves, sorry for the delay. I have read your replay and I have done some attempts to try to understand your advices.

This picture sums up my issue:

sketch_0.PNG

I have a sketch in which there is a close curve (in this case for simplicity a circle), and I want  to project it to the cap along the line  that connect the external point on the z axis with the center of the circle.

 

Your advice to project it to a plane that is normal to the direction of the line means that I have to project the curve on a ‘plane along the path’ of the line.

projection_along_path.pngprojection_along_path_with_body.png

The projection of this resultant curve on the plane tangent to the face of the body has this result:

projection_along_vector.PNGprojection_along_vector_with_body.PNG

 

While the projection ‘along a vector’ in the direction of the line has a different result:

projection_tangent_plane.PNGprojection_tangent_plane_with_body.PNG

As you can see the projection are different.

I thank you for your reply and for your answer

Dino

0 Likes

dinocoglitore
Advocate
Advocate

Hi ekinsb, thanks  for your reply and sorry for my delay. I’ve tried your advice and it is ok. I used the sweep operation instead of the loft and I found the right intersection.

Many thanks

Dino

0 Likes

sgraves
Enthusiast
Enthusiast

@dinocoglitore  Now if you extrude the projection on the normal plane to the vector, I believe the intersection of that extrusion with the surface is the shape you are looking for.  Sketches have an intersect method, but for a more general surface I don't know.  Perhaps something can be done with the Interference tools.

0 Likes

sgraves
Enthusiast
Enthusiast

@dinocoglitoreand @ekinsb,

 

I see the sweep is a beautiful solution.  With the sweep along the vector you get the desired shape without creating the normal plane.  In fact the intersection of the sweep with the normal plane is basically how the projection on the normal plane is made.  And in fact as @dinocoglitore has discovered the projection on any surface can be done with the intersection of the sweep.

0 Likes