Hi All,

I'm not sure if this has been debated previously, but I would very much
like the pythonOCC wrappers to rename OCC class so as to remove the
package prefix from the name.

I am not fond of the lazy import syntax i.e.
        
        from OCC.BRep import *
        blah = BRep_Builder(...)
        
One problem with this is the name-space pollution hinders things like
IDE auto_completion (you get too many options). This makes coding with
OCC just little less pleasant than it could be.
        
I usually use

        from OCC import BRep
        blah = BRep.BRep_Builder(...)
        
but the IDE auto-completion is still hindered, since everything in BRep
begins with the same prefix, and it's somewhat more typing.

I'd much prefer:

        from OCC import BRep
        blah = BRep.Builder(...)
        etc.
        
I think it should be possible to mod the SWIG_generator script to
include a %rename directive for each class, to achieve this.

Obviously, this would break all existing code, but I think long-term it
is worth it. If this is to happen at all, it needs to happen ASAP.

I'm will attempt to produce a patch for this myself and fix up as many
of the examples as I can, but if the consensus is against the change,
then I won't pursue this any further.

What do you all think?

Bryan C



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

Reply via email to