You can access the Wrappers project by cloning the Hg repository:
This shows step by step how to generate wrappers on a clean OpenCascade installation
Step 1. Open OCWrappersExt.sln and build it,
Step 2. Go to ProjectProperties->ConfigurationProperties->Debugging->CommandArguments
and add the packages to generate from (a sample can be seen in OCWrappersExt.bat).
Ex:
-cppext -cppdir out -cdldir c:\OpenCASCADE6.3.0\win32\ros\src\ Standard MMgt TCollection Quantity TColgp TColStd Message gp TopLoc GeomAbs Geom Bnd TShort TColQuantity SortTools Resource Aspect Viewer OSD MFT PlotMgt Image Graphic2d Xw WNT AlienImage Graphic3d Visual3d V2d V3d TopAbs TopoDS Geom2d StdFail math Adaptor2d Adaptor3d Geom2dAdaptor Precision GeomAdaptor BRepAdaptor CPnts GCPnts TopTools TopExp Intrv TopBas TopTrans TopCnx IntRes2d IntAna2d IntAna Intf IntImp IntSurf IntCurveSurface HLRAlgo MeshDS MeshShape MeshAlgo Poly Prs3d PrsMgr SelectBasics Select2D Select3D SelectMgr StdSelect DsgPrs AIS BRep LProp BRepLProp BRepTools Geom2dLProp GProp TColGeom2d PLib AdvApprox GeomLProp LProp3d AdvApp2Var FEmTool AppParCurves AppCont Approx AppDef BndLib Extrema gce GC GCE2d Convert Geom2dConvert TColGeom GeomConvert GeomLib GeomProjLib GeomTools Hermit ProjLib MeshVS CGM PS Prs2d AIS2D GGraphic2d BRepLib BRepBuilderAPI Primitives BRepPrim Sweep BRepSweep BRepPrimAPI IntImpParGen IntCurve Geom2dInt TopClass BRepClass CSLib BRepTopAdaptor IntStart IntWalk IntPatch BRepIntCurveSurface IntCurvesFace BRepClass3d TopOpeBRepTool TopOpeBRepDS TopOpeBRep TopOpeBRepBuild BOPTColStd BooleanOperations GeomAPI IntTools BOPTools BOP BRepAlgo BRepAlgoAPI Law Draft BRepOffset MAT GccInt Bisector AppBlend GeomFill MAT2d BRepMAT2d ElSLib Plate GeomPlate BRepFill BRepOffsetAPI Blend BlendFunc BRepBlend ChFi2d ChFiDS ChFi3d BRepFilletAPI ChFiKPart FilletSurf PStandard PMMgt DBC PCollection PColStd PTColStd TDF Storage CDM PCDM PDF MDF CDF TDocStd TNaming TDataStd AppStdL AppStd TPrsStd TFunction
or
-cppext -cppdir out -cdldir c:\OpenCASCADE6.3.0\ros\src\ Standard MMgt TCollection TColStd gp
Step 3. Execute
Step 4. Encountered the first error:
Error : File not found : c:\OpenCASCADE6.3.0\win32\ros\src\MeshShape/MeshShape_ListOfMeshVertex.cdl
In order to solve the error we go to the C:\OpenCascade6.3.0\win32\ros\src\MeshShapeMeshShape.cdl
There we find the section:
generic class UV, Delaun,
ListOfMeshVertex, DataMapOfVertexInteger, DataMapOfEdgePolygon,
DataMapOfIntegerFace, StripIterator;
the cdl files for these are missing do we comment them
generic class UV, Delaun,
— ListOfMeshVertex, DataMapOfVertexInteger, DataMapOfEdgePolygon,
— DataMapOfIntegerFace, StripIterator;
! the modified file exists in wrappersWrapperGeneratorOCWrappersExtmodification
so you can just overwrite the file with that one
Step 5. Execute again
Step 6. Encountered error:
Error : File not found : c:\OpenCASCADE6.3.0\win32\ros\src\AppParCurves/AppParCurves_MyCriterion.cdl
Same solution as the point 4, open AppParCurves.cdl, comment the code for the missing cdl file:
— class MyCriterion;
—Level: Internal
! the modified file exists in wrappers\WrapperGenerator\OCWrappersExt\modification
so you can just overwrite the file with that one
Step 7. Execute again and files generated successfully in the out directory!
Let’s assume that we want now to add some new packages like ShapeUpgrade and ShapeFix
Step 8. We add: “ShapeUpgrade ShapeFix” at the end of the list but before generating we also open their corresponding cdl files to see their dependencies
ShapeUpgrade.cdl depends on:
uses
gp,
Geom,
Geom2d,
GeomAbs,
Adaptor3d,
GeomAdaptor,
Geom2dAPI,
TopLoc,
TColStd,
TColGeom,
TColGeom2d,
TCollection,
TopoDS,
TopTools,
TopAbs,
ShapeExtend,
ShapeBuild,
ShapeAnalysis,
BRepBuilderAPI
So we have to check in the list if all these files are included, if not they are added and also their dependencies
We add these at the end of our package list from Step 2 and run again the generator
Step 9. Files generated successfully. We copy the 7 new generated folders in the “out” folder to the wrappers folders add them to the solution.
Next step is building and solving compiling errors.
Please look at the SolutionsToBuildErrors.txt for solutions at the errors received