> I think there's a lot to be done for OCAF.

Absolutely.
The API though doesnt seem to have share the coherence of the BRep*  
API though, which is a pity.
I agree that we need to focus on OCAF, since it'll provide true rapid  
prototyping capabilities for pythonOCC.

> If I can understand the
> wrapper creation process, I'll hopefully be able to contribute to the
> wrappers myself.

Great, I'm very pleased to hear so!
Thinking of that; we should probably document the wrapping process,  
such that developers like yourself can contribute.

> I've hit a new blocker: I can extract attributes as TDF_Attribute
> instances. Even when I can identify the underlying attribute class via
> it's GUID, I don't know how to "downcast" the attribute to it's  
> concrete
> type, so I can access it's type-specific methods.

I'm sorry; for the moment it looks like *you* are the OCAF expert  
Bryan ;')
Its largely unchartered territory for myself too.
Have you grepped through the MFC OCAF sample program?

> Sorry to disappoint you. I didn't *actually* do this, but was  
> "wondering
> out loud" if an approach like this would work. I googled a bit on SWIG
> and ctypes, since it seems like there ought to be a way to construct
> pointers which SWIG will accept, using ctypes objects, but I couldn't
> find anything.

Right, though that would be a hideous way to tackle the problem.
I was just curious if you actually did that ;')

> Hacking round swig pointers isn't a practical approach except as a
> tempory workaround to experiment with OCAF functionality. The right
> approach is to "fix" the wrappers.

_definitely_

> For Standard_GUID, there is another method: can convert them to a  
> tuple
> suitable for hashing with -
>
> def GID2Tuple(gid):
>    return (gid._CSFDB_GetStandard_GUIDmy32b(),
>            gid._CSFDB_GetStandard_GUIDmy16b1(),
>            gid._CSFDB_GetStandard_GUIDmy16b2(),
>            gid._CSFDB_GetStandard_GUIDmy16b3(),
>            gid._CSFDB_GetStandard_GUIDmy8b1(),
>            gid._CSFDB_GetStandard_GUIDmy8b2(),
>            gid._CSFDB_GetStandard_GUIDmy8b3(),
>            gid._CSFDB_GetStandard_GUIDmy8b4(),
>            gid._CSFDB_GetStandard_GUIDmy8b5(),
>            gid._CSFDB_GetStandard_GUIDmy8b6())
>
> Ugly, but it seems to work.

That _sure_ is ugly... you're right, looks like we got quite a bit of  
work on our hands with OCAF.
Many thanks for reporting these issues.
I hope Thomas is able to give you a few pointers regarding polishing  
the SWIG .i interface files.
That way you can work around it before we do ;')

> I have a some experience with SWIG, but I've never used pygcc_xml. It
> would be useful if Thomas could briefly describe the approach he's
> taking in making the wrappers. In particular, assuming pygcc_xml can
> construct .i files covering the common cases, how do you handle  
> special
> cases? Do you just added a few manually created .i files?

Thomas? Would you care to fill Bryan in?


Cheers,

-jelle




_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to