Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more examples #10

Open
Tim-Evans-Seequent opened this issue Jun 25, 2024 · 3 comments
Open

Add more examples #10

Tim-Evans-Seequent opened this issue Jun 25, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Tim-Evans-Seequent
Copy link
Contributor

Tim-Evans-Seequent commented Jun 25, 2024

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 with examples/example2/main.rs and examples/example2/example2.omf along with any input data.

Update the examples/README.md to provide a brief description of each example.

@Tim-Evans-Seequent Tim-Evans-Seequent added good first issue Good for newcomers help wanted Extra attention is needed documentation Improvements or additions to documentation labels Jun 25, 2024
@m-sb
Copy link

m-sb commented Nov 12, 2024

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

@Tim-Evans-Seequent
Copy link
Contributor Author

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.

@m-sb
Copy link

m-sb commented Nov 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants