API checking for bad mates.

Discussion in 'SolidWorks' started by kellnerp, Feb 1, 2004.

  1. kellnerp

    kellnerp Guest

    Is there a way in the API to check for bad mates? I looked in help and
    couldn't find anything.
     
    kellnerp, Feb 1, 2004
    #1
  2. Remember that a Mate is a Feature : Feature::GetErrorCode is what you're
    looking for.
    Check www.cadml.org for tools that represent assembly structures as graphs,
    with errors in red.

    Just had an idea! When you add a mate that overconstrains the assembly, many
    mates go to red. The Feature:DateModified API could be used to know which
    was changed last and display it as the probable cause of the trouble... Will
    do this ASAP...
     
    Philippe Guglielmetti, Feb 2, 2004
    #2
  3. kellnerp

    kellnerp Guest

    Thanks Philippe.

    The one drawback I see to using this is in a large assembly. Wouldn't it
    require a traversal of the entire feature tree in each check?

    DateModified might show the last problem, but I am going to be looking at
    assemblies that may not be as "fresh" and that may have mates that seem to
    have gone bad on their own earlier in the feature tree.
     
    kellnerp, Feb 2, 2004
    #3
  4. Structure traversal is quite fast.... and multiple copies of a subassembly
    could be traversed only once..-.
    Do you have a better idea ? I've been rading and thinking for quite long now
    about constraint graphs... If you plan to find the smallest set of mates
    that must be deleted to remove overconstraints without modifying the dofs of
    any part, then:
    1) I wish you good luck, it is a tough problem (you must consider the
    geometry of the mates too...)
    2) if you have money to spend on this, I can help you ;-)
     
    Philippe Guglielmetti, Feb 2, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.