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

Documentation vagueness (GeometricConstraints.addCoincident Method)

Anonymous
466 Views
2 Replies
Message 1 of 3

Documentation vagueness (GeometricConstraints.addCoincident Method)

Anonymous
Not applicable

In the Fusion 360 API documentation for addCoincident (here), the call is described as:

 

returnValue = geometricConstraints_var.addCoincident(point, entity)
point SketchPoint The SketchPoint that will be made coincident. entity SketchEntity The SketchPoint or sketch curve that the point will be made coincident to.

This is not my experience from testing this. If I try:

        pt1 = mysketch.sketchPoints.add(adsk.core.Point3D.create(1, 1, 0))
        pt2 = mysketch.sketchPoints.add(adsk.core.Point3D.create(2, 2, 0))

        mysketch.geometricConstraints.addCoincident(pt1, pt2)

Then point 2 is moved to be coincident with point1 and the result is a point at (1,1,0). This is consistent with the UI where the selection order is important: The first entity remains in place and the second moves to satisfy the constraint.

 

Edit: Of course, if you are trying to make a line endpoint end coincident with a circle, then you have to put the Point first anyway. I suppose it should be noted that the effect of creating a coincident may not be what you always expect!

 

Thanks, Conor.

0 Likes
Accepted solutions (1)
467 Views
2 Replies
Replies (2)
Message 2 of 3

ekinsb
Alumni
Alumni
Accepted solution

The help topic wasn't trying to be explicit about how the entities might adjust when the coincident constraint is added, but is just saying that the two entities will be made coincident, whatever that means in that specific case.  As you said, depending on what the entities are, the results can be very different.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 3 of 3

Anonymous
Not applicable

Ah. I was overlaying an interpretation of the help text that likely wasn't intended. Given that I had to test my code anyway to see that what I intended actually happened, I suppose it doesn't make any difference. Thanks.

 

PS: That goes double or triple for angular dimensions, which are a bit ... tricky...

 

0 Likes