Constrained condition in shapes

Hi Everyone!

I want to set the constrained conditions in shapes ( like two circles concentric or two faces tangent .etc). The features are like the mate in Solidworks in an assembly environment.

I find the OCC document that there are some functions and keywords about that(TDataXtd_Constraint, TDataXtd_ConstraintEnum) but I don't know how to use it.


Does anyone have the experience of setting constrained conditions in shapes?

If you have any advice please let me know. Thanks.

Mikhail MPV's picture

  Hi Brian,

OCCT allows to store a wide range of constraints and dimensions in a data model or visualize them in 3D viewer (see PrsDim package), but it contains no constraints solver inside. So, if you need to move objects in accordance to applied constraints, you need to compute it in a custom way, perhaps, using OCCT algorithmic methods or some external solver.

You may take a look how it is done in SALOME/SHAPER, CAD Builder or FreeCAD.


Brian Lin's picture

Thanks for your advice, Mikhail.

I will look at the FreeCAD and CAD Builder on how to reach that feature.

Thanks again!