<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Where are Coincident Constraints saved? in Fusion API and Scripts Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/where-are-coincident-constraints-saved/m-p/9209033#M13012</link>
    <description>&lt;P&gt;I created a rectangle using the 2-point-rectangle tool in a sketch.&lt;/P&gt;&lt;P&gt;Now I checked if i could find the object with the text command prompt.&lt;/P&gt;&lt;P&gt;In the geometricConstraint object, only the two horizontal and two vertical constraints are saved.&lt;/P&gt;&lt;PRE&gt;sketches.item(1).geometricConstraints.count 
4&lt;/PRE&gt;&lt;P&gt;Now I wonder where the four missing Coincident Constraints are stored that are visible when clicking at each point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is highly appreciated.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Dec 2019 10:14:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-18T10:14:45Z</dc:date>
    <item>
      <title>Where are Coincident Constraints saved?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/where-are-coincident-constraints-saved/m-p/9209033#M13012</link>
      <description>&lt;P&gt;I created a rectangle using the 2-point-rectangle tool in a sketch.&lt;/P&gt;&lt;P&gt;Now I checked if i could find the object with the text command prompt.&lt;/P&gt;&lt;P&gt;In the geometricConstraint object, only the two horizontal and two vertical constraints are saved.&lt;/P&gt;&lt;PRE&gt;sketches.item(1).geometricConstraints.count 
4&lt;/PRE&gt;&lt;P&gt;Now I wonder where the four missing Coincident Constraints are stored that are visible when clicking at each point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is highly appreciated.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 10:14:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/where-are-coincident-constraints-saved/m-p/9209033#M13012</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-18T10:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Where are Coincident Constraints saved?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/where-are-coincident-constraints-saved/m-p/9209800#M13013</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A id="link_9" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8149451" target="_self"&gt;&lt;SPAN class=""&gt;dellerXU4FF&lt;/SPAN&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I&amp;nbsp;created&amp;nbsp;the&amp;nbsp;following&amp;nbsp;script&amp;nbsp;to&amp;nbsp;check.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;#Fusion360API Python script
#Author-kantoku
#Description-Coincident test

import adsk.core, adsk.fusion, traceback


def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        des = adsk.fusion.Design.cast(app.activeProduct)
        root = des.rootComponent

        # create sketch
        skts = root.sketches
        skt = skts.add(root.xYConstructionPlane)

        # create TwoPointRectangle
        pnt3d = adsk.core.Point3D
        pnt1 = pnt3d.create(1.0, 2.0, 0.0)
        pnt2 = pnt3d.create(3.0, 4.0, 0.0)

        lines = skt.sketchCurves.sketchLines
        lines.addTwoPointRectangle(pnt1, pnt2)

        # Assign a temporary ID as an attribute to the sketch point.
        # skt.sketchPoints.item(0) is the origin.
        for idx, sktPnt in enumerate(skt.sketchPoints):
            sktPnt.attributes.add(
                'test_ID',
                'ID',
                str(idx))
        
        # Get information in sketch
        info = []
        info.append('sketchCurves.count[{}]'.format(
            skt.sketchCurves.count)
        )
        info.append('sketchPoints.count[{}]'.format(
            skt.sketchPoints.count)
        )
        info.append('geometricConstraints.count[{}]'.format(
            skt.geometricConstraints.count)
        )
        info.append('--------------')

        for idx, line in enumerate(lines):
            sp = line.startSketchPoint
            ep = line.endSketchPoint
            info.append('lineIndex[{}] : startPointID[{}] : endPointID[{}]'.format(
                str(idx),
                sp.attributes.itemByName('test_ID', 'ID').value,
                ep.attributes.itemByName('test_ID', 'ID').value)
            )

        # show info
        ui.messageBox('\n'.join(info))
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))&lt;/PRE&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;When&amp;nbsp;executed,&amp;nbsp;creates&amp;nbsp;a&amp;nbsp;TwoPointRectangle&amp;nbsp;and&amp;nbsp;displays&amp;nbsp;a&amp;nbsp;dialog&amp;nbsp;at&amp;nbsp;the&amp;nbsp;end.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;The&amp;nbsp;dialog&amp;nbsp;shows&amp;nbsp;which&amp;nbsp;sketch&amp;nbsp;point&amp;nbsp;the&amp;nbsp;start&amp;nbsp;and&amp;nbsp;end&amp;nbsp;points&amp;nbsp;of&amp;nbsp;each&amp;nbsp;line&amp;nbsp;are&amp;nbsp;referring&amp;nbsp;to&amp;nbsp;by&amp;nbsp;test&amp;nbsp;ID.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 408px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/709274i3099A4CE63B74C4B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I&amp;nbsp;thought&amp;nbsp;that&amp;nbsp;the&amp;nbsp;end&amp;nbsp;points&amp;nbsp;of&amp;nbsp;each&amp;nbsp;line&amp;nbsp;refer&amp;nbsp;to&amp;nbsp;the&amp;nbsp;same&amp;nbsp;point,&amp;nbsp;which&amp;nbsp;meant&amp;nbsp;coincidence&amp;nbsp;constraint.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Dec 2019 15:32:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/where-are-coincident-constraints-saved/m-p/9209800#M13013</guid>
      <dc:creator>kandennti</dc:creator>
      <dc:date>2019-12-18T15:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: Where are Coincident Constraints saved?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/where-are-coincident-constraints-saved/m-p/9222650#M13014</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2019 17:41:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/where-are-coincident-constraints-saved/m-p/9222650#M13014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-28T17:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Where are Coincident Constraints saved?</title>
      <link>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/where-are-coincident-constraints-saved/m-p/9222661#M13015</link>
      <description>&lt;P&gt;Here's a bit more info. Internally, there aren't coincident constraints to tie the end points of entities together. The UI makes it appear that way but it's a strictly for the UI. Actually the curves share the same sketch point and that's what ties them together. When you add a coincident constraint to connect two entities, Fusion is really adjusting the entities so the share a single point. If you delete the coincident constraint tying two entities together, Fusion is creating a new sketch point and changing one of the entities to use this new point so the are no longer associated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Dec 2019 17:56:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/where-are-coincident-constraints-saved/m-p/9222661#M13015</guid>
      <dc:creator>BrianEkins</dc:creator>
      <dc:date>2019-12-28T17:56:51Z</dc:date>
    </item>
  </channel>
</rss>

