adg: add geometry handling to AdgDim
Add new internal methods to help the relocation of geometry behavior
into AdgDim in view of the planned a change of behavior on the geometry
computation.
Actually when a point is missing or when two points that must be
differents are coincidents the entity is not rendered but in the former
case it is done silently while in the latter case a warning is issued.
This is not consistent and implicates code duplication. Worse, the
caller has no easy way to know if the dimension has been rendered.
The new behavior will be to always be silent and to provide a way to
inspect if the dimension is valid before the rendering, allowing to do
some code similar to the following one:
dim = <create new dimension>
if dim:compute_geometry() then
-- The dimension is valid: render it
canvas:add(dim)
else
print('Dimension not valid: ', dim:get_geometry_notice())
end