opencascade-rs icon indicating copy to clipboard operation
opencascade-rs copied to clipboard

Convert from opencascade native types to wrapper types

Open TomiS opened this issue 2 years ago • 1 comments

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?

TomiS avatar Aug 23 '23 11:08 TomiS

@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.

bschwind avatar Aug 26 '23 05:08 bschwind