Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

Spline not residing in Expected Plane

oafak
Enthusiast

Spline not residing in Expected Plane

oafak
Enthusiast
Enthusiast

I expected the following Python code to create a spline, using three points, to completely lie in the YZ plane:

        splPoints = adsk.core.ObjectCollection.create()
        # Define the points the spline with fit through.
        splPoints.add(adsk.core.Point3D.create(0, -2.5, -5.0))
        splPoints.add(adsk.core.Point3D.create(000))
        splPoints.add(adsk.core.Point3D.create(07.55.0))
        splOne = sketchYZ.sketchCurves.sketchFittedSplines.add(splPoints)
I was surprised to find that the points are on the XY plane. Is there anything I am doing wrongly? Point3D arguments are supposed to be (x,y,z) coordinates, are they not? If the values of x is constant in all points, does that not necessarily constrain the spline to YZ plane? I cannot recognize the spline I am getting.
0 Likes
Reply
Accepted solutions (2)
739 Views
4 Replies
Replies (4)

OceanHydroAU
Collaborator
Collaborator

Presumably you're putting this onto a plane that you already selected before ( sketchYZ ) ?

At a guess - while you've named it YZ, perhaps it is not actually YZ?

 

If it's not confidential, it can help us to help you more if you post the entire script instead of the bit you think is wrong.

0 Likes

BrianEkins
Mentor
Mentor
Accepted solution

When you add geometry to a sketch, the coordinates you input are relative to the sketch coordinate system, not the root component.  Based on your variable names, I assume the sketchYZ sketch was created on the YZ construction plane. The X-Y plane of the sketch will lie on the input plane, so in this case it will lie on the model Y-Z plane.  I believe if you define coordinates in the Y-Z plane of the sketch that will result in geometry being drawn in the model X-Y plane.

 

I recently posted a response to a somewhat related question that might also help you.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/coordinate-system-when-sketching-on-a-plan...

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

oafak
Enthusiast
Enthusiast
Accepted solution

Hello Brian,

I saw your earlier solution and it cleared the situation completely. Thinking about it, it all looks so logical since it allows the specification of new construction planes easily. Many thanks for your very helpful explanation as well as your effort to repeat yourself when I asked the same question again!

OA Fakinlede

0 Likes

oafak
Enthusiast
Enthusiast

Thanks. The problem was resolved as shown below. Grateful for your help.

0 Likes