Manually creating a curved connector

Hi,

I’m trying to manually build a curved connector.

I built, using Visio, a .vsdx that contains 2 shapes and a curved connector. I then opened this .vsdx in Aspose took the data from the curved connector and tried building another one using exactly the same data.

Firstly, I tried this using the exact objects used in the original geom of the connector. I then to build the same .vsdx passing all the values of the original geom (for instance, newMoveTo.getX().setValue(originalMoveTo.getX().getValue() ).
Using the first method I managed to properly build the curved connector, but the second method failed.

I attached my experiment: the originally created Visio, my stencil, my Java code and the results I got.

ManualCurvedConnector.zip (223.9 KB)

@dragos.petrescu,
Thank you for the details. You are generating two VSDX drawings and connecting shapes with a single curved line. In your first scenario, you managed to properly build the curved connector. The code of the second scenario is different than the code of your first scenario. Are you seeking to build a curved line in some different way? If so, then kindly send an expected VSDX drawing. We will investigate and share our findings with you. Your response is awaited.

Best Regards,
Imran Rafique

Hi,

In the second scenario I am trying to obtain exactly same result as in the first scenario but using a different method.
As you were able to see in my code snippet, I took all the info from the original VSDX and, using it, created identical objects which I then passed to the connector’s geom.
Using this method my result was different from what i obtained using the first method (passing the objects rather than creating new ones with the exactly same data).

Is there something wrong in my code? What is the reason for which, by building equal objects (MoveTo, NURBSTo and LineTo), I obtain a different result from the first scenario?

I attached the expected and obtained pictures.

expected.png (2.6 KB)
obtained.png (4.0 KB)

@dragos.petrescu,
We can see additional entries in the geometric section of the problematic connecting line. It has been logged under the ticket ID DIAGRAMJAVA-50534 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

Best Regards,
Imran Rafique

@dragos.petrescu,
In reference to the ticket ID DIAGRAMJAVA-50534, the del property of LineTo of the connector shape in the sample drawing is set to bool true. Please try the following lines of code:

[Java]

newConnector2.getGeoms().get(0).getCoordinateCol().clear();

MoveTo move = new MoveTo();
move.getX().setValue(originalMoveTo.getX().getValue());
move.getY().setValue(originalMoveTo.getY().getValue());
move.setIX(1);
newConnector2.getGeoms().get(0).getCoordinateCol().add(move);

NURBSTo nurbsto = new NURBSTo();
nurbsto.getX().setValue(originalNurbsTo.getX().getValue());
nurbsto.getY().setValue(originalNurbsTo.getY().getValue());
nurbsto.getA().setValue(originalNurbsTo.getA().getValue());
nurbsto.getB().setValue(originalNurbsTo.getB().getValue());
nurbsto.getC().setValue(originalNurbsTo.getC().getValue());
nurbsto.getD().setValue(originalNurbsTo.getD().getValue());
nurbsto.getE().setValue(originalNurbsTo.getE().getValue());
nurbsto.setIX(2);
newConnector2.getGeoms().get(0).getCoordinateCol().add(nurbsto);

LineTo line = new LineTo();
line.getX().setValue(originalLineTo.getX().getValue());
line.getY().setValue(originalLineTo.getY().getValue());
line.setIX(3);
line.setDel(BOOL.TRUE);
newConnector2.getGeoms().get(0).getCoordinateCol().add(line);

Best Regards,
Imran Rafique