Section Constraints
 
Functions Introduced:
ProSectionConstraintsIdsGet()
ProSectionConstraintsGet()
ProSectionConstraintDeny()
ProSectionConstraintCreate()
ProSectionConstraintDelete()
The function ProSectionConstraintsIdsGet() returns an array of section constraint identifiers that currently exist in the specified section.
Note:
 
You must solve the section first by calling the function ProSectionSolve() to get the section constraints. Because adding or deleting section entities might invalidate the current list of section constraint identifiers, you must solve the section again to get the up-to-date list.
If a section has not been fully dimensioned with dimensions created explicitly by the user, the Sketcher will make assumptions in order to solve the section. If the Sketcher can assume enough constraints to find a unique solution to the section, it solves the section successfully.
However, you might want to disable certain Sketcher constraints to have more control over the way the section is dimensioned and solved. To do this, use the function ProSectionConstraintDeny() to deny a certain section constraint.
Note:
 
The function ProSectionConstraintDeny() is not supported for sections that have the Intent Manager property set to ON.
The function ProSectionConstraintsGet() returns information about the specified section constraint. It takes as input the section handle and the constraint identifier for which the information is requested. The function returns details about the section constraint including its type, status, and references. The constraint types are defined in the include file ProSecConstr.h. The following table lists the possible constraint types.
Constraint Type
Description
PRO_CONSTRAINT_SAME_POINT
Make the points coincident.
PRO_CONSTRAINT_HORIZONTAL_ENT
Make the entity horizontal.
PRO_CONSTRAINT_VERTICAL_ENT
Make the entity vertical.
PRO_CONSTRAINT_PNT_ON_ENT
Place the point on the entity.
PRO_CONSTRAINT_TANGENT_ENTS
Make the entities tangent.
PRO_CONSTRAINT_ORTHOG_ENTS
Make the entities perpendicular.
PRO_CONSTRAINT_EQUAL_RADII
Make the arcs or circles of equal radius.
PRO_CONSTRAINT_PARALLEL_ENTS
Make the entities parallel.
PRO_CONSTRAINT_EQUAL_SEGMENTS
Make the segments of equal length.
PRO_CONSTRAINT_COLLINEAR_LINES
Make lines co-linear.
PRO_CONSTRAINT_90_ARC
Make the arcs 90 degrees.
PRO_CONSTRAINT_180_ARC
Make the arcs 180 degrees.
PRO_CONSTRAINT_HORIZONTAL_ARC
Make the arcs horizontal.
PRO_CONSTRAINT_VERTICAL_ARC
Make the arcs vertical.
PRO_CONSTRAINT_SYMMETRY
Impose symmetry.
PRO_CONSTRAINT_SAME_COORD
Assume the endpoints and centers of arcs to have the same coordinates.
The possible types of constraint status are as follows:
PRO_TK_CONSTRAINT_DENIED—The constraint is denied. This gives you more control over the section.
PRO_TK_CONSTRAINT_ENABLED—The constraint is enabled. The Sketcher uses the predefined assumption.
Use the function ProSectionConstraintCreate() to create constraints between entities in the specified section. Use the function ProSectionConstraintDelete() to delete the specified section constraint.
Note:
 
The function ProSectionConstraintCreate() works only if the Intent Manager property of the specified section is set to ON.
這是否有幫助?