Question

Convert a point line


Badge +1

Hello,

I work with autocad and FME 2016, I transform a point type block defined by its name, insert point, x scale and y scale as well as its rotation The attributes are contained in the point, the lines in this block are only skin.

point vers ligne I want to convert this point to a line with only 2 vertices, with the insert point as the first point and the second point defined by the x and y scale + rotation. I'm stuck because I don't see how to do it. Thanks for your help


5 replies

Userlevel 6
Badge +32

Use a CoordinateExtractor to extract the current x,y. Then add a point with a VertexCreator/2DPointAdder, X = _x, Y = @Value(_y)+10 (or another value for the length). Then rotate using the Rotator and the original _x, _y.

Badge +1

In the 2016 version I don't have 2dpointadder. I use coordinateextractor then vertexCreator and offstter. But I can't connect the 2 dots

Userlevel 6
Badge +32

In the 2016 version I don't have 2dpointadder. I use coordinateextractor then vertexCreator and offstter. But I can't connect the 2 dots

Ah, wasn't sure if it was already renamed to VertexCreator in 2016. In the VertexCreator you can choose for "Add Point" instead of "Replace Point">

Badge +1

I managed to get 2 points but I cannot create the row knowing that the end result is only one row

Userlevel 6
Badge +32

Hej @sej, I have a hard time understanding your issue. If I get it correctly, you have a Point, as the block is a point, and you want to add another point to it, creating a line?

According to the 2016.1 VertexCreator documentation you can set the mode parameter to "Add point". So if you fill x and y, it will draw a line, from your original point, to the defined x and y. This way you don't have to create a separate point and connect them afterwards.

If you need to connect 2 points to a line you can do this with a LineBuilder / PointConnector. But then the point pairs need to have a common ID you can do a group by.

Reply