Hi all,
I’m looking for a lisp routine (or a patch example) that would perform the extraction of a segment in a 3dc between some specified and values and also between some and values, in a very similar way to how bpf-extract works. Does anybody have an idea about how to do it? Thanks for your concern.
Best,
Francesco Vitale
Hi Francesco. You can get the list of (z y z) from the 3DC using the POINT-PAIRS function.
(or build it joining the x, y and z values then using MAT-TRANS, for instance).
Once you have this list, you can select the points in a given range using LIST-FILTER.
Create a patch and use it as “test” argument for this function, specifying the condition for keeping points in the results (in your case, X > x1 AND x < x2 AND z > z1 AND z < z2).
Split the result of LIST-FILER back into x, y and z lists using MAT-TRANS and use these new lists to create a new 3DC.
I hope this helps:)
Jean
Hi Jean,
I’ll try your solution as soon as possible. Thanks for your always enlightening support.
Best,
Francesco
Dear Jean,
as far as I can see, the list-filter approach has one big inconvenient: the 3DC is not returned at the x1-x2 and z1-z2 bounds, but at the closest values to these bounds as they are found in the list. If the 3DC is not heavily sampled (and that affects the computation), the 3DC returned is very imprecise. Is there another approach that really does what bpf-extract can do?
Best,
Francesco
Dear Jean,
I’ve realized that I don’t need to use list-filter: all I’d need is a band-filter that includes in its output also the specified min and the max bounds. Now, the band-filter in OM returns only the values between the bounds, excluding the bounds themselves: what should be changed in this function in order to return also the min and max values?
Best,
Francesco
it is difficult because the min and max bounds are not in the BPC so a number of interpolations are required.
you can try to interpolate the points yourself and append them at the beginning and end of the returned BPC points maybe…