Comments (11)
Great work, very interesting. What do you exactly call a "correct dependency", i.e. how did you build this oriented graph ? Indeed, according to the definition, one can consider that Standard depends upon TCollection and TCollection depends on Standard as well, which is not the case in your document, and which create circular dependencies between python modules.
from pythonocc-generator.
These are the minimum requirements how to make handles work correctly. I figured it out as written in some of the other issues. In practice, I simply added dependencies until I could compile everything.
So, if there occurs a Handle(geom...), the geom model is obviously required.
I did not look for circular dependencies though. Also did not try get to load modules. These are the minimum requirements to make everything compile.
from pythonocc-generator.
So... There are definitely some circular dependencies making problems. The question is, how to untie them.
from pythonocc-generator.
The smallest cycles are (In opencascade, they all belong to the same toolkit/dll):
import Graphic3d
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/localdata1/sigg_ma/src/pythonocc-core/buildocct740/OCC/Core/Graphic3d.py", line 156, in <module>
import OCC.Core.Select3D
File "/localdata1/sigg_ma/src/pythonocc-core/buildocct740/OCC/Core/Select3D.py", line 158, in <module>
import OCC.Core.SelectMgr
File "/localdata1/sigg_ma/src/pythonocc-core/buildocct740/OCC/Core/SelectMgr.py", line 161, in <module>
import OCC.Core.PrsMgr
File "/localdata1/sigg_ma/src/pythonocc-core/buildocct740/OCC/Core/PrsMgr.py", line 162, in <module>
import OCC.Core.Prs3d
File "/localdata1/sigg_ma/src/pythonocc-core/buildocct740/OCC/Core/Prs3d.py", line 163, in <module>
import OCC.Core.V3d
File "/localdata1/sigg_ma/src/pythonocc-core/buildocct740/OCC/Core/V3d.py", line 357, in <module>
class V3d_AmbientLight(OCC.Core.Graphic3d.Graphic3d_CLight):
AttributeError: module 'OCC.Core' has no attribute 'Graphic3d'
and
StepRepr
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/localdata1/sigg_ma/src/pythonocc-core/buildocct740/OCC/Core/StepRepr.py", line 150, in <module>
import OCC.Core.StepShape
File "/localdata1/sigg_ma/src/pythonocc-core/buildocct740/OCC/Core/StepShape.py", line 144, in <module>
import OCC.Core.StepGeom
File "/localdata1/sigg_ma/src/pythonocc-core/buildocct740/OCC/Core/StepGeom.py", line 1096, in <module>
class StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx(OCC.Core.StepRepr.StepRepr_RepresentationContext):
AttributeError: module 'OCC.Core' has no attribute 'StepRepr'
from pythonocc-generator.
- In the first case, the best way to resolve the cycle is to drop the dependency of graphic3d from select3d. there are just two functions involved.
from pythonocc-generator.
Yesterday, I tried something : removing all imports from Graphic3d (at the end of the interface file, all the import Something.i). Of course it works and break the circular references between all these packages. I will try your suggestion. If it's ok, then let's go that way.
On the midterm, if circular references become a stronger issue, it may become necessary to create a single GraphicStuff.i interface file including all of the Graphic3d, PrsMgr, Select3d etc. definitions.
from pythonocc-generator.
@rainman110 btw, what's the code to draw the graph ? I guess you've been using networkx but I didn't practice this package for a while
from pythonocc-generator.
@tpaviot No, used used the dot tool. It's standard on linux/maxOS. You can directly throw in the dependencies.txt into the tool.
from pythonocc-generator.
If we remove the class StepRepr_ReprItemAndMeasureWithUnitAndQRI
we solve the circular dependency as well.
from pythonocc-generator.
Tested with Graphic3d. I pushed a change to the generator and updated interfaces files as well see
from pythonocc-generator.
Fixed
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
- 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
- OCCT 7.4.0: BRepAlgoAPI must import BRepBuilderAPI HOT 15
- 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.