Constraints are used in an Assembly document to define the relationship between component occurrences. A constraint should never be over constrained but at times based on requirements, it might be under constrained. This Design supports Mate, Flush, Insert and Angle constraint.
InvObjectMixin
RULE NAME |
DESCRIPTION |
TYPE |
DEFAULTS |
CATEGORY |
FLAGS |
invSolution |
Specify the type of Constraint being created. The possible values are Mate, Flush, Insert and Angle. |
String |
"Mate"
|
Inventor |
Cached |
invPart1 |
Part or assembly for the first item. |
String |
"" |
Inventor |
Cached Parameter |
invPart2 |
Part or assembly for the second item. |
String |
"kNormalBOMStructure" |
Inventor |
Cached |
invNamedFeature1 |
Name of work feature or named entity from the first Part. |
String |
"" |
Inventor |
Cached Parameter |
invNamedFeature2 |
Name of work feature or named entity from the second Part. |
String |
"" |
Inventor |
Cached Parameter |
invAngle |
Angle in degrees between the two Parts. This is applicable for Angle constraint only. |
Number |
0 |
Inventor |
Cached Parameter |
invAngleOpposed |
If true, the component axes should point in opposite directions. |
Boolean |
true |
Inventor |
Cached Parameter |
invName |
Name of constraint displayed in Inventor browser. |
String |
"" |
Inventor |
Cached Parameter |
invOffset |
Offset distance between the planar entities. |
Number |
return 0.0; |
Inventor |
Cached Parameter |
invXData |
Data passed in here is stored as Inventor’s attributes on this object. Only string values can be stored and the structure is "[["AttSetName" ,["AttName","AttValue""]], ["AttSetName1" ,["AttName1","AttValue""]]…]" Where AttSetName = AttributeSet name AttName = Attribute name AttValue = Attribute value
Example: "[["myData" ,["County","Orange""]],["ExportPaths" , ["PartSheet", "C:\\temp\\cache\\Parts"]], [ "ExportPaths" , ["AssemblySheet", "C:\\temp\\cache\\Assemblies"]]" |
String |
"" |
Inventor |
Cached Parameter |
In your kBridge Examples Projects folder open the project called ‘Table_KB_Inventor_Example’.
Link:
https://knowledgebridge.engineer/projects
Reference Location:
"world.tableapplication1.tables.tables0.constraintangle.constraintangle0"
Example: The ConstraintAngle sets the angle of the book placed on the table.
Reference location:
"world.tableapplication1.tables.tables0.constraintflush.constraintflush0"
Example: The ConstraintFlush sets the elevation of the book.
Reference location:
"world.tableapplication1.tables.tables0.books.books0"
Example: To see the book on top of the table in kBridge Graphics, you need to add a formula to the books Parameter rule ‘Position’. Because you added constraints, in Inventor the constraints will overrule the ‘Position’ rule.
If you leave the Position rule empty the default will be { origin: p(0, 0, 0, this.parent.transform ) }. The book will be centered inside the table top and will not be visible unless you set the view to wireframe. Again, the book will show up in the correct location in Inventor because of the constraints.
Example rendered in Inventor: