Selection.point usage ?

Selection.point usage ?

lionel.courgnaud
Enthusiast Enthusiast
448 Views
2 Replies
Message 1 of 3

Selection.point usage ?

lionel.courgnaud
Enthusiast
Enthusiast

Hello,

 

I'm trying to create a sketchPoint from a Face selection. I'd like to have this point where I clicked on my Face.

The point is never on the created sketch.

I think I'm not using the right way to do this.

 

 

 

 

constructLib = adsk.core.ObjectCollection.create()
Selection = ui.selectEntity('Select FIRST FACE', 'Faces')
constructLib.add(Selection.entity)
newSketch0 : adsk.fusion.Sketch = rootComp.sketches.add(constructLib.item(0))  
ClickPoint : adsk.core.Point3D = Selection.point      
newSketch0.sketchPoints.add(ClickPoint)

 

 

 
Capture d’écran 2022-04-23 à 09.17.34.png
 
thanks for your help 🙂
 
0 Likes
Accepted solutions (1)
449 Views
2 Replies
Replies (2)
Message 2 of 3

kandennti
Mentor
Mentor
Accepted solution

Hi @lionel.courgnaud .

 

Try this.

・・・
    point: adsk.core.Point3D = newSketch0.modelToSketchSpace(ClickPoint)
    newSketch0.sketchPoints.add(point)
Message 3 of 3

lionel.courgnaud
Enthusiast
Enthusiast

Perfect ! I didn't know this function 🙂 

It will save me a lot of time.