Distance From a Point to a Segment

Distance from a point to a segment is a distance dimension that includes three points, where two points define a line segment, and from it the distance to the third point is measured. This dimension is created by the

constraint_item GCE_AddDistancePLs(GCE_system gSys, geom_item p[3]
                                                  , const GCE_dim_pars & dPars).

The specific feature of this constraint is that the segment length should be non-zero. It means that the distance dimension would stop working if the two points defining the segment would coincide. The dimension can be applied when it is required to define the distance dimension only based on points, without any linear object. However, when it is not needed, it is recommended to use the GCE_AddDistance() function, which would be sufficient to create almost all variants of distance dimensions.