Skip to main content
Question

Looping custom transformer


Hi,

I need to design the following process:

1. I move the object to a specific point (x, y)

2. I check if it fits in another training ground

3. generate another object with offset (dx)

 

I repeat steps until dx <1.01

 

I did it like this:

 

 

When I created the loops I got a message

 

So I click YES and create custom transformer:

 

But when I start the process I don't get the result from the loop...

 

Does anyone know the easier way? or knows what I have to change?

6 replies

oscarwillems
Contributor
Forum|alt.badge.img+13

This happens because you have a blocking transformer in your loop: the SpatialFilter. This transformer stocks al incoming points from your offsettter and waits for all of them to collect, hence blocking it.

You must make this SpatialFilter non-blocking, and you can do this by making sure the filter features arrive first. You can ensure this by having the reader for your filter be on top in your navigator (so it reads it first).

Then you can configure your SpatialFilter als "filters first" and have it be non-blocking for each candidate that enters (and loops).


  • Author
  • June 30, 2020
oscarwillems wrote:

This happens because you have a blocking transformer in your loop: the SpatialFilter. This transformer stocks al incoming points from your offsettter and waits for all of them to collect, hence blocking it.

You must make this SpatialFilter non-blocking, and you can do this by making sure the filter features arrive first. You can ensure this by having the reader for your filter be on top in your navigator (so it reads it first).

Then you can configure your SpatialFilter als "filters first" and have it be non-blocking for each candidate that enters (and loops).

Can you show me where I have to change it?


daraghatsafe
Forum|alt.badge.img
tk_st wrote:

Can you show me where I have to change it?

Hi @tk_st, on the Navigator panel on the left-hand side of your screen you should see the readers at the top of this panel simply click on the reader which you would like to process first and drag it to the top of the panel. ReorderReaders.gif


Forum|alt.badge.img
oscarwillems wrote:

This happens because you have a blocking transformer in your loop: the SpatialFilter. This transformer stocks al incoming points from your offsettter and waits for all of them to collect, hence blocking it.

You must make this SpatialFilter non-blocking, and you can do this by making sure the filter features arrive first. You can ensure this by having the reader for your filter be on top in your navigator (so it reads it first).

Then you can configure your SpatialFilter als "filters first" and have it be non-blocking for each candidate that enters (and loops).

With a NeighborFinder is the same process?


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • July 8, 2020
rodrigo_ferrao wrote:

With a NeighborFinder is the same process?

Hi @rodrigo_ferrao,

 

Correct, the NeighborFinder is also a Group-Based transformer so it will behave similarly when the blocking mode is set to Process at End (Blocking).

You can learn more about the Group By More Parameter in the Advanced Training.


Forum|alt.badge.img
chrisatsafe wrote:

Hi @rodrigo_ferrao,

 

Correct, the NeighborFinder is also a Group-Based transformer so it will behave similarly when the blocking mode is set to Process at End (Blocking).

You can learn more about the Group By More Parameter in the Advanced Training.

I am stucked in looping with a feature merger and a neighboorfinder. I tried the idea with no loop and it works perfect, but I need to use about 50 neighbootfinder, so I am trying to loop, but it starts to run infinitily


Reply


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