Open Tim-Evans-Seequent opened 4 months ago
Hi, I am working with blockmodels. So can I get reading writing examples for basic type of blockodels in c/cpp language?
Actually, I stuck to iterate loop on subblock. If anyone can add that code. That will be helpful.
Thanks in advance
For right now, there is a small example of writing block models, with both regular and free-form sub-blocks, in geometries.c. For reading you would need to translate from the Rust example in bunny_blocks.
Thanks,
@Tim-Evans-Seequent
that is what I am saying. Actually I went through this example, but my bad. I am not able to convert that rust code to cpp code. specially for iterator.
Could you please share the cpp subblock iterator code.
Does following code OK:
OmfArrayInfo info = omf_reader_array_info(reader, omfArr);
assert(info.array_type == OMF_ARRAY_TYPE_REGULAR_SUBBLOCKS);
OmfRegularSubblocks* iter = omf_reader_array_regular_subblocks_iter(reader, omfArr);
while (omf_regular_subblocks_next(iter, parent, corner)) {
//business logic
}
Thanks in advance.
It would be useful to have a few different examples of real mining data in OMF2 files. Code to write and read the files can be included as well, but isn't necessary.
Example files on their own can be placed into
examples/example1.omf
for example. If they come with Rust code then put them into a subfolder withexamples/example2/main.rs
andexamples/example2/example2.omf
along with any input data.Update the
examples/README.md
to provide a brief description of each example.