Message 1 of 5
Coordinate algebraic sign (-) in point geometry print command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to print (and later export to a csv file) the pnt coordinates of 2+ sketch or construction points.
But the issue I am having currently is, that some coordinates should have a "-" before the value.
import adsk.core, adsk.fusion, adsk.cam, traceback, csv app = adsk.core.Application.get() ui = app.userInterface # Initialize variables i=0 coord= [] templist = () #1 pntEntity = ui.selectEntity('Select a sketch point', 'SketchPoints') pnt = adsk.fusion.SketchPoint.cast(pntEntity.entity) templist = ('{}'.format(pnt.geometry.z), '{}'.format(pnt.geometry.y), '{}'.format(pnt.geometry.x)) coord.append(templist) print(templist) templist = 0 print(coord) #2 pntEntity = ui.selectEntity('Select a sketch point', 'SketchPoints') pnt = adsk.fusion.SketchPoint.cast(pntEntity.entity) templist = ('{}'.format(pnt.geometry.z), '{}'.format(pnt.geometry.y), '{}'.format(pnt.geometry.x)) coord.append(templist) #print(templist) templist = 0 print(coord)
The output should be:
[('0.0', '0.3000234521308176', '-2.3838218031176135'), ('0.0', '3.0992720830223104', '-5.589760148808029')]
but it is:
[('0.0', '0.3000234521308176', '2.3838218031176135'), ('0.0', '3.0992720830223104', '5.589760148808029')]
so basicely without the "-".
In Fusion i get the - shown if i select the point
Thank you guys in advance