Skip to main content
Question

Convert a point line


Forum|alt.badge.img+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

nielsgerrits
VIP
Forum|alt.badge.img+54

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.


Forum|alt.badge.img+1
  • Author
  • May 3, 2021

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


nielsgerrits
VIP
Forum|alt.badge.img+54
sej wrote:

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">


Forum|alt.badge.img+1
  • Author
  • May 4, 2021

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


nielsgerrits
VIP
Forum|alt.badge.img+54

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings