Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Spline not residing in Expected Plane

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
oafak
425 Views, 4 Replies

Spline not residing in Expected Plane

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.
4 REPLIES 4
Message 2 of 5
OceanHydroAU
in reply to: oafak

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.

Message 3 of 5
BrianEkins
in reply to: oafak

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
Message 4 of 5
oafak
in reply to: BrianEkins

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

Message 5 of 5
oafak
in reply to: OceanHydroAU

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report