Message 1 of 7
Not applicable
11-24-2018
02:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've made a very simple script to place a point at 1, 1, 1.
When I run it I see a point has been created at 1, 1, -1.
Why is the z axis been made negative?
import adsk.core, adsk.fusion, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
design = adsk.fusion.Design.cast(app.activeProduct)
# Get the root component of the active design
rootComp = design.rootComponent
# Create sketch
sketches = rootComp.sketches
sketch = sketches.add(rootComp.xZConstructionPlane)
# Create point
testPosition1 = adsk.core.Point3D.create(1, 1, 1)
testPoint1 = sketch.sketchPoints.add(testPosition1)
# Test values
print('x: ' + str(testPoint1.worldGeometry.x))
print('y: ' + str(testPoint1.worldGeometry.y))
print('z: ' + str(testPoint1.worldGeometry.z))
# Outputs
# x: 1.0
# y: 1.0
# z: -1.0
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
The Fusion 36o UI also reports the point is at Z -1.
Solved! Go to Solution.