Comments (15)
Is there are way to hard-code this dependency?
from pythonocc-generator.
@tpaviot Fixed this in the generator. Just need a regeneration.
from pythonocc-generator.
@rainman110 I'm not comfortable with this fix. The issue is that the BRepAlgoAPI_Algo
class has 2 ancestors, and is skipped by the wrapper. I prefer thinking about a fix related to multiple inheritance.
from pythonocc-generator.
Sure... I prefer also a more general solution
from pythonocc-generator.
What about this: The main issue wrt to multiple inheritance is to get the "right" order.
From a computer scientist point of view, the dependencies form a directed acyclic graph (DAG). What we need then, is a topological sort of this dag such that a class is defined before it is referenced first.
Instead of sorting on our own, we can use something like this:
https://pypi.org/project/toposort/
from pythonocc-generator.
I have made a working proof of concept!
from pythonocc-generator.
@rainman110 Something similar is already implemented in the generator. No "DAG" or "topological sort" but a kind of. It's in the build_inheritance_tree
see https://github.com/tpaviot/pythonocc-generator/blob/master/src/generate_wrapper.py#L1212
from pythonocc-generator.
I have seen it already! This is limited on single inheritance though, right? I replaced most of this code with toposort and it works really nice.
from pythonocc-generator.
I also have a fix, adding only a few more lines. If we can do the same without any additional dependency, it's better.
from pythonocc-generator.
No problem. I found a new problem though in the cppparser itself. It cannot parse correctly the class BOPTools_BoxSelector
due to the list in the template arguments.
I opened up an issue at CppHeaderParser:
robotpy/robotpy-cppheaderparser#27
from pythonocc-generator.
opencascade mostly uses single inheritance, only about ten to twenty classes have 2 ancestors.
from pythonocc-generator.
I applied the fix, regenerating the swig files, compilation is building. I'll push when I'm sure everythong compiles
from pythonocc-generator.
interface files were also updated
from pythonocc-generator.
@rainman110 I see the issue you opened on the robotpy/cppheaderparser repository, good point. It's a good news that this package was forked and is maintained by another dev team. Although it suffers from many drawbacks and lacks, it's currently the best tool I found to be used by the pythonocc generator. I started with gccxml 10 years ago, it was more than one hour to parse every occ headers. Now it's only 20s on my machine. That's the most important point : be quick. There are so many generation/compilation necessary when updating to another occ release, that's it's simply undoable without such a fast tool.
from pythonocc-generator.
Is fixed by b979afb
from pythonocc-generator.
Related Issues (20)
- Improvement: Make runtime issues to compile time errors HOT 1
- OCCT 7.4.0: Missing package XCAFNoteObjects HOT 1
- OCCT 7.4.0: Missing package IGESToBRep
- Bug: Wrong position of %wrap_handle HOT 7
- OCCT 7.4.0: Missing package MoniTool HOT 1
- OCCT 7.4.0: Missing package IMeshTools and IMeshData HOT 1
- OCCT 7.4.0: No handle detected for class BRepMesh_DataStructureOfDelaun HOT 2
- OCCT 7.4.0: No handle detected for class BRepMesh_VertexTool HOT 2
- Update correct module dependecies HOT 11
- Missing TopoDS_Shape constructor HOT 3
- OCCT 7.4.0: BRepMesh_Delaun.hxx must be first BRepMesh header file HOT 9
- OCCT 7.4.0: Fix windows compilation again HOT 1
- Remove operating system header information in wrapper files HOT 1
- OCCT 7.4.0: Missing function TDF_Labl::FindAttribute
- OCCT 7.4.0: TDF_Tool is empty HOT 1
- Make a clean wrapper for Standard_OStream&
- Reuse potential HOT 1
- Bindings for OCCT 7.6 HOT 17
- C# Generator HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pythonocc-generator.