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

Convert from opencascade native types to wrapper types #127

Open
TomiS opened this issue Aug 23, 2023 · 1 comment
Open

Convert from opencascade native types to wrapper types #127

TomiS opened this issue Aug 23, 2023 · 1 comment

Comments

@TomiS
Copy link

TomiS commented Aug 23, 2023

At the moment most types are defined like this:

pub struct Shape {
    pub(crate) inner: UniquePtr<ffi::TopoDS_Shape>,
}

I think it might be useful to be able to use the low level ffi directly and then convert the result to Shape (or Edge or whatever) somehow. I didn't find any way to do it because the inner field is defined as public only on crate level. Am I missing something?

@bschwind
Copy link
Owner

@TomiS what sort of code are you writing where you would want this?

We could probably just expose the field via a getter, though the point of the higher level wrapper is to avoid having to use the ffi types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants