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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Documentation vagueness (GeometricConstraints.addCoincident Method)

Message 1 of 3
256 Views, 2 Replies

Documentation vagueness (GeometricConstraints.addCoincident Method)

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.

Message 2 of 3
in reply to: Anonymous

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
Message 3 of 3
in reply to: ekinsb

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...


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