diff --git a/src/SWIG_files/common/IOStream.i b/src/SWIG_files/common/IOStream.i index 961bc3823..c8ddd6249 100644 --- a/src/SWIG_files/common/IOStream.i +++ b/src/SWIG_files/common/IOStream.i @@ -22,14 +22,36 @@ along with pythonOCC. If not, see . %include %include -/* -Standard_OStream & function transformation -The float number is returned in the output tuple -*/ -%typemap(argout) Standard_OStream &OutValue { +// Standard_IStream +%typemap(in) std::istream& { + PyObject* temp_bytes = PyUnicode_AsEncodedString($input, "UTF-8", "strict"); + std::string data(PyBytes_AsString(temp_bytes)); + std::stringstream* ss = new std::stringstream(data); + $1 = ss; +} + +%typemap(freearg) std::istream& { + delete $1; +} + +// Standard_SStream +%typemap(in) std::stringstream & { + PyObject* temp_bytes = PyUnicode_AsEncodedString($input, "UTF-8", "strict"); + std::string data(PyBytes_AsString(temp_bytes)); + std::stringstream* ss = new std::stringstream(data); + $1 = ss; +} + +%typemap(freearg) std::stringstream & { + delete $1; +} + +%typemap(argout) std::ostream &OutValue { PyObject *o, *o2, *o3; - std::ostringstream *output = static_cast ($1); - o = PyString_FromString(output->str().c_str()); + + std::string str = ((std::stringstream*)$1)->str(); + o = PyUnicode_FromString(str.c_str()); + if ((!$result) || ($result == Py_None)) { $result = o; } else { @@ -47,16 +69,7 @@ The float number is returned in the output tuple } } -%typemap(in, numinputs=0) Standard_OStream &OutValue (std::ostringstream temp) { +%typemap(in, numinputs=0) std::ostream &OutValue (std::stringstream temp) { $1 = &temp; } -/* -Standard_IStream & function transformation -takes a string as input -*/ -%typemap(in) Standard_IStream & { - char * in = PyString_AsString($input); - std::istringstream ss(in); - $1 = &ss; -} diff --git a/src/SWIG_files/wrapper/AIS.i b/src/SWIG_files/wrapper/AIS.i index 12afa666b..b8258bb38 100644 --- a/src/SWIG_files/wrapper/AIS.i +++ b/src/SWIG_files/wrapper/AIS.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_ais.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -3252,10 +3253,22 @@ Returns standard_true if the hidden lines are to be drawn. by default the hidden Standard_Boolean DrawHiddenLine(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6245,10 +6258,22 @@ Each interactive object has methods which allow us to attribute an owner to it i void ClearOwner(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -15415,10 +15440,22 @@ Returns the color attributes of the shape accordingly to the current facing mode virtual void Color(Quantity_Color & aColor); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/AIS.pyi b/src/SWIG_files/wrapper/AIS.pyi index 5b53c5bcd..71e0f2aa7 100644 --- a/src/SWIG_files/wrapper/AIS.pyi +++ b/src/SWIG_files/wrapper/AIS.pyi @@ -571,6 +571,7 @@ class AIS_InteractiveContext(Standard_Transient): @overload def DisplayedObjects(self, theWhichKind: AIS_KindOfInteractive, theWhichSignature: int, theListOfIO: AIS_ListOfInteractive) -> None: ... def DrawHiddenLine(self) -> bool: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EnableDrawHiddenLine(self) -> None: ... @overload def EndImmediateDraw(self, theView: V3d_View) -> bool: ... @@ -792,6 +793,7 @@ class AIS_InteractiveContext(Standard_Transient): class AIS_InteractiveObject(SelectMgr_SelectableObject): def ClearOwner(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetContext(self) -> AIS_InteractiveContext: ... def GetOwner(self) -> Standard_Transient: ... def HasInteractiveContext(self) -> bool: ... @@ -1424,6 +1426,7 @@ class AIS_Shape(AIS_InteractiveObject): def AcceptShapeDecomposition(self) -> bool: ... def BoundingBox(self) -> Bnd_Box: ... def Color(self, aColor: Quantity_Color) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Material(self) -> Graphic3d_NameOfMaterial: ... def OwnDeviationAngle(self) -> Tuple[bool, float, float]: ... def OwnDeviationCoefficient(self) -> Tuple[bool, float, float]: ... diff --git a/src/SWIG_files/wrapper/APIHeaderSection.i b/src/SWIG_files/wrapper/APIHeaderSection.i index df5678406..c6d2631ba 100644 --- a/src/SWIG_files/wrapper/APIHeaderSection.i +++ b/src/SWIG_files/wrapper/APIHeaderSection.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_apiheadersection. %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Adaptor2d.i b/src/SWIG_files/wrapper/Adaptor2d.i index 8b61df5b5..c54086f34 100644 --- a/src/SWIG_files/wrapper/Adaptor2d.i +++ b/src/SWIG_files/wrapper/Adaptor2d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_adaptor2d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Adaptor3d.i b/src/SWIG_files/wrapper/Adaptor3d.i index 1f24d192b..a9dd58f11 100644 --- a/src/SWIG_files/wrapper/Adaptor3d.i +++ b/src/SWIG_files/wrapper/Adaptor3d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_adaptor3d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/AdvApp2Var.i b/src/SWIG_files/wrapper/AdvApp2Var.i index 90f09ef9d..ae4147ab8 100644 --- a/src/SWIG_files/wrapper/AdvApp2Var.i +++ b/src/SWIG_files/wrapper/AdvApp2Var.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_advapp2var.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -314,14 +315,23 @@ No available documentation. ") CritError; Standard_Real CritError(const Standard_Integer Dimension, const Standard_Integer Index); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream 'o' information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** HasResult ******************/ /**** md5 signature: 345d4b0f7e88f528928167976d8256d5 ****/ %feature("compactdefaultargs") HasResult; diff --git a/src/SWIG_files/wrapper/AdvApp2Var.pyi b/src/SWIG_files/wrapper/AdvApp2Var.pyi index 514d0c84d..3d6bee684 100644 --- a/src/SWIG_files/wrapper/AdvApp2Var.pyi +++ b/src/SWIG_files/wrapper/AdvApp2Var.pyi @@ -120,6 +120,7 @@ class AdvApp2Var_ApproxAFunc2Var: @overload def AverageError(self, Dimension: int, Index: int) -> float: ... def CritError(self, Dimension: int, Index: int) -> float: ... + def Dump(self) -> str: ... def HasResult(self) -> bool: ... def IsDone(self) -> bool: ... @overload diff --git a/src/SWIG_files/wrapper/AdvApprox.i b/src/SWIG_files/wrapper/AdvApprox.i index ba1615682..62aba5fd0 100644 --- a/src/SWIG_files/wrapper/AdvApprox.i +++ b/src/SWIG_files/wrapper/AdvApprox.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_advapprox.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -230,14 +231,23 @@ No available documentation. ") Degree; Standard_Integer Degree(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Display information on approximation. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** HasResult ******************/ /**** md5 signature: 345d4b0f7e88f528928167976d8256d5 ****/ %feature("compactdefaultargs") HasResult; @@ -599,14 +609,23 @@ No available documentation. ") DifTab; opencascade::handle DifTab(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Display information on approximation. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** FirstConstr ******************/ /**** md5 signature: f7818f8b2283dc680ce2b42c85a59f9d ****/ %feature("compactdefaultargs") FirstConstr; diff --git a/src/SWIG_files/wrapper/AdvApprox.pyi b/src/SWIG_files/wrapper/AdvApprox.pyi index fe65d1f4e..29eec8d20 100644 --- a/src/SWIG_files/wrapper/AdvApprox.pyi +++ b/src/SWIG_files/wrapper/AdvApprox.pyi @@ -21,6 +21,7 @@ class AdvApprox_ApproxAFunction: @overload def AverageError(self, Dimension: int, Index: int) -> float: ... def Degree(self) -> int: ... + def Dump(self) -> str: ... def HasResult(self) -> bool: ... def IsDone(self) -> bool: ... def Knots(self) -> TColStd_HArray1OfReal: ... @@ -54,6 +55,7 @@ class AdvApprox_SimpleApprox: def Coefficients(self) -> TColStd_HArray1OfReal: ... def Degree(self) -> int: ... def DifTab(self) -> TColStd_HArray1OfReal: ... + def Dump(self) -> str: ... def FirstConstr(self) -> TColStd_HArray2OfReal: ... def IsDone(self) -> bool: ... def LastConstr(self) -> TColStd_HArray2OfReal: ... diff --git a/src/SWIG_files/wrapper/AppBlend.i b/src/SWIG_files/wrapper/AppBlend.i index 66c0792e8..15b703224 100644 --- a/src/SWIG_files/wrapper/AppBlend.i +++ b/src/SWIG_files/wrapper/AppBlend.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_appblend.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/AppCont.i b/src/SWIG_files/wrapper/AppCont.i index dd1c7fe26..5974cdc4a 100644 --- a/src/SWIG_files/wrapper/AppCont.i +++ b/src/SWIG_files/wrapper/AppCont.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_appcont.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/AppDef.i b/src/SWIG_files/wrapper/AppDef.i index 05009c889..b3257957f 100644 --- a/src/SWIG_files/wrapper/AppDef.i +++ b/src/SWIG_files/wrapper/AppDef.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_appdef.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1875,14 +1876,23 @@ The multiline constructed will have one line of 2d points without their tangenci ") AppDef_MultiLine; AppDef_MultiLine(const TColgp_Array1OfPnt2d & tabP2d); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** NbMultiPoints ******************/ /**** md5 signature: 3773aba9a0a09cf608eddf5448da667d ****/ %feature("compactdefaultargs") NbMultiPoints; @@ -2209,14 +2219,23 @@ Returns the normal vector at the point of range index. an exception is raised if ") Curv2d; gp_Vec2d Curv2d(const Standard_Integer Index); + /****************** Dump ******************/ + /**** md5 signature: b42defe2d7a7208961fa81b225a70479 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + virtual void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsCurvaturePoint ******************/ /**** md5 signature: d472719ada146163920fff12150b4a88 ****/ %feature("compactdefaultargs") IsCurvaturePoint; @@ -6492,14 +6511,23 @@ Returns the distances between the points of the multiline and the approximation ") Distance; void Distance(math_Matrix & mat); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. maxerror,maxerrorindex,averageerror,quadraticerror,criterium distances,degre,nombre de poles, parametres, noeuds. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsCreated ******************/ /**** md5 signature: ee98cd23a823f97ff49721b779c9bc76 ****/ %feature("compactdefaultargs") IsCreated; diff --git a/src/SWIG_files/wrapper/AppDef.pyi b/src/SWIG_files/wrapper/AppDef.pyi index a150208d3..34f791b49 100644 --- a/src/SWIG_files/wrapper/AppDef.pyi +++ b/src/SWIG_files/wrapper/AppDef.pyi @@ -165,6 +165,7 @@ class AppDef_MultiLine: def __init__(self, tabP3d: TColgp_Array1OfPnt) -> None: ... @overload def __init__(self, tabP2d: TColgp_Array1OfPnt2d) -> None: ... + def Dump(self) -> str: ... def NbMultiPoints(self) -> int: ... def NbPoints(self) -> int: ... def SetValue(self, Index: int, MPoint: AppDef_MultiPointConstraint) -> None: ... @@ -195,6 +196,7 @@ class AppDef_MultiPointConstraint(AppParCurves_MultiPoint): def __init__(self, tabP2d: TColgp_Array1OfPnt2d, tabVec2d: TColgp_Array1OfVec2d, tabCur2d: TColgp_Array1OfVec2d) -> None: ... def Curv(self, Index: int) -> gp_Vec: ... def Curv2d(self, Index: int) -> gp_Vec2d: ... + def Dump(self) -> str: ... def IsCurvaturePoint(self) -> bool: ... def IsTangencyPoint(self) -> bool: ... def SetCurv(self, Index: int, Curv: gp_Vec) -> None: ... @@ -526,6 +528,7 @@ class AppDef_Variational: def Criterium(self) -> Tuple[float, float, float]: ... def CriteriumWeight(self) -> Tuple[float, float, float]: ... def Distance(self, mat: math_Matrix) -> None: ... + def Dump(self) -> str: ... def IsCreated(self) -> bool: ... def IsDone(self) -> bool: ... def IsOverConstrained(self) -> bool: ... diff --git a/src/SWIG_files/wrapper/AppParCurves.i b/src/SWIG_files/wrapper/AppParCurves.i index 95a40317d..c31a211a3 100644 --- a/src/SWIG_files/wrapper/AppParCurves.i +++ b/src/SWIG_files/wrapper/AppParCurves.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_appparcurves.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -680,14 +681,23 @@ Returns the dimension of the cuindex curve. an exception is raised if cuindex<0 ") Dimension; Standard_Integer Dimension(const Standard_Integer CuIndex); + /****************** Dump ******************/ + /**** md5 signature: 3285fe47a669df0eece9c96593dad879 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + virtual void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** NbCurves ******************/ /**** md5 signature: f7f6dbd981df076443155a5a87b5c223 ****/ %feature("compactdefaultargs") NbCurves; @@ -1012,14 +1022,23 @@ Returns the dimension of the point of range index. an exception is raised if ind ") Dimension; Standard_Integer Dimension(const Standard_Integer Index); + /****************** Dump ******************/ + /**** md5 signature: 3285fe47a669df0eece9c96593dad879 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + virtual void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** NbPoints ******************/ /**** md5 signature: 1d4bbbd7c4dda4f1e56c00ae994bedbe ****/ %feature("compactdefaultargs") NbPoints; @@ -1350,14 +1369,23 @@ Returns the degree of the curve(s). ") Degree; virtual Standard_Integer Degree(); + /****************** Dump ******************/ + /**** md5 signature: b42defe2d7a7208961fa81b225a70479 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + virtual void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Knots ******************/ /**** md5 signature: 8001460ab922c7159116eb85f0693b97 ****/ %feature("compactdefaultargs") Knots; diff --git a/src/SWIG_files/wrapper/AppParCurves.pyi b/src/SWIG_files/wrapper/AppParCurves.pyi index f7d2c5229..0f8a7c244 100644 --- a/src/SWIG_files/wrapper/AppParCurves.pyi +++ b/src/SWIG_files/wrapper/AppParCurves.pyi @@ -187,6 +187,7 @@ class AppParCurves_MultiCurve: def D2(self, CuIndex: int, U: float, Pt: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d) -> None: ... def Degree(self) -> int: ... def Dimension(self, CuIndex: int) -> int: ... + def Dump(self) -> str: ... def NbCurves(self) -> int: ... def NbPoles(self) -> int: ... def Pole(self, CuIndex: int, Nieme: int) -> gp_Pnt: ... @@ -214,6 +215,7 @@ class AppParCurves_MultiPoint: @overload def __init__(self, tabP: TColgp_Array1OfPnt, tabP2d: TColgp_Array1OfPnt2d) -> None: ... def Dimension(self, Index: int) -> int: ... + def Dump(self) -> str: ... def NbPoints(self) -> int: ... def NbPoints2d(self) -> int: ... def Point(self, Index: int) -> gp_Pnt: ... @@ -241,6 +243,7 @@ class AppParCurves_MultiBSpCurve(AppParCurves_MultiCurve): @overload def D2(self, CuIndex: int, U: float, Pt: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d) -> None: ... def Degree(self) -> int: ... + def Dump(self) -> str: ... def Knots(self) -> TColStd_Array1OfReal: ... def Multiplicities(self) -> TColStd_Array1OfInteger: ... def SetKnots(self, theKnots: TColStd_Array1OfReal) -> None: ... diff --git a/src/SWIG_files/wrapper/AppStd.i b/src/SWIG_files/wrapper/AppStd.i index a70701450..92ac7f68a 100644 --- a/src/SWIG_files/wrapper/AppStd.i +++ b/src/SWIG_files/wrapper/AppStd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_appstd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -87,10 +88,22 @@ from OCC.Core.Exception import * class AppStd_Application : public TDocStd_Application { public: - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/AppStd.pyi b/src/SWIG_files/wrapper/AppStd.pyi index 5098d7093..aa2be3a73 100644 --- a/src/SWIG_files/wrapper/AppStd.pyi +++ b/src/SWIG_files/wrapper/AppStd.pyi @@ -7,6 +7,7 @@ from OCC.Core.TDocStd import * class AppStd_Application(TDocStd_Application): + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ResourcesName(self) -> str: ... # harray1 classes diff --git a/src/SWIG_files/wrapper/AppStdL.i b/src/SWIG_files/wrapper/AppStdL.i index 89299be60..8826c2b2e 100644 --- a/src/SWIG_files/wrapper/AppStdL.i +++ b/src/SWIG_files/wrapper/AppStdL.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_appstdl.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -88,10 +89,22 @@ from OCC.Core.Exception import * class AppStdL_Application : public TDocStd_Application { public: - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/AppStdL.pyi b/src/SWIG_files/wrapper/AppStdL.pyi index 22d93bbae..05c1da490 100644 --- a/src/SWIG_files/wrapper/AppStdL.pyi +++ b/src/SWIG_files/wrapper/AppStdL.pyi @@ -7,6 +7,7 @@ from OCC.Core.TDocStd import * class AppStdL_Application(TDocStd_Application): + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ResourcesName(self) -> str: ... # harray1 classes diff --git a/src/SWIG_files/wrapper/Approx.i b/src/SWIG_files/wrapper/Approx.i index 935bd1bbd..085417bd9 100644 --- a/src/SWIG_files/wrapper/Approx.i +++ b/src/SWIG_files/wrapper/Approx.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_approx.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -352,14 +353,23 @@ No available documentation. ") Curve; opencascade::handle Curve(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Print on the stream o information about the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** HasResult ******************/ /**** md5 signature: 345d4b0f7e88f528928167976d8256d5 ****/ %feature("compactdefaultargs") HasResult; @@ -698,14 +708,23 @@ Returns the bspline curve corresponding to the reparametrized 3d curve. ") Curve3d; opencascade::handle Curve3d(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Print the maximum errors(s). +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** HasResult ******************/ /**** md5 signature: 345d4b0f7e88f528928167976d8256d5 ****/ %feature("compactdefaultargs") HasResult; @@ -2098,14 +2117,23 @@ No available documentation. ") Curves2dShape; void Curves2dShape(Standard_Integer &OutValue, Standard_Integer &OutValue, Standard_Integer &OutValue); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Display information on approximation. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Eval ******************/ /**** md5 signature: 71e7f11e45548ac47de3b270019a0b2d ****/ %feature("compactdefaultargs") Eval; diff --git a/src/SWIG_files/wrapper/Approx.pyi b/src/SWIG_files/wrapper/Approx.pyi index b30870a3a..84ebb353c 100644 --- a/src/SWIG_files/wrapper/Approx.pyi +++ b/src/SWIG_files/wrapper/Approx.pyi @@ -107,6 +107,7 @@ class Approx_Curve2d: class Approx_Curve3d: def __init__(self, Curve: Adaptor3d_Curve, Tol3d: float, Order: GeomAbs_Shape, MaxSegments: int, MaxDegree: int) -> None: ... def Curve(self) -> Geom_BSplineCurve: ... + def Dump(self) -> str: ... def HasResult(self) -> bool: ... def IsDone(self) -> bool: ... def MaxError(self) -> float: ... @@ -135,6 +136,7 @@ class Approx_CurvilinearParameter: def Curve2d1(self) -> Geom2d_BSplineCurve: ... def Curve2d2(self) -> Geom2d_BSplineCurve: ... def Curve3d(self) -> Geom_BSplineCurve: ... + def Dump(self) -> str: ... def HasResult(self) -> bool: ... def IsDone(self) -> bool: ... def MaxError2d1(self) -> float: ... @@ -238,6 +240,7 @@ class Approx_SweepApproximation: def Curves2dKnots(self) -> TColStd_Array1OfReal: ... def Curves2dMults(self) -> TColStd_Array1OfInteger: ... def Curves2dShape(self) -> Tuple[int, int, int]: ... + def Dump(self) -> str: ... def Eval(self, Parameter: float, DerivativeRequest: int, First: float, Last: float) -> Tuple[int, float]: ... def IsDone(self) -> bool: ... def Max2dError(self, Index: int) -> float: ... diff --git a/src/SWIG_files/wrapper/ApproxInt.i b/src/SWIG_files/wrapper/ApproxInt.i index 52b038778..24b78e72d 100644 --- a/src/SWIG_files/wrapper/ApproxInt.i +++ b/src/SWIG_files/wrapper/ApproxInt.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_approxint.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Aspect.i b/src/SWIG_files/wrapper/Aspect.i index 0a383c72d..a97c4c5fd 100644 --- a/src/SWIG_files/wrapper/Aspect.i +++ b/src/SWIG_files/wrapper/Aspect.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_aspect.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1250,10 +1251,22 @@ Returns the colour of the window background . Quantity_Color Color(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1430,10 +1443,22 @@ Returns the number of available identifiers. Standard_Integer Available(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1645,10 +1670,22 @@ Returns the grid aspect. Aspect_GridDrawMode DrawMode(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2051,10 +2088,22 @@ Get cloud intensity. by default this value is 0.2 0.0 means no clouds at all and Standard_ShortReal Cloudiness(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2696,10 +2745,22 @@ Apply the resizing to the window . virtual Aspect_TypeOfResize DoResize(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4671,10 +4732,22 @@ Returns colours of the window gradient background. void Colors(Quantity_Color & theColor1, Quantity_Color & theColor2); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/Aspect.pyi b/src/SWIG_files/wrapper/Aspect.pyi index f9bbdd7c8..5bbfdeaa7 100644 --- a/src/SWIG_files/wrapper/Aspect.pyi +++ b/src/SWIG_files/wrapper/Aspect.pyi @@ -759,6 +759,7 @@ class Aspect_Background: @overload def __init__(self, AColor: Quantity_Color) -> None: ... def Color(self) -> Quantity_Color: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def SetColor(self, AColor: Quantity_Color) -> None: ... class Aspect_DisplayConnection(Standard_Transient): @@ -772,6 +773,7 @@ class Aspect_GenId: @overload def __init__(self, theLow: int, theUpper: int) -> None: ... def Available(self) -> int: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Free(self) -> None: ... @overload @@ -791,6 +793,7 @@ class Aspect_Grid(Standard_Transient): def Deactivate(self) -> None: ... def Display(self) -> None: ... def DrawMode(self) -> Aspect_GridDrawMode: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Erase(self) -> None: ... def Hit(self, X: float, Y: float) -> Tuple[float, float]: ... def Init(self) -> None: ... @@ -821,6 +824,7 @@ class Aspect_SkydomeBackground: @overload def __init__(self, theSunDirection: gp_Dir, theCloudiness: float, theTime: float, theFogginess: float, theSize: int) -> None: ... def Cloudiness(self) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Fogginess(self) -> float: ... def SetCloudiness(self, theCloudiness: float) -> None: ... def SetFogginess(self, theFogginess: float) -> None: ... @@ -864,6 +868,7 @@ class Aspect_Window(Standard_Transient): def DisplayConnection(self) -> Aspect_DisplayConnection: ... def DoMapping(self) -> bool: ... def DoResize(self) -> Aspect_TypeOfResize: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GradientBackground(self) -> Aspect_GradientBackground: ... def InvalidateContent(self, theDisp: Aspect_DisplayConnection) -> None: ... def IsMapped(self) -> bool: ... @@ -994,6 +999,7 @@ class Aspect_GradientBackground(Aspect_Background): def __init__(self, theColor1: Quantity_Color, theColor2: Quantity_Color, theMethod: Optional[Aspect_GradientFillMethod] = Aspect_GradientFillMethod_Horizontal) -> None: ... def BgGradientFillMethod(self) -> Aspect_GradientFillMethod: ... def Colors(self, theColor1: Quantity_Color, theColor2: Quantity_Color) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def SetColors(self, theColor1: Quantity_Color, theColor2: Quantity_Color, theMethod: Optional[Aspect_GradientFillMethod] = Aspect_GradientFillMethod_Horizontal) -> None: ... class Aspect_OpenVRSession(Aspect_XRSession): diff --git a/src/SWIG_files/wrapper/BOPAlgo.i b/src/SWIG_files/wrapper/BOPAlgo.i index 71504b291..b8160a06a 100644 --- a/src/SWIG_files/wrapper/BOPAlgo.i +++ b/src/SWIG_files/wrapper/BOPAlgo.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bopalgo.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -623,22 +624,40 @@ Clears the warnings of the algorithm. ") ClearWarnings; void ClearWarnings(); + /****************** DumpErrors ******************/ + /**** md5 signature: 90a98b1a0d228edd0b78f11fc13715d9 ****/ + %feature("compactdefaultargs") DumpErrors; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpErrorsToString() { - std::stringstream s; - self->DumpErrors(s); - return s.str();} - }; +Return +------- +theOS: Standard_OStream + +Description +----------- +Dumps the error status into the given stream. +") DumpErrors; + void DumpErrors(std::ostream &OutValue); + + /****************** DumpWarnings ******************/ + /**** md5 signature: b7a54acbfda1ad785ffbd552beb749fd ****/ + %feature("compactdefaultargs") DumpWarnings; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theOS: Standard_OStream + +Description +----------- +Dumps the warning statuses into the given stream. +") DumpWarnings; + void DumpWarnings(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpWarningsToString() { - std::stringstream s; - self->DumpWarnings(s); - return s.str();} - }; /****************** FuzzyValue ******************/ /**** md5 signature: c7081d612ee5325e18733e215807d19f ****/ %feature("compactdefaultargs") FuzzyValue; diff --git a/src/SWIG_files/wrapper/BOPAlgo.pyi b/src/SWIG_files/wrapper/BOPAlgo.pyi index 82148dddf..8c61157e1 100644 --- a/src/SWIG_files/wrapper/BOPAlgo.pyi +++ b/src/SWIG_files/wrapper/BOPAlgo.pyi @@ -120,6 +120,8 @@ class BOPAlgo_Options: def Allocator(self) -> NCollection_BaseAllocator: ... def Clear(self) -> None: ... def ClearWarnings(self) -> None: ... + def DumpErrors(self) -> str: ... + def DumpWarnings(self) -> str: ... def FuzzyValue(self) -> float: ... @staticmethod def GetParallelMode() -> bool: ... diff --git a/src/SWIG_files/wrapper/BOPDS.i b/src/SWIG_files/wrapper/BOPDS.i index 6580111eb..5ad2685c7 100644 --- a/src/SWIG_files/wrapper/BOPDS.i +++ b/src/SWIG_files/wrapper/BOPDS.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bopds.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BOPTools.i b/src/SWIG_files/wrapper/BOPTools.i index db2c21ba5..afbd9ce44 100644 --- a/src/SWIG_files/wrapper/BOPTools.i +++ b/src/SWIG_files/wrapper/BOPTools.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_boptools.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRep.i b/src/SWIG_files/wrapper/BRep.i index 816328413..7502e55cf 100644 --- a/src/SWIG_files/wrapper/BRep.i +++ b/src/SWIG_files/wrapper/BRep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brep.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1298,10 +1299,22 @@ No available documentation. virtual void Curve3D(const opencascade::handle & C); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1850,10 +1863,22 @@ No available documentation. virtual void Curve(const opencascade::handle & C); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2197,10 +2222,22 @@ No available documentation. void Degenerated(const Standard_Boolean S); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2372,10 +2409,22 @@ Returns current active triangulation. const opencascade::handle & ActiveTriangulation(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2642,10 +2691,22 @@ No available documentation. BRep_ListOfPointRepresentation & ChangePoints(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3900,10 +3961,22 @@ Raises an error. void D0(const Standard_Real U, gp_Pnt & P); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4018,10 +4091,22 @@ Computes the point at parameter u. virtual void D0(const Standard_Real U, gp_Pnt & P); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4206,10 +4291,22 @@ No available documentation. virtual void Curve(const opencascade::handle & C); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4264,10 +4361,22 @@ No available documentation. class BRep_PointsOnSurface : public BRep_PointRepresentation { public: - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4352,10 +4461,22 @@ Return a copy of this representation. opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4454,10 +4575,22 @@ Return a copy of this representation. virtual opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4588,10 +4721,22 @@ Return a copy of this representation. virtual opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4771,10 +4916,22 @@ Computes the point at parameter u. void D0(const Standard_Real U, gp_Pnt & P); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4861,10 +5018,22 @@ Computes the point at parameter u. void D0(const Standard_Real U, gp_Pnt & P); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5034,10 +5203,22 @@ No available documentation. BRep_PointOnCurveOnSurface(const Standard_Real P, const opencascade::handle & C, const opencascade::handle & S, const TopLoc_Location & L); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5257,10 +5438,22 @@ Return a copy of this representation. virtual opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5360,10 +5553,22 @@ Return a copy of this representation. virtual opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5495,10 +5700,22 @@ Return a copy of this representation. virtual opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/BRep.pyi b/src/SWIG_files/wrapper/BRep.pyi index 2bab5fa02..7c3a19143 100644 --- a/src/SWIG_files/wrapper/BRep.pyi +++ b/src/SWIG_files/wrapper/BRep.pyi @@ -153,6 +153,7 @@ class BRep_CurveRepresentation(Standard_Transient): def Curve3D(self) -> Geom_Curve: ... @overload def Curve3D(self, C: Geom_Curve) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsCurve3D(self) -> bool: ... def IsCurveOnClosedSurface(self) -> bool: ... @overload @@ -216,6 +217,7 @@ class BRep_PointRepresentation(Standard_Transient): def Curve(self) -> Geom_Curve: ... @overload def Curve(self, C: Geom_Curve) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def IsPointOnCurve(self) -> bool: ... @overload @@ -257,6 +259,7 @@ class BRep_TEdge(TopoDS_TEdge): def Degenerated(self) -> bool: ... @overload def Degenerated(self, S: bool) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EmptyCopy(self) -> TopoDS_TShape: ... @overload def SameParameter(self) -> bool: ... @@ -275,6 +278,7 @@ class BRep_TEdge(TopoDS_TEdge): class BRep_TFace(TopoDS_TFace): def __init__(self) -> None: ... def ActiveTriangulation(self) -> Poly_Triangulation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EmptyCopy(self) -> TopoDS_TShape: ... @overload def Location(self) -> TopLoc_Location: ... @@ -305,6 +309,7 @@ class BRep_TFace(TopoDS_TFace): class BRep_TVertex(TopoDS_TVertex): def __init__(self) -> None: ... def ChangePoints(self) -> BRep_ListOfPointRepresentation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EmptyCopy(self) -> TopoDS_TShape: ... @overload def Pnt(self) -> gp_Pnt: ... @@ -471,6 +476,7 @@ class BRep_CurveOn2Surfaces(BRep_CurveRepresentation): def Continuity(self, C: GeomAbs_Shape) -> None: ... def Copy(self) -> BRep_CurveRepresentation: ... def D0(self, U: float, P: gp_Pnt) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def IsRegularity(self) -> bool: ... @overload @@ -481,6 +487,7 @@ class BRep_CurveOn2Surfaces(BRep_CurveRepresentation): class BRep_GCurve(BRep_CurveRepresentation): def D0(self, U: float, P: gp_Pnt) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def First(self) -> float: ... @overload @@ -499,12 +506,14 @@ class BRep_PointOnCurve(BRep_PointRepresentation): def Curve(self) -> Geom_Curve: ... @overload def Curve(self, C: Geom_Curve) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def IsPointOnCurve(self) -> bool: ... @overload def IsPointOnCurve(self, C: Geom_Curve, L: TopLoc_Location) -> bool: ... class BRep_PointsOnSurface(BRep_PointRepresentation): + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Surface(self) -> Geom_Surface: ... @overload @@ -513,6 +522,7 @@ class BRep_PointsOnSurface(BRep_PointRepresentation): class BRep_Polygon3D(BRep_CurveRepresentation): def __init__(self, P: Poly_Polygon3D, L: TopLoc_Location) -> None: ... def Copy(self) -> BRep_CurveRepresentation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsPolygon3D(self) -> bool: ... @overload def Polygon3D(self) -> Poly_Polygon3D: ... @@ -522,6 +532,7 @@ class BRep_Polygon3D(BRep_CurveRepresentation): class BRep_PolygonOnSurface(BRep_CurveRepresentation): def __init__(self, P: Poly_Polygon2D, S: Geom_Surface, L: TopLoc_Location) -> None: ... def Copy(self) -> BRep_CurveRepresentation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def IsPolygonOnSurface(self) -> bool: ... @overload @@ -535,6 +546,7 @@ class BRep_PolygonOnSurface(BRep_CurveRepresentation): class BRep_PolygonOnTriangulation(BRep_CurveRepresentation): def __init__(self, P: Poly_PolygonOnTriangulation, T: Poly_Triangulation, L: TopLoc_Location) -> None: ... def Copy(self) -> BRep_CurveRepresentation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def IsPolygonOnTriangulation(self) -> bool: ... @overload @@ -553,12 +565,14 @@ class BRep_Curve3D(BRep_GCurve): @overload def Curve3D(self, C: Geom_Curve) -> None: ... def D0(self, U: float, P: gp_Pnt) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsCurve3D(self) -> bool: ... class BRep_CurveOnSurface(BRep_GCurve): def __init__(self, PC: Geom2d_Curve, S: Geom_Surface, L: TopLoc_Location) -> None: ... def Copy(self) -> BRep_CurveRepresentation: ... def D0(self, U: float, P: gp_Pnt) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def IsCurveOnSurface(self) -> bool: ... @overload @@ -574,6 +588,7 @@ class BRep_CurveOnSurface(BRep_GCurve): class BRep_PointOnCurveOnSurface(BRep_PointsOnSurface): def __init__(self, P: float, C: Geom2d_Curve, S: Geom_Surface, L: TopLoc_Location) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def IsPointOnCurveOnSurface(self) -> bool: ... @overload @@ -597,6 +612,7 @@ class BRep_PointOnSurface(BRep_PointsOnSurface): class BRep_PolygonOnClosedSurface(BRep_PolygonOnSurface): def __init__(self, P1: Poly_Polygon2D, P2: Poly_Polygon2D, S: Geom_Surface, L: TopLoc_Location) -> None: ... def Copy(self) -> BRep_CurveRepresentation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsPolygonOnClosedSurface(self) -> bool: ... @overload def Polygon2(self) -> Poly_Polygon2D: ... @@ -606,6 +622,7 @@ class BRep_PolygonOnClosedSurface(BRep_PolygonOnSurface): class BRep_PolygonOnClosedTriangulation(BRep_PolygonOnTriangulation): def __init__(self, P1: Poly_PolygonOnTriangulation, P2: Poly_PolygonOnTriangulation, Tr: Poly_Triangulation, L: TopLoc_Location) -> None: ... def Copy(self) -> BRep_CurveRepresentation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsPolygonOnClosedTriangulation(self) -> bool: ... @overload def PolygonOnTriangulation2(self, P2: Poly_PolygonOnTriangulation) -> None: ... @@ -619,6 +636,7 @@ class BRep_CurveOnClosedSurface(BRep_CurveOnSurface): @overload def Continuity(self, C: GeomAbs_Shape) -> None: ... def Copy(self) -> BRep_CurveRepresentation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsCurveOnClosedSurface(self) -> bool: ... @overload def IsRegularity(self) -> bool: ... diff --git a/src/SWIG_files/wrapper/BRepAdaptor.i b/src/SWIG_files/wrapper/BRepAdaptor.i index 65f2bf66a..10b5d0180 100644 --- a/src/SWIG_files/wrapper/BRepAdaptor.i +++ b/src/SWIG_files/wrapper/BRepAdaptor.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepadaptor.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepAlgo.i b/src/SWIG_files/wrapper/BRepAlgo.i index a0888bcff..08f748ef8 100644 --- a/src/SWIG_files/wrapper/BRepAlgo.i +++ b/src/SWIG_files/wrapper/BRepAlgo.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepalgo.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepAlgoAPI.i b/src/SWIG_files/wrapper/BRepAlgoAPI.i index ea9baf6f1..3d4f0b3c3 100644 --- a/src/SWIG_files/wrapper/BRepAlgoAPI.i +++ b/src/SWIG_files/wrapper/BRepAlgoAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepalgoapi.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepApprox.i b/src/SWIG_files/wrapper/BRepApprox.i index 0f163a295..540a103a0 100644 --- a/src/SWIG_files/wrapper/BRepApprox.i +++ b/src/SWIG_files/wrapper/BRepApprox.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepapprox.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepBlend.i b/src/SWIG_files/wrapper/BRepBlend.i index 184521179..14952b506 100644 --- a/src/SWIG_files/wrapper/BRepBlend.i +++ b/src/SWIG_files/wrapper/BRepBlend.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepblend.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1206,14 +1207,23 @@ No available documentation. ") Curves2dShape; void Curves2dShape(Standard_Integer &OutValue, Standard_Integer &OutValue, Standard_Integer &OutValue); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Display information on approximation. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; diff --git a/src/SWIG_files/wrapper/BRepBlend.pyi b/src/SWIG_files/wrapper/BRepBlend.pyi index df35bab03..9df18d9b7 100644 --- a/src/SWIG_files/wrapper/BRepBlend.pyi +++ b/src/SWIG_files/wrapper/BRepBlend.pyi @@ -135,6 +135,7 @@ class BRepBlend_AppSurface(AppBlend_Approx): def Curves2dKnots(self) -> TColStd_Array1OfReal: ... def Curves2dMults(self) -> TColStd_Array1OfInteger: ... def Curves2dShape(self) -> Tuple[int, int, int]: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def Max2dError(self, Index: int) -> float: ... def MaxErrorOnSurf(self) -> float: ... diff --git a/src/SWIG_files/wrapper/BRepBndLib.i b/src/SWIG_files/wrapper/BRepBndLib.i index 5855acc6a..93011d888 100644 --- a/src/SWIG_files/wrapper/BRepBndLib.i +++ b/src/SWIG_files/wrapper/BRepBndLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepbndlib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepBuilderAPI.i b/src/SWIG_files/wrapper/BRepBuilderAPI.i index ea762ecb9..8b6850219 100644 --- a/src/SWIG_files/wrapper/BRepBuilderAPI.i +++ b/src/SWIG_files/wrapper/BRepBuilderAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepbuilderapi.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepCheck.i b/src/SWIG_files/wrapper/BRepCheck.i index 8798f1e29..d59df7cf3 100644 --- a/src/SWIG_files/wrapper/BRepCheck.i +++ b/src/SWIG_files/wrapper/BRepCheck.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepcheck.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -284,6 +285,24 @@ Returns the resolution on the surface. ") PrecSurface; static Standard_Real PrecSurface(const opencascade::handle & aAHSurf); + /****************** Print ******************/ + /**** md5 signature: 0f4f5589255e0cda18fd387e5d4e5b49 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +Stat: BRepCheck_Status + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Print; + static void Print(const BRepCheck_Status Stat, std::ostream &OutValue); + /****************** SelfIntersection ******************/ /**** md5 signature: bb04b20d19bd60ec83e4525199c06c3b ****/ %feature("compactdefaultargs") SelfIntersection; @@ -1681,6 +1700,10 @@ def brepcheck_PrecCurve(*args): def brepcheck_PrecSurface(*args): return brepcheck.PrecSurface(*args) +@deprecated +def brepcheck_Print(*args): + return brepcheck.Print(*args) + @deprecated def brepcheck_SelfIntersection(*args): return brepcheck.SelfIntersection(*args) diff --git a/src/SWIG_files/wrapper/BRepCheck.pyi b/src/SWIG_files/wrapper/BRepCheck.pyi index e29850203..ae14486b3 100644 --- a/src/SWIG_files/wrapper/BRepCheck.pyi +++ b/src/SWIG_files/wrapper/BRepCheck.pyi @@ -111,6 +111,8 @@ class brepcheck: @staticmethod def PrecSurface(aAHSurf: Adaptor3d_Surface) -> float: ... @staticmethod + def Print(Stat: BRepCheck_Status) -> str: ... + @staticmethod def SelfIntersection(W: TopoDS_Wire, F: TopoDS_Face, E1: TopoDS_Edge, E2: TopoDS_Edge) -> bool: ... class BRepCheck_Analyzer: diff --git a/src/SWIG_files/wrapper/BRepClass.i b/src/SWIG_files/wrapper/BRepClass.i index d60667326..311f2df0c 100644 --- a/src/SWIG_files/wrapper/BRepClass.i +++ b/src/SWIG_files/wrapper/BRepClass.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepclass.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepClass3d.i b/src/SWIG_files/wrapper/BRepClass3d.i index 9bd394212..d448672f1 100644 --- a/src/SWIG_files/wrapper/BRepClass3d.i +++ b/src/SWIG_files/wrapper/BRepClass3d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepclass3d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepExtrema.i b/src/SWIG_files/wrapper/BRepExtrema.i index 54fd7ba01..919b284c4 100644 --- a/src/SWIG_files/wrapper/BRepExtrema.i +++ b/src/SWIG_files/wrapper/BRepExtrema.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepextrema.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -197,14 +198,23 @@ Create tool and computation of the minimum distance (value and pair of points) i ") BRepExtrema_DistShapeShape; BRepExtrema_DistShapeShape(const TopoDS_Shape & Shape1, const TopoDS_Shape & Shape2, const Standard_Real theDeflection, const Extrema_ExtFlag F = Extrema_ExtFlag_MINMAX, const Extrema_ExtAlgo A = Extrema_ExtAlgo_Grad, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. . +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** InnerSolution ******************/ /**** md5 signature: c2076c783e4f1c4305057f88c3c68086 ****/ %feature("compactdefaultargs") InnerSolution; diff --git a/src/SWIG_files/wrapper/BRepExtrema.pyi b/src/SWIG_files/wrapper/BRepExtrema.pyi index 8ad08f1e8..03aeb6bba 100644 --- a/src/SWIG_files/wrapper/BRepExtrema.pyi +++ b/src/SWIG_files/wrapper/BRepExtrema.pyi @@ -45,6 +45,7 @@ class BRepExtrema_DistShapeShape: def __init__(self, Shape1: TopoDS_Shape, Shape2: TopoDS_Shape, F: Optional[Extrema_ExtFlag] = Extrema_ExtFlag_MINMAX, A: Optional[Extrema_ExtAlgo] = Extrema_ExtAlgo_Grad, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... @overload def __init__(self, Shape1: TopoDS_Shape, Shape2: TopoDS_Shape, theDeflection: float, F: Optional[Extrema_ExtFlag] = Extrema_ExtFlag_MINMAX, A: Optional[Extrema_ExtAlgo] = Extrema_ExtAlgo_Grad, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + def Dump(self) -> str: ... def InnerSolution(self) -> bool: ... def IsDone(self) -> bool: ... def IsMultiThread(self) -> bool: ... diff --git a/src/SWIG_files/wrapper/BRepFeat.i b/src/SWIG_files/wrapper/BRepFeat.i index e8a6cd01a..882be2668 100644 --- a/src/SWIG_files/wrapper/BRepFeat.i +++ b/src/SWIG_files/wrapper/BRepFeat.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepfeat.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -344,6 +345,24 @@ Ori = true taking account the orientation. ") ParametricMinMax; static void ParametricMinMax(const TopoDS_Shape & S, const opencascade::handle & C, Standard_Real &OutValue, Standard_Real &OutValue, Standard_Real &OutValue, Standard_Real &OutValue, Standard_Boolean &OutValue, const Standard_Boolean Ori = Standard_False); + /****************** Print ******************/ + /**** md5 signature: a6852c8c0afb9e1a2f070d2ece4eddfa ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +SE: BRepFeat_StatusError + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the error description of the state as a string on the stream and returns . +") Print; + static Standard_OStream & Print(const BRepFeat_StatusError SE, std::ostream &OutValue); + /****************** SampleEdges ******************/ /**** md5 signature: f1154ae22c369e9497c31a5a83612489 ****/ %feature("compactdefaultargs") SampleEdges; @@ -2953,6 +2972,10 @@ def brepfeat_ParametricBarycenter(*args): def brepfeat_ParametricMinMax(*args): return brepfeat.ParametricMinMax(*args) +@deprecated +def brepfeat_Print(*args): + return brepfeat.Print(*args) + @deprecated def brepfeat_SampleEdges(*args): return brepfeat.SampleEdges(*args) diff --git a/src/SWIG_files/wrapper/BRepFeat.pyi b/src/SWIG_files/wrapper/BRepFeat.pyi index e7fe9ecdc..233b8ee3b 100644 --- a/src/SWIG_files/wrapper/BRepFeat.pyi +++ b/src/SWIG_files/wrapper/BRepFeat.pyi @@ -109,6 +109,8 @@ class brepfeat: @staticmethod def ParametricMinMax(S: TopoDS_Shape, C: Geom_Curve, Ori: Optional[bool] = False) -> Tuple[float, float, float, float, bool]: ... @staticmethod + def Print(SE: BRepFeat_StatusError) -> Tuple[Standard_OStream, str]: ... + @staticmethod def SampleEdges(S: TopoDS_Shape, Pt: TColgp_SequenceOfPnt) -> None: ... @staticmethod def Tool(SRef: TopoDS_Shape, Fac: TopoDS_Face, Orf: TopAbs_Orientation) -> TopoDS_Solid: ... diff --git a/src/SWIG_files/wrapper/BRepFill.i b/src/SWIG_files/wrapper/BRepFill.i index e2780e71c..95c30172b 100644 --- a/src/SWIG_files/wrapper/BRepFill.i +++ b/src/SWIG_files/wrapper/BRepFill.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepfill.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepFilletAPI.i b/src/SWIG_files/wrapper/BRepFilletAPI.i index 63232e09c..587dffa3f 100644 --- a/src/SWIG_files/wrapper/BRepFilletAPI.i +++ b/src/SWIG_files/wrapper/BRepFilletAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepfilletapi.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepGProp.i b/src/SWIG_files/wrapper/BRepGProp.i index a29eae963..56c116434 100644 --- a/src/SWIG_files/wrapper/BRepGProp.i +++ b/src/SWIG_files/wrapper/BRepGProp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepgprop.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepIntCurveSurface.i b/src/SWIG_files/wrapper/BRepIntCurveSurface.i index a8176e1c3..40d4ee82f 100644 --- a/src/SWIG_files/wrapper/BRepIntCurveSurface.i +++ b/src/SWIG_files/wrapper/BRepIntCurveSurface.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepintcurvesurfa %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepLProp.i b/src/SWIG_files/wrapper/BRepLProp.i index 652b1a773..fb94567e1 100644 --- a/src/SWIG_files/wrapper/BRepLProp.i +++ b/src/SWIG_files/wrapper/BRepLProp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_breplprop.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepLib.i b/src/SWIG_files/wrapper/BRepLib.i index 74f8e653b..aa3c98444 100644 --- a/src/SWIG_files/wrapper/BRepLib.i +++ b/src/SWIG_files/wrapper/BRepLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_breplib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepMAT2d.i b/src/SWIG_files/wrapper/BRepMAT2d.i index 1210f1325..197a46e90 100644 --- a/src/SWIG_files/wrapper/BRepMAT2d.i +++ b/src/SWIG_files/wrapper/BRepMAT2d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepmat2d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepMesh.i b/src/SWIG_files/wrapper/BRepMesh.i index 8991a44fc..88534358d 100644 --- a/src/SWIG_files/wrapper/BRepMesh.i +++ b/src/SWIG_files/wrapper/BRepMesh.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepmesh.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1328,14 +1329,23 @@ Removes node from the mesh in case if it has no connected links and its type is ") RemoveNode; void RemoveNode(const Standard_Integer theIndex, const Standard_Boolean isForce = Standard_False); + /****************** Statistics ******************/ + /**** md5 signature: 1a1dab8d9fff60f7ef456c28f93e75d1 ****/ + %feature("compactdefaultargs") Statistics; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theStream: Standard_OStream + +Description +----------- +Dumps information about this structure. @param thestream stream to be used for dump. +") Statistics; + void Statistics(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string StatisticsToString() { - std::stringstream s; - self->Statistics(s); - return s.str();} - }; /****************** SubstituteElement ******************/ /**** md5 signature: 12a4e39048c62f85d59c6cb6b113dccd ****/ %feature("compactdefaultargs") SubstituteElement; @@ -5063,14 +5073,23 @@ Sets the tolerance to be used for identification of coincident vertices. @param ") SetTolerance; void SetTolerance(const Standard_Real theToleranceX, const Standard_Real theToleranceY); + /****************** Statistics ******************/ + /**** md5 signature: 1a1dab8d9fff60f7ef456c28f93e75d1 ****/ + %feature("compactdefaultargs") Statistics; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theStream: Standard_OStream + +Description +----------- +Prints statistics. +") Statistics; + void Statistics(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string StatisticsToString() { - std::stringstream s; - self->Statistics(s); - return s.str();} - }; /****************** Substitute ******************/ /**** md5 signature: 02ac53c87b5a046c4ee9a0b10ac44d20 ****/ %feature("compactdefaultargs") Substitute; diff --git a/src/SWIG_files/wrapper/BRepMesh.pyi b/src/SWIG_files/wrapper/BRepMesh.pyi index fbbba1208..aa0fc2314 100644 --- a/src/SWIG_files/wrapper/BRepMesh.pyi +++ b/src/SWIG_files/wrapper/BRepMesh.pyi @@ -133,6 +133,7 @@ class BRepMesh_DataStructureOfDelaun(Standard_Transient): def RemoveElement(self, theIndex: int) -> None: ... def RemoveLink(self, theIndex: int, isForce: Optional[bool] = False) -> None: ... def RemoveNode(self, theIndex: int, isForce: Optional[bool] = False) -> None: ... + def Statistics(self) -> str: ... def SubstituteElement(self, theIndex: int, theNewElement: BRepMesh_Triangle) -> bool: ... def SubstituteLink(self, theIndex: int, theNewLink: BRepMesh_Edge) -> bool: ... def SubstituteNode(self, theIndex: int, theNewNode: BRepMesh_Vertex) -> bool: ... @@ -399,6 +400,7 @@ class BRepMesh_VertexTool(Standard_Transient): def SetTolerance(self, theTolerance: float) -> None: ... @overload def SetTolerance(self, theToleranceX: float, theToleranceY: float) -> None: ... + def Statistics(self) -> str: ... def Substitute(self, theIndex: int, theVertex: BRepMesh_Vertex) -> None: ... class BRepMesh_ConeRangeSplitter(BRepMesh_DefaultRangeSplitter): diff --git a/src/SWIG_files/wrapper/BRepMeshData.i b/src/SWIG_files/wrapper/BRepMeshData.i index e3b0f7dae..972ff1962 100644 --- a/src/SWIG_files/wrapper/BRepMeshData.i +++ b/src/SWIG_files/wrapper/BRepMeshData.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepmeshdata.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepOffset.i b/src/SWIG_files/wrapper/BRepOffset.i index 736ca7057..7ef121323 100644 --- a/src/SWIG_files/wrapper/BRepOffset.i +++ b/src/SWIG_files/wrapper/BRepOffset.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepoffset.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepOffsetAPI.i b/src/SWIG_files/wrapper/BRepOffsetAPI.i index 557d33fe3..ef11f526d 100644 --- a/src/SWIG_files/wrapper/BRepOffsetAPI.i +++ b/src/SWIG_files/wrapper/BRepOffsetAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepoffsetapi.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepPrim.i b/src/SWIG_files/wrapper/BRepPrim.i index 0e7d20163..de6d1e1e1 100644 --- a/src/SWIG_files/wrapper/BRepPrim.i +++ b/src/SWIG_files/wrapper/BRepPrim.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepprim.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepPrimAPI.i b/src/SWIG_files/wrapper/BRepPrimAPI.i index 41fbee912..c3674e8be 100644 --- a/src/SWIG_files/wrapper/BRepPrimAPI.i +++ b/src/SWIG_files/wrapper/BRepPrimAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepprimapi.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepProj.i b/src/SWIG_files/wrapper/BRepProj.i index eff3e40aa..4e712853f 100644 --- a/src/SWIG_files/wrapper/BRepProj.i +++ b/src/SWIG_files/wrapper/BRepProj.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepproj.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepSweep.i b/src/SWIG_files/wrapper/BRepSweep.i index ad4aa48af..8a9399525 100644 --- a/src/SWIG_files/wrapper/BRepSweep.i +++ b/src/SWIG_files/wrapper/BRepSweep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_brepsweep.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BRepTools.i b/src/SWIG_files/wrapper/BRepTools.i index d084af0d0..27d742673 100644 --- a/src/SWIG_files/wrapper/BRepTools.i +++ b/src/SWIG_files/wrapper/BRepTools.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_breptools.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -308,6 +309,24 @@ Detect closedness of face in u and v directions. ") DetectClosedness; static void DetectClosedness(const TopoDS_Face & theFace, Standard_Boolean &OutValue, Standard_Boolean &OutValue); + /****************** Dump ******************/ + /**** md5 signature: d8fbac42c489d0bae98b03b1387b21c5 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +Sh: TopoDS_Shape + +Return +------- +S: Standard_OStream + +Description +----------- +Dumps the topological structure and the geometry of on the stream . +") Dump; + static void Dump(const TopoDS_Shape & Sh, std::ostream &OutValue); + /****************** EvalAndUpdateTol ******************/ /**** md5 signature: 16be652a9c224d56f94960b2cade0539 ****/ %feature("compactdefaultargs") EvalAndUpdateTol; @@ -446,6 +465,27 @@ Returns the outer most wire of . returns a null wire if has no wires. ") OuterWire; static TopoDS_Wire OuterWire(const TopoDS_Face & F); + /****************** Read ******************/ + /**** md5 signature: f8f4ebe237e52067b8c32d38777547cb ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +Sh: TopoDS_Shape +S: str +B: BRep_Builder +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads a shape from in returns it in . is used to build the shape. +") Read; + static void Read(TopoDS_Shape & Sh, std::istream & S, const BRep_Builder & B, const Message_ProgressRange & theProgress = Message_ProgressRange()); + /****************** Read ******************/ /**** md5 signature: 5e5d6e702af29b2284954f484072b531 ****/ %feature("compactdefaultargs") Read; @@ -806,6 +846,47 @@ For each edge of the face reset the uv points to the bounding points of the ") UpdateFaceUVPoints; static void UpdateFaceUVPoints(const TopoDS_Face & theF); + /****************** Write ******************/ + /**** md5 signature: 92da105c9c540199f80c0283d45c56e0 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theShape: TopoDS_Shape +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theStream: Standard_OStream + +Description +----------- +Writes the shape to the stream in an ascii format toptools_formatversion_version_1. this alias writes shape with triangulation data. @param theshape [in] the shape to write @param thestream [in][out] the stream to output shape into @param therange the range of progress indicator to fill in. +") Write; + static void Write(const TopoDS_Shape & theShape, std::ostream &OutValue, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** Write ******************/ + /**** md5 signature: 9549ae676c065d5541189e667b74dffd ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theShape: TopoDS_Shape +theWithTriangles: bool +theWithNormals: bool +theVersion: TopTools_FormatVersion +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theStream: Standard_OStream + +Description +----------- +Writes the shape to the stream in an ascii format of specified version. @param theshape [in] the shape to write @param thestream [in][out] the stream to output shape into @param thewithtriangles [in] flag which specifies whether to save shape with (true) or without (false) triangles; has no effect on triangulation-only geometry @param thewithnormals [in] flag which specifies whether to save triangulation with (true) or without (false) normals; has no effect on triangulation-only geometry @param theversion [in] the toptools format version @param theprogress the range of progress indicator to fill in. +") Write; + static void Write(const TopoDS_Shape & theShape, std::ostream &OutValue, const Standard_Boolean theWithTriangles, const Standard_Boolean theWithNormals, const TopTools_FormatVersion theVersion, const Message_ProgressRange & theProgress = Message_ProgressRange()); + /****************** Write ******************/ /**** md5 signature: 2b0742433c64d0c04f4d2d4d98afcfa2 ****/ %feature("compactdefaultargs") Write; @@ -957,14 +1038,23 @@ Clears the history. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: b0b4810c084d0c0f210602a019840cff ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theS: Standard_OStream + +Description +----------- +Prints the brief description of the history into a stream. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Generated ******************/ /**** md5 signature: 308ecbb5e9f94e72f26d5a5fd518be68 ****/ %feature("compactdefaultargs") Generated; @@ -2084,38 +2174,92 @@ Clears the content of the set. ") Clear; virtual void Clear(); + /****************** DumpGeometry ******************/ + /**** md5 signature: 8a10297a2e0a44206d544cf3208c2ebd ****/ + %feature("compactdefaultargs") DumpGeometry; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpGeometryToString() { - std::stringstream s; - self->DumpGeometry(s); - return s.str();} - }; +Return +------- +OS: Standard_OStream - %feature("autodoc", "1"); - %extend{ - std::string DumpPolygon3DToString() { - std::stringstream s; - self->DumpPolygon3D(s); - return s.str();} - }; +Description +----------- +Dumps the geometry of me on the stream . +") DumpGeometry; + virtual void DumpGeometry(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpPolygonOnTriangulationToString() { - std::stringstream s; - self->DumpPolygonOnTriangulation(s); - return s.str();} - }; + /****************** DumpGeometry ******************/ + /**** md5 signature: 441eb2169ad0b3222fe794ba8ea21d05 ****/ + %feature("compactdefaultargs") DumpGeometry; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the geometry of on the stream . +") DumpGeometry; + virtual void DumpGeometry(const TopoDS_Shape & S, std::ostream &OutValue); + + /****************** DumpPolygon3D ******************/ + /**** md5 signature: d71dc2828833ae37d1fdf2e355dbb1b6 ****/ + %feature("compactdefaultargs") DumpPolygon3D; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the 3d polygons on the stream . +") DumpPolygon3D; + void DumpPolygon3D(std::ostream &OutValue); + + /****************** DumpPolygonOnTriangulation ******************/ + /**** md5 signature: ebede4d5757370c7f0a77e3b47b20ea8 ****/ + %feature("compactdefaultargs") DumpPolygonOnTriangulation; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the polygons on triangulation on the stream . +") DumpPolygonOnTriangulation; + void DumpPolygonOnTriangulation(std::ostream &OutValue); + + /****************** DumpTriangulation ******************/ + /**** md5 signature: 573377e15caf72db43c4f0909c6d6c4b ****/ + %feature("compactdefaultargs") DumpTriangulation; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the triangulation on the stream . +") DumpTriangulation; + void DumpTriangulation(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpTriangulationToString() { - std::stringstream s; - self->DumpTriangulation(s); - return s.str();} - }; /****************** IsWithNormals ******************/ /**** md5 signature: 49f5baecd893691e08f163fb559d8b06 ****/ %feature("compactdefaultargs") IsWithNormals; @@ -2142,34 +2286,102 @@ Return true if shape should be stored with triangles. ") IsWithTriangles; Standard_Boolean IsWithTriangles(); + /****************** ReadGeometry ******************/ + /**** md5 signature: 29982a86f8628bd19687b88946d88b2b ****/ + %feature("compactdefaultargs") ReadGeometry; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None - %feature("autodoc", "1"); - %extend{ - void ReadGeometryFromString(std::string src) { - std::stringstream s(src); - self->ReadGeometry(s);} - }; +Description +----------- +Reads the geometry of me from the stream . +") ReadGeometry; + virtual void ReadGeometry(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - void ReadPolygon3DFromString(std::string src) { - std::stringstream s(src); - self->ReadPolygon3D(s);} - }; + /****************** ReadGeometry ******************/ + /**** md5 signature: aec2489bee709d857b09eddd7a62d272 ****/ + %feature("compactdefaultargs") ReadGeometry; + %feature("autodoc", " +Parameters +---------- +T: TopAbs_ShapeEnum +IS: str +S: TopoDS_Shape - %feature("autodoc", "1"); - %extend{ - void ReadPolygonOnTriangulationFromString(std::string src) { - std::stringstream s(src); - self->ReadPolygonOnTriangulation(s);} - }; +Return +------- +None + +Description +----------- +Reads the geometry of a shape of type from the stream and returns it in . +") ReadGeometry; + virtual void ReadGeometry(const TopAbs_ShapeEnum T, std::istream & IS, TopoDS_Shape & S); + + /****************** ReadPolygon3D ******************/ + /**** md5 signature: e637370098b2bac74ea2ad781985457f ****/ + %feature("compactdefaultargs") ReadPolygon3D; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the 3d polygons of me from the stream . +") ReadPolygon3D; + void ReadPolygon3D(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** ReadPolygonOnTriangulation ******************/ + /**** md5 signature: 8c589d9572a02a58a24994948b7ca837 ****/ + %feature("compactdefaultargs") ReadPolygonOnTriangulation; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the polygons on triangulation of me from the stream . +") ReadPolygonOnTriangulation; + void ReadPolygonOnTriangulation(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** ReadTriangulation ******************/ + /**** md5 signature: 2c884f46fbe1934a9efd5f890623beee ****/ + %feature("compactdefaultargs") ReadTriangulation; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the triangulation of me from the stream . +") ReadTriangulation; + void ReadTriangulation(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - void ReadTriangulationFromString(std::string src) { - std::stringstream s(src); - self->ReadTriangulation(s);} - }; /****************** SetWithNormals ******************/ /**** md5 signature: 9f03f91e56766f46bd17d99a089a0a21 ****/ %feature("compactdefaultargs") SetWithNormals; @@ -2206,14 +2418,99 @@ Define if shape will be stored with triangles. ignored (always written) if face ") SetWithTriangles; void SetWithTriangles(const Standard_Boolean theWithTriangles); + /****************** WriteGeometry ******************/ + /**** md5 signature: 4f112c9f4ab0e11dc4ef39084df9e9d4 ****/ + %feature("compactdefaultargs") WriteGeometry; + %feature("autodoc", " +Parameters +---------- +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the geometry of me on the stream in a format that can be read back by read. +") WriteGeometry; + virtual void WriteGeometry(std::ostream &OutValue, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** WriteGeometry ******************/ + /**** md5 signature: ce5d0a3d33cc100dd52fd3b965ea1743 ****/ + %feature("compactdefaultargs") WriteGeometry; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the geometry of on the stream in a format that can be read back by read. +") WriteGeometry; + virtual void WriteGeometry(const TopoDS_Shape & S, std::ostream &OutValue); + + /****************** WritePolygon3D ******************/ + /**** md5 signature: adec09c9b52ff86073162dcfc4f3bda4 ****/ + %feature("compactdefaultargs") WritePolygon3D; + %feature("autodoc", " +Parameters +---------- +Compact: bool (optional, default to Standard_True) +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the 3d polygons on the stream in a format that can be read back by read. +") WritePolygon3D; + void WritePolygon3D(std::ostream &OutValue, const Standard_Boolean Compact = Standard_True, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** WritePolygonOnTriangulation ******************/ + /**** md5 signature: b6577cbf6cdb2bc0baa774f88dfd3418 ****/ + %feature("compactdefaultargs") WritePolygonOnTriangulation; + %feature("autodoc", " +Parameters +---------- +Compact: bool (optional, default to Standard_True) +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the polygons on triangulation on the stream in a format that can be read back by read. +") WritePolygonOnTriangulation; + void WritePolygonOnTriangulation(std::ostream &OutValue, const Standard_Boolean Compact = Standard_True, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** WriteTriangulation ******************/ + /**** md5 signature: 63a7d12f83f3bef281e1178d99ed272d ****/ + %feature("compactdefaultargs") WriteTriangulation; + %feature("autodoc", " +Parameters +---------- +Compact: bool (optional, default to Standard_True) +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the triangulation on the stream in a format that can be read back by read. +") WriteTriangulation; + void WriteTriangulation(std::ostream &OutValue, const Standard_Boolean Compact = Standard_True, const Message_ProgressRange & theProgress = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - std::string WriteGeometryToString() { - std::stringstream s; - self->WriteGeometry(s); - return s.str();} - }; }; @@ -3506,6 +3803,10 @@ def breptools_Compare(*args): def breptools_DetectClosedness(*args): return breptools.DetectClosedness(*args) +@deprecated +def breptools_Dump(*args): + return breptools.Dump(*args) + @deprecated def breptools_EvalAndUpdateTol(*args): return breptools.EvalAndUpdateTol(*args) @@ -3538,6 +3839,10 @@ def breptools_OuterWire(*args): def breptools_Read(*args): return breptools.Read(*args) +@deprecated +def breptools_Read(*args): + return breptools.Read(*args) + @deprecated def breptools_RemoveInternals(*args): return breptools.RemoveInternals(*args) @@ -3618,6 +3923,14 @@ def breptools_Write(*args): def breptools_Write(*args): return breptools.Write(*args) +@deprecated +def breptools_Write(*args): + return breptools.Write(*args) + +@deprecated +def breptools_Write(*args): + return breptools.Write(*args) + @deprecated def BRepTools_History_IsSupportedType(*args): return BRepTools_History.IsSupportedType(*args) diff --git a/src/SWIG_files/wrapper/BRepTools.pyi b/src/SWIG_files/wrapper/BRepTools.pyi index e5d5543d2..26c798d5a 100644 --- a/src/SWIG_files/wrapper/BRepTools.pyi +++ b/src/SWIG_files/wrapper/BRepTools.pyi @@ -45,6 +45,8 @@ class breptools: @staticmethod def DetectClosedness(theFace: TopoDS_Face) -> Tuple[bool, bool]: ... @staticmethod + def Dump(Sh: TopoDS_Shape) -> str: ... + @staticmethod def EvalAndUpdateTol(theE: TopoDS_Edge, theC3d: Geom_Curve, theC2d: Geom2d_Curve, theS: Geom_Surface, theF: float, theL: float) -> float: ... @staticmethod def IsReallyClosed(E: TopoDS_Edge, F: TopoDS_Face) -> bool: ... @@ -60,6 +62,9 @@ class breptools: def OuterWire(F: TopoDS_Face) -> TopoDS_Wire: ... @overload @staticmethod + def Read(Sh: TopoDS_Shape, S: str, B: BRep_Builder, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + @staticmethod def Read(Sh: TopoDS_Shape, File: str, B: BRep_Builder, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> bool: ... @staticmethod def RemoveInternals(theS: TopoDS_Shape, theForce: Optional[bool] = False) -> None: ... @@ -111,6 +116,12 @@ class breptools: def UpdateFaceUVPoints(theF: TopoDS_Face) -> None: ... @overload @staticmethod + def Write(theShape: TopoDS_Shape, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + @overload + @staticmethod + def Write(theShape: TopoDS_Shape, theWithTriangles: bool, theWithNormals: bool, theVersion: TopTools_FormatVersion, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + @overload + @staticmethod def Write(theShape: TopoDS_Shape, theFile: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> bool: ... @overload @staticmethod @@ -124,6 +135,7 @@ class BRepTools_History(Standard_Transient): def AddGenerated(self, theInitial: TopoDS_Shape, theGenerated: TopoDS_Shape) -> None: ... def AddModified(self, theInitial: TopoDS_Shape, theModified: TopoDS_Shape) -> None: ... def Clear(self) -> None: ... + def Dump(self) -> str: ... def Generated(self, theInitial: TopoDS_Shape) -> TopTools_ListOfShape: ... def HasGenerated(self) -> bool: ... def HasModified(self) -> bool: ... @@ -204,10 +216,31 @@ class BRepTools_ShapeSet(TopTools_ShapeSet): def AddShapes(self, S1: TopoDS_Shape, S2: TopoDS_Shape) -> None: ... def Check(self, T: TopAbs_ShapeEnum, S: TopoDS_Shape) -> None: ... def Clear(self) -> None: ... + @overload + def DumpGeometry(self) -> str: ... + @overload + def DumpGeometry(self, S: TopoDS_Shape) -> str: ... + def DumpPolygon3D(self) -> str: ... + def DumpPolygonOnTriangulation(self) -> str: ... + def DumpTriangulation(self) -> str: ... def IsWithNormals(self) -> bool: ... def IsWithTriangles(self) -> bool: ... + @overload + def ReadGeometry(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def ReadGeometry(self, T: TopAbs_ShapeEnum, IS: str, S: TopoDS_Shape) -> None: ... + def ReadPolygon3D(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + def ReadPolygonOnTriangulation(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + def ReadTriangulation(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... def SetWithNormals(self, theWithNormals: bool) -> None: ... def SetWithTriangles(self, theWithTriangles: bool) -> None: ... + @overload + def WriteGeometry(self, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + @overload + def WriteGeometry(self, S: TopoDS_Shape) -> str: ... + def WritePolygon3D(self, Compact: Optional[bool] = True, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + def WritePolygonOnTriangulation(self, Compact: Optional[bool] = True, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + def WriteTriangulation(self, Compact: Optional[bool] = True, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... class BRepTools_Substitution: def __init__(self) -> None: ... diff --git a/src/SWIG_files/wrapper/BRepTopAdaptor.i b/src/SWIG_files/wrapper/BRepTopAdaptor.i index 48fa4990c..319d8f2f1 100644 --- a/src/SWIG_files/wrapper/BRepTopAdaptor.i +++ b/src/SWIG_files/wrapper/BRepTopAdaptor.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_breptopadaptor.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BSplCLib.i b/src/SWIG_files/wrapper/BSplCLib.i index d44bbf8bc..fa4e5c914 100644 --- a/src/SWIG_files/wrapper/BSplCLib.i +++ b/src/SWIG_files/wrapper/BSplCLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bsplclib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BSplSLib.i b/src/SWIG_files/wrapper/BSplSLib.i index c50048659..2ed9bb370 100644 --- a/src/SWIG_files/wrapper/BSplSLib.i +++ b/src/SWIG_files/wrapper/BSplSLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bsplslib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BVH.i b/src/SWIG_files/wrapper/BVH.i index 0952781e0..53d192d5a 100644 --- a/src/SWIG_files/wrapper/BVH.i +++ b/src/SWIG_files/wrapper/BVH.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bvh.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BiTgte.i b/src/SWIG_files/wrapper/BiTgte.i index 6af40c37a..97067c543 100644 --- a/src/SWIG_files/wrapper/BiTgte.i +++ b/src/SWIG_files/wrapper/BiTgte.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bitgte.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BinDrivers.i b/src/SWIG_files/wrapper/BinDrivers.i index eb49b7a96..23d2d9d80 100644 --- a/src/SWIG_files/wrapper/BinDrivers.i +++ b/src/SWIG_files/wrapper/BinDrivers.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bindrivers.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -205,6 +206,25 @@ No available documentation. ") AttributeDrivers; virtual opencascade::handle AttributeDrivers(const opencascade::handle & theMsgDriver); + /****************** CheckShapeSection ******************/ + /**** md5 signature: 700e6a408d65152684bc7e5f46482651 ****/ + %feature("compactdefaultargs") CheckShapeSection; + %feature("autodoc", " +Parameters +---------- +thePos: Storage_Position +theIS: str + +Return +------- +None + +Description +----------- +No available documentation. +") CheckShapeSection; + virtual void CheckShapeSection(const Storage_Position & thePos, std::istream & theIS); + /****************** Clear ******************/ /**** md5 signature: f671931d03948860d0ead34afbe920aa ****/ %feature("compactdefaultargs") Clear; @@ -237,6 +257,27 @@ Enables reading in the quick part access mode. ") EnableQuickPartReading; virtual void EnableQuickPartReading(const opencascade::handle & theMessageDriver, Standard_Boolean theValue); + /****************** ReadShapeSection ******************/ + /**** md5 signature: 7bf07d0fc30fd0c1486d23e896f3c271 ****/ + %feature("compactdefaultargs") ReadShapeSection; + %feature("autodoc", " +Parameters +---------- +theSection: BinLDrivers_DocumentSection +theIS: str +isMess: bool (optional, default to Standard_False) +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +No available documentation. +") ReadShapeSection; + virtual void ReadShapeSection(BinLDrivers_DocumentSection & theSection, std::istream & theIS, const Standard_Boolean isMess = Standard_False, const Message_ProgressRange & theRange = Message_ProgressRange()); + }; @@ -380,6 +421,26 @@ Set if triangulation should be stored or not. ") SetWithTriangles; void SetWithTriangles(const opencascade::handle & theMessageDriver, const Standard_Boolean theWithTriangulation); + /****************** WriteShapeSection ******************/ + /**** md5 signature: 64e554649673659ee22057bde5256cf5 ****/ + %feature("compactdefaultargs") WriteShapeSection; + %feature("autodoc", " +Parameters +---------- +theDocSection: BinLDrivers_DocumentSection +theDocVer: TDocStd_FormatVersion +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theOS: Standard_OStream + +Description +----------- +Implements the procedure of writing a shape section to file. +") WriteShapeSection; + virtual void WriteShapeSection(BinLDrivers_DocumentSection & theDocSection, std::ostream &OutValue, const TDocStd_FormatVersion theDocVer, const Message_ProgressRange & theRange = Message_ProgressRange()); + }; diff --git a/src/SWIG_files/wrapper/BinDrivers.pyi b/src/SWIG_files/wrapper/BinDrivers.pyi index eedcddd6e..04cbaaab1 100644 --- a/src/SWIG_files/wrapper/BinDrivers.pyi +++ b/src/SWIG_files/wrapper/BinDrivers.pyi @@ -28,8 +28,10 @@ class bindrivers: class BinDrivers_DocumentRetrievalDriver(BinLDrivers_DocumentRetrievalDriver): def __init__(self) -> None: ... def AttributeDrivers(self, theMsgDriver: Message_Messenger) -> BinMDF_ADriverTable: ... + def CheckShapeSection(self, thePos: Storage_Position, theIS: str) -> None: ... def Clear(self) -> None: ... def EnableQuickPartReading(self, theMessageDriver: Message_Messenger, theValue: bool) -> None: ... + def ReadShapeSection(self, theSection: BinLDrivers_DocumentSection, theIS: str, isMess: Optional[bool] = False, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... class BinDrivers_DocumentStorageDriver(BinLDrivers_DocumentStorageDriver): def __init__(self) -> None: ... @@ -40,6 +42,7 @@ class BinDrivers_DocumentStorageDriver(BinLDrivers_DocumentStorageDriver): def IsWithTriangles(self) -> bool: ... def SetWithNormals(self, theMessageDriver: Message_Messenger, theWithTriangulation: bool) -> None: ... def SetWithTriangles(self, theMessageDriver: Message_Messenger, theWithTriangulation: bool) -> None: ... + def WriteShapeSection(self, theDocSection: BinLDrivers_DocumentSection, theDocVer: TDocStd_FormatVersion, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... # harray1 classes # harray2 classes diff --git a/src/SWIG_files/wrapper/BinLDrivers.i b/src/SWIG_files/wrapper/BinLDrivers.i index 1154a4447..24bda5b40 100644 --- a/src/SWIG_files/wrapper/BinLDrivers.i +++ b/src/SWIG_files/wrapper/BinLDrivers.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binldrivers.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -231,6 +232,29 @@ Retrieves the content of the file into a new document. ") Read; virtual void Read(TCollection_ExtendedString theFileName, const opencascade::handle & theNewDocument, const opencascade::handle & theApplication, const opencascade::handle & theFilter = opencascade::handle(), const Message_ProgressRange & theProgress = Message_ProgressRange()); + /****************** Read ******************/ + /**** md5 signature: 771be11c877b12fef9f44e77dfdf48ba ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +theIStream: str +theStorageData: Storage_Data +theDoc: CDM_Document +theApplication: CDM_Application +theFilter: PCDM_ReaderFilter (optional, default to opencascade::handle()) +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +No available documentation. +") Read; + virtual void Read(std::istream & theIStream, const opencascade::handle & theStorageData, const opencascade::handle & theDoc, const opencascade::handle & theApplication, const opencascade::handle & theFilter = opencascade::handle(), const Message_ProgressRange & theProgress = Message_ProgressRange()); + }; @@ -331,6 +355,26 @@ Query the offset of the section in the persistent file. ") Offset; uint64_t Offset(); + /****************** ReadTOC ******************/ + /**** md5 signature: 6d892ade1242a16e99246162955f59d3 ****/ + %feature("compactdefaultargs") ReadTOC; + %feature("autodoc", " +Parameters +---------- +theSection: BinLDrivers_DocumentSection +theIS: str +theDocFormatVersion: TDocStd_FormatVersion + +Return +------- +bool + +Description +----------- +Fill a documentsection instance from the data that are read from toc. returns false in case of the stream reading problem. +") ReadTOC; + static Standard_Boolean ReadTOC(BinLDrivers_DocumentSection & theSection, std::istream & theIS, const TDocStd_FormatVersion theDocFormatVersion); + /****************** SetLength ******************/ /**** md5 signature: 9c89e70c52c75c8f071a4a8b0807f508 ****/ %feature("compactdefaultargs") SetLength; @@ -367,6 +411,43 @@ Set the offset of the section in the persistent file. ") SetOffset; void SetOffset(const uint64_t theOffset); + /****************** Write ******************/ + /**** md5 signature: f8a305892a9630863531b16bb0e8d748 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theOffset: uint64_t +theDocFormatVersion: TDocStd_FormatVersion + +Return +------- +theOS: Standard_OStream + +Description +----------- +Save offset and length data into the section entry in the document toc (list of sections). +") Write; + void Write(std::ostream &OutValue, const uint64_t theOffset, const TDocStd_FormatVersion theDocFormatVersion); + + /****************** WriteTOC ******************/ + /**** md5 signature: 1286c7467df97ba170437cf09bae7984 ****/ + %feature("compactdefaultargs") WriteTOC; + %feature("autodoc", " +Parameters +---------- +theDocFormatVersion: TDocStd_FormatVersion + +Return +------- +theOS: Standard_OStream + +Description +----------- +Create a section entry in the document toc (list of sections). +") WriteTOC; + void WriteTOC(std::ostream &OutValue, const TDocStd_FormatVersion theDocFormatVersion); + }; @@ -469,6 +550,25 @@ Write to the binary file . ") Write; virtual void Write(const opencascade::handle & theDocument, TCollection_ExtendedString theFileName, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Write ******************/ + /**** md5 signature: 1593005190d18463c833b2c78ffb13a5 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theDocument: CDM_Document +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theOStream: Standard_OStream + +Description +----------- +Write to theostream. +") Write; + virtual void Write(const opencascade::handle & theDocument, std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + }; @@ -500,4 +600,8 @@ def binldrivers_DefineFormat(*args): def binldrivers_Factory(*args): return binldrivers.Factory(*args) +@deprecated +def BinLDrivers_DocumentSection_ReadTOC(*args): + return BinLDrivers_DocumentSection.ReadTOC(*args) + } diff --git a/src/SWIG_files/wrapper/BinLDrivers.pyi b/src/SWIG_files/wrapper/BinLDrivers.pyi index 59ce93d34..1b11c42e9 100644 --- a/src/SWIG_files/wrapper/BinLDrivers.pyi +++ b/src/SWIG_files/wrapper/BinLDrivers.pyi @@ -34,6 +34,8 @@ class BinLDrivers_DocumentRetrievalDriver(PCDM_RetrievalDriver): def AttributeDrivers(self, theMsgDriver: Message_Messenger) -> BinMDF_ADriverTable: ... @overload def Read(self, theFileName: str, theNewDocument: CDM_Document, theApplication: CDM_Application, theFilter: Optional[PCDM_ReaderFilter] = PCDM_ReaderFilter(), theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def Read(self, theIStream: str, theStorageData: Storage_Data, theDoc: CDM_Document, theApplication: CDM_Application, theFilter: Optional[PCDM_ReaderFilter] = PCDM_ReaderFilter(), theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... class BinLDrivers_DocumentSection: @overload @@ -44,6 +46,9 @@ class BinLDrivers_DocumentSection: def Length(self) -> False: ... def Name(self) -> str: ... def Offset(self) -> False: ... + @staticmethod + def ReadTOC(theSection: BinLDrivers_DocumentSection, theIS: str, theDocFormatVersion: TDocStd_FormatVersion) -> bool: ... + def WriteTOC(self, theDocFormatVersion: TDocStd_FormatVersion) -> str: ... class BinLDrivers_DocumentStorageDriver(PCDM_StorageDriver): def __init__(self) -> None: ... @@ -52,6 +57,8 @@ class BinLDrivers_DocumentStorageDriver(PCDM_StorageDriver): def IsQuickPart(self, theVersion: int) -> bool: ... @overload def Write(self, theDocument: CDM_Document, theFileName: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def Write(self, theDocument: CDM_Document, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... # harray1 classes # harray2 classes diff --git a/src/SWIG_files/wrapper/BinMDF.i b/src/SWIG_files/wrapper/BinMDF.i index 89f2e9c27..1a3b3222b 100644 --- a/src/SWIG_files/wrapper/BinMDF.i +++ b/src/SWIG_files/wrapper/BinMDF.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binmdf.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BinMDataStd.i b/src/SWIG_files/wrapper/BinMDataStd.i index d425d52dc..288eed30c 100644 --- a/src/SWIG_files/wrapper/BinMDataStd.i +++ b/src/SWIG_files/wrapper/BinMDataStd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binmdatastd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BinMDataXtd.i b/src/SWIG_files/wrapper/BinMDataXtd.i index 85409398b..580af208a 100644 --- a/src/SWIG_files/wrapper/BinMDataXtd.i +++ b/src/SWIG_files/wrapper/BinMDataXtd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binmdataxtd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BinMDocStd.i b/src/SWIG_files/wrapper/BinMDocStd.i index 2f67e145a..07c08db04 100644 --- a/src/SWIG_files/wrapper/BinMDocStd.i +++ b/src/SWIG_files/wrapper/BinMDocStd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binmdocstd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BinMFunction.i b/src/SWIG_files/wrapper/BinMFunction.i index 688462d5e..0397cd4ff 100644 --- a/src/SWIG_files/wrapper/BinMFunction.i +++ b/src/SWIG_files/wrapper/BinMFunction.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binmfunction.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BinMNaming.i b/src/SWIG_files/wrapper/BinMNaming.i index c04410bd8..174d2ab31 100644 --- a/src/SWIG_files/wrapper/BinMNaming.i +++ b/src/SWIG_files/wrapper/BinMNaming.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binmnaming.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -284,13 +285,25 @@ No available documentation. ") Paste; void Paste(const opencascade::handle & Source, BinObjMgt_Persistent & Target, BinObjMgt_SRelocationTable & RelocTable); + /****************** ReadShapeSection ******************/ + /**** md5 signature: 66ff232ed5a17a346bcdcc9d0bc2b9ce ****/ + %feature("compactdefaultargs") ReadShapeSection; + %feature("autodoc", " +Parameters +---------- +theIS: str +therange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Input the shapes from bin document file. +") ReadShapeSection; + void ReadShapeSection(std::istream & theIS, const Message_ProgressRange & therange = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - void ReadShapeSectionFromString(std::string src) { - std::stringstream s(src); - self->ReadShapeSection(s);} - }; /****************** SetWithNormals ******************/ /**** md5 signature: 2f7757cd59d0573f368c1b217c28b7f5 ****/ %feature("compactdefaultargs") SetWithNormals; @@ -345,6 +358,25 @@ Returns shape-set of the needed type. ") ShapeSet; BinTools_ShapeSetBase * ShapeSet(const Standard_Boolean theReading); + /****************** WriteShapeSection ******************/ + /**** md5 signature: 257dfbc6e624d2b0bb9fa1de0712dd47 ****/ + %feature("compactdefaultargs") WriteShapeSection; + %feature("autodoc", " +Parameters +---------- +theDocVer: int +therange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theOS: Standard_OStream + +Description +----------- +Output the shapes into bin document file. +") WriteShapeSection; + void WriteShapeSection(std::ostream &OutValue, const Standard_Integer theDocVer, const Message_ProgressRange & therange = Message_ProgressRange()); + }; diff --git a/src/SWIG_files/wrapper/BinMNaming.pyi b/src/SWIG_files/wrapper/BinMNaming.pyi index 023e8f01e..7d39da69a 100644 --- a/src/SWIG_files/wrapper/BinMNaming.pyi +++ b/src/SWIG_files/wrapper/BinMNaming.pyi @@ -27,9 +27,11 @@ class BinMNaming_NamedShapeDriver(BinMDF_ADriver): def Paste(self, Source: BinObjMgt_Persistent, Target: TDF_Attribute, RelocTable: BinObjMgt_RRelocationTable) -> bool: ... @overload def Paste(self, Source: TDF_Attribute, Target: BinObjMgt_Persistent, RelocTable: BinObjMgt_SRelocationTable) -> None: ... + def ReadShapeSection(self, theIS: str, therange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... def SetWithNormals(self, isWithNormals: bool) -> None: ... def SetWithTriangles(self, isWithTriangles: bool) -> None: ... def ShapeSet(self, theReading: bool) -> BinTools_ShapeSetBase: ... + def WriteShapeSection(self, theDocVer: int, therange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... class BinMNaming_NamingDriver(BinMDF_ADriver): def __init__(self, theMessageDriver: Message_Messenger) -> None: ... diff --git a/src/SWIG_files/wrapper/BinMXCAFDoc.i b/src/SWIG_files/wrapper/BinMXCAFDoc.i index 35b1f145d..3114a2730 100644 --- a/src/SWIG_files/wrapper/BinMXCAFDoc.i +++ b/src/SWIG_files/wrapper/BinMXCAFDoc.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binmxcafdoc.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BinObjMgt.i b/src/SWIG_files/wrapper/BinObjMgt.i index 464f25bbb..ecae1c1a3 100644 --- a/src/SWIG_files/wrapper/BinObjMgt.i +++ b/src/SWIG_files/wrapper/BinObjMgt.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binobjmgt.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -875,20 +876,42 @@ Put c array of float, thelength is the number of elements. ") PutShortRealArray; BinObjMgt_Persistent & PutShortRealArray(const BinObjMgt_PShortReal theArray, const Standard_Integer theLength); + /****************** Read ******************/ + /**** md5 signature: 703e11a3fb46f18575a45a43966aa937 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +theIS: str + +Return +------- +Standard_IStream - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; +Description +----------- +Retrieves from the stream. inline standard_istream& operator>> (standard_istream&, binobjmgt_persistent&) is also available. +") Read; + Standard_IStream & Read(std::istream & theIS); + + /****************** SetIStream ******************/ + /**** md5 signature: 5d0249291c7182c496c2994cfe459a5d ****/ + %feature("compactdefaultargs") SetIStream; + %feature("autodoc", " +Parameters +---------- +theStream: str + +Return +------- +None + +Description +----------- +Sets the stream for direct reading. +") SetIStream; + void SetIStream(std::istream & theStream); - %feature("autodoc", "1"); - %extend{ - void SetIStreamFromString(std::string src) { - std::stringstream s(src); - self->SetIStream(s);} - }; /****************** SetId ******************/ /**** md5 signature: 3131e8337f46d2a085b133db913d7e12 ****/ %feature("compactdefaultargs") SetId; @@ -907,14 +930,23 @@ Sets the id of the object. ") SetId; void SetId(const Standard_Integer theId); + /****************** SetOStream ******************/ + /**** md5 signature: 05ebcdbd2bdd64c5cb2e8dd9a9b0f378 ****/ + %feature("compactdefaultargs") SetOStream; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theStream: Standard_OStream + +Description +----------- +Sets the stream for direct writing. +") SetOStream; + void SetOStream(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string SetOStreamToString() { - std::stringstream s; - self->SetOStream(s); - return s.str();} - }; /****************** SetPosition ******************/ /**** md5 signature: 734a09cc1c2f91af755a362f6ac9dbb1 ****/ %feature("compactdefaultargs") SetPosition; @@ -990,6 +1022,24 @@ Returns the id of the type of the object. ") TypeId; Standard_Integer TypeId(); + /****************** Write ******************/ + /**** md5 signature: 84710283a2afe6c7aea0d3158b3cf2ea ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theDirectStream: bool (optional, default to Standard_False) + +Return +------- +theOS: Standard_OStream + +Description +----------- +Stores to the stream. inline standard_ostream& operator<< (standard_ostream&, binobjmgt_persistent&) is also available. if thedirectstream is true, after this data the direct stream data is stored. +") Write; + Standard_OStream & Write(std::ostream &OutValue, const Standard_Boolean theDirectStream = Standard_False); + }; diff --git a/src/SWIG_files/wrapper/BinObjMgt.pyi b/src/SWIG_files/wrapper/BinObjMgt.pyi index 356a9a150..a7018836b 100644 --- a/src/SWIG_files/wrapper/BinObjMgt.pyi +++ b/src/SWIG_files/wrapper/BinObjMgt.pyi @@ -64,12 +64,16 @@ class BinObjMgt_Persistent: def PutRealArray(self, theArray: BinObjMgt_PReal, theLength: int) -> BinObjMgt_Persistent: ... def PutShortReal(self, theValue: float) -> BinObjMgt_Persistent: ... def PutShortRealArray(self, theArray: BinObjMgt_PShortReal, theLength: int) -> BinObjMgt_Persistent: ... + def Read(self, theIS: str) -> Standard_IStream: ... + def SetIStream(self, theStream: str) -> None: ... def SetId(self, theId: int) -> None: ... + def SetOStream(self) -> str: ... def SetPosition(self, thePos: int) -> bool: ... def SetTypeId(self, theId: int) -> None: ... def StreamStart(self) -> BinObjMgt_Position: ... def Truncate(self) -> None: ... def TypeId(self) -> int: ... + def Write(self, theDirectStream: Optional[bool] = False) -> Tuple[Standard_OStream, str]: ... class BinObjMgt_RRelocationTable(TColStd_DataMapOfIntegerTransient): def Clear(self, doReleaseMemory: Optional[bool] = True) -> None: ... diff --git a/src/SWIG_files/wrapper/BinTObjDrivers.i b/src/SWIG_files/wrapper/BinTObjDrivers.i index 5b62950ae..ed125ce2e 100644 --- a/src/SWIG_files/wrapper/BinTObjDrivers.i +++ b/src/SWIG_files/wrapper/BinTObjDrivers.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bintobjdrivers.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BinTools.i b/src/SWIG_files/wrapper/BinTools.i index bc971bd9a..32698ab72 100644 --- a/src/SWIG_files/wrapper/BinTools.i +++ b/src/SWIG_files/wrapper/BinTools.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bintools.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -192,6 +193,207 @@ typedef BinTools_LocationSet * BinTools_LocationSetPtr; %rename(bintools) BinTools; class BinTools { public: + /****************** GetBool ******************/ + /**** md5 signature: 790955f4f4ba6908f582aee44fb265dd ****/ + %feature("compactdefaultargs") GetBool; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +theValue: bool + +Description +----------- +No available documentation. +") GetBool; + static Standard_IStream & GetBool(std::istream & IS, Standard_Boolean &OutValue); + + /****************** GetExtChar ******************/ + /**** md5 signature: 123b0c66c3051e9feb92d9bfbbb192e6 ****/ + %feature("compactdefaultargs") GetExtChar; + %feature("autodoc", " +Parameters +---------- +IS: str +theValue: Standard_ExtCharacter + +Return +------- +Standard_IStream + +Description +----------- +No available documentation. +") GetExtChar; + static Standard_IStream & GetExtChar(std::istream & IS, Standard_ExtCharacter & theValue); + + /****************** GetInteger ******************/ + /**** md5 signature: 651f0a33e9e7502671bc3ef42df123eb ****/ + %feature("compactdefaultargs") GetInteger; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +theValue: int + +Description +----------- +No available documentation. +") GetInteger; + static Standard_IStream & GetInteger(std::istream & IS, Standard_Integer &OutValue); + + /****************** GetReal ******************/ + /**** md5 signature: 38bb080ad1790d03931bd0c0aa629b48 ****/ + %feature("compactdefaultargs") GetReal; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +theValue: float + +Description +----------- +No available documentation. +") GetReal; + static Standard_IStream & GetReal(std::istream & IS, Standard_Real &OutValue); + + /****************** GetShortReal ******************/ + /**** md5 signature: 825f85854ff0d067143065401770de68 ****/ + %feature("compactdefaultargs") GetShortReal; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +theValue: float + +Description +----------- +No available documentation. +") GetShortReal; + static Standard_IStream & GetShortReal(std::istream & IS, Standard_ShortReal &OutValue); + + /****************** PutBool ******************/ + /**** md5 signature: 0afdd320ec549f8b3da2cea1881b2e46 ****/ + %feature("compactdefaultargs") PutBool; + %feature("autodoc", " +Parameters +---------- +theValue: bool + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") PutBool; + static Standard_OStream & PutBool(std::ostream &OutValue, const Standard_Boolean theValue); + + /****************** PutExtChar ******************/ + /**** md5 signature: 6f5f97a4001fb0c14520fc2b5b0888a6 ****/ + %feature("compactdefaultargs") PutExtChar; + %feature("autodoc", " +Parameters +---------- +theValue: Standard_ExtCharacter + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") PutExtChar; + static Standard_OStream & PutExtChar(std::ostream &OutValue, const Standard_ExtCharacter theValue); + + /****************** PutInteger ******************/ + /**** md5 signature: 9e70411996f2de65be7008dfb8c34a78 ****/ + %feature("compactdefaultargs") PutInteger; + %feature("autodoc", " +Parameters +---------- +theValue: int + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") PutInteger; + static Standard_OStream & PutInteger(std::ostream &OutValue, const Standard_Integer theValue); + + /****************** PutReal ******************/ + /**** md5 signature: f7775506bd4618f420e375baa72bb4b9 ****/ + %feature("compactdefaultargs") PutReal; + %feature("autodoc", " +Parameters +---------- +theValue: float + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") PutReal; + static Standard_OStream & PutReal(std::ostream &OutValue, const Standard_Real & theValue); + + /****************** PutShortReal ******************/ + /**** md5 signature: 042b4eea8e6fbf4023588ae3edf72eee ****/ + %feature("compactdefaultargs") PutShortReal; + %feature("autodoc", " +Parameters +---------- +theValue: float + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") PutShortReal; + static Standard_OStream & PutShortReal(std::ostream &OutValue, const Standard_ShortReal & theValue); + + /****************** Read ******************/ + /**** md5 signature: f85bd54e020fe6af72c5aebd07ae8a7b ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +theShape: TopoDS_Shape +theStream: str +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads a shape from and returns it in . +") Read; + static void Read(TopoDS_Shape & theShape, std::istream & theStream, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Read ******************/ /**** md5 signature: 8f3081f8c29c84c71da9267be3a08fa6 ****/ %feature("compactdefaultargs") Read; @@ -212,6 +414,47 @@ Reads a shape from and returns it in . ") Read; static Standard_Boolean Read(TopoDS_Shape & theShape, Standard_CString theFile, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Write ******************/ + /**** md5 signature: 66b06396144ebe349cc1d4ffe3194b4c ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theShape: TopoDS_Shape +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theStream: Standard_OStream + +Description +----------- +Writes the shape to the stream in binary format bintools_formatversion_current. this alias writes shape with triangulation data. @param theshape [in] the shape to write @param thestream [in][out] the stream to output shape into @param therange the range of progress indicator to fill in. +") Write; + static void Write(const TopoDS_Shape & theShape, std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** Write ******************/ + /**** md5 signature: cfe16f73efe24f22e21aa7c502d4ad33 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theShape: TopoDS_Shape +theWithTriangles: bool +theWithNormals: bool +theVersion: BinTools_FormatVersion +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theStream: Standard_OStream + +Description +----------- +Writes the shape to the stream in binary format of specified version. @param theshape [in] the shape to write @param thestream [in][out] the stream to output shape into @param thewithtriangles [in] flag which specifies whether to save shape with (true) or without (false) triangles; has no effect on triangulation-only geometry @param thewithnormals [in] flag which specifies whether to save triangulation with (true) or without (false) normals; has no effect on triangulation-only geometry @param theversion [in] the bintools format version @param therange the range of progress indicator to fill in. +") Write; + static void Write(const TopoDS_Shape & theShape, std::ostream &OutValue, const Standard_Boolean theWithTriangles, const Standard_Boolean theWithNormals, const BinTools_FormatVersion theVersion, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Write ******************/ /**** md5 signature: 3881a3762eede8c671fff2911d095012 ****/ %feature("compactdefaultargs") Write; @@ -349,21 +592,62 @@ Returns the index of . ") Index; Standard_Integer Index(const opencascade::handle & C); + /****************** Read ******************/ + /**** md5 signature: 5f2f4456946ffa93c620ea243e0f1362 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the content of me from the stream . me is first cleared. +") Read; + void Read(std::istream & IS, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** ReadCurve2d ******************/ + /**** md5 signature: 8e76149c6e11b24fea6111aef9de38d2 ****/ + %feature("compactdefaultargs") ReadCurve2d; + %feature("autodoc", " +Parameters +---------- +IS: str +C: Geom2d_Curve + +Return +------- +Standard_IStream + +Description +----------- +Reads the curve from the stream. the curve is assumed to have been written with the write method. +") ReadCurve2d; + static Standard_IStream & ReadCurve2d(std::istream & IS, opencascade::handle & C); + + /****************** Write ******************/ + /**** md5 signature: d5d3cef6bd5a493e7490071dfb7ee4a9 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in a format that can be read back by read. +") Write; + void Write(std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; /****************** WriteCurve2d ******************/ /**** md5 signature: fb004cea29fe8c8fbe520368a3fabd33 ****/ %feature("compactdefaultargs") WriteCurve2d; @@ -481,21 +765,62 @@ Returns the index of . ") Index; Standard_Integer Index(const opencascade::handle & C); + /****************** Read ******************/ + /**** md5 signature: 5f2f4456946ffa93c620ea243e0f1362 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the content of me from the stream . me is first cleared. +") Read; + void Read(std::istream & IS, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** ReadCurve ******************/ + /**** md5 signature: dd391fb5d956a43e1ec7bd591b8d99ee ****/ + %feature("compactdefaultargs") ReadCurve; + %feature("autodoc", " +Parameters +---------- +IS: str +C: Geom_Curve + +Return +------- +Standard_IStream + +Description +----------- +Reads the curve from the stream. the curve is assumed to have been written with the write method. +") ReadCurve; + static Standard_IStream & ReadCurve(std::istream & IS, opencascade::handle & C); + + /****************** Write ******************/ + /**** md5 signature: d5d3cef6bd5a493e7490071dfb7ee4a9 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in a format that can be read back by read. +") Write; + void Write(std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; /****************** WriteCurve ******************/ /**** md5 signature: 0fd9a95014467f2918a41d1253d1067c ****/ %feature("compactdefaultargs") WriteCurve; @@ -625,31 +950,51 @@ Returns number of locations. ") NbLocations; Standard_Integer NbLocations(); + /****************** Read ******************/ + /**** md5 signature: e0ade46168fbfd205cb072426bbabac5 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; -}; - +Return +------- +None -%extend BinTools_LocationSet { - %pythoncode { - __repr__ = _dumps_object - } -}; +Description +----------- +Reads the content of me from the stream . me is first cleared. +") Read; + void Read(std::istream & IS); -/************************* + /****************** Write ******************/ + /**** md5 signature: 26d5c57dbc383da9144a6151592feb6a ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in a format that can be read back by read. +") Write; + void Write(std::ostream &OutValue); + +}; + + +%extend BinTools_LocationSet { + %pythoncode { + __repr__ = _dumps_object + } +}; + +/************************* * class BinTools_OStream * *************************/ /****************************** @@ -722,13 +1067,44 @@ Return true if shape should be stored with triangles. ") IsWithTriangles; Standard_Boolean IsWithTriangles(); + /****************** Read ******************/ + /**** md5 signature: 15d2ae9c24a20dde18a097c304597a5b ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +&: std::istream +&: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the content of me from the binary stream . me is first cleared. //! reads the locations. //! reads the geometry calling readgeometry. //! reads the shapes. for each shape reads the type. calls readgeometry(t,s). reads the flag, the subshapes. +") Read; + virtual void Read(std::istream &, const Message_ProgressRange & = Message_ProgressRange()); + + /****************** Read ******************/ + /**** md5 signature: 9e512dab6bca19a0eddcb7c7167d7163 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +&: std::istream +&: TopoDS_Shape + +Return +------- +None + +Description +----------- +An empty virtual method for redefinition in shape-reader. +") Read; + virtual void Read(std::istream &, TopoDS_Shape &); - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; /****************** SetFormatNb ******************/ /**** md5 signature: efa61c5f0aa586c699f53e1139cd95f9 ****/ %feature("compactdefaultargs") SetFormatNb; @@ -783,14 +1159,42 @@ Define if shape will be stored with triangles. ignored (always written) if face ") SetWithTriangles; void SetWithTriangles(const Standard_Boolean theWithTriangles); + /****************** Write ******************/ + /**** md5 signature: eae5f683a0f7fae7ee4a50d676192413 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +&: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +&: Standard_OStream + +Description +----------- +Writes the content of me on the stream in binary format that can be read back by read. //! writes the locations. //! writes the geometry calling writegeometry. //! dumps the shapes from last to first. for each shape: write the type. calls writegeometry(s). write the flags, the subshapes. +") Write; + virtual void Write(std::ostream &OutValue, const Message_ProgressRange & = Message_ProgressRange()); + + /****************** Write ******************/ + /**** md5 signature: 7494fb2ca2dcbcd64d26ab29a1473ab5 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +&: TopoDS_Shape + +Return +------- +&: Standard_OStream + +Description +----------- +Writes on the shape . writes the orientation, the index of the tshape and the index of the location. +") Write; + virtual void Write(const TopoDS_Shape &, std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; }; @@ -867,13 +1271,44 @@ Returns the index of . ") Index; Standard_Integer Index(const opencascade::handle & S); + /****************** Read ******************/ + /**** md5 signature: 5f2f4456946ffa93c620ea243e0f1362 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str +therange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the content of me from the stream . me is first cleared. +") Read; + void Read(std::istream & IS, const Message_ProgressRange & therange = Message_ProgressRange()); + + /****************** ReadSurface ******************/ + /**** md5 signature: aadfa21c3ae4baf4c6a6f03347b99a89 ****/ + %feature("compactdefaultargs") ReadSurface; + %feature("autodoc", " +Parameters +---------- +IS: str +S: Geom_Surface + +Return +------- +Standard_IStream + +Description +----------- +Reads the surface from the stream. the surface is assumed to have been written with the write method. +") ReadSurface; + static Standard_IStream & ReadSurface(std::istream & IS, opencascade::handle & S); - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; /****************** Surface ******************/ /**** md5 signature: f08a9f2a886e0a3933ae15a38f9b8dda ****/ %feature("compactdefaultargs") Surface; @@ -892,14 +1327,24 @@ Returns the surface of index . ") Surface; opencascade::handle Surface(const Standard_Integer I); + /****************** Write ******************/ + /**** md5 signature: d5d3cef6bd5a493e7490071dfb7ee4a9 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in binary format that can be read back by read. +") Write; + void Write(std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; /****************** WriteSurface ******************/ /**** md5 signature: 41c510c34876aa6bbad25b27f75b3a30 ****/ %feature("compactdefaultargs") WriteSurface; @@ -959,6 +1404,25 @@ Clears the content of the set. ") Clear; virtual void Clear(); + /****************** Read ******************/ + /**** md5 signature: 25227b6e5e5f66e65787f684a82d38bd ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +theStream: str +theShape: TopoDS_Shape + +Return +------- +None + +Description +----------- +Reads the shape from stream using previously restored shapes and objects by references. +") Read; + void Read(std::istream & theStream, TopoDS_Shape & theShape); + /****************** ReadLocation ******************/ /**** md5 signature: bd5aa45e9ea119dbeec11eb219039ce0 ****/ %feature("compactdefaultargs") ReadLocation; @@ -1129,41 +1593,181 @@ Returns number of shapes read from file. ") NbShapes; Standard_Integer NbShapes(); + /****************** Read ******************/ + /**** md5 signature: 4b07273aaddc061dc208ad849f29a02f ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the content of me from the binary stream . me is first cleared. //! reads the locations. //! reads the geometry calling readgeometry. //! reads the shapes. for each shape reads the type. calls readgeometry(t,s). reads the flag, the subshapes. +") Read; + virtual void Read(std::istream & IS, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** Read ******************/ + /**** md5 signature: 9e512dab6bca19a0eddcb7c7167d7163 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +&: std::istream +&: TopoDS_Shape + +Return +------- +None + +Description +----------- +An empty virtual method for redefinition in shape-reader. +") Read; + virtual void Read(std::istream &, TopoDS_Shape &); + + /****************** ReadFlagsAndSubs ******************/ + /**** md5 signature: ec793d841cfc55e44fec35b171f31924 ****/ + %feature("compactdefaultargs") ReadFlagsAndSubs; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape +T: TopAbs_ShapeEnum +IS: str +NbShapes: int + +Return +------- +None + +Description +----------- +Reads from a shape flags and sub-shapes and modifies s. +") ReadFlagsAndSubs; + virtual void ReadFlagsAndSubs(TopoDS_Shape & S, const TopAbs_ShapeEnum T, std::istream & IS, const Standard_Integer NbShapes); + + /****************** ReadGeometry ******************/ + /**** md5 signature: 8c49d87428ea54564c18dee1e735e34e ****/ + %feature("compactdefaultargs") ReadGeometry; + %feature("autodoc", " +Parameters +---------- +IS: str +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the geometry of me from the stream . +") ReadGeometry; + virtual void ReadGeometry(std::istream & IS, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** ReadPolygon3D ******************/ + /**** md5 signature: cd88a23b4835946311db7bfe884e93c4 ****/ + %feature("compactdefaultargs") ReadPolygon3D; + %feature("autodoc", " +Parameters +---------- +IS: str +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the 3d polygons of me from the stream . +") ReadPolygon3D; + void ReadPolygon3D(std::istream & IS, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** ReadPolygonOnTriangulation ******************/ + /**** md5 signature: c12c2902aa15103beb764ae29fc6d436 ****/ + %feature("compactdefaultargs") ReadPolygonOnTriangulation; + %feature("autodoc", " +Parameters +---------- +IS: str +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the polygons on triangulation of me from the stream . +") ReadPolygonOnTriangulation; + void ReadPolygonOnTriangulation(std::istream & IS, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** ReadShape ******************/ + /**** md5 signature: d4336c38e7a97a10044a8170fcfa8cf4 ****/ + %feature("compactdefaultargs") ReadShape; + %feature("autodoc", " +Parameters +---------- +T: TopAbs_ShapeEnum +IS: str +S: TopoDS_Shape + +Return +------- +None + +Description +----------- +Reads a shape of type from the stream and returns it in . +") ReadShape; + virtual void ReadShape(const TopAbs_ShapeEnum T, std::istream & IS, TopoDS_Shape & S); + + /****************** ReadSubs ******************/ + /**** md5 signature: 7a4bfadead50fe32d0ef7d49caa4db13 ****/ + %feature("compactdefaultargs") ReadSubs; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape +IS: str +NbShapes: int + +Return +------- +None + +Description +----------- +Reads from a shape and returns it in s. is the number of tshapes in the set. +") ReadSubs; + virtual void ReadSubs(TopoDS_Shape & S, std::istream & IS, const Standard_Integer NbShapes); + + /****************** ReadTriangulation ******************/ + /**** md5 signature: 90589deefe94d4f2b164d615d1250312 ****/ + %feature("compactdefaultargs") ReadTriangulation; + %feature("autodoc", " +Parameters +---------- +IS: str +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the triangulation of me from the stream . +") ReadTriangulation; + void ReadTriangulation(std::istream & IS, const Message_ProgressRange & theRange = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; - - %feature("autodoc", "1"); - %extend{ - void ReadGeometryFromString(std::string src) { - std::stringstream s(src); - self->ReadGeometry(s);} - }; - - %feature("autodoc", "1"); - %extend{ - void ReadPolygon3DFromString(std::string src) { - std::stringstream s(src); - self->ReadPolygon3D(s);} - }; - - %feature("autodoc", "1"); - %extend{ - void ReadPolygonOnTriangulationFromString(std::string src) { - std::stringstream s(src); - self->ReadPolygonOnTriangulation(s);} - }; - - %feature("autodoc", "1"); - %extend{ - void ReadTriangulationFromString(std::string src) { - std::stringstream s(src); - self->ReadTriangulation(s);} - }; /****************** Shape ******************/ /**** md5 signature: e70e8ec038f807ea515f2fa1e45089cf ****/ %feature("compactdefaultargs") Shape; @@ -1182,46 +1786,132 @@ Returns the sub-shape of index . ") Shape; const TopoDS_Shape Shape(const Standard_Integer I); + /****************** Write ******************/ + /**** md5 signature: 2090695479553866c37ac063a125c102 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in binary format that can be read back by read. //! writes the locations. //! writes the geometry calling writegeometry. //! dumps the shapes from last to first. for each shape: write the type. calls writegeometry(s). write the flags, the subshapes. +") Write; + virtual void Write(std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** Write ******************/ + /**** md5 signature: abb0b72362303f9400b3c04f195f92e2 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes on the shape . writes the orientation, the index of the tshape and the index of the location. +") Write; + virtual void Write(const TopoDS_Shape & S, std::ostream &OutValue); + + /****************** WriteGeometry ******************/ + /**** md5 signature: 79b02143ea9e44b9406698e1fc0e4a65 ****/ + %feature("compactdefaultargs") WriteGeometry; + %feature("autodoc", " +Parameters +---------- +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the geometry of me on the stream in a binary format that can be read back by read. +") WriteGeometry; + virtual void WriteGeometry(std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** WritePolygon3D ******************/ + /**** md5 signature: f7a844b3f174b4082764be44bdeba902 ****/ + %feature("compactdefaultargs") WritePolygon3D; + %feature("autodoc", " +Parameters +---------- +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the 3d polygons on the stream in a format that can be read back by read. +") WritePolygon3D; + void WritePolygon3D(std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** WritePolygonOnTriangulation ******************/ + /**** md5 signature: 42a0cb0fd4ac67791ede7550f408592e ****/ + %feature("compactdefaultargs") WritePolygonOnTriangulation; + %feature("autodoc", " +Parameters +---------- +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the polygons on triangulation on the stream in a format that can be read back by read. +") WritePolygonOnTriangulation; + void WritePolygonOnTriangulation(std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** WriteShape ******************/ + /**** md5 signature: 7c621dc2ecbfe0ab8412c61c3966b71b ****/ + %feature("compactdefaultargs") WriteShape; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the shape on the stream in a binary format that can be read back by read. +") WriteShape; + virtual void WriteShape(const TopoDS_Shape & S, std::ostream &OutValue); + + /****************** WriteTriangulation ******************/ + /**** md5 signature: 86067a9cabf0d76ba9ca5aaa8394eeef ****/ + %feature("compactdefaultargs") WriteTriangulation; + %feature("autodoc", " +Parameters +---------- +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the triangulation on the stream in a format that can be read back by read. +") WriteTriangulation; + void WriteTriangulation(std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WriteGeometryToString() { - std::stringstream s; - self->WriteGeometry(s); - return s.str();} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WritePolygon3DToString() { - std::stringstream s; - self->WritePolygon3D(s); - return s.str();} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WritePolygonOnTriangulationToString() { - std::stringstream s; - self->WritePolygonOnTriangulation(s); - return s.str();} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WriteTriangulationToString() { - std::stringstream s; - self->WriteTriangulation(s); - return s.str();} - }; }; @@ -1262,6 +1952,24 @@ Clears the content of the set. ") Clear; virtual void Clear(); + /****************** Write ******************/ + /**** md5 signature: 59a6a83cf3635e21cdb1e1ebc16aadda ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theShape: TopoDS_Shape + +Return +------- +theStream: Standard_OStream + +Description +----------- +Writes the shape to stream using previously stored shapes and objects to refer them. +") Write; + virtual void Write(const TopoDS_Shape & theShape, std::ostream &OutValue); + /****************** WriteLocation ******************/ /**** md5 signature: 650139b9f368324efb64446489116d9f ****/ %feature("compactdefaultargs") WriteLocation; @@ -1310,6 +2018,50 @@ class BinTools_OStream: } /* deprecated methods */ %pythoncode { +@deprecated +def bintools_GetBool(*args): + return bintools.GetBool(*args) + +@deprecated +def bintools_GetExtChar(*args): + return bintools.GetExtChar(*args) + +@deprecated +def bintools_GetInteger(*args): + return bintools.GetInteger(*args) + +@deprecated +def bintools_GetReal(*args): + return bintools.GetReal(*args) + +@deprecated +def bintools_GetShortReal(*args): + return bintools.GetShortReal(*args) + +@deprecated +def bintools_PutBool(*args): + return bintools.PutBool(*args) + +@deprecated +def bintools_PutExtChar(*args): + return bintools.PutExtChar(*args) + +@deprecated +def bintools_PutInteger(*args): + return bintools.PutInteger(*args) + +@deprecated +def bintools_PutReal(*args): + return bintools.PutReal(*args) + +@deprecated +def bintools_PutShortReal(*args): + return bintools.PutShortReal(*args) + +@deprecated +def bintools_Read(*args): + return bintools.Read(*args) + @deprecated def bintools_Read(*args): return bintools.Read(*args) @@ -1322,14 +2074,34 @@ def bintools_Write(*args): def bintools_Write(*args): return bintools.Write(*args) +@deprecated +def bintools_Write(*args): + return bintools.Write(*args) + +@deprecated +def bintools_Write(*args): + return bintools.Write(*args) + +@deprecated +def BinTools_Curve2dSet_ReadCurve2d(*args): + return BinTools_Curve2dSet.ReadCurve2d(*args) + @deprecated def BinTools_Curve2dSet_WriteCurve2d(*args): return BinTools_Curve2dSet.WriteCurve2d(*args) +@deprecated +def BinTools_CurveSet_ReadCurve(*args): + return BinTools_CurveSet.ReadCurve(*args) + @deprecated def BinTools_CurveSet_WriteCurve(*args): return BinTools_CurveSet.WriteCurve(*args) +@deprecated +def BinTools_SurfaceSet_ReadSurface(*args): + return BinTools_SurfaceSet.ReadSurface(*args) + @deprecated def BinTools_SurfaceSet_WriteSurface(*args): return BinTools_SurfaceSet.WriteSurface(*args) diff --git a/src/SWIG_files/wrapper/BinTools.pyi b/src/SWIG_files/wrapper/BinTools.pyi index cedd6d00a..f9dd6758f 100644 --- a/src/SWIG_files/wrapper/BinTools.pyi +++ b/src/SWIG_files/wrapper/BinTools.pyi @@ -76,11 +76,40 @@ BinTools_ObjectType_EmptyShape = BinTools_ObjectType.BinTools_ObjectType_EmptySh BinTools_ObjectType_EndShape = BinTools_ObjectType.BinTools_ObjectType_EndShape class bintools: + @staticmethod + def GetBool(IS: str) -> Tuple[Standard_IStream, bool]: ... + @staticmethod + def GetExtChar(IS: str, theValue: Standard_ExtCharacter) -> Standard_IStream: ... + @staticmethod + def GetInteger(IS: str) -> Tuple[Standard_IStream, int]: ... + @staticmethod + def GetReal(IS: str) -> Tuple[Standard_IStream, float]: ... + @staticmethod + def GetShortReal(IS: str) -> Tuple[Standard_IStream, float]: ... + @staticmethod + def PutBool(theValue: bool) -> Tuple[Standard_OStream, str]: ... + @staticmethod + def PutExtChar(theValue: Standard_ExtCharacter) -> Tuple[Standard_OStream, str]: ... + @staticmethod + def PutInteger(theValue: int) -> Tuple[Standard_OStream, str]: ... + @staticmethod + def PutReal(theValue: float) -> Tuple[Standard_OStream, str]: ... + @staticmethod + def PutShortReal(theValue: float) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Read(theShape: TopoDS_Shape, theStream: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... @overload @staticmethod def Read(theShape: TopoDS_Shape, theFile: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> bool: ... @overload @staticmethod + def Write(theShape: TopoDS_Shape, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + @overload + @staticmethod + def Write(theShape: TopoDS_Shape, theWithTriangles: bool, theWithNormals: bool, theVersion: BinTools_FormatVersion, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + @overload + @staticmethod def Write(theShape: TopoDS_Shape, theFile: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> bool: ... @overload @staticmethod @@ -92,6 +121,10 @@ class BinTools_Curve2dSet: def Clear(self) -> None: ... def Curve2d(self, I: int) -> Geom2d_Curve: ... def Index(self, C: Geom2d_Curve) -> int: ... + def Read(self, IS: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @staticmethod + def ReadCurve2d(IS: str, C: Geom2d_Curve) -> Standard_IStream: ... + def Write(self, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... @staticmethod def WriteCurve2d(C: Geom2d_Curve, OS: BinTools_OStream) -> None: ... @@ -101,6 +134,10 @@ class BinTools_CurveSet: def Clear(self) -> None: ... def Curve(self, I: int) -> Geom_Curve: ... def Index(self, C: Geom_Curve) -> int: ... + def Read(self, IS: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @staticmethod + def ReadCurve(IS: str, C: Geom_Curve) -> Standard_IStream: ... + def Write(self, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... @staticmethod def WriteCurve(C: Geom_Curve, OS: BinTools_OStream) -> None: ... @@ -111,6 +148,8 @@ class BinTools_LocationSet: def Index(self, L: TopLoc_Location) -> int: ... def Location(self, I: int) -> TopLoc_Location: ... def NbLocations(self) -> int: ... + def Read(self, IS: str) -> None: ... + def Write(self) -> str: ... class BinTools_ShapeSetBase: def __init__(self) -> None: ... @@ -127,13 +166,18 @@ class BinTools_SurfaceSet: def Add(self, S: Geom_Surface) -> int: ... def Clear(self) -> None: ... def Index(self, S: Geom_Surface) -> int: ... + def Read(self, IS: str, therange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @staticmethod + def ReadSurface(IS: str, S: Geom_Surface) -> Standard_IStream: ... def Surface(self, I: int) -> Geom_Surface: ... + def Write(self, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... @staticmethod def WriteSurface(S: Geom_Surface, OS: BinTools_OStream) -> None: ... class BinTools_ShapeReader(BinTools_ShapeSetBase): def __init__(self) -> None: ... def Clear(self) -> None: ... + def Read(self, theStream: str, theShape: TopoDS_Shape) -> None: ... def ReadLocation(self, theStream: BinTools_IStream) -> TopLoc_Location: ... class BinTools_ShapeSet(BinTools_ShapeSetBase): @@ -146,11 +190,30 @@ class BinTools_ShapeSet(BinTools_ShapeSetBase): def Index(self, S: TopoDS_Shape) -> int: ... def Locations(self) -> BinTools_LocationSet: ... def NbShapes(self) -> int: ... + @overload + def Read(self, IS: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + def ReadFlagsAndSubs(self, S: TopoDS_Shape, T: TopAbs_ShapeEnum, IS: str, NbShapes: int) -> None: ... + def ReadGeometry(self, IS: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + def ReadPolygon3D(self, IS: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + def ReadPolygonOnTriangulation(self, IS: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + def ReadShape(self, T: TopAbs_ShapeEnum, IS: str, S: TopoDS_Shape) -> None: ... + def ReadSubs(self, S: TopoDS_Shape, IS: str, NbShapes: int) -> None: ... + def ReadTriangulation(self, IS: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... def Shape(self, I: int) -> TopoDS_Shape: ... + @overload + def Write(self, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + @overload + def Write(self, S: TopoDS_Shape) -> str: ... + def WriteGeometry(self, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + def WritePolygon3D(self, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + def WritePolygonOnTriangulation(self, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + def WriteShape(self, S: TopoDS_Shape) -> str: ... + def WriteTriangulation(self, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... class BinTools_ShapeWriter(BinTools_ShapeSetBase): def __init__(self) -> None: ... def Clear(self) -> None: ... + def Write(self, theShape: TopoDS_Shape) -> str: ... def WriteLocation(self, theStream: BinTools_OStream, theLocation: TopLoc_Location) -> None: ... #classnotwrapped diff --git a/src/SWIG_files/wrapper/BinXCAFDrivers.i b/src/SWIG_files/wrapper/BinXCAFDrivers.i index 7d2de6a20..8fff828e1 100644 --- a/src/SWIG_files/wrapper/BinXCAFDrivers.i +++ b/src/SWIG_files/wrapper/BinXCAFDrivers.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_binxcafdrivers.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Bisector.i b/src/SWIG_files/wrapper/Bisector.i index 877f6d513..0389d1f21 100644 --- a/src/SWIG_files/wrapper/Bisector.i +++ b/src/SWIG_files/wrapper/Bisector.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bisector.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Blend.i b/src/SWIG_files/wrapper/Blend.i index ab43530ef..d8c1299a8 100644 --- a/src/SWIG_files/wrapper/Blend.i +++ b/src/SWIG_files/wrapper/Blend.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_blend.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/BlendFunc.i b/src/SWIG_files/wrapper/BlendFunc.i index 5fbd834f0..5c8c5ef54 100644 --- a/src/SWIG_files/wrapper/BlendFunc.i +++ b/src/SWIG_files/wrapper/BlendFunc.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_blendfunc.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Bnd.i b/src/SWIG_files/wrapper/Bnd.i index 499fc9783..d3f4ea193 100644 --- a/src/SWIG_files/wrapper/Bnd.i +++ b/src/SWIG_files/wrapper/Bnd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bnd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -2141,10 +2142,22 @@ No available documentation. void Dump(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2229,10 +2242,22 @@ Returns true if this box has finite part. Standard_Boolean HasFinitePart(); - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -2797,7 +2822,7 @@ Adds a point of coordinates (x,y,z) to this bounding box. %extend Bnd_Box { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -2805,7 +2830,7 @@ Adds a point of coordinates (x,y,z) to this bounding box. %pythoncode { def __setstate__(self, state): inst = Bnd_Box() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Bnd_Box') @@ -3373,7 +3398,7 @@ Adds a point of coordinates (x,y) to this bounding box. %extend Bnd_Box2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -3381,7 +3406,7 @@ Adds a point of coordinates (x,y) to this bounding box. %pythoncode { def __setstate__(self, state): inst = Bnd_Box2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Bnd_Box2d') @@ -3503,10 +3528,22 @@ Returns the center of obb. const gp_XYZ Center(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3864,7 +3901,7 @@ Returns the z dimension of obb. %extend Bnd_OBB { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -3872,7 +3909,7 @@ Returns the z dimension of obb. %pythoncode { def __setstate__(self, state): inst = Bnd_OBB() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Bnd_OBB') @@ -3989,10 +4026,22 @@ Returns range value (max-min). returns negative value for void range. Standard_Real Delta(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4297,7 +4346,7 @@ def __eq__(self, right): %extend Bnd_Range { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -4305,7 +4354,7 @@ def __eq__(self, right): %pythoncode { def __setstate__(self, state): inst = Bnd_Range() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Bnd_Range') @@ -4607,7 +4656,7 @@ Returns the v parameter on shape. %extend Bnd_Sphere { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -4615,7 +4664,7 @@ Returns the v parameter on shape. %pythoncode { def __setstate__(self, state): inst = Bnd_Sphere() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Bnd_Sphere') @@ -4675,7 +4724,7 @@ Converts the given bnd_box to bvh_box. %extend Bnd_Tools { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -4683,7 +4732,7 @@ Converts the given bnd_box to bvh_box. %pythoncode { def __setstate__(self, state): inst = Bnd_Tools() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Bnd_Tools') diff --git a/src/SWIG_files/wrapper/Bnd.pyi b/src/SWIG_files/wrapper/Bnd.pyi index 364641bca..37b25be4f 100644 --- a/src/SWIG_files/wrapper/Bnd.pyi +++ b/src/SWIG_files/wrapper/Bnd.pyi @@ -266,11 +266,13 @@ class Bnd_Box: def CornerMin(self) -> gp_Pnt: ... def Distance(self, Other: Bnd_Box) -> float: ... def Dump(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Enlarge(self, Tol: float) -> None: ... def FinitePart(self) -> Bnd_Box: ... def Get(self) -> Tuple[float, float, float, float, float, float]: ... def GetGap(self) -> float: ... def HasFinitePart(self) -> bool: ... + def InitFromJson(self, json_string: str) -> bool: ... def IsOpen(self) -> bool: ... def IsOpenXmax(self) -> bool: ... def IsOpenXmin(self) -> bool: ... @@ -380,6 +382,7 @@ class Bnd_OBB: @overload def Add(self, theP: gp_Pnt) -> None: ... def Center(self) -> gp_XYZ: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Enlarge(self, theGapAdd: float) -> None: ... def GetVertex(self, theP_list: List[gp_Pnt]) -> bool: ... def IsAABox(self) -> bool: ... @@ -416,6 +419,7 @@ class Bnd_Range: def Add(self, theRange: Bnd_Range) -> None: ... def Common(self, theOther: Bnd_Range) -> None: ... def Delta(self) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Enlarge(self, theDelta: float) -> None: ... def GetBounds(self) -> Tuple[bool, float, float]: ... def GetIntermediatePoint(self, theLambda: float) -> Tuple[bool, float]: ... diff --git a/src/SWIG_files/wrapper/BndLib.i b/src/SWIG_files/wrapper/BndLib.i index 4558af926..275e55c4b 100644 --- a/src/SWIG_files/wrapper/BndLib.i +++ b/src/SWIG_files/wrapper/BndLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_bndlib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/CDF.i b/src/SWIG_files/wrapper/CDF.i index 21d117eec..b16d559cf 100644 --- a/src/SWIG_files/wrapper/CDF.i +++ b/src/SWIG_files/wrapper/CDF.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_cdf.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -366,6 +367,27 @@ Puts the document in the current session directory and calls the virtual method ") Open; void Open(const opencascade::handle & aDocument); + /****************** Read ******************/ + /**** md5 signature: fed3647299064218aa4c2d8dceec103f ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +theIStream: str +theDocument: CDM_Document +theFilter: PCDM_ReaderFilter (optional, default to opencascade::handle()) +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads thedocument from standard seekable stream theistream, the stream should support seek functionality. +") Read; + void Read(std::istream & theIStream, opencascade::handle & theDocument, const opencascade::handle & theFilter = opencascade::handle(), const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** ReaderFromFormat ******************/ /**** md5 signature: aab6344d555db3220a1fcf7db3c7d59e ****/ %feature("compactdefaultargs") ReaderFromFormat; diff --git a/src/SWIG_files/wrapper/CDF.pyi b/src/SWIG_files/wrapper/CDF.pyi index 37cf672f2..f70000b1d 100644 --- a/src/SWIG_files/wrapper/CDF.pyi +++ b/src/SWIG_files/wrapper/CDF.pyi @@ -65,6 +65,7 @@ class CDF_Application(CDM_Application): def MetaDataDriver(self) -> CDF_MetaDataDriver: ... def NewDocument(self, theFormat: str, theDoc: CDM_Document) -> None: ... def Open(self, aDocument: CDM_Document) -> None: ... + def Read(self, theIStream: str, theDocument: CDM_Document, theFilter: Optional[PCDM_ReaderFilter] = PCDM_ReaderFilter(), theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... def ReaderFromFormat(self, aFormat: str) -> PCDM_Reader: ... @overload def Retrieve(self, aFolder: str, aName: str, UseStorageConfiguration: Optional[bool] = True, theFilter: Optional[PCDM_ReaderFilter] = PCDM_ReaderFilter(), theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> CDM_Document: ... diff --git a/src/SWIG_files/wrapper/CDM.i b/src/SWIG_files/wrapper/CDM.i index 5dd512150..8b0f14d83 100644 --- a/src/SWIG_files/wrapper/CDM.i +++ b/src/SWIG_files/wrapper/CDM.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_cdm.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -161,10 +162,22 @@ This method is called before the update of a document. by default, writes in mes virtual void BeginOfUpdate(const opencascade::handle & aDocument); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -546,10 +559,22 @@ Returns the to document of the reference identified by areferenceidentifier. if opencascade::handle Document(const Standard_Integer aReferenceIdentifier); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -912,14 +937,23 @@ No available documentation. ") Open; void Open(const opencascade::handle & anApplication); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Reference ******************/ /**** md5 signature: 8fb9128b48e5f8568694a49ff83331ff ****/ %feature("compactdefaultargs") Reference; @@ -1436,10 +1470,22 @@ No available documentation. opencascade::handle Document(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1582,14 +1628,23 @@ No available documentation. ") Path; TCollection_ExtendedString Path(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetIsReadOnly ******************/ /**** md5 signature: 9f4f8649234a1411f6086a147fb0f5ad ****/ %feature("compactdefaultargs") SetIsReadOnly; @@ -1673,10 +1728,22 @@ No available documentation. Standard_Integer DocumentVersion(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/CDM.pyi b/src/SWIG_files/wrapper/CDM.pyi index 279a3f62d..b825b8887 100644 --- a/src/SWIG_files/wrapper/CDM.pyi +++ b/src/SWIG_files/wrapper/CDM.pyi @@ -60,6 +60,7 @@ CDM_CCS_ReferenceRejection = CDM_CanCloseStatus.CDM_CCS_ReferenceRejection class CDM_Application(Standard_Transient): def BeginOfUpdate(self, aDocument: CDM_Document) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndOfUpdate(self, aDocument: CDM_Document, theStatus: bool, ErrorString: str) -> None: ... def MessageDriver(self) -> Message_Messenger: ... def MetaDataLookUpTable(self) -> CDM_MetaDataLookUpTable: ... @@ -87,6 +88,7 @@ class CDM_Document(Standard_Transient): def DeepReferences(self, aDocument: CDM_Document) -> bool: ... def Description(self) -> str: ... def Document(self, aReferenceIdentifier: int) -> CDM_Document: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Extensions(self, Extensions: TColStd_SequenceOfExtendedString) -> None: ... def FileExtension(self) -> str: ... def FindDescription(self) -> bool: ... @@ -117,6 +119,7 @@ class CDM_Document(Standard_Transient): def Modify(self) -> None: ... def Name(self, aReferenceIdentifier: int) -> str: ... def Open(self, anApplication: CDM_Application) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def Reference(self, aReferenceIdentifier: int) -> CDM_Reference: ... def ReferenceCounter(self) -> int: ... def RemoveAllReferences(self) -> None: ... @@ -154,6 +157,7 @@ class CDM_Document(Standard_Transient): class CDM_MetaData(Standard_Transient): def Document(self) -> CDM_Document: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FileName(self) -> str: ... def Folder(self) -> str: ... def HasVersion(self) -> bool: ... @@ -167,6 +171,7 @@ class CDM_MetaData(Standard_Transient): def LookUp(theLookUpTable: CDM_MetaDataLookUpTable, aFolder: str, aName: str, aPath: str, aVersion: str, aFileName: str, ReadOnly: bool) -> CDM_MetaData: ... def Name(self) -> str: ... def Path(self) -> str: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetIsReadOnly(self) -> None: ... def UnsetDocument(self) -> None: ... def UnsetIsReadOnly(self) -> None: ... @@ -174,6 +179,7 @@ class CDM_MetaData(Standard_Transient): class CDM_Reference(Standard_Transient): def DocumentVersion(self) -> int: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FromDocument(self) -> CDM_Document: ... def IsReadOnly(self) -> bool: ... def ReferenceIdentifier(self) -> int: ... diff --git a/src/SWIG_files/wrapper/CPnts.i b/src/SWIG_files/wrapper/CPnts.i index 81c2bd703..6cbcee586 100644 --- a/src/SWIG_files/wrapper/CPnts.i +++ b/src/SWIG_files/wrapper/CPnts.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_cpnts.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/CSLib.i b/src/SWIG_files/wrapper/CSLib.i index 0f1dae5da..5fcd62855 100644 --- a/src/SWIG_files/wrapper/CSLib.i +++ b/src/SWIG_files/wrapper/CSLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_cslib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ChFi2d.i b/src/SWIG_files/wrapper/ChFi2d.i index 934347c5c..08f1eb161 100644 --- a/src/SWIG_files/wrapper/ChFi2d.i +++ b/src/SWIG_files/wrapper/ChFi2d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_chfi2d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ChFi3d.i b/src/SWIG_files/wrapper/ChFi3d.i index dbe9b62a6..e98ff851e 100644 --- a/src/SWIG_files/wrapper/ChFi3d.i +++ b/src/SWIG_files/wrapper/ChFi3d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_chfi3d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ChFiDS.i b/src/SWIG_files/wrapper/ChFiDS.i index 90ba150fc..2e35bde22 100644 --- a/src/SWIG_files/wrapper/ChFiDS.i +++ b/src/SWIG_files/wrapper/ChFiDS.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_chfids.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ChFiKPart.i b/src/SWIG_files/wrapper/ChFiKPart.i index 8d1b53e47..8b4463907 100644 --- a/src/SWIG_files/wrapper/ChFiKPart.i +++ b/src/SWIG_files/wrapper/ChFiKPart.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_chfikpart.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Contap.i b/src/SWIG_files/wrapper/Contap.i index 4bb1d69c4..bbfbc7731 100644 --- a/src/SWIG_files/wrapper/Contap.i +++ b/src/SWIG_files/wrapper/Contap.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_contap.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Convert.i b/src/SWIG_files/wrapper/Convert.i index 4c21caa8e..32c856f2d 100644 --- a/src/SWIG_files/wrapper/Convert.i +++ b/src/SWIG_files/wrapper/Convert.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_convert.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/DE.i b/src/SWIG_files/wrapper/DE.i index 023f50f52..ed4d0fcee 100644 --- a/src/SWIG_files/wrapper/DE.i +++ b/src/SWIG_files/wrapper/DE.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_de.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/DEBRepCascade.i b/src/SWIG_files/wrapper/DEBRepCascade.i index 6af8ecc10..c94d96269 100644 --- a/src/SWIG_files/wrapper/DEBRepCascade.i +++ b/src/SWIG_files/wrapper/DEBRepCascade.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_debrepcascade.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/DEXCAFCascade.i b/src/SWIG_files/wrapper/DEXCAFCascade.i index 72b1148e9..990cc1369 100644 --- a/src/SWIG_files/wrapper/DEXCAFCascade.i +++ b/src/SWIG_files/wrapper/DEXCAFCascade.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_dexcafcascade.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Draft.i b/src/SWIG_files/wrapper/Draft.i index 4f4ab0d6d..d95a97725 100644 --- a/src/SWIG_files/wrapper/Draft.i +++ b/src/SWIG_files/wrapper/Draft.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_draft.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/DsgPrs.i b/src/SWIG_files/wrapper/DsgPrs.i index e5c2e5407..69b970d72 100644 --- a/src/SWIG_files/wrapper/DsgPrs.i +++ b/src/SWIG_files/wrapper/DsgPrs.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_dsgprs.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ElCLib.i b/src/SWIG_files/wrapper/ElCLib.i index 9c92ad14d..610a00ce5 100644 --- a/src/SWIG_files/wrapper/ElCLib.i +++ b/src/SWIG_files/wrapper/ElCLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_elclib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ElSLib.i b/src/SWIG_files/wrapper/ElSLib.i index 98fbdcef2..35a7d48de 100644 --- a/src/SWIG_files/wrapper/ElSLib.i +++ b/src/SWIG_files/wrapper/ElSLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_elslib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Expr.i b/src/SWIG_files/wrapper/Expr.i index 8c8e10178..ee8fcdcd2 100644 --- a/src/SWIG_files/wrapper/Expr.i +++ b/src/SWIG_files/wrapper/Expr.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_expr.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ExprIntrp.i b/src/SWIG_files/wrapper/ExprIntrp.i index 047d78b4e..22e350179 100644 --- a/src/SWIG_files/wrapper/ExprIntrp.i +++ b/src/SWIG_files/wrapper/ExprIntrp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_exprintrp.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Extrema.i b/src/SWIG_files/wrapper/Extrema.i index 7efb42d30..e097ffacf 100644 --- a/src/SWIG_files/wrapper/Extrema.i +++ b/src/SWIG_files/wrapper/Extrema.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_extrema.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/FEmTool.i b/src/SWIG_files/wrapper/FEmTool.i index 06224054c..4281eea45 100644 --- a/src/SWIG_files/wrapper/FEmTool.i +++ b/src/SWIG_files/wrapper/FEmTool.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_femtool.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/FSD.i b/src/SWIG_files/wrapper/FSD.i index a820843f9..bd396fd0c 100644 --- a/src/SWIG_files/wrapper/FSD.i +++ b/src/SWIG_files/wrapper/FSD.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_fsd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/FairCurve.i b/src/SWIG_files/wrapper/FairCurve.i index 8c10a14a3..a3095f7b9 100644 --- a/src/SWIG_files/wrapper/FairCurve.i +++ b/src/SWIG_files/wrapper/FairCurve.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_faircurve.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -158,14 +159,23 @@ Returns the computed curve a 2d bspline. ") Curve; opencascade::handle Curve(); + /****************** Dump ******************/ + /**** md5 signature: 3285fe47a669df0eece9c96593dad879 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. //! private methodes --------------------------------------. +") Dump; + virtual void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetAngle1 ******************/ /**** md5 signature: 4d8e16f87d9a075ff3d1c86749675db9 ****/ %feature("compactdefaultargs") GetAngle1; @@ -1255,14 +1265,23 @@ Computes the curve with respect to the constraints, nbiterations and tolerance. ") Compute; virtual Standard_Boolean Compute(FairCurve_AnalysisCode &OutValue, const Standard_Integer NbIterations = 50, const Standard_Real Tolerance = 1.0e-3); + /****************** Dump ******************/ + /**** md5 signature: b42defe2d7a7208961fa81b225a70479 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + virtual void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetCurvature1 ******************/ /**** md5 signature: 52b65eab76a83b1bbd4a765dc4226232 ****/ %feature("compactdefaultargs") GetCurvature1; diff --git a/src/SWIG_files/wrapper/FairCurve.pyi b/src/SWIG_files/wrapper/FairCurve.pyi index 87a049f5d..febe2eac8 100644 --- a/src/SWIG_files/wrapper/FairCurve.pyi +++ b/src/SWIG_files/wrapper/FairCurve.pyi @@ -25,6 +25,7 @@ class FairCurve_Batten: def __init__(self, P1: gp_Pnt2d, P2: gp_Pnt2d, Height: float, Slope: Optional[float] = 0) -> None: ... def Compute(self, NbIterations: Optional[int] = 50, Tolerance: Optional[float] = 1.0e-3) -> Tuple[bool, FairCurve_AnalysisCode]: ... def Curve(self) -> Geom2d_BSplineCurve: ... + def Dump(self) -> str: ... def GetAngle1(self) -> float: ... def GetAngle2(self) -> float: ... def GetConstraintOrder1(self) -> int: ... @@ -102,6 +103,7 @@ class FairCurve_EnergyOfMVC(FairCurve_Energy): class FairCurve_MinimalVariation(FairCurve_Batten): def __init__(self, P1: gp_Pnt2d, P2: gp_Pnt2d, Heigth: float, Slope: Optional[float] = 0, PhysicalRatio: Optional[float] = 0) -> None: ... def Compute(self, NbIterations: Optional[int] = 50, Tolerance: Optional[float] = 1.0e-3) -> Tuple[bool, FairCurve_AnalysisCode]: ... + def Dump(self) -> str: ... def GetCurvature1(self) -> float: ... def GetCurvature2(self) -> float: ... def GetPhysicalRatio(self) -> float: ... diff --git a/src/SWIG_files/wrapper/FilletSurf.i b/src/SWIG_files/wrapper/FilletSurf.i index a28477ae8..001f933e8 100644 --- a/src/SWIG_files/wrapper/FilletSurf.i +++ b/src/SWIG_files/wrapper/FilletSurf.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_filletsurf.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GC.i b/src/SWIG_files/wrapper/GC.i index 144f2cda5..782b09b19 100644 --- a/src/SWIG_files/wrapper/GC.i +++ b/src/SWIG_files/wrapper/GC.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gc.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GCE2d.i b/src/SWIG_files/wrapper/GCE2d.i index 820f7ecd6..d59e5431b 100644 --- a/src/SWIG_files/wrapper/GCE2d.i +++ b/src/SWIG_files/wrapper/GCE2d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gce2d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GCPnts.i b/src/SWIG_files/wrapper/GCPnts.i index fe9d3211a..51e544209 100644 --- a/src/SWIG_files/wrapper/GCPnts.i +++ b/src/SWIG_files/wrapper/GCPnts.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gcpnts.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GProp.i b/src/SWIG_files/wrapper/GProp.i index 711bbe61c..26bbc0707 100644 --- a/src/SWIG_files/wrapper/GProp.i +++ b/src/SWIG_files/wrapper/GProp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gprop.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GccAna.i b/src/SWIG_files/wrapper/GccAna.i index 8a1a0340c..cd8f473fc 100644 --- a/src/SWIG_files/wrapper/GccAna.i +++ b/src/SWIG_files/wrapper/GccAna.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gccana.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GccEnt.i b/src/SWIG_files/wrapper/GccEnt.i index 3e98462c0..253a73bf2 100644 --- a/src/SWIG_files/wrapper/GccEnt.i +++ b/src/SWIG_files/wrapper/GccEnt.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gccent.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -280,6 +281,24 @@ Returns the string name for a given position. @param theposition position type r ") PositionToString; static Standard_CString PositionToString(GccEnt_Position thePosition); + /****************** Print ******************/ + /**** md5 signature: 068a92268570b76299d24afa3d55cb04 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +thePosition: GccEnt_Position + +Return +------- +theStream: Standard_OStream + +Description +----------- +Prints the name of position type as a string on the stream. +") Print; + static Standard_OStream & Print(const GccEnt_Position thePosition, std::ostream &OutValue); + /****************** Unqualified ******************/ /**** md5 signature: 0b3ce4b2adf987fc69edb4f535e49b85 ****/ %feature("compactdefaultargs") Unqualified; @@ -574,6 +593,10 @@ def gccent_PositionFromString(*args): def gccent_PositionToString(*args): return gccent.PositionToString(*args) +@deprecated +def gccent_Print(*args): + return gccent.Print(*args) + @deprecated def gccent_Unqualified(*args): return gccent.Unqualified(*args) diff --git a/src/SWIG_files/wrapper/GccEnt.pyi b/src/SWIG_files/wrapper/GccEnt.pyi index b6c9f816c..c77a2adbb 100644 --- a/src/SWIG_files/wrapper/GccEnt.pyi +++ b/src/SWIG_files/wrapper/GccEnt.pyi @@ -66,6 +66,8 @@ class gccent: def PositionFromString(thePositionString: str) -> Tuple[bool, GccEnt_Position]: ... @staticmethod def PositionToString(thePosition: GccEnt_Position) -> str: ... + @staticmethod + def Print(thePosition: GccEnt_Position) -> Tuple[Standard_OStream, str]: ... @overload @staticmethod def Unqualified(Obj: gp_Lin2d) -> GccEnt_QualifiedLin: ... diff --git a/src/SWIG_files/wrapper/GccInt.i b/src/SWIG_files/wrapper/GccInt.i index 177f5efd1..abaf45ad2 100644 --- a/src/SWIG_files/wrapper/GccInt.i +++ b/src/SWIG_files/wrapper/GccInt.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gccint.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Geom.i b/src/SWIG_files/wrapper/Geom.i index 2e7df447f..35cb24111 100644 --- a/src/SWIG_files/wrapper/Geom.i +++ b/src/SWIG_files/wrapper/Geom.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -148,10 +149,22 @@ Creates a new object which is a copy of this geometric object. virtual opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -512,10 +525,22 @@ No available documentation. opencascade::handle BasisSurface(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -653,10 +678,22 @@ Creates a new object which is a copy of this transformation. opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1311,10 +1348,22 @@ The returned vector gives the value of the derivative for the order of derivatio virtual gp_Vec DN(const Standard_Real U, const Standard_Integer N); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1793,10 +1842,22 @@ Computes the derivative of order nu in the direction u and nv in the direction v virtual gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2738,10 +2799,22 @@ Returns the 'ydirection'. this is a unit vector. class Geom_BoundedCurve : public Geom_Curve { public: - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3081,10 +3154,22 @@ The continuity of the conic is cn. GeomAbs_Shape Continuity(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3591,10 +3676,22 @@ Returns geomabs_cn, the global continuity of any elementary surface. GeomAbs_Shape Continuity(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3976,10 +4073,22 @@ The returned vector gives the value of the derivative for the order of derivatio gp_Vec DN(const Standard_Real U, const Standard_Integer N); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4429,10 +4538,22 @@ Returns the reference vector of this offset curve. value and derivatives warning const gp_Dir Direction(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4900,10 +5021,22 @@ Computes the derivative of order nu in the direction u and nv in the direction v gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5361,10 +5494,22 @@ Returns the reference direction of the swept surface. for a surface of revolutio const gp_Dir Direction(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6038,10 +6183,22 @@ Returns the degree of this bspline curve. the degree of a geom_bsplinecurve curv Standard_Integer Degree(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7373,10 +7530,22 @@ Nu is the order of derivation in the u parametric direction and nv is the order gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -9312,10 +9481,22 @@ Returns the polynomial degree of the curve. it is the number of poles - 1 point Standard_Integer Degree(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -10028,10 +10209,22 @@ Computes the derivative of order nu in the u parametric direction, and nv in the gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -11053,10 +11246,22 @@ The returned vector gives the value of the derivative for the order of derivatio gp_Vec DN(const Standard_Real U, const Standard_Integer N); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -11468,10 +11673,22 @@ Computes the derivative of order nu in the u parametric direction, and nv in the gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -11991,10 +12208,22 @@ Computes the derivative of order nu in the direction u and nv in the direction v gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -12422,10 +12651,22 @@ This line is obtained by the symmetrical transformation of 'directrix1' with res gp_Ax1 Directrix2(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -12923,10 +13164,22 @@ This line is obtained by the symmetrical transformation of 'directrix1' with res gp_Ax1 Directrix2(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -13390,10 +13643,22 @@ Computes the directrix of this parabola. this is a line normal to the axis of sy gp_Ax1 Directrix(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -13887,10 +14152,22 @@ Computes the derivative of order nu in the direction u and nv in the direction v gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -14370,10 +14647,22 @@ The returned derivative has the same orientation as the derivative of the basis gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -14932,10 +15221,22 @@ Computes the derivative of order nu in the direction u and nv in the direction v gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -15343,10 +15644,22 @@ Computes the derivative of order nu in the direction u and nv in the direction v gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -15827,10 +16140,22 @@ Computes the derivative of order nu in the direction u and nv in the direction v gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -16410,10 +16735,22 @@ Computes the derivative of order nu in the direction u and nv in the direction v gp_Vec DN(const Standard_Real U, const Standard_Real V, const Standard_Integer Nu, const Standard_Integer Nv); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -16845,10 +17182,22 @@ N is the order of derivation. raised if the continuity of the curve is not cn. r gp_Vec DN(const Standard_Real U, const Standard_Integer N); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/Geom.pyi b/src/SWIG_files/wrapper/Geom.pyi index d15ab082d..7c45a9227 100644 --- a/src/SWIG_files/wrapper/Geom.pyi +++ b/src/SWIG_files/wrapper/Geom.pyi @@ -26,6 +26,7 @@ class Geom_SequenceOfBSplineSurface: class Geom_Geometry(Standard_Transient): def Copy(self) -> Geom_Geometry: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Mirror(self, P: gp_Pnt) -> None: ... @overload @@ -59,6 +60,7 @@ class Geom_OsculatingSurface(Standard_Transient): @overload def __init__(self, BS: Geom_Surface, Tol: float) -> None: ... def BasisSurface(self) -> Geom_Surface: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Init(self, BS: Geom_Surface, Tol: float) -> None: ... def Tolerance(self) -> float: ... def UOscSurf(self, U: float, V: float, L: Geom_BSplineSurface) -> Tuple[bool, bool]: ... @@ -70,6 +72,7 @@ class Geom_Transformation(Standard_Transient): @overload def __init__(self, T: gp_Trsf) -> None: ... def Copy(self) -> Geom_Transformation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Form(self) -> gp_TrsfForm: ... def Invert(self) -> None: ... def Inverted(self) -> Geom_Transformation: ... @@ -117,6 +120,7 @@ class Geom_Curve(Geom_Geometry): def D2(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec) -> None: ... def D3(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec) -> None: ... def DN(self, U: float, N: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FirstParameter(self) -> float: ... def IsCN(self, N: int) -> bool: ... def IsClosed(self) -> bool: ... @@ -147,6 +151,7 @@ class Geom_Surface(Geom_Geometry): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsCNu(self, N: int) -> bool: ... def IsCNv(self, N: int) -> bool: ... def IsUClosed(self) -> bool: ... @@ -214,6 +219,7 @@ class Geom_Axis2Placement(Geom_AxisPlacement): def YDirection(self) -> gp_Dir: ... class Geom_BoundedCurve(Geom_Curve): + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndPoint(self) -> gp_Pnt: ... def StartPoint(self) -> gp_Pnt: ... @@ -241,6 +247,7 @@ class Geom_CartesianPoint(Geom_Point): class Geom_Conic(Geom_Curve): def Axis(self) -> gp_Ax1: ... def Continuity(self) -> GeomAbs_Shape: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def IsCN(self, N: int) -> bool: ... def Location(self) -> gp_Pnt: ... @@ -276,6 +283,7 @@ class Geom_Direction(Geom_Vector): class Geom_ElementarySurface(Geom_Surface): def Axis(self) -> gp_Ax1: ... def Continuity(self) -> GeomAbs_Shape: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsCNu(self, N: int) -> bool: ... def IsCNv(self, N: int) -> bool: ... def Location(self) -> gp_Pnt: ... @@ -302,6 +310,7 @@ class Geom_Line(Geom_Curve): def D2(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec) -> None: ... def D3(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec) -> None: ... def DN(self, U: float, N: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FirstParameter(self) -> float: ... def IsCN(self, N: int) -> bool: ... def IsClosed(self) -> bool: ... @@ -330,6 +339,7 @@ class Geom_OffsetCurve(Geom_Curve): def D3(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec) -> None: ... def DN(self, U: float, N: int) -> gp_Vec: ... def Direction(self) -> gp_Dir: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FirstParameter(self) -> float: ... def GetBasisCurveContinuity(self) -> GeomAbs_Shape: ... def IsCN(self, N: int) -> bool: ... @@ -358,6 +368,7 @@ class Geom_OffsetSurface(Geom_Surface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetBasisSurfContinuity(self) -> GeomAbs_Shape: ... def IsCNu(self, N: int) -> bool: ... def IsCNv(self, N: int) -> bool: ... @@ -388,6 +399,7 @@ class Geom_SweptSurface(Geom_Surface): def BasisCurve(self) -> Geom_Curve: ... def Continuity(self) -> GeomAbs_Shape: ... def Direction(self) -> gp_Dir: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... class Geom_VectorWithMagnitude(Geom_Vector): @overload @@ -433,6 +445,7 @@ class Geom_BSplineCurve(Geom_BoundedCurve): def D3(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec) -> None: ... def DN(self, U: float, N: int) -> gp_Vec: ... def Degree(self) -> int: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndPoint(self) -> gp_Pnt: ... def FirstParameter(self) -> float: ... def FirstUKnotIndex(self) -> int: ... @@ -529,6 +542,7 @@ class Geom_BSplineSurface(Geom_BoundedSurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ExchangeUV(self) -> None: ... def FirstUKnotIndex(self) -> int: ... def FirstVKnotIndex(self) -> int: ... @@ -677,6 +691,7 @@ class Geom_BezierCurve(Geom_BoundedCurve): def D3(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec) -> None: ... def DN(self, U: float, N: int) -> gp_Vec: ... def Degree(self) -> int: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndPoint(self) -> gp_Pnt: ... def FirstParameter(self) -> float: ... def Increase(self, Degree: int) -> None: ... @@ -732,6 +747,7 @@ class Geom_BezierSurface(Geom_BoundedSurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ExchangeUV(self) -> None: ... def Increase(self, UDeg: int, VDeg: int) -> None: ... @overload @@ -813,6 +829,7 @@ class Geom_Circle(Geom_Conic): def D2(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec) -> None: ... def D3(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec) -> None: ... def DN(self, U: float, N: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def FirstParameter(self) -> float: ... def IsClosed(self) -> bool: ... @@ -839,6 +856,7 @@ class Geom_ConicalSurface(Geom_ElementarySurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsUClosed(self) -> bool: ... def IsUPeriodic(self) -> bool: ... def IsVClosed(self) -> bool: ... @@ -871,6 +889,7 @@ class Geom_CylindricalSurface(Geom_ElementarySurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsUClosed(self) -> bool: ... def IsUPeriodic(self) -> bool: ... def IsVClosed(self) -> bool: ... @@ -899,6 +918,7 @@ class Geom_Ellipse(Geom_Conic): def DN(self, U: float, N: int) -> gp_Vec: ... def Directrix1(self) -> gp_Ax1: ... def Directrix2(self) -> gp_Ax1: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def Elips(self) -> gp_Elips: ... def FirstParameter(self) -> float: ... @@ -934,6 +954,7 @@ class Geom_Hyperbola(Geom_Conic): def DN(self, U: float, N: int) -> gp_Vec: ... def Directrix1(self) -> gp_Ax1: ... def Directrix2(self) -> gp_Ax1: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def FirstParameter(self) -> float: ... def Focal(self) -> float: ... @@ -967,6 +988,7 @@ class Geom_Parabola(Geom_Conic): def D3(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec) -> None: ... def DN(self, U: float, N: int) -> gp_Vec: ... def Directrix(self) -> gp_Ax1: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def FirstParameter(self) -> float: ... def Focal(self) -> float: ... @@ -1000,6 +1022,7 @@ class Geom_Plane(Geom_ElementarySurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsUClosed(self) -> bool: ... def IsUPeriodic(self) -> bool: ... def IsVClosed(self) -> bool: ... @@ -1030,6 +1053,7 @@ class Geom_RectangularTrimmedSurface(Geom_BoundedSurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsCNu(self, N: int) -> bool: ... def IsCNv(self, N: int) -> bool: ... def IsUClosed(self) -> bool: ... @@ -1066,6 +1090,7 @@ class Geom_SphericalSurface(Geom_ElementarySurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsUClosed(self) -> bool: ... def IsUPeriodic(self) -> bool: ... def IsVClosed(self) -> bool: ... @@ -1090,6 +1115,7 @@ class Geom_SurfaceOfLinearExtrusion(Geom_SweptSurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsCNu(self, N: int) -> bool: ... def IsCNv(self, N: int) -> bool: ... def IsUClosed(self) -> bool: ... @@ -1118,6 +1144,7 @@ class Geom_SurfaceOfRevolution(Geom_SweptSurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsCNu(self, N: int) -> bool: ... def IsCNv(self, N: int) -> bool: ... def IsUClosed(self) -> bool: ... @@ -1154,6 +1181,7 @@ class Geom_ToroidalSurface(Geom_ElementarySurface): def D2(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec) -> None: ... def D3(self, U: float, V: float, P: gp_Pnt, D1U: gp_Vec, D1V: gp_Vec, D2U: gp_Vec, D2V: gp_Vec, D2UV: gp_Vec, D3U: gp_Vec, D3V: gp_Vec, D3UUV: gp_Vec, D3UVV: gp_Vec) -> None: ... def DN(self, U: float, V: float, Nu: int, Nv: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsUClosed(self) -> bool: ... def IsUPeriodic(self) -> bool: ... def IsVClosed(self) -> bool: ... @@ -1181,6 +1209,7 @@ class Geom_TrimmedCurve(Geom_BoundedCurve): def D2(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec) -> None: ... def D3(self, U: float, P: gp_Pnt, V1: gp_Vec, V2: gp_Vec, V3: gp_Vec) -> None: ... def DN(self, U: float, N: int) -> gp_Vec: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndPoint(self) -> gp_Pnt: ... def FirstParameter(self) -> float: ... def IsCN(self, N: int) -> bool: ... diff --git a/src/SWIG_files/wrapper/Geom2d.i b/src/SWIG_files/wrapper/Geom2d.i index 0c3ba32cb..5f329a18d 100644 --- a/src/SWIG_files/wrapper/Geom2d.i +++ b/src/SWIG_files/wrapper/Geom2d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom2d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -120,10 +121,22 @@ No available documentation. virtual opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1199,10 +1212,22 @@ For the point of parameter u of this curve, computes the vector corresponding to virtual gp_Vec2d DN(const Standard_Real U, const Standard_Integer N); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1443,10 +1468,22 @@ Computes the distance between and . Standard_Real Distance(const opencascade::handle & Other); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1706,10 +1743,22 @@ Returns the y coordinate of . class Geom2d_BoundedCurve : public Geom2d_Curve { public: - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1825,10 +1874,22 @@ No available documentation. opencascade::handle Copy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1994,10 +2055,22 @@ Returns geomabs_cn which is the global continuity of any conic. GeomAbs_Shape Continuity(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2632,10 +2705,22 @@ Computes the distance between and the point p. Standard_Real Distance(const gp_Pnt2d & P); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3084,10 +3169,22 @@ The returned vector gives the value of the derivative for the order of derivatio gp_Vec2d DN(const Standard_Real U, const Standard_Integer N); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4014,10 +4111,22 @@ Returns the degree of this bspline curve. in this class the degree of the basis Standard_Integer Degree(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5306,10 +5415,22 @@ Returns the polynomial degree of the curve. it is the number of poles less one. Standard_Integer Degree(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5968,10 +6089,22 @@ For the point of parameter u of this circle, computes the vector corresponding t gp_Vec2d DN(const Standard_Real U, const Standard_Integer N); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6342,10 +6475,22 @@ This line is obtained by the symmetrical transformation of 'directrix1' with res gp_Ax2d Directrix2(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6864,10 +7009,22 @@ This line is obtained by the symmetrical transformation of 'directrix1' with res gp_Ax2d Directrix2(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7351,10 +7508,22 @@ The directrix is parallel to the 'yaxis' of the parabola. the 'location' point o gp_Ax2d Directrix(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7764,10 +7933,22 @@ For the point of parameter u of this trimmed curve, computes the vector correspo gp_Vec2d DN(const Standard_Real U, const Standard_Integer N); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/Geom2d.pyi b/src/SWIG_files/wrapper/Geom2d.pyi index b927e7f62..66109955b 100644 --- a/src/SWIG_files/wrapper/Geom2d.pyi +++ b/src/SWIG_files/wrapper/Geom2d.pyi @@ -11,6 +11,7 @@ from OCC.Core.TColStd import * class Geom2d_Geometry(Standard_Transient): def Copy(self) -> Geom2d_Geometry: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Mirror(self, P: gp_Pnt2d) -> None: ... @overload @@ -93,6 +94,7 @@ class Geom2d_Curve(Geom2d_Geometry): def D2(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d) -> None: ... def D3(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d) -> None: ... def DN(self, U: float, N: int) -> gp_Vec2d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FirstParameter(self) -> float: ... def IsCN(self, N: int) -> bool: ... def IsClosed(self) -> bool: ... @@ -109,6 +111,7 @@ class Geom2d_Curve(Geom2d_Geometry): class Geom2d_Point(Geom2d_Geometry): def Coord(self) -> Tuple[float, float]: ... def Distance(self, Other: Geom2d_Point) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Pnt2d(self) -> gp_Pnt2d: ... def SquareDistance(self, Other: Geom2d_Point) -> float: ... def X(self) -> float: ... @@ -128,6 +131,7 @@ class Geom2d_Vector(Geom2d_Geometry): def Y(self) -> float: ... class Geom2d_BoundedCurve(Geom2d_Curve): + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndPoint(self) -> gp_Pnt2d: ... def StartPoint(self) -> gp_Pnt2d: ... @@ -138,6 +142,7 @@ class Geom2d_CartesianPoint(Geom2d_Point): def __init__(self, X: float, Y: float) -> None: ... def Coord(self) -> Tuple[float, float]: ... def Copy(self) -> Geom2d_Geometry: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Pnt2d(self) -> gp_Pnt2d: ... def SetCoord(self, X: float, Y: float) -> None: ... def SetPnt2d(self, P: gp_Pnt2d) -> None: ... @@ -149,6 +154,7 @@ class Geom2d_CartesianPoint(Geom2d_Point): class Geom2d_Conic(Geom2d_Curve): def Continuity(self) -> GeomAbs_Shape: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def IsCN(self, N: int) -> bool: ... def Location(self) -> gp_Pnt2d: ... @@ -194,6 +200,7 @@ class Geom2d_Line(Geom2d_Curve): def DN(self, U: float, N: int) -> gp_Vec2d: ... def Direction(self) -> gp_Dir2d: ... def Distance(self, P: gp_Pnt2d) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FirstParameter(self) -> float: ... def IsCN(self, N: int) -> bool: ... def IsClosed(self) -> bool: ... @@ -222,6 +229,7 @@ class Geom2d_OffsetCurve(Geom2d_Curve): def D2(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d) -> None: ... def D3(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d) -> None: ... def DN(self, U: float, N: int) -> gp_Vec2d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FirstParameter(self) -> float: ... def GetBasisCurveContinuity(self) -> GeomAbs_Shape: ... def IsCN(self, N: int) -> bool: ... @@ -278,6 +286,7 @@ class Geom2d_BSplineCurve(Geom2d_BoundedCurve): def D3(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d) -> None: ... def DN(self, U: float, N: int) -> gp_Vec2d: ... def Degree(self) -> int: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndPoint(self) -> gp_Pnt2d: ... def FirstParameter(self) -> float: ... def FirstUKnotIndex(self) -> int: ... @@ -372,6 +381,7 @@ class Geom2d_BezierCurve(Geom2d_BoundedCurve): def D3(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d) -> None: ... def DN(self, U: float, N: int) -> gp_Vec2d: ... def Degree(self) -> int: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndPoint(self) -> gp_Pnt2d: ... def FirstParameter(self) -> float: ... def Increase(self, Degree: int) -> None: ... @@ -422,6 +432,7 @@ class Geom2d_Circle(Geom2d_Conic): def D2(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d) -> None: ... def D3(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d) -> None: ... def DN(self, U: float, N: int) -> gp_Vec2d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def FirstParameter(self) -> float: ... def IsClosed(self) -> bool: ... @@ -448,6 +459,7 @@ class Geom2d_Ellipse(Geom2d_Conic): def DN(self, U: float, N: int) -> gp_Vec2d: ... def Directrix1(self) -> gp_Ax2d: ... def Directrix2(self) -> gp_Ax2d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def Elips2d(self) -> gp_Elips2d: ... def FirstParameter(self) -> float: ... @@ -485,6 +497,7 @@ class Geom2d_Hyperbola(Geom2d_Conic): def DN(self, U: float, N: int) -> gp_Vec2d: ... def Directrix1(self) -> gp_Ax2d: ... def Directrix2(self) -> gp_Ax2d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def FirstParameter(self) -> float: ... def Focal(self) -> float: ... @@ -520,6 +533,7 @@ class Geom2d_Parabola(Geom2d_Conic): def D3(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d) -> None: ... def DN(self, U: float, N: int) -> gp_Vec2d: ... def Directrix(self) -> gp_Ax2d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eccentricity(self) -> float: ... def FirstParameter(self) -> float: ... def Focal(self) -> float: ... @@ -546,6 +560,7 @@ class Geom2d_TrimmedCurve(Geom2d_BoundedCurve): def D2(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d) -> None: ... def D3(self, U: float, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, V3: gp_Vec2d) -> None: ... def DN(self, U: float, N: int) -> gp_Vec2d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndPoint(self) -> gp_Pnt2d: ... def FirstParameter(self) -> float: ... def IsCN(self, N: int) -> bool: ... diff --git a/src/SWIG_files/wrapper/Geom2dAPI.i b/src/SWIG_files/wrapper/Geom2dAPI.i index 924f452e6..3a27a400c 100644 --- a/src/SWIG_files/wrapper/Geom2dAPI.i +++ b/src/SWIG_files/wrapper/Geom2dAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom2dapi.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Geom2dAdaptor.i b/src/SWIG_files/wrapper/Geom2dAdaptor.i index ad54c7bcb..fcbf7de68 100644 --- a/src/SWIG_files/wrapper/Geom2dAdaptor.i +++ b/src/SWIG_files/wrapper/Geom2dAdaptor.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom2dadaptor.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Geom2dConvert.i b/src/SWIG_files/wrapper/Geom2dConvert.i index bae301c04..7be684956 100644 --- a/src/SWIG_files/wrapper/Geom2dConvert.i +++ b/src/SWIG_files/wrapper/Geom2dConvert.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom2dconvert.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -430,14 +431,23 @@ Returns the 2d bspline curve resulting from the approximation algorithm. ") Curve; opencascade::handle Curve(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Print on the stream o information about the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** HasResult ******************/ /**** md5 signature: 345d4b0f7e88f528928167976d8256d5 ****/ %feature("compactdefaultargs") HasResult; diff --git a/src/SWIG_files/wrapper/Geom2dConvert.pyi b/src/SWIG_files/wrapper/Geom2dConvert.pyi index 36e7585ce..74de85fd6 100644 --- a/src/SWIG_files/wrapper/Geom2dConvert.pyi +++ b/src/SWIG_files/wrapper/Geom2dConvert.pyi @@ -63,6 +63,7 @@ class Geom2dConvert_ApproxCurve: @overload def __init__(self, Curve: Adaptor2d_Curve2d, Tol2d: float, Order: GeomAbs_Shape, MaxSegments: int, MaxDegree: int) -> None: ... def Curve(self) -> Geom2d_BSplineCurve: ... + def Dump(self) -> str: ... def HasResult(self) -> bool: ... def IsDone(self) -> bool: ... def MaxError(self) -> float: ... diff --git a/src/SWIG_files/wrapper/Geom2dEvaluator.i b/src/SWIG_files/wrapper/Geom2dEvaluator.i index 75e90a900..3f0d0aba9 100644 --- a/src/SWIG_files/wrapper/Geom2dEvaluator.i +++ b/src/SWIG_files/wrapper/Geom2dEvaluator.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom2devaluator.h %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Geom2dGcc.i b/src/SWIG_files/wrapper/Geom2dGcc.i index 643cadd17..9ea4d108b 100644 --- a/src/SWIG_files/wrapper/Geom2dGcc.i +++ b/src/SWIG_files/wrapper/Geom2dGcc.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom2dgcc.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Geom2dHatch.i b/src/SWIG_files/wrapper/Geom2dHatch.i index 7b08a80cb..3a9cdaf54 100644 --- a/src/SWIG_files/wrapper/Geom2dHatch.i +++ b/src/SWIG_files/wrapper/Geom2dHatch.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom2dhatch.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Geom2dInt.i b/src/SWIG_files/wrapper/Geom2dInt.i index ea09bfbee..aec3a8e4f 100644 --- a/src/SWIG_files/wrapper/Geom2dInt.i +++ b/src/SWIG_files/wrapper/Geom2dInt.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom2dint.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Geom2dLProp.i b/src/SWIG_files/wrapper/Geom2dLProp.i index 7bbfcc9ff..31937de2e 100644 --- a/src/SWIG_files/wrapper/Geom2dLProp.i +++ b/src/SWIG_files/wrapper/Geom2dLProp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geom2dlprop.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomAPI.i b/src/SWIG_files/wrapper/GeomAPI.i index b15cb0ec3..d8214cefc 100644 --- a/src/SWIG_files/wrapper/GeomAPI.i +++ b/src/SWIG_files/wrapper/GeomAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomapi.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomAbs.i b/src/SWIG_files/wrapper/GeomAbs.i index d0603105e..f52cf9995 100644 --- a/src/SWIG_files/wrapper/GeomAbs.i +++ b/src/SWIG_files/wrapper/GeomAbs.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomabs.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomAdaptor.i b/src/SWIG_files/wrapper/GeomAdaptor.i index 9f14481c2..312bad572 100644 --- a/src/SWIG_files/wrapper/GeomAdaptor.i +++ b/src/SWIG_files/wrapper/GeomAdaptor.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomadaptor.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomConvert.i b/src/SWIG_files/wrapper/GeomConvert.i index c4aa3f260..5ab9fb5bb 100644 --- a/src/SWIG_files/wrapper/GeomConvert.i +++ b/src/SWIG_files/wrapper/GeomConvert.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomconvert.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -488,14 +489,23 @@ Returns the bspline curve resulting from the approximation algorithm. ") Curve; opencascade::handle Curve(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Print on the stream o information about the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** HasResult ******************/ /**** md5 signature: 345d4b0f7e88f528928167976d8256d5 ****/ %feature("compactdefaultargs") HasResult; @@ -599,14 +609,23 @@ Constructs a surface approximation framework defined by - the surf - the toleran ") GeomConvert_ApproxSurface; GeomConvert_ApproxSurface(const opencascade::handle & Surf, const Standard_Real Tol3d, const GeomAbs_Shape UContinuity, const GeomAbs_Shape VContinuity, const Standard_Integer MaxDegU, const Standard_Integer MaxDegV, const Standard_Integer MaxSegments, const Standard_Integer PrecisCode); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** HasResult ******************/ /**** md5 signature: 345d4b0f7e88f528928167976d8256d5 ****/ %feature("compactdefaultargs") HasResult; diff --git a/src/SWIG_files/wrapper/GeomConvert.pyi b/src/SWIG_files/wrapper/GeomConvert.pyi index 6840981df..ba96923dc 100644 --- a/src/SWIG_files/wrapper/GeomConvert.pyi +++ b/src/SWIG_files/wrapper/GeomConvert.pyi @@ -70,6 +70,7 @@ class GeomConvert_ApproxCurve: @overload def __init__(self, Curve: Adaptor3d_Curve, Tol3d: float, Order: GeomAbs_Shape, MaxSegments: int, MaxDegree: int) -> None: ... def Curve(self) -> Geom_BSplineCurve: ... + def Dump(self) -> str: ... def HasResult(self) -> bool: ... def IsDone(self) -> bool: ... def MaxError(self) -> float: ... @@ -79,6 +80,7 @@ class GeomConvert_ApproxSurface: def __init__(self, Surf: Geom_Surface, Tol3d: float, UContinuity: GeomAbs_Shape, VContinuity: GeomAbs_Shape, MaxDegU: int, MaxDegV: int, MaxSegments: int, PrecisCode: int) -> None: ... @overload def __init__(self, Surf: Adaptor3d_Surface, Tol3d: float, UContinuity: GeomAbs_Shape, VContinuity: GeomAbs_Shape, MaxDegU: int, MaxDegV: int, MaxSegments: int, PrecisCode: int) -> None: ... + def Dump(self) -> str: ... def HasResult(self) -> bool: ... def IsDone(self) -> bool: ... def MaxError(self) -> float: ... diff --git a/src/SWIG_files/wrapper/GeomEvaluator.i b/src/SWIG_files/wrapper/GeomEvaluator.i index e98e3cb51..75c70cd46 100644 --- a/src/SWIG_files/wrapper/GeomEvaluator.i +++ b/src/SWIG_files/wrapper/GeomEvaluator.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomevaluator.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomFill.i b/src/SWIG_files/wrapper/GeomFill.i index 6964212c7..d2211b073 100644 --- a/src/SWIG_files/wrapper/GeomFill.i +++ b/src/SWIG_files/wrapper/GeomFill.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomfill.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomInt.i b/src/SWIG_files/wrapper/GeomInt.i index 932f3cbc5..28651aea6 100644 --- a/src/SWIG_files/wrapper/GeomInt.i +++ b/src/SWIG_files/wrapper/GeomInt.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomint.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomLProp.i b/src/SWIG_files/wrapper/GeomLProp.i index a120ab4aa..29535c011 100644 --- a/src/SWIG_files/wrapper/GeomLProp.i +++ b/src/SWIG_files/wrapper/GeomLProp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomlprop.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomLib.i b/src/SWIG_files/wrapper/GeomLib.i index 510e0cb40..31e6205af 100644 --- a/src/SWIG_files/wrapper/GeomLib.i +++ b/src/SWIG_files/wrapper/GeomLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomlib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomPlate.i b/src/SWIG_files/wrapper/GeomPlate.i index 6bf325dcd..e325e9c9d 100644 --- a/src/SWIG_files/wrapper/GeomPlate.i +++ b/src/SWIG_files/wrapper/GeomPlate.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomplate.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomProjLib.i b/src/SWIG_files/wrapper/GeomProjLib.i index 096f2e0fe..2b79fa1aa 100644 --- a/src/SWIG_files/wrapper/GeomProjLib.i +++ b/src/SWIG_files/wrapper/GeomProjLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomprojlib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomToStep.i b/src/SWIG_files/wrapper/GeomToStep.i index 3bd741095..d35967b56 100644 --- a/src/SWIG_files/wrapper/GeomToStep.i +++ b/src/SWIG_files/wrapper/GeomToStep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomtostep.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/GeomTools.i b/src/SWIG_files/wrapper/GeomTools.i index a07b237bb..a39dab808 100644 --- a/src/SWIG_files/wrapper/GeomTools.i +++ b/src/SWIG_files/wrapper/GeomTools.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomtools.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -44,6 +45,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomtools.html" #include #include #include +#include #include #include #include @@ -55,6 +57,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_geomtools.html" %import NCollection.i %import Geom.i %import Geom2d.i +%import Message.i %pythoncode { from enum import IntEnum @@ -85,6 +88,78 @@ from OCC.Core.Exception import * %rename(geomtools) GeomTools; class GeomTools { public: + /****************** Dump ******************/ + /**** md5 signature: 3a6cd44b2ef16268d7f58b9b7270cde3 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +S: Geom_Surface + +Return +------- +OS: Standard_OStream + +Description +----------- +A set of curves from geom2d. dumps the surface on the stream. +") Dump; + static void Dump(const opencascade::handle & S, std::ostream &OutValue); + + /****************** Dump ******************/ + /**** md5 signature: 20c6add2ce10d173c8b9bb0b25454934 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +C: Geom_Curve + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the curve on the stream. +") Dump; + static void Dump(const opencascade::handle & C, std::ostream &OutValue); + + /****************** Dump ******************/ + /**** md5 signature: 9175efaa435a7d1386eb4799ecf3c40c ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +C: Geom2d_Curve + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the curve on the stream. +") Dump; + static void Dump(const opencascade::handle & C, std::ostream &OutValue); + + /****************** GetReal ******************/ + /**** md5 signature: c50fd53b89ec2e186f253d0a770a36c5 ****/ + %feature("compactdefaultargs") GetReal; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +theValue: float + +Description +----------- +Reads the standard_real value from the stream. zero is read in case of error. +") GetReal; + static void GetReal(std::istream & IS, Standard_Real &OutValue); + /****************** GetUndefinedTypeHandler ******************/ /**** md5 signature: 4feeff4a1f6ab5a12fb2effedf9bc1c3 ****/ %feature("compactdefaultargs") GetUndefinedTypeHandler; @@ -98,6 +173,63 @@ No available documentation. ") GetUndefinedTypeHandler; static opencascade::handle GetUndefinedTypeHandler(); + /****************** Read ******************/ + /**** md5 signature: 191d80cccc353bbf07985fe0caac76a3 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +S: Geom_Surface +IS: str + +Return +------- +None + +Description +----------- +Reads the surface from the stream. +") Read; + static void Read(opencascade::handle & S, std::istream & IS); + + /****************** Read ******************/ + /**** md5 signature: 43eb96c4a0f249b2667438b2ff88caea ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +C: Geom_Curve +IS: str + +Return +------- +None + +Description +----------- +Reads the curve from the stream. +") Read; + static void Read(opencascade::handle & C, std::istream & IS); + + /****************** Read ******************/ + /**** md5 signature: 79ef9bb82a3316be119a2083f299bda0 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +C: Geom2d_Curve +IS: str + +Return +------- +None + +Description +----------- +Reads the curve from the stream. +") Read; + static void Read(opencascade::handle & C, std::istream & IS); + /****************** SetUndefinedTypeHandler ******************/ /**** md5 signature: 924bb9ac20d7bc97a8eee36d4f9f3c0b ****/ %feature("compactdefaultargs") SetUndefinedTypeHandler; @@ -116,6 +248,60 @@ No available documentation. ") SetUndefinedTypeHandler; static void SetUndefinedTypeHandler(const opencascade::handle & aHandler); + /****************** Write ******************/ + /**** md5 signature: b224a56a31c778e86a088ef67369cbeb ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +S: Geom_Surface + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the surface on the stream. +") Write; + static void Write(const opencascade::handle & S, std::ostream &OutValue); + + /****************** Write ******************/ + /**** md5 signature: 5fef400262c9232ed45a679c8f37278e ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +C: Geom_Curve + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the curve on the stream. +") Write; + static void Write(const opencascade::handle & C, std::ostream &OutValue); + + /****************** Write ******************/ + /**** md5 signature: 1496e488409705f4e06b0e25cc3dde78 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +C: Geom2d_Curve + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the curve on the stream. +") Write; + static void Write(const opencascade::handle & C, std::ostream &OutValue); + }; @@ -192,14 +378,23 @@ Returns the curve of index . ") Curve2d; opencascade::handle Curve2d(const Standard_Integer I); + /****************** Dump ******************/ + /**** md5 signature: e60d722f65a7811be636699da7600e78 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the content of me on the stream . +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Index ******************/ /**** md5 signature: e1559320ddf80ce0263d324c781a3407 ****/ %feature("compactdefaultargs") Index; @@ -218,28 +413,80 @@ Returns the index of . ") Index; Standard_Integer Index(const opencascade::handle & C); + /****************** PrintCurve2d ******************/ + /**** md5 signature: ffcee85cd663bb79253e2d08e26c9b19 ****/ + %feature("compactdefaultargs") PrintCurve2d; + %feature("autodoc", " +Parameters +---------- +C: Geom2d_Curve +compact: bool (optional, default to Standard_False) + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the curve on the stream, if compact is true use the compact format that can be read back. +") PrintCurve2d; + static void PrintCurve2d(const opencascade::handle & C, std::ostream &OutValue, const Standard_Boolean compact = Standard_False); + + /****************** Read ******************/ + /**** md5 signature: e5ce096318e6663d7e9f744e8d66b70b ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the content of me from the stream . me is first cleared. +") Read; + void Read(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** ReadCurve2d ******************/ + /**** md5 signature: 5d3b82b1ffef248fe3d83a98f1b80a19 ****/ + %feature("compactdefaultargs") ReadCurve2d; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +opencascade::handle + +Description +----------- +Reads the curve from the stream. the curve is assumed to have been written with the print method (compact = true). +") ReadCurve2d; + static opencascade::handle ReadCurve2d(std::istream & IS); + + /****************** Write ******************/ + /**** md5 signature: 6a95f1af9efa3b2eec48861a606241ee ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in a format that can be read back by read. +") Write; + void Write(std::ostream &OutValue, const Message_ProgressRange & theProgress = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; - - %feature("autodoc", "1"); - %extend{ - void ReadCurve2dFromString(std::string src) { - std::stringstream s(src); - self->ReadCurve2d(s);} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; }; @@ -316,14 +563,23 @@ Returns the curve of index . ") Curve; opencascade::handle Curve(const Standard_Integer I); + /****************** Dump ******************/ + /**** md5 signature: e60d722f65a7811be636699da7600e78 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the content of me on the stream . +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Index ******************/ /**** md5 signature: c53cbf4d0efdfb90843e67e9b32c5252 ****/ %feature("compactdefaultargs") Index; @@ -342,28 +598,80 @@ Returns the index of . ") Index; Standard_Integer Index(const opencascade::handle & C); + /****************** PrintCurve ******************/ + /**** md5 signature: 9cb5308983a4ee0a89defb9c26e1cdb3 ****/ + %feature("compactdefaultargs") PrintCurve; + %feature("autodoc", " +Parameters +---------- +C: Geom_Curve +compact: bool (optional, default to Standard_False) + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the curve on the stream, if compact is true use the compact format that can be read back. +") PrintCurve; + static void PrintCurve(const opencascade::handle & C, std::ostream &OutValue, const Standard_Boolean compact = Standard_False); + + /****************** Read ******************/ + /**** md5 signature: e5ce096318e6663d7e9f744e8d66b70b ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the content of me from the stream . me is first cleared. +") Read; + void Read(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** ReadCurve ******************/ + /**** md5 signature: 7beb4c6e38ccc7af597e9d8bc17c7088 ****/ + %feature("compactdefaultargs") ReadCurve; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +opencascade::handle + +Description +----------- +Reads the curve from the stream. the curve is assumed to have been written with the print method (compact = true). +") ReadCurve; + static opencascade::handle ReadCurve(std::istream & IS); + + /****************** Write ******************/ + /**** md5 signature: 6a95f1af9efa3b2eec48861a606241ee ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in a format that can be read back by read. +") Write; + void Write(std::ostream &OutValue, const Message_ProgressRange & theProgress = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; - - %feature("autodoc", "1"); - %extend{ - void ReadCurveFromString(std::string src) { - std::stringstream s(src); - self->ReadCurve(s);} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; }; @@ -422,14 +730,23 @@ Clears the content of the set. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: e60d722f65a7811be636699da7600e78 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the content of me on the stream . +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Index ******************/ /**** md5 signature: 7fc50802d17ebd7c660284e6560fb7f6 ****/ %feature("compactdefaultargs") Index; @@ -448,20 +765,62 @@ Returns the index of . ") Index; Standard_Integer Index(const opencascade::handle & S); + /****************** PrintSurface ******************/ + /**** md5 signature: f03cd58b0fc54c8e16b1b9c3619b768f ****/ + %feature("compactdefaultargs") PrintSurface; + %feature("autodoc", " +Parameters +---------- +S: Geom_Surface +compact: bool (optional, default to Standard_False) + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the surface on the stream, if compact is true use the compact format that can be read back. +") PrintSurface; + static void PrintSurface(const opencascade::handle & S, std::ostream &OutValue, const Standard_Boolean compact = Standard_False); + + /****************** Read ******************/ + /**** md5 signature: e5ce096318e6663d7e9f744e8d66b70b ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; +Description +----------- +Reads the content of me from the stream . me is first cleared. +") Read; + void Read(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** ReadSurface ******************/ + /**** md5 signature: c678c8ab6d4fb0ee948ec3e0b84c9046 ****/ + %feature("compactdefaultargs") ReadSurface; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +opencascade::handle + +Description +----------- +Reads the surface from the stream. the surface is assumed to have been written with the print method (compact = true). +") ReadSurface; + static opencascade::handle ReadSurface(std::istream & IS); - %feature("autodoc", "1"); - %extend{ - void ReadSurfaceFromString(std::string src) { - std::stringstream s(src); - self->ReadSurface(s);} - }; /****************** Surface ******************/ /**** md5 signature: f08a9f2a886e0a3933ae15a38f9b8dda ****/ %feature("compactdefaultargs") Surface; @@ -480,14 +839,24 @@ Returns the surface of index . ") Surface; opencascade::handle Surface(const Standard_Integer I); + /****************** Write ******************/ + /**** md5 signature: 6a95f1af9efa3b2eec48861a606241ee ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in a format that can be read back by read. +") Write; + void Write(std::ostream &OutValue, const Message_ProgressRange & theProgress = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; }; @@ -515,6 +884,123 @@ No available documentation. ") GeomTools_UndefinedTypeHandler; GeomTools_UndefinedTypeHandler(); + /****************** PrintCurve ******************/ + /**** md5 signature: 9229a0d70724577ea967874667e632bc ****/ + %feature("compactdefaultargs") PrintCurve; + %feature("autodoc", " +Parameters +---------- +C: Geom_Curve +compact: bool (optional, default to Standard_False) + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") PrintCurve; + virtual void PrintCurve(const opencascade::handle & C, std::ostream &OutValue, const Standard_Boolean compact = Standard_False); + + /****************** PrintCurve2d ******************/ + /**** md5 signature: 7e257c476bf0d68e904e2daed78d6479 ****/ + %feature("compactdefaultargs") PrintCurve2d; + %feature("autodoc", " +Parameters +---------- +C: Geom2d_Curve +compact: bool (optional, default to Standard_False) + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") PrintCurve2d; + virtual void PrintCurve2d(const opencascade::handle & C, std::ostream &OutValue, const Standard_Boolean compact = Standard_False); + + /****************** PrintSurface ******************/ + /**** md5 signature: 6b4c01c323e1d0fad05dea4d7e15f780 ****/ + %feature("compactdefaultargs") PrintSurface; + %feature("autodoc", " +Parameters +---------- +S: Geom_Surface +compact: bool (optional, default to Standard_False) + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") PrintSurface; + virtual void PrintSurface(const opencascade::handle & S, std::ostream &OutValue, const Standard_Boolean compact = Standard_False); + + /****************** ReadCurve ******************/ + /**** md5 signature: ec4aea4a5365adad6fc1b3ae7538554c ****/ + %feature("compactdefaultargs") ReadCurve; + %feature("autodoc", " +Parameters +---------- +ctype: int +IS: str +C: Geom_Curve + +Return +------- +Standard_IStream + +Description +----------- +No available documentation. +") ReadCurve; + virtual Standard_IStream & ReadCurve(const Standard_Integer ctype, std::istream & IS, opencascade::handle & C); + + /****************** ReadCurve2d ******************/ + /**** md5 signature: ad483c9803fa37d94a5a9dad7bf1987d ****/ + %feature("compactdefaultargs") ReadCurve2d; + %feature("autodoc", " +Parameters +---------- +ctype: int +IS: str +C: Geom2d_Curve + +Return +------- +Standard_IStream + +Description +----------- +No available documentation. +") ReadCurve2d; + virtual Standard_IStream & ReadCurve2d(const Standard_Integer ctype, std::istream & IS, opencascade::handle & C); + + /****************** ReadSurface ******************/ + /**** md5 signature: acd0062fe378bd76a7b522c9793520ec ****/ + %feature("compactdefaultargs") ReadSurface; + %feature("autodoc", " +Parameters +---------- +ctype: int +IS: str +S: Geom_Surface + +Return +------- +Standard_IStream + +Description +----------- +No available documentation. +") ReadSurface; + virtual Standard_IStream & ReadSurface(const Standard_Integer ctype, std::istream & IS, opencascade::handle & S); + }; @@ -534,12 +1020,76 @@ No available documentation. } /* deprecated methods */ %pythoncode { +@deprecated +def geomtools_Dump(*args): + return geomtools.Dump(*args) + +@deprecated +def geomtools_Dump(*args): + return geomtools.Dump(*args) + +@deprecated +def geomtools_Dump(*args): + return geomtools.Dump(*args) + +@deprecated +def geomtools_GetReal(*args): + return geomtools.GetReal(*args) + @deprecated def geomtools_GetUndefinedTypeHandler(*args): return geomtools.GetUndefinedTypeHandler(*args) +@deprecated +def geomtools_Read(*args): + return geomtools.Read(*args) + +@deprecated +def geomtools_Read(*args): + return geomtools.Read(*args) + +@deprecated +def geomtools_Read(*args): + return geomtools.Read(*args) + @deprecated def geomtools_SetUndefinedTypeHandler(*args): return geomtools.SetUndefinedTypeHandler(*args) +@deprecated +def geomtools_Write(*args): + return geomtools.Write(*args) + +@deprecated +def geomtools_Write(*args): + return geomtools.Write(*args) + +@deprecated +def geomtools_Write(*args): + return geomtools.Write(*args) + +@deprecated +def GeomTools_Curve2dSet_PrintCurve2d(*args): + return GeomTools_Curve2dSet.PrintCurve2d(*args) + +@deprecated +def GeomTools_Curve2dSet_ReadCurve2d(*args): + return GeomTools_Curve2dSet.ReadCurve2d(*args) + +@deprecated +def GeomTools_CurveSet_PrintCurve(*args): + return GeomTools_CurveSet.PrintCurve(*args) + +@deprecated +def GeomTools_CurveSet_ReadCurve(*args): + return GeomTools_CurveSet.ReadCurve(*args) + +@deprecated +def GeomTools_SurfaceSet_PrintSurface(*args): + return GeomTools_SurfaceSet.PrintSurface(*args) + +@deprecated +def GeomTools_SurfaceSet_ReadSurface(*args): + return GeomTools_SurfaceSet.ReadSurface(*args) + } diff --git a/src/SWIG_files/wrapper/GeomTools.pyi b/src/SWIG_files/wrapper/GeomTools.pyi index 9caaa13e2..949f30db1 100644 --- a/src/SWIG_files/wrapper/GeomTools.pyi +++ b/src/SWIG_files/wrapper/GeomTools.pyi @@ -5,37 +5,94 @@ from OCC.Core.Standard import * from OCC.Core.NCollection import * from OCC.Core.Geom import * from OCC.Core.Geom2d import * +from OCC.Core.Message import * class geomtools: + @overload + @staticmethod + def Dump(S: Geom_Surface) -> str: ... + @overload + @staticmethod + def Dump(C: Geom_Curve) -> str: ... + @overload + @staticmethod + def Dump(C: Geom2d_Curve) -> str: ... + @staticmethod + def GetReal(IS: str) -> float: ... @staticmethod def GetUndefinedTypeHandler() -> GeomTools_UndefinedTypeHandler: ... + @overload + @staticmethod + def Read(S: Geom_Surface, IS: str) -> None: ... + @overload + @staticmethod + def Read(C: Geom_Curve, IS: str) -> None: ... + @overload + @staticmethod + def Read(C: Geom2d_Curve, IS: str) -> None: ... @staticmethod def SetUndefinedTypeHandler(aHandler: GeomTools_UndefinedTypeHandler) -> None: ... + @overload + @staticmethod + def Write(S: Geom_Surface) -> str: ... + @overload + @staticmethod + def Write(C: Geom_Curve) -> str: ... + @overload + @staticmethod + def Write(C: Geom2d_Curve) -> str: ... class GeomTools_Curve2dSet: def __init__(self) -> None: ... def Add(self, C: Geom2d_Curve) -> int: ... def Clear(self) -> None: ... def Curve2d(self, I: int) -> Geom2d_Curve: ... + def Dump(self) -> str: ... def Index(self, C: Geom2d_Curve) -> int: ... + @staticmethod + def PrintCurve2d(C: Geom2d_Curve, compact: Optional[bool] = False) -> str: ... + def Read(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @staticmethod + def ReadCurve2d(IS: str) -> Geom2d_Curve: ... + def Write(self, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... class GeomTools_CurveSet: def __init__(self) -> None: ... def Add(self, C: Geom_Curve) -> int: ... def Clear(self) -> None: ... def Curve(self, I: int) -> Geom_Curve: ... + def Dump(self) -> str: ... def Index(self, C: Geom_Curve) -> int: ... + @staticmethod + def PrintCurve(C: Geom_Curve, compact: Optional[bool] = False) -> str: ... + def Read(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @staticmethod + def ReadCurve(IS: str) -> Geom_Curve: ... + def Write(self, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... class GeomTools_SurfaceSet: def __init__(self) -> None: ... def Add(self, S: Geom_Surface) -> int: ... def Clear(self) -> None: ... + def Dump(self) -> str: ... def Index(self, S: Geom_Surface) -> int: ... + @staticmethod + def PrintSurface(S: Geom_Surface, compact: Optional[bool] = False) -> str: ... + def Read(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @staticmethod + def ReadSurface(IS: str) -> Geom_Surface: ... def Surface(self, I: int) -> Geom_Surface: ... + def Write(self, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... class GeomTools_UndefinedTypeHandler(Standard_Transient): def __init__(self) -> None: ... + def PrintCurve(self, C: Geom_Curve, compact: Optional[bool] = False) -> str: ... + def PrintCurve2d(self, C: Geom2d_Curve, compact: Optional[bool] = False) -> str: ... + def PrintSurface(self, S: Geom_Surface, compact: Optional[bool] = False) -> str: ... + def ReadCurve(self, ctype: int, IS: str, C: Geom_Curve) -> Standard_IStream: ... + def ReadCurve2d(self, ctype: int, IS: str, C: Geom2d_Curve) -> Standard_IStream: ... + def ReadSurface(self, ctype: int, IS: str, S: Geom_Surface) -> Standard_IStream: ... # harray1 classes # harray2 classes diff --git a/src/SWIG_files/wrapper/Graphic3d.i b/src/SWIG_files/wrapper/Graphic3d.i index 8e0e8b661..817832cf1 100644 --- a/src/SWIG_files/wrapper/Graphic3d.i +++ b/src/SWIG_files/wrapper/Graphic3d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_graphic3d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -3487,10 +3488,22 @@ Returns true if material properties should be distinguished for back and front f bool Distinguish(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5037,10 +5050,22 @@ Creates bsdf describing transparent object. transparent bsdf models simple trans static Graphic3d_BSDF CreateTransparent(const Graphic3d_Vec3 & theWeight, const Graphic3d_Vec3 & theAbsorptionColor, const Standard_ShortReal theAbsorptionCoeff); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5109,10 +5134,22 @@ Empty constructor. Graphic3d_BoundBuffer(const opencascade::handle & theAlloc); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5532,10 +5569,22 @@ Returns location of positional/spot/directional light, which is the same as retu const gp_Pnt DisplayPosition(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6234,10 +6283,22 @@ Disconnect other structure to this one. virtual void Disconnect(Graphic3d_CStructure & theStructure); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7017,10 +7078,22 @@ Get distance of eye from camera center. return the distance. Standard_Real Distance(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -8247,10 +8320,22 @@ Return the copy cropped by total size. Graphic3d_CameraTile Cropped(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -8495,10 +8580,22 @@ Clone plane. virtual method to simplify copying procedure if plane class is rede virtual opencascade::handle Clone(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -10101,10 +10198,22 @@ Creates schlick's approximation of fresnel factor. static Graphic3d_Fresnel CreateSchlick(const Graphic3d_Vec3 & theSpecularColor); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -10702,10 +10811,22 @@ No available documentation. virtual Standard_ShortReal DefaultTextHeight(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -11319,10 +11440,22 @@ Suppress all primitives and attributes of . to clear group without update virtual void Clear(const Standard_Boolean theUpdateStructureMgr = Standard_True); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -11792,10 +11925,22 @@ Creates a new predefined hatch style with the given id in aspect_hatchstyle enum Graphic3d_HatchStyle(const Aspect_HatchStyle theType); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -11943,10 +12088,22 @@ Returns set of transform persistent graphic3d_cstructures for building bvh tree. const Graphic3d_BvhCStructureSetTrsfPers & CullableTrsfPersStructuresBVH(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -12804,10 +12961,22 @@ Returns the diffuse color of the surface. const Quantity_Color & DiffuseColor(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -13495,10 +13664,22 @@ Returns albedo color with alpha component of material. const Quantity_ColorRGBA & Color(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -13863,10 +14044,22 @@ Empty constructor. Graphic3d_PolygonOffset(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -13965,10 +14158,22 @@ Returns display mode, 0 by default. -1 means undefined (main display mode of pre Standard_Integer DisplayMode(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -14312,10 +14517,22 @@ Creates default rendering parameters. Graphic3d_RenderingParams(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -14393,10 +14610,22 @@ Clear the items out. void Clear(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -15956,10 +16185,22 @@ Returns the current display priority for this structure. Graphic3d_DisplayPriority DisplayPriority(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -16985,10 +17226,22 @@ Returns the set of structures displayed in visualiser . void DisplayedStructures(Graphic3d_MapOfStructure & SG); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -18445,10 +18698,22 @@ Return the corner for 2d/trihedron transformation persistence. Aspect_TypeOfTriedronPosition Corner2d(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -18973,10 +19238,22 @@ Returns the distance between two points. Standard_ShortReal Distance(const Graphic3d_Vertex & theOther); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -19088,10 +19365,22 @@ Empty constructor. Graphic3d_ViewAffinity(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -19201,10 +19490,22 @@ Constructor for custom projector type. @param theprojectionstate [in] the projec Graphic3d_WorldViewProjState(const Standard_Size theProjectionState, const Standard_Size theWorldViewState, const Standard_Transient * theCamera = NULL); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -19448,10 +19749,22 @@ Return the size to discard drawing of small objects; by default it is infinite ( Standard_Real CullingSize(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -20944,10 +21257,22 @@ Return display type. Aspect_TypeOfDisplayText DisplayType(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -21746,10 +22071,22 @@ Returns the set of structures displayed in this view. void DisplayedStructures(Graphic3d_MapOfStructure & theStructures); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/Graphic3d.pyi b/src/SWIG_files/wrapper/Graphic3d.pyi index 8fde1c305..ce939abb0 100644 --- a/src/SWIG_files/wrapper/Graphic3d.pyi +++ b/src/SWIG_files/wrapper/Graphic3d.pyi @@ -1305,6 +1305,7 @@ class Graphic3d_Aspects(Standard_Transient): @staticmethod def DefaultLinePatternForType(theType: Aspect_TypeOfLine) -> False: ... def Distinguish(self) -> bool: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EdgeColor(self) -> Quantity_Color: ... def EdgeColorRGBA(self) -> Quantity_ColorRGBA: ... def EdgeLineType(self) -> Aspect_TypeOfLine: ... @@ -1421,10 +1422,12 @@ class Graphic3d_BSDF: def CreateMetallicRoughness(thePbr: Graphic3d_PBRMaterial) -> Graphic3d_BSDF: ... @staticmethod def CreateTransparent(theWeight: Graphic3d_Vec3, theAbsorptionColor: Graphic3d_Vec3, theAbsorptionCoeff: float) -> Graphic3d_BSDF: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Normalize(self) -> None: ... class Graphic3d_BoundBuffer(NCollection_Buffer): def __init__(self, theAlloc: NCollection_BaseAllocator) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Init(self, theNbBounds: int, theHasColors: bool) -> bool: ... class Graphic3d_BufferRange: @@ -1457,6 +1460,7 @@ class Graphic3d_CLight(Standard_Transient): @overload def Direction(self) -> Tuple[float, float, float]: ... def DisplayPosition(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetId(self) -> str: ... def HasRange(self) -> bool: ... def Headlight(self) -> bool: ... @@ -1508,6 +1512,7 @@ class Graphic3d_CStructure(Standard_Transient): def ClipPlanes(self) -> Graphic3d_SequenceOfHClipPlane: ... def Connect(self, theStructure: Graphic3d_CStructure) -> None: ... def Disconnect(self, theStructure: Graphic3d_CStructure) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GraphicDriver(self) -> Graphic3d_GraphicDriver: ... def GraphicHighlight(self, theStyle: Graphic3d_PresentationAttributes) -> None: ... def GraphicUnhighlight(self) -> None: ... @@ -1559,6 +1564,7 @@ class Graphic3d_Camera(Standard_Transient): def CopyOrientationData(self, theOtherCamera: Graphic3d_Camera) -> None: ... def Direction(self) -> gp_Dir: ... def Distance(self) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eye(self) -> gp_Pnt: ... def FOV2d(self) -> float: ... def FOVx(self) -> float: ... @@ -1638,6 +1644,7 @@ class Graphic3d_Camera(Standard_Transient): class Graphic3d_CameraTile: def __init__(self) -> None: ... def Cropped(self) -> Graphic3d_CameraTile: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsValid(self) -> bool: ... def OffsetLowerLeft(self) -> Graphic3d_Vec2i: ... @@ -1659,6 +1666,7 @@ class Graphic3d_ClipPlane(Standard_Transient): def ChainNextPlane(self) -> Graphic3d_ClipPlane: ... def ChainPreviousPlane(self) -> Graphic3d_ClipPlane: ... def Clone(self) -> Graphic3d_ClipPlane: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetEquation(self) -> Graphic3d_Vec4d: ... def GetId(self) -> str: ... def IsBoxFullInHalfspace(self, theBox: Graphic3d_BndBox3d) -> bool: ... @@ -1769,6 +1777,7 @@ class Graphic3d_Fresnel: def CreateDielectric(theRefractionIndex: float) -> Graphic3d_Fresnel: ... @staticmethod def CreateSchlick(theSpecularColor: Graphic3d_Vec3) -> Graphic3d_Fresnel: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FresnelType(self) -> Graphic3d_FresnelModel: ... def Serialize(self) -> Graphic3d_Vec4: ... @@ -1805,6 +1814,7 @@ class Graphic3d_GraphicDriver(Standard_Transient): def CreateStructure(self, theManager: Graphic3d_StructureManager) -> Graphic3d_CStructure: ... def CreateView(self, theMgr: Graphic3d_StructureManager) -> Graphic3d_CView: ... def DefaultTextHeight(self) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EnableVBO(self, status: bool) -> None: ... def GetDisplayConnection(self) -> Aspect_DisplayConnection: ... def InquireLightLimit(self) -> int: ... @@ -1849,6 +1859,7 @@ class Graphic3d_Group(Standard_Transient): def BoundingBox(self) -> Graphic3d_BndBox4f: ... def ChangeBoundingBox(self) -> Graphic3d_BndBox4f: ... def Clear(self, theUpdateStructureMgr: Optional[bool] = True) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsClosed(self) -> bool: ... def IsDeleted(self) -> bool: ... def IsEmpty(self) -> bool: ... @@ -1883,6 +1894,7 @@ class Graphic3d_HatchStyle(Standard_Transient): def __init__(self, thePattern: Image_PixMap) -> None: ... @overload def __init__(self, theType: Aspect_HatchStyle) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def HatchType(self) -> int: ... def Pattern(self) -> str: ... @@ -1893,6 +1905,7 @@ class Graphic3d_Layer(Standard_Transient): def BoundingBox(self, theViewId: int, theCamera: Graphic3d_Camera, theWindowWidth: int, theWindowHeight: int, theToIncludeAuxiliary: bool) -> Bnd_Box: ... def CullableStructuresBVH(self) -> Graphic3d_BvhCStructureSet: ... def CullableTrsfPersStructuresBVH(self) -> Graphic3d_BvhCStructureSetTrsfPers: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def InvalidateBVHData(self) -> None: ... def InvalidateBoundingBox(self) -> None: ... def IsCulled(self) -> bool: ... @@ -1954,6 +1967,7 @@ class Graphic3d_MaterialAspect: def BSDF(self) -> Graphic3d_BSDF: ... def Color(self) -> Quantity_Color: ... def DiffuseColor(self) -> Quantity_Color: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EmissiveColor(self) -> Quantity_Color: ... def IncreaseShine(self, theDelta: float) -> None: ... def IsDifferent(self, theOther: Graphic3d_MaterialAspect) -> bool: ... @@ -2010,6 +2024,7 @@ class Graphic3d_PBRMaterial: def __init__(self, theBSDF: Graphic3d_BSDF) -> None: ... def Alpha(self) -> float: ... def Color(self) -> Quantity_ColorRGBA: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Emission(self) -> Graphic3d_Vec3: ... @staticmethod def GenerateEnvLUT(theLUT: Image_PixMap, theNbIntegralSamples: Optional[int] = 1024) -> None: ... @@ -2042,6 +2057,7 @@ class Graphic3d_PBRMaterial: class Graphic3d_PolygonOffset: def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... class Graphic3d_PresentationAttributes(Standard_Transient): def __init__(self) -> None: ... @@ -2049,6 +2065,7 @@ class Graphic3d_PresentationAttributes(Standard_Transient): def Color(self) -> Quantity_Color: ... def ColorRGBA(self) -> Quantity_ColorRGBA: ... def DisplayMode(self) -> int: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Method(self) -> Aspect_TypeOfHighlightMethod: ... def SetBasicFillAreaAspect(self, theAspect: Graphic3d_AspectFillArea3d) -> None: ... def SetColor(self, theColor: Quantity_Color) -> None: ... @@ -2061,12 +2078,14 @@ class Graphic3d_PresentationAttributes(Standard_Transient): class Graphic3d_RenderingParams: def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ResolutionRatio(self) -> float: ... class Graphic3d_SequenceOfHClipPlane(Standard_Transient): def __init__(self) -> None: ... def Append(self, theItem: Graphic3d_ClipPlane) -> bool: ... def Clear(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def First(self) -> Graphic3d_ClipPlane: ... def IsEmpty(self) -> bool: ... @overload @@ -2177,6 +2196,7 @@ class Graphic3d_Structure(Standard_Transient): def DisconnectAll(self, AType: Graphic3d_TypeOfConnection) -> None: ... def Display(self) -> None: ... def DisplayPriority(self) -> Graphic3d_DisplayPriority: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Erase(self) -> None: ... def GetZLayer(self) -> Graphic3d_ZLayerId: ... def GraphicClear(self, WithDestruction: bool) -> None: ... @@ -2249,6 +2269,7 @@ class Graphic3d_StructureManager(Standard_Transient): def Disconnect(self, theMother: Graphic3d_Structure, theDaughter: Graphic3d_Structure) -> None: ... def Display(self, theStructure: Graphic3d_Structure) -> None: ... def DisplayedStructures(self, SG: Graphic3d_MapOfStructure) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Erase(self) -> None: ... @overload @@ -2360,6 +2381,7 @@ class Graphic3d_TransformPers(Standard_Transient): def __init__(self, theMode: Graphic3d_TransModeFlags, theCorner: Aspect_TypeOfTriedronPosition, theOffset: Optional[Graphic3d_Vec2i] = Graphic3d_Vec2i(0,0)) -> None: ... def AnchorPoint(self) -> gp_Pnt: ... def Corner2d(self) -> Aspect_TypeOfTriedronPosition: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Flags(self) -> Graphic3d_TransModeFlags: ... @overload @staticmethod @@ -2424,6 +2446,7 @@ class Graphic3d_Vertex: @overload def Coord(self) -> Tuple[float, float, float]: ... def Distance(self, theOther: Graphic3d_Vertex) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def SetCoord(self, theX: float, theY: float, theZ: float) -> None: ... @overload @@ -2434,6 +2457,7 @@ class Graphic3d_Vertex: class Graphic3d_ViewAffinity(Standard_Transient): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsVisible(self, theViewId: int) -> bool: ... @overload def SetVisible(self, theIsVisible: bool) -> None: ... @@ -2445,6 +2469,7 @@ class Graphic3d_WorldViewProjState: def __init__(self) -> None: ... @overload def __init__(self, theProjectionState: int, theWorldViewState: int, theCamera: Optional[Standard_Transient] = None) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Initialize(self, theProjectionState: int, theWorldViewState: int, theCamera: Optional[Standard_Transient] = None) -> None: ... @overload @@ -2462,6 +2487,7 @@ class Graphic3d_ZLayerSettings: def ChangePolygonOffset(self) -> Graphic3d_PolygonOffset: ... def CullingDistance(self) -> float: ... def CullingSize(self) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def HasCullingDistance(self) -> bool: ... def HasCullingSize(self) -> bool: ... def IsImmediate(self) -> bool: ... @@ -2594,6 +2620,7 @@ class Graphic3d_AspectText3d(Graphic3d_Aspects): def Color(self) -> Quantity_Color: ... def ColorRGBA(self) -> Quantity_ColorRGBA: ... def DisplayType(self) -> Aspect_TypeOfDisplayText: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Font(self) -> str: ... def GetTextAngle(self) -> float: ... def GetTextFontAspect(self) -> False: ... @@ -2657,6 +2684,7 @@ class Graphic3d_CView(Graphic3d_DataStructureManager): def Deactivate(self) -> None: ... def DiagnosticInformation(self, theDict: TColStd_IndexedDataMapOfStringString, theFlags: Graphic3d_DiagnosticInfo) -> None: ... def DisplayedStructures(self, theStructures: Graphic3d_MapOfStructure) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FBO(self) -> Standard_Transient: ... def FBOChangeViewport(self, theFbo: Standard_Transient, theWidth: int, theHeight: int) -> None: ... def FBOCreate(self, theWidth: int, theHeight: int) -> Standard_Transient: ... diff --git a/src/SWIG_files/wrapper/HLRAlgo.i b/src/SWIG_files/wrapper/HLRAlgo.i index 160415688..2d5c90545 100644 --- a/src/SWIG_files/wrapper/HLRAlgo.i +++ b/src/SWIG_files/wrapper/HLRAlgo.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_hlralgo.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/HLRAppli.i b/src/SWIG_files/wrapper/HLRAppli.i index 6fc67e94a..c82bde679 100644 --- a/src/SWIG_files/wrapper/HLRAppli.i +++ b/src/SWIG_files/wrapper/HLRAppli.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_hlrappli.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/HLRBRep.i b/src/SWIG_files/wrapper/HLRBRep.i index 713ced8c7..95343bfed 100644 --- a/src/SWIG_files/wrapper/HLRBRep.i +++ b/src/SWIG_files/wrapper/HLRBRep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_hlrbrep.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/HLRTopoBRep.i b/src/SWIG_files/wrapper/HLRTopoBRep.i index 66c918493..7c91569ed 100644 --- a/src/SWIG_files/wrapper/HLRTopoBRep.i +++ b/src/SWIG_files/wrapper/HLRTopoBRep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_hlrtopobrep.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Hatch.i b/src/SWIG_files/wrapper/Hatch.i index aa0d8a7cf..cdb34656e 100644 --- a/src/SWIG_files/wrapper/Hatch.i +++ b/src/SWIG_files/wrapper/Hatch.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_hatch.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/HatchGen.i b/src/SWIG_files/wrapper/HatchGen.i index 1328a3231..448aa4bbb 100644 --- a/src/SWIG_files/wrapper/HatchGen.i +++ b/src/SWIG_files/wrapper/HatchGen.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_hatchgen.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/HeaderSection.i b/src/SWIG_files/wrapper/HeaderSection.i index e8f0742c0..0e31dffd5 100644 --- a/src/SWIG_files/wrapper/HeaderSection.i +++ b/src/SWIG_files/wrapper/HeaderSection.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_headersection.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Hermit.i b/src/SWIG_files/wrapper/Hermit.i index bd1ebed16..c25458818 100644 --- a/src/SWIG_files/wrapper/Hermit.i +++ b/src/SWIG_files/wrapper/Hermit.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_hermit.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IFSelect.i b/src/SWIG_files/wrapper/IFSelect.i index 100e3cf84..21d3e5ad3 100644 --- a/src/SWIG_files/wrapper/IFSelect.i +++ b/src/SWIG_files/wrapper/IFSelect.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_ifselect.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -2378,14 +2379,43 @@ From an edited value, returns its ... value (original one) null means that this ") OriginalValue; opencascade::handle OriginalValue(const Standard_Integer num); + /****************** PrintDefs ******************/ + /**** md5 signature: 46629d4f069d37bd12c0384fcc538c0d ****/ + %feature("compactdefaultargs") PrintDefs; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +Prints definitions, relative to the editor. +") PrintDefs; + void PrintDefs(std::ostream &OutValue); + + /****************** PrintValues ******************/ + /**** md5 signature: 9580ee383589529b4c579a30e8eb8c2b ****/ + %feature("compactdefaultargs") PrintValues; + %feature("autodoc", " +Parameters +---------- +what: int +names: bool +alsolist: bool (optional, default to Standard_False) + +Return +------- +S: Standard_OStream + +Description +----------- +Prints values, according to what and alsolist true: prints long names; false: prints short names < 0: prints original values (+ flag modified) > 0: prints final values (+flag modified) = 0: prints modified values (original + edited) false (d): lists are printed only as their count true: lists are printed for all their items. +") PrintValues; + void PrintValues(std::ostream &OutValue, const Standard_Integer what, const Standard_Boolean names, const Standard_Boolean alsolist = Standard_False); - %feature("autodoc", "1"); - %extend{ - std::string PrintDefsToString() { - std::stringstream s; - self->PrintDefs(s); - return s.str();} - }; /****************** RankFromNumber ******************/ /**** md5 signature: fe822a7d919e60ec0cdab5e6f2363afe ****/ %feature("compactdefaultargs") RankFromNumber; @@ -2775,14 +2805,41 @@ Returns the count of typed values. ") NbValues; Standard_Integer NbValues(); + /****************** PrintDefs ******************/ + /**** md5 signature: 5eb01ddb6757ab25c90b1081fcc7f846 ****/ + %feature("compactdefaultargs") PrintDefs; + %feature("autodoc", " +Parameters +---------- +labels: bool (optional, default to Standard_False) + +Return +------- +S: Standard_OStream + +Description +----------- +No available documentation. +") PrintDefs; + void PrintDefs(std::ostream &OutValue, const Standard_Boolean labels = Standard_False); + + /****************** PrintNames ******************/ + /**** md5 signature: 02f5b2a426678e69e3d51e32f074a88c ****/ + %feature("compactdefaultargs") PrintNames; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +No available documentation. +") PrintNames; + void PrintNames(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintNamesToString() { - std::stringstream s; - self->PrintNames(s); - return s.str();} - }; /****************** Recognize ******************/ /**** md5 signature: 8378a2193566cc16fc414dbb42c7fa11 ****/ %feature("compactdefaultargs") Recognize; @@ -6394,22 +6451,59 @@ Returns the number of times a signature was counted, 0 if it has not been record ") NbTimes; Standard_Integer NbTimes(Standard_CString sign); + /****************** PrintCount ******************/ + /**** md5 signature: 52dc9956b3be6f0fa8745979cb86a350 ****/ + %feature("compactdefaultargs") PrintCount; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string PrintCountToString() { - std::stringstream s; - self->PrintCount(s); - return s.str();} - }; +Return +------- +S: Standard_OStream + +Description +----------- +Prints the counts of items (not the list). +") PrintCount; + virtual void PrintCount(std::ostream &OutValue); + + /****************** PrintList ******************/ + /**** md5 signature: bcbb5a17846c2054455e1d0575bea15a ****/ + %feature("compactdefaultargs") PrintList; + %feature("autodoc", " +Parameters +---------- +model: Interface_InterfaceModel +mod: IFSelect_PrintCount (optional, default to IFSelect_ListByItem) + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the lists of items, if they are present (else, prints a message 'no list available') uses to determine for each entity to be listed, its number, and its specific identifier (by printlabel) gives a mode for printing: - countbyitem: just count (as printcount) - shortbyitem: minimum i.e. count plus 5 first entity numbers - shortbyitem(d) complete list of entity numbers (0: 'global') - entitiesbyitem: list of (entity number/printlabel from the model) other modes are ignored. +") PrintList; + virtual void PrintList(std::ostream &OutValue, const opencascade::handle & model, const IFSelect_PrintCount mod = IFSelect_ListByItem); + + /****************** PrintSum ******************/ + /**** md5 signature: 12295d942889bf52eeb33b08fd2a6899 ****/ + %feature("compactdefaultargs") PrintSum; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +Prints a summary item which has the greatest count of entities for items which are numeric values: their count, maximum, minimum values, cumul, average. +") PrintSum; + virtual void PrintSum(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintSumToString() { - std::stringstream s; - self->PrintSum(s); - return s.str();} - }; /****************** SetList ******************/ /**** md5 signature: b238846d95b165f74a942ebb6e50644f ****/ %feature("compactdefaultargs") SetList; @@ -6572,6 +6666,47 @@ Performs the copy of entities from an original model to a new one. it must also ") CopyModel; virtual Standard_Boolean CopyModel(const opencascade::handle & original, const opencascade::handle & newmodel, const Interface_EntityIterator & list, Interface_CopyTool & TC); + /****************** DumpEntity ******************/ + /**** md5 signature: f8408c5a3c33881cd6f64d4f853e5b90 ****/ + %feature("compactdefaultargs") DumpEntity; + %feature("autodoc", " +Parameters +---------- +model: Interface_InterfaceModel +protocol: Interface_Protocol +entity: Standard_Transient +level: int + +Return +------- +S: Standard_OStream + +Description +----------- +Gives the way of dumping an entity under a form comprehensive for each norm. helps to identify, number ... entities. is to be interpreted for each norm (because of the formats which can be very different). +") DumpEntity; + virtual void DumpEntity(const opencascade::handle & model, const opencascade::handle & protocol, const opencascade::handle & entity, std::ostream &OutValue, const Standard_Integer level); + + /****************** DumpEntity ******************/ + /**** md5 signature: d4ac4e0fc19594eff493ccd280b9aab2 ****/ + %feature("compactdefaultargs") DumpEntity; + %feature("autodoc", " +Parameters +---------- +model: Interface_InterfaceModel +protocol: Interface_Protocol +entity: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Calls deferred dumpentity with the recorded default level. +") DumpEntity; + void DumpEntity(const opencascade::handle & model, const opencascade::handle & protocol, const opencascade::handle & entity, std::ostream &OutValue); + /****************** DumpHelp ******************/ /**** md5 signature: f61ff69745dfa047c7a47cefecb0fa1c ****/ %feature("compactdefaultargs") DumpHelp; @@ -6635,7 +6770,7 @@ Gives the way to read a file and transfer it to a model is the resulting m Parameters ---------- theName: str -theIStream: std::istream +theIStream: str model: Interface_InterfaceModel protocol: Interface_Protocol @@ -7117,6 +7252,43 @@ Returns the rank of a dispatch in the shareout, or 0 if is not in the sha ") DispatchRank; Standard_Integer DispatchRank(const opencascade::handle & disp); + /****************** DumpEntity ******************/ + /**** md5 signature: f990cff2a6a7f265e11d7bac988dbbd6 ****/ + %feature("compactdefaultargs") DumpEntity; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient +level: int + +Return +------- +S: Standard_OStream + +Description +----------- +Dumps a starting entity according to the current norm. to do this, it calls dumpentity from worklibrary. is to be interpreted for each norm: see specific classes of worklibrary for it. generally, 0 if for very basic (only type ...), greater values give more and more details. +") DumpEntity; + void DumpEntity(const opencascade::handle & ent, const Standard_Integer level, std::ostream &OutValue); + + /****************** DumpModel ******************/ + /**** md5 signature: d1b07e5d32687faa97f239407098b2d6 ****/ + %feature("compactdefaultargs") DumpModel; + %feature("autodoc", " +Parameters +---------- +level: int + +Return +------- +S: Standard_OStream + +Description +----------- +Lists the content of the input model (if there is one) according level: 0 -> gives only count of entities and roots 1 -> lists also roots; 2 -> lists all entities (by tracetype) 3 -> performs a call to checklist (fails) and lists the result 4 -> as 3 but all checklist (fails + warnings) 5,6,7: as 3 but resp. count,list,labels by fail 8,9,10: as 4 but resp. count,list,labels by message. +") DumpModel; + void DumpModel(const Standard_Integer level, std::ostream &OutValue); + /****************** DumpSelection ******************/ /**** md5 signature: 678949be99cdcf061da9cb44548ea4f4 ****/ %feature("compactdefaultargs") DumpSelection; @@ -7818,6 +7990,25 @@ Returns the check list produced by the last execution of either: evaluatefile(fo ") LastRunCheckList; Interface_CheckIterator LastRunCheckList(); + /****************** ListEntities ******************/ + /**** md5 signature: 7dcb72658ee62c200859aa51b254701d ****/ + %feature("compactdefaultargs") ListEntities; + %feature("autodoc", " +Parameters +---------- +iter: Interface_EntityIterator +mode: int + +Return +------- +S: Standard_OStream + +Description +----------- +Internal method which displays an entityiterator 0 gives short display (only entity numbers) 1 gives a more complete trace (1 line per entity) (can be used each time a trace has to be output from a list) 2 gives a form suitable for givelist: (n1,n2,n3...). +") ListEntities; + void ListEntities(const Interface_EntityIterator & iter, const Standard_Integer mode, std::ostream &OutValue); + /****************** ListFinalModifiers ******************/ /**** md5 signature: b6f48db447f14a56611601af586a67c5 ****/ %feature("compactdefaultargs") ListFinalModifiers; @@ -8239,6 +8430,63 @@ From a given label in model, returns the corresponding number starts from first ") NumberFromLabel; Standard_Integer NumberFromLabel(Standard_CString val, const Standard_Integer afternum = 0); + /****************** PrintCheckList ******************/ + /**** md5 signature: abe5e5f6e65ec20b5fa1bdc0150abd4b ****/ + %feature("compactdefaultargs") PrintCheckList; + %feature("autodoc", " +Parameters +---------- +checklist: Interface_CheckIterator +failsonly: bool +mode: IFSelect_PrintCount + +Return +------- +S: Standard_OStream + +Description +----------- +Prints a checkiterator to the current trace file, controlled with the current model complete or fails only, according to defines the mode of printing 0: sequential, according entities; else with a checkcounter 1: according messages, count of entities 2: id but with list of entities, designated by their numbers 3: as 2 but with labels of entities. +") PrintCheckList; + void PrintCheckList(std::ostream &OutValue, const Interface_CheckIterator & checklist, const Standard_Boolean failsonly, const IFSelect_PrintCount mode); + + /****************** PrintEntityStatus ******************/ + /**** md5 signature: 23f12785981bcfcd0d9cd330e2c76792 ****/ + %feature("compactdefaultargs") PrintEntityStatus; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Prints main information about an entity: its number, type, validity (and checks if any), category, shareds and sharings.. mutable because it can recompute checks as necessary. +") PrintEntityStatus; + void PrintEntityStatus(const opencascade::handle & ent, std::ostream &OutValue); + + /****************** PrintSignatureList ******************/ + /**** md5 signature: eea2888114f184bae9fc2d6912607a7f ****/ + %feature("compactdefaultargs") PrintSignatureList; + %feature("autodoc", " +Parameters +---------- +signlist: IFSelect_SignatureList +mode: IFSelect_PrintCount + +Return +------- +S: Standard_OStream + +Description +----------- +Prints a signaturelist to the current trace file, controlled with the current model defines the mode of printing (see signaturelist). +") PrintSignatureList; + void PrintSignatureList(std::ostream &OutValue, const opencascade::handle & signlist, const IFSelect_PrintCount mode); + /****************** Protocol ******************/ /**** md5 signature: 1c9ddeeacf191f917e4377fcdad955ea ****/ %feature("compactdefaultargs") Protocol; @@ -8332,7 +8580,7 @@ Reads a file with the worklibrary (sets model and loadedfile) returns a integer Parameters ---------- theName: str -theIStream: std::istream +theIStream: str Return ------- diff --git a/src/SWIG_files/wrapper/IFSelect.pyi b/src/SWIG_files/wrapper/IFSelect.pyi index ecda679cc..cbbddac39 100644 --- a/src/SWIG_files/wrapper/IFSelect.pyi +++ b/src/SWIG_files/wrapper/IFSelect.pyi @@ -305,6 +305,8 @@ class IFSelect_EditForm(Standard_Transient): def NumberFromRank(self, rank: int) -> int: ... def OriginalList(self, num: int) -> TColStd_HSequenceOfHAsciiString: ... def OriginalValue(self, num: int) -> TCollection_HAsciiString: ... + def PrintDefs(self) -> str: ... + def PrintValues(self, what: int, names: bool, alsolist: Optional[bool] = False) -> str: ... def RankFromNumber(self, number: int) -> int: ... def Recognize(self) -> bool: ... def SetData(self, ent: Standard_Transient, model: Interface_InterfaceModel) -> None: ... @@ -328,6 +330,8 @@ class IFSelect_Editor(Standard_Transient): def Name(self, num: int, isshort: Optional[bool] = False) -> str: ... def NameNumber(self, name: str) -> int: ... def NbValues(self) -> int: ... + def PrintDefs(self, labels: Optional[bool] = False) -> str: ... + def PrintNames(self) -> str: ... def Recognize(self, form: IFSelect_EditForm) -> bool: ... def SetList(self, num: int, max: Optional[int] = 0) -> None: ... def SetValue(self, num: int, typval: Interface_TypedValue, shortname: Optional[str] = "", accessmode: Optional[IFSelect_EditValue] = IFSelect_Editable) -> None: ... @@ -580,6 +584,9 @@ class IFSelect_SignatureList(Standard_Transient): def Name(self) -> str: ... def NbNulls(self) -> int: ... def NbTimes(self, sign: str) -> int: ... + def PrintCount(self) -> str: ... + def PrintList(self, model: Interface_InterfaceModel, mod: Optional[IFSelect_PrintCount] = IFSelect_ListByItem) -> str: ... + def PrintSum(self) -> str: ... def SetList(self, withlist: bool) -> None: ... def SetName(self, name: str) -> None: ... @@ -591,9 +598,14 @@ class IFSelect_Transformer(Standard_Transient): class IFSelect_WorkLibrary(Standard_Transient): def CopyModel(self, original: Interface_InterfaceModel, newmodel: Interface_InterfaceModel, list: Interface_EntityIterator, TC: Interface_CopyTool) -> bool: ... + @overload + def DumpEntity(self, model: Interface_InterfaceModel, protocol: Interface_Protocol, entity: Standard_Transient, level: int) -> str: ... + @overload + def DumpEntity(self, model: Interface_InterfaceModel, protocol: Interface_Protocol, entity: Standard_Transient) -> str: ... def DumpHelp(self, level: int) -> str: ... def DumpLevels(self) -> Tuple[int, int]: ... def ReadFile(self, name: str, model: Interface_InterfaceModel, protocol: Interface_Protocol) -> int: ... + def ReadStream(self, theName: str, theIStream: str, model: Interface_InterfaceModel, protocol: Interface_Protocol) -> int: ... def SetDumpHelp(self, level: int, help: str) -> None: ... def SetDumpLevels(self, def_: int, max: int) -> None: ... def WriteFile(self, ctx: IFSelect_ContextWrite) -> bool: ... @@ -622,6 +634,8 @@ class IFSelect_WorkSession(Standard_Transient): def DefaultFileRoot(self) -> TCollection_HAsciiString: ... def Dispatch(self, id: int) -> IFSelect_Dispatch: ... def DispatchRank(self, disp: IFSelect_Dispatch) -> int: ... + def DumpEntity(self, ent: Standard_Transient, level: int) -> str: ... + def DumpModel(self, level: int) -> str: ... def DumpSelection(self, sel: IFSelect_Selection) -> None: ... def DumpShare(self) -> None: ... def EntityLabel(self, ent: Standard_Transient) -> TCollection_HAsciiString: ... @@ -666,6 +680,7 @@ class IFSelect_WorkSession(Standard_Transient): def ItemNamesForLabel(self, label: str) -> TColStd_HSequenceOfHAsciiString: ... def ItemSelection(self, item: Standard_Transient) -> IFSelect_Selection: ... def LastRunCheckList(self) -> Interface_CheckIterator: ... + def ListEntities(self, iter: Interface_EntityIterator, mode: int) -> str: ... def ListFinalModifiers(self, formodel: bool) -> None: ... def ListItems(self, label: Optional[str] = "") -> None: ... def LoadedFile(self) -> str: ... @@ -693,11 +708,15 @@ class IFSelect_WorkSession(Standard_Transient): def NewTransformStandard(self, copy: bool, name: Optional[str] = "") -> IFSelect_Transformer: ... def NextIdentForLabel(self, label: str, id: int, mode: Optional[int] = 0) -> int: ... def NumberFromLabel(self, val: str, afternum: Optional[int] = 0) -> int: ... + def PrintCheckList(self, checklist: Interface_CheckIterator, failsonly: bool, mode: IFSelect_PrintCount) -> str: ... + def PrintEntityStatus(self, ent: Standard_Transient) -> str: ... + def PrintSignatureList(self, signlist: IFSelect_SignatureList, mode: IFSelect_PrintCount) -> str: ... def Protocol(self) -> Interface_Protocol: ... def QueryCheckList(self, chl: Interface_CheckIterator) -> None: ... def QueryCheckStatus(self, ent: Standard_Transient) -> int: ... def QueryParent(self, entdad: Standard_Transient, entson: Standard_Transient) -> int: ... def ReadFile(self, filename: str) -> IFSelect_ReturnStatus: ... + def ReadStream(self, theName: str, theIStream: str) -> IFSelect_ReturnStatus: ... def RemoveItem(self, item: Standard_Transient) -> bool: ... def RemoveName(self, name: str) -> bool: ... def RemoveNamedItem(self, name: str) -> bool: ... diff --git a/src/SWIG_files/wrapper/IGESCAFControl.i b/src/SWIG_files/wrapper/IGESCAFControl.i index 59dc4ced1..35eb6b473 100644 --- a/src/SWIG_files/wrapper/IGESCAFControl.i +++ b/src/SWIG_files/wrapper/IGESCAFControl.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_igescafcontrol.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IGESControl.i b/src/SWIG_files/wrapper/IGESControl.i index 710b13872..2fb603dd2 100644 --- a/src/SWIG_files/wrapper/IGESControl.i +++ b/src/SWIG_files/wrapper/IGESControl.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_igescontrol.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -723,6 +724,24 @@ No available documentation. ") TransferProcess; const opencascade::handle & TransferProcess(); + /****************** Write ******************/ + /**** md5 signature: 641c31af3cf254e70aab3e12c5732d18 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +fnes: bool (optional, default to Standard_False) + +Return +------- +S: Standard_OStream + +Description +----------- +Computes then writes the model to an ostream returns true when done, false in case of error. +") Write; + Standard_Boolean Write(std::ostream &OutValue, const Standard_Boolean fnes = Standard_False); + /****************** Write ******************/ /**** md5 signature: 336d0511a9ae227341af6444cb65363f ****/ %feature("compactdefaultargs") Write; diff --git a/src/SWIG_files/wrapper/IGESControl.pyi b/src/SWIG_files/wrapper/IGESControl.pyi index 30e2691b5..4922599a3 100644 --- a/src/SWIG_files/wrapper/IGESControl.pyi +++ b/src/SWIG_files/wrapper/IGESControl.pyi @@ -67,6 +67,8 @@ class IGESControl_Writer: def SetTransferProcess(self, TP: Transfer_FinderProcess) -> None: ... def TransferProcess(self) -> Transfer_FinderProcess: ... @overload + def Write(self, fnes: Optional[bool] = False) -> Tuple[bool, str]: ... + @overload def Write(self, file: str, fnes: Optional[bool] = False) -> bool: ... # harray1 classes diff --git a/src/SWIG_files/wrapper/IGESData.i b/src/SWIG_files/wrapper/IGESData.i index 29b90c2d0..42580fc76 100644 --- a/src/SWIG_files/wrapper/IGESData.i +++ b/src/SWIG_files/wrapper/IGESData.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_igesdata.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -2929,6 +2930,81 @@ Returns an igesdumper ready to work. the igesmodel provides the numbering of ent ") IGESData_IGESDumper; IGESData_IGESDumper(const opencascade::handle & model, const opencascade::handle & protocol); + /****************** Dump ******************/ + /**** md5 signature: c347dc756919bc04f1eac57ddbe6e2a8 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +ent: IGESData_IGESEntity +own: int +attached: int (optional, default to -1) + +Return +------- +S: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + void Dump(const opencascade::handle & ent, std::ostream &OutValue, const Standard_Integer own, const Standard_Integer attached = -1); + + /****************** OwnDump ******************/ + /**** md5 signature: 3235d2f595b46c51344158ad01916bf5 ****/ + %feature("compactdefaultargs") OwnDump; + %feature("autodoc", " +Parameters +---------- +ent: IGESData_IGESEntity +own: int + +Return +------- +S: Standard_OStream + +Description +----------- +Specific dump for each iges entity, call by dump (just above) is the parameter from dump. +") OwnDump; + void OwnDump(const opencascade::handle & ent, std::ostream &OutValue, const Standard_Integer own); + + /****************** PrintDNum ******************/ + /**** md5 signature: 843ade9a40f705735dc483822de7ae21 ****/ + %feature("compactdefaultargs") PrintDNum; + %feature("autodoc", " +Parameters +---------- +ent: IGESData_IGESEntity + +Return +------- +S: Standard_OStream + +Description +----------- +Prints onto an output, the 'number of directory entry' which corresponds to an igesentity in the igesmodel, under the form 'd#nnn' (a null handle gives d#0). +") PrintDNum; + void PrintDNum(const opencascade::handle & ent, std::ostream &OutValue); + + /****************** PrintShort ******************/ + /**** md5 signature: 70b65854c8626a1ea0446479ed6c8a1a ****/ + %feature("compactdefaultargs") PrintShort; + %feature("autodoc", " +Parameters +---------- +ent: IGESData_IGESEntity + +Return +------- +S: Standard_OStream + +Description +----------- +Prints onto an output, the 'number of directory entry' (see printdnum) plus iges type and form numbers, which gives 'd#nnn type nnn form nnn'. +") PrintShort; + void PrintShort(const opencascade::handle & ent, std::ostream &OutValue); + }; @@ -4039,6 +4115,24 @@ Returns the equivalent de number for an entity, i.e. 2*number(ent)-1 , or 0 if < ") DNum; Standard_Integer DNum(const opencascade::handle & ent); + /****************** DumpHeader ******************/ + /**** md5 signature: 56f8df745054635fd7397075063f4387 ****/ + %feature("compactdefaultargs") DumpHeader; + %feature("autodoc", " +Parameters +---------- +level: int (optional, default to 0) + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the iges file header (start and global sections) to the log file. the integer parameter is intended to be used as a level indicator but is not used at present. +") DumpHeader; + void DumpHeader(std::ostream &OutValue, const Standard_Integer level = 0); + /****************** Entity ******************/ /**** md5 signature: 9ad99fc403d738612d5a7261abb4e74e ****/ %feature("compactdefaultargs") Entity; @@ -4114,6 +4208,60 @@ Returns a new empty model, same type as i.e. igesmodel. ") NewEmptyModel; opencascade::handle NewEmptyModel(); + /****************** PrintInfo ******************/ + /**** md5 signature: 048e00e2b50d28afc8b7b531cd4b786a ****/ + %feature("compactdefaultargs") PrintInfo; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Prints label specific to iges norm for a given entity, i.e. its directory entry number (2*number-1). +") PrintInfo; + void PrintInfo(const opencascade::handle & ent, std::ostream &OutValue); + + /****************** PrintLabel ******************/ + /**** md5 signature: 70ad5739c870581f6dca5167f0b3bae0 ****/ + %feature("compactdefaultargs") PrintLabel; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Prints label specific to iges norm for a given entity, i.e. its directory entry number (2*number-1). +") PrintLabel; + void PrintLabel(const opencascade::handle & ent, std::ostream &OutValue); + + /****************** PrintToLog ******************/ + /**** md5 signature: 0993bb95706cbffcda2c98453ed6b557 ****/ + %feature("compactdefaultargs") PrintToLog; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Prints label specific to iges norm for a given -- -- entity, i.e. its directory entry number (2*number-1) in the log file format. +") PrintToLog; + virtual void PrintToLog(const opencascade::handle & ent, std::ostream &OutValue); + /****************** ReShape ******************/ /**** md5 signature: acfc9c298bd502c36bf4f2873869a723 ****/ %feature("compactdefaultargs") ReShape; @@ -5049,14 +5197,23 @@ Sends own parameters of the entity, by sending firstly its type, then calling sp ") OwnParams; void OwnParams(const opencascade::handle & anent); + /****************** Print ******************/ + /**** md5 signature: 5e5b127c01c68c6fb6a747c286a95265 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +Writes result on an output defined as an ostream resolves stored infos at this time; in particular, numbers of lines used to address p-section from d-section and final totals takes writemode into account. +") Print; + Standard_Boolean Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Properties ******************/ /**** md5 signature: 593129876ee8c43cc811cf1423c82b5d ****/ %feature("compactdefaultargs") Properties; @@ -7147,6 +7304,27 @@ Specific automatic correction on own parameters of an entity. it works by settin ") OwnCorrect; virtual Standard_Boolean OwnCorrect(const Standard_Integer CN, const opencascade::handle & ent); + /****************** OwnDump ******************/ + /**** md5 signature: f276487f02d27b508cdd766536f98d29 ****/ + %feature("compactdefaultargs") OwnDump; + %feature("autodoc", " +Parameters +---------- +CN: int +ent: IGESData_IGESEntity +dumper: IGESData_IGESDumper +own: int + +Return +------- +S: Standard_OStream + +Description +----------- +Specific dump for each type of iges entity: it concerns only own parameters, the general data (directory part, lists) are taken into account by the igesdumper see class igesdumper for the rules to follow for and level. +") OwnDump; + virtual void OwnDump(const Standard_Integer CN, const opencascade::handle & ent, const IGESData_IGESDumper & dumper, std::ostream &OutValue, const Standard_Integer own); + }; @@ -7873,6 +8051,27 @@ Creates a defaultspecific and puts it into specificlib. ") IGESData_DefaultSpecific; IGESData_DefaultSpecific(); + /****************** OwnDump ******************/ + /**** md5 signature: 97551005b4180a704e712d2024f870d6 ****/ + %feature("compactdefaultargs") OwnDump; + %feature("autodoc", " +Parameters +---------- +CN: int +ent: IGESData_IGESEntity +dumper: IGESData_IGESDumper +own: int + +Return +------- +S: Standard_OStream + +Description +----------- +Specific dump for undefinedentity: it concerns only own parameters, the general data (directory part, lists) are taken into account by the igesdumper. +") OwnDump; + void OwnDump(const Standard_Integer CN, const opencascade::handle & ent, const IGESData_IGESDumper & dumper, std::ostream &OutValue, const Standard_Integer own); + }; diff --git a/src/SWIG_files/wrapper/IGESData.pyi b/src/SWIG_files/wrapper/IGESData.pyi index 3b14cfc48..94a7197d8 100644 --- a/src/SWIG_files/wrapper/IGESData.pyi +++ b/src/SWIG_files/wrapper/IGESData.pyi @@ -308,6 +308,10 @@ class IGESData_GlobalSection: class IGESData_IGESDumper: def __init__(self, model: IGESData_IGESModel, protocol: IGESData_Protocol) -> None: ... + def Dump(self, ent: IGESData_IGESEntity, own: int, attached: Optional[int] = -1) -> str: ... + def OwnDump(self, ent: IGESData_IGESEntity, own: int) -> str: ... + def PrintDNum(self, ent: IGESData_IGESEntity) -> str: ... + def PrintShort(self, ent: IGESData_IGESEntity) -> str: ... class IGESData_IGESEntity(Standard_Transient): def AddProperty(self, ent: IGESData_IGESEntity) -> None: ... @@ -385,11 +389,15 @@ class IGESData_IGESModel(Interface_InterfaceModel): def ClearLabels(self) -> None: ... def ClearStartSection(self) -> None: ... def DNum(self, ent: IGESData_IGESEntity) -> int: ... + def DumpHeader(self, level: Optional[int] = 0) -> str: ... def Entity(self, num: int) -> IGESData_IGESEntity: ... def GetFromAnother(self, other: Interface_InterfaceModel) -> None: ... def GlobalSection(self) -> IGESData_GlobalSection: ... def NbStartLines(self) -> int: ... def NewEmptyModel(self) -> Interface_InterfaceModel: ... + def PrintInfo(self, ent: Standard_Transient) -> str: ... + def PrintLabel(self, ent: Standard_Transient) -> str: ... + def PrintToLog(self, ent: Standard_Transient) -> str: ... def ReShape(self) -> ShapeBuild_ReShape: ... def SetGlobalSection(self, header: IGESData_GlobalSection) -> None: ... def SetLineWeights(self, defw: float) -> None: ... @@ -452,6 +460,7 @@ class IGESData_IGESWriter: def EndEntity(self) -> None: ... def FloatWriter(self) -> Interface_FloatWriter: ... def OwnParams(self, anent: IGESData_IGESEntity) -> None: ... + def Print(self) -> Tuple[bool, str]: ... def Properties(self, anent: IGESData_IGESEntity) -> None: ... def SectionG(self, header: IGESData_GlobalSection) -> None: ... def SectionS(self) -> None: ... @@ -621,6 +630,7 @@ class IGESData_SpecificLib: class IGESData_SpecificModule(Standard_Transient): def OwnCorrect(self, CN: int, ent: IGESData_IGESEntity) -> bool: ... + def OwnDump(self, CN: int, ent: IGESData_IGESEntity, dumper: IGESData_IGESDumper, own: int) -> str: ... class IGESData_ToolLocation(Standard_Transient): def __init__(self, amodel: IGESData_IGESModel, protocol: IGESData_Protocol) -> None: ... @@ -674,6 +684,7 @@ class IGESData_DefaultGeneral(IGESData_GeneralModule): class IGESData_DefaultSpecific(IGESData_SpecificModule): def __init__(self) -> None: ... + def OwnDump(self, CN: int, ent: IGESData_IGESEntity, dumper: IGESData_IGESDumper, own: int) -> str: ... class IGESData_FileProtocol(IGESData_Protocol): def __init__(self) -> None: ... diff --git a/src/SWIG_files/wrapper/IGESToBRep.i b/src/SWIG_files/wrapper/IGESToBRep.i index 9ef2daa80..6c7ae763d 100644 --- a/src/SWIG_files/wrapper/IGESToBRep.i +++ b/src/SWIG_files/wrapper/IGESToBRep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_igestobrep.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IMeshData.i b/src/SWIG_files/wrapper/IMeshData.i index 0723cb706..460982c8a 100644 --- a/src/SWIG_files/wrapper/IMeshData.i +++ b/src/SWIG_files/wrapper/IMeshData.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_imeshdata.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IMeshTools.i b/src/SWIG_files/wrapper/IMeshTools.i index dcd70b4a4..85ce4d154 100644 --- a/src/SWIG_files/wrapper/IMeshTools.i +++ b/src/SWIG_files/wrapper/IMeshTools.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_imeshtools.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IVtk.i b/src/SWIG_files/wrapper/IVtk.i index a4faa09a5..9c6067339 100644 --- a/src/SWIG_files/wrapper/IVtk.i +++ b/src/SWIG_files/wrapper/IVtk.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_ivtk.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IVtkOCC.i b/src/SWIG_files/wrapper/IVtkOCC.i index 2ef1c77b3..08f3e9f10 100644 --- a/src/SWIG_files/wrapper/IVtkOCC.i +++ b/src/SWIG_files/wrapper/IVtkOCC.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_ivtkocc.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IVtkTools.i b/src/SWIG_files/wrapper/IVtkTools.i index 1e5a0d64e..e7e4cbd51 100644 --- a/src/SWIG_files/wrapper/IVtkTools.i +++ b/src/SWIG_files/wrapper/IVtkTools.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_ivtktools.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IVtkVTK.i b/src/SWIG_files/wrapper/IVtkVTK.i index 8cc6e89be..ea67bee04 100644 --- a/src/SWIG_files/wrapper/IVtkVTK.i +++ b/src/SWIG_files/wrapper/IVtkVTK.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_ivtkvtk.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Image.i b/src/SWIG_files/wrapper/Image.i index dbff1e859..561ae46ea 100644 --- a/src/SWIG_files/wrapper/Image.i +++ b/src/SWIG_files/wrapper/Image.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_image.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntAna.i b/src/SWIG_files/wrapper/IntAna.i index 680fea335..cc32b86e7 100644 --- a/src/SWIG_files/wrapper/IntAna.i +++ b/src/SWIG_files/wrapper/IntAna.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intana.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntAna2d.i b/src/SWIG_files/wrapper/IntAna2d.i index c3dc468f4..3983d1ed5 100644 --- a/src/SWIG_files/wrapper/IntAna2d.i +++ b/src/SWIG_files/wrapper/IntAna2d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intana2d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntCurve.i b/src/SWIG_files/wrapper/IntCurve.i index b8e22e1db..3fd95d148 100644 --- a/src/SWIG_files/wrapper/IntCurve.i +++ b/src/SWIG_files/wrapper/IntCurve.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intcurve.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntCurveSurface.i b/src/SWIG_files/wrapper/IntCurveSurface.i index b2b2419af..ca06a6c99 100644 --- a/src/SWIG_files/wrapper/IntCurveSurface.i +++ b/src/SWIG_files/wrapper/IntCurveSurface.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intcurvesurface.h %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntCurvesFace.i b/src/SWIG_files/wrapper/IntCurvesFace.i index 59dacd899..cb9723d05 100644 --- a/src/SWIG_files/wrapper/IntCurvesFace.i +++ b/src/SWIG_files/wrapper/IntCurvesFace.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intcurvesface.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntImp.i b/src/SWIG_files/wrapper/IntImp.i index e1d0d95d1..d3b9f3fd0 100644 --- a/src/SWIG_files/wrapper/IntImp.i +++ b/src/SWIG_files/wrapper/IntImp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intimp.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntImpParGen.i b/src/SWIG_files/wrapper/IntImpParGen.i index 90d3f342f..68dfc7e29 100644 --- a/src/SWIG_files/wrapper/IntImpParGen.i +++ b/src/SWIG_files/wrapper/IntImpParGen.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intimppargen.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntPatch.i b/src/SWIG_files/wrapper/IntPatch.i index fc6e5a7c9..cf2bf5b34 100644 --- a/src/SWIG_files/wrapper/IntPatch.i +++ b/src/SWIG_files/wrapper/IntPatch.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intpatch.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntPolyh.i b/src/SWIG_files/wrapper/IntPolyh.i index eedf435af..b7f9ea226 100644 --- a/src/SWIG_files/wrapper/IntPolyh.i +++ b/src/SWIG_files/wrapper/IntPolyh.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intpolyh.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntRes2d.i b/src/SWIG_files/wrapper/IntRes2d.i index 14014cfc0..3946a343b 100644 --- a/src/SWIG_files/wrapper/IntRes2d.i +++ b/src/SWIG_files/wrapper/IntRes2d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intres2d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntStart.i b/src/SWIG_files/wrapper/IntStart.i index 08a39af83..82afca344 100644 --- a/src/SWIG_files/wrapper/IntStart.i +++ b/src/SWIG_files/wrapper/IntStart.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intstart.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntSurf.i b/src/SWIG_files/wrapper/IntSurf.i index 22d1b57e7..b92090ec8 100644 --- a/src/SWIG_files/wrapper/IntSurf.i +++ b/src/SWIG_files/wrapper/IntSurf.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intsurf.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntTools.i b/src/SWIG_files/wrapper/IntTools.i index 8dfdf45bb..d6955a7e3 100644 --- a/src/SWIG_files/wrapper/IntTools.i +++ b/src/SWIG_files/wrapper/IntTools.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_inttools.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/IntWalk.i b/src/SWIG_files/wrapper/IntWalk.i index bd0e6555a..a8c282d9f 100644 --- a/src/SWIG_files/wrapper/IntWalk.i +++ b/src/SWIG_files/wrapper/IntWalk.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intwalk.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Interface.i b/src/SWIG_files/wrapper/Interface.i index dd1ce3f9a..d9ffc3f84 100644 --- a/src/SWIG_files/wrapper/Interface.i +++ b/src/SWIG_files/wrapper/Interface.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_interface.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1504,6 +1505,25 @@ Returns count of recorded warning messages. ") NbWarnings; Standard_Integer NbWarnings(); + /****************** Print ******************/ + /**** md5 signature: cd6f31420152be00482d8b2c47fd50c1 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +level: int +final: int (optional, default to 1) + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the messages of the check to an messenger = 1: only fails = 2: fails and warnings = 3: all (fails, warnings, info msg) : if positive (d) prints final values of messages if negative, prints originals if null, prints both forms. +") Print; + void Print(std::ostream &OutValue, const Standard_Integer level, const Standard_Integer final = 1); + /****************** Remove ******************/ /**** md5 signature: fbc96bff34dc8f4089235a7befff9769 ****/ %feature("compactdefaultargs") Remove; @@ -2005,6 +2025,45 @@ Returns number of entity for the check currently iterated or 0 for globalcheck. ") Number; Standard_Integer Number(); + /****************** Print ******************/ + /**** md5 signature: fbbffa04ee2028cd35a21f2ac0226d1e ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +failsonly: bool +final: int (optional, default to 0) + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the list of checks with their attached numbers if is true, prints only fail messages if is false, prints all messages if = 0 (d), prints also original messages if different if < 0, prints only original messages if > 0, prints only final messages it uses the recorded model if it is defined remark: works apart from the iteration methods (no interference). +") Print; + void Print(std::ostream &OutValue, const Standard_Boolean failsonly, const Standard_Integer final = 0); + + /****************** Print ******************/ + /**** md5 signature: 287a76ed6178a67e94c843a507962cc1 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +model: Interface_InterfaceModel +failsonly: bool +final: int (optional, default to 0) + +Return +------- +S: Standard_OStream + +Description +----------- +Works as print without a model, but for entities which have no attached number (number not positive), tries to compute this number from and displays 'original' or 'computed'. +") Print; + void Print(std::ostream &OutValue, const opencascade::handle & model, const Standard_Boolean failsonly, const Standard_Integer final = 0); + /****************** Remove ******************/ /**** md5 signature: 81170abf4e017303192fc5e4bf72fea9 ****/ %feature("compactdefaultargs") Remove; @@ -2282,6 +2341,42 @@ Fills as required a check with the error and warning messages produced by checki ") FillCheck; void FillCheck(const opencascade::handle & ent, const Interface_ShareTool & sh, opencascade::handle & ach); + /****************** Print ******************/ + /**** md5 signature: 77b918ff1d1ec5c1b0230477d5a40611 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +ach: Interface_Check + +Return +------- +S: Standard_OStream + +Description +----------- +Utility method which prints the content of a check. +") Print; + void Print(const opencascade::handle & ach, std::ostream &OutValue); + + /****************** Print ******************/ + /**** md5 signature: 14d98babb92b15fa230bc4228bcc71be ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +list: Interface_CheckIterator + +Return +------- +S: Standard_OStream + +Description +----------- +Simply lists all the checks and the content (messages) and the entity, if there is, of each check (if all checks are ok, nothing is printed). +") Print; + void Print(const Interface_CheckIterator & list, std::ostream &OutValue); + /****************** UnknownEntities ******************/ /**** md5 signature: bd331908c549b04b25469271a771e03d ****/ %feature("compactdefaultargs") UnknownEntities; @@ -6956,6 +7051,24 @@ Clears the list of entities (service whendelete). $self->DispatchStatus()=value; } }; + /****************** DumpHeader ******************/ + /**** md5 signature: aa1f14cdc284ebad5c520a0f2f1e0070 ****/ + %feature("compactdefaultargs") DumpHeader; + %feature("autodoc", " +Parameters +---------- +level: int (optional, default to 0) + +Return +------- +S: Standard_OStream + +Description +----------- +Dumps header in a short, easy to read, form, onto a stream allows to print more or less parts of the header, if necessary. 0 for basic print. +") DumpHeader; + virtual void DumpHeader(std::ostream &OutValue, const Standard_Integer level = 0); + /****************** Entities ******************/ /**** md5 signature: 5b7a9453b66b65586915cfb6dcb67a37 ****/ %feature("compactdefaultargs") Entities; @@ -7290,6 +7403,61 @@ Returns the number of an entity in the model if it contains it. else returns 0. ") Number; Standard_Integer Number(const opencascade::handle & anentity); + /****************** Print ******************/ + /**** md5 signature: f32d9b13a42d350bd451be6e924bdd04 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient +mode: int (optional, default to 0) + +Return +------- +s: Standard_OStream + +Description +----------- +Prints identification of a given entity in , in order to be printed in a list or phrase < 0: prints only its number = 1: just calls printlabel = 0 (d): prints its number plus '/' plus printlabel if == , simply prints 'global' if is unknown, prints '/its type'. +") Print; + void Print(const opencascade::handle & ent, std::ostream &OutValue, const Standard_Integer mode = 0); + + /****************** PrintLabel ******************/ + /**** md5 signature: 52220811631aa24ac981dc628dc618c9 ****/ + %feature("compactdefaultargs") PrintLabel; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Prints label specific to each norm, for a given entity. must only print label itself, in order to be included in a phrase. can call the result of stringlabel, but not obliged. +") PrintLabel; + virtual void PrintLabel(const opencascade::handle & ent, std::ostream &OutValue); + + /****************** PrintToLog ******************/ + /**** md5 signature: b7aa819e37079792a003e300dd25e367 ****/ + %feature("compactdefaultargs") PrintToLog; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Prints label specific to each norm in log format, for a given entity. by default, just calls printlabel, can be redefined. +") PrintToLog; + virtual void PrintToLog(const opencascade::handle & ent, std::ostream &OutValue); + /****************** Protocol ******************/ /**** md5 signature: 2dce80af32cedc07d353d312ab7e2c73 ****/ %feature("compactdefaultargs") Protocol; @@ -8183,21 +8351,61 @@ Decodes a date to numeric integer values returns true if ok, false if text does ") NDate; static Standard_Boolean NDate(Standard_CString text, Standard_Integer &OutValue, Standard_Integer &OutValue, Standard_Integer &OutValue, Standard_Integer &OutValue, Standard_Integer &OutValue, Standard_Integer &OutValue); + /****************** Print ******************/ + /**** md5 signature: 8ceabb583669672b2199c7b698914502 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +val: str +max: int +just: int (optional, default to -1) - %feature("autodoc", "1"); - %extend{ - std::string PrintTraceToString() { - std::stringstream s; - self->PrintTrace(s); - return s.str();} - }; +Return +------- +S: Standard_OStream + +Description +----------- +Prints a string on an output stream, as follows: accompanied with blanks, to give up to charis at all, justified according just: -1 (d): left 0: center 1: right maximum 76 characters. +") Print; + static void Print(std::ostream &OutValue, Standard_CString val, const Standard_Integer max, const Standard_Integer just = -1); + + /****************** PrintTrace ******************/ + /**** md5 signature: 1e6fc924febc04632e11bb3880253bee ****/ + %feature("compactdefaultargs") PrintTrace; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the recorded errors (without title; can be empty, this is the normally expected case). +") PrintTrace; + static void PrintTrace(std::ostream &OutValue); + + /****************** Read ******************/ + /**** md5 signature: f8598b09b5e3b635ed31058415611435 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +S: str + +Return +------- +int + +Description +----------- +Reads a list of messages from a stream, returns read count 0 means empty file, -1 means error. +") Read; + static Standard_Integer Read(std::istream & S); - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; /****************** Read ******************/ /**** md5 signature: 858a3ab50e2d14b2c69b3dde90ff0915 ****/ %feature("compactdefaultargs") Read; @@ -8329,6 +8537,24 @@ Returns the translated message, in a functional form with operator () was c++: r ") Value; Standard_CString Value(); + /****************** Write ******************/ + /**** md5 signature: 5d0fb0710cbfaa527a5eba31f6de7c16 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +rootkey: str (optional, default to "") + +Return +------- +S: Standard_OStream + +Description +----------- +Writes the list of messages recorded to be translated, to a stream. writes all the list (default) or only keys which begin by . returns the count of written messages. +") Write; + static Standard_Integer Write(std::ostream &OutValue, Standard_CString rootkey = ""); + }; @@ -10310,6 +10536,24 @@ Returns the count of sharing entities of an entity, which are kind of a given ty ") NbTypedSharings; Standard_Integer NbTypedSharings(const opencascade::handle & ent, const opencascade::handle & atype); + /****************** Print ******************/ + /**** md5 signature: 2f38257dbca8db3ebc49f083711c4d06 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +iter: Interface_EntityIterator + +Return +------- +S: Standard_OStream + +Description +----------- +Utility method which prints the content of an iterator (by their numbers). +") Print; + void Print(const Interface_EntityIterator & iter, std::ostream &OutValue); + /****************** RootEntities ******************/ /**** md5 signature: 63cd32bddc79c5ff7cf79d39668774c9 ****/ %feature("compactdefaultargs") RootEntities; @@ -11443,14 +11687,23 @@ Returns a list of names of statics: = 0 (d): criter is for family ") Items; static opencascade::handle Items(const Standard_Integer mode = 0, Standard_CString criter = ""); + /****************** PrintStatic ******************/ + /**** md5 signature: 7f17a7202d6963fb7283a5d0144d0ad0 ****/ + %feature("compactdefaultargs") PrintStatic; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +Writes the properties of a parameter in the diagnostic file. these include: - name - family, - wildcard (if it has one) - current status (empty string if it was updated or if it is the original one) - value. +") PrintStatic; + void PrintStatic(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintStaticToString() { - std::stringstream s; - self->PrintStatic(s); - return s.str();} - }; /****************** RVal ******************/ /**** md5 signature: 916bf9a6651fba4b6f0c699767b5c1ed ****/ %feature("compactdefaultargs") RVal; @@ -11754,6 +12007,18 @@ def Interface_MSG_IsKey(*args): def Interface_MSG_NDate(*args): return Interface_MSG.NDate(*args) +@deprecated +def Interface_MSG_Print(*args): + return Interface_MSG.Print(*args) + +@deprecated +def Interface_MSG_PrintTrace(*args): + return Interface_MSG.PrintTrace(*args) + +@deprecated +def Interface_MSG_Read(*args): + return Interface_MSG.Read(*args) + @deprecated def Interface_MSG_Read(*args): return Interface_MSG.Read(*args) @@ -11778,6 +12043,10 @@ def Interface_MSG_TDate(*args): def Interface_MSG_Translated(*args): return Interface_MSG.Translated(*args) +@deprecated +def Interface_MSG_Write(*args): + return Interface_MSG.Write(*args) + @deprecated def Interface_MapAsciiStringHasher_HashCode(*args): return Interface_MapAsciiStringHasher.HashCode(*args) diff --git a/src/SWIG_files/wrapper/Interface.pyi b/src/SWIG_files/wrapper/Interface.pyi index cbe05dd09..8fc043ce6 100644 --- a/src/SWIG_files/wrapper/Interface.pyi +++ b/src/SWIG_files/wrapper/Interface.pyi @@ -233,6 +233,7 @@ class Interface_Check(Standard_Transient): def NbFails(self) -> int: ... def NbInfoMsgs(self) -> int: ... def NbWarnings(self) -> int: ... + def Print(self, level: int, final: Optional[int] = 1) -> str: ... def Remove(self, mess: TCollection_HAsciiString, incl: int, status: Interface_CheckStatus) -> bool: ... def SendFail(self, amsg: Message_Msg) -> None: ... def SendMsg(self, amsg: Message_Msg) -> None: ... @@ -272,6 +273,10 @@ class Interface_CheckIterator: def Name(self) -> str: ... def Next(self) -> None: ... def Number(self) -> int: ... + @overload + def Print(self, failsonly: bool, final: Optional[int] = 0) -> str: ... + @overload + def Print(self, model: Interface_InterfaceModel, failsonly: bool, final: Optional[int] = 0) -> str: ... def Remove(self, mess: str, incl: int, status: Interface_CheckStatus) -> bool: ... def SetModel(self, model: Interface_InterfaceModel) -> None: ... def SetName(self, name: str) -> None: ... @@ -294,6 +299,10 @@ class Interface_CheckTool: def CheckSuccess(self, reset: Optional[bool] = False) -> None: ... def CompleteCheckList(self) -> Interface_CheckIterator: ... def FillCheck(self, ent: Standard_Transient, sh: Interface_ShareTool, ach: Interface_Check) -> None: ... + @overload + def Print(self, ach: Interface_Check) -> str: ... + @overload + def Print(self, list: Interface_CheckIterator) -> str: ... def UnknownEntities(self) -> Interface_EntityIterator: ... def VerifyCheckList(self) -> Interface_CheckIterator: ... def WarningCheckList(self) -> Interface_CheckIterator: ... @@ -646,6 +655,7 @@ class Interface_InterfaceModel(Standard_Transient): def Destroy(self) -> None: ... def GetDispatchStatus(self) -> bool: ... def SetDispatchStatus(self, value: bool) -> None: ... + def DumpHeader(self, level: Optional[int] = 0) -> str: ... def Entities(self) -> Interface_EntityIterator: ... def EntityState(self, num: int) -> Interface_DataState: ... def FillIterator(self, iter: Interface_EntityIterator) -> None: ... @@ -668,6 +678,9 @@ class Interface_InterfaceModel(Standard_Transient): def NewEmptyModel(self) -> Interface_InterfaceModel: ... def NextNumberForLabel(self, label: str, lastnum: Optional[int] = 0, exact: Optional[bool] = True) -> int: ... def Number(self, anentity: Standard_Transient) -> int: ... + def Print(self, ent: Standard_Transient, mode: Optional[int] = 0) -> str: ... + def PrintLabel(self, ent: Standard_Transient) -> str: ... + def PrintToLog(self, ent: Standard_Transient) -> str: ... def Protocol(self) -> Interface_Protocol: ... def Redefineds(self) -> Interface_EntityIterator: ... def ReplaceEntity(self, nument: int, anent: Standard_Transient) -> None: ... @@ -745,6 +758,13 @@ class Interface_MSG: def IsKey(mess: str) -> bool: ... @staticmethod def NDate(text: str) -> Tuple[bool, int, int, int, int, int, int]: ... + @staticmethod + def Print(val: str, max: int, just: Optional[int] = -1) -> str: ... + @staticmethod + def PrintTrace() -> str: ... + @overload + @staticmethod + def Read(S: str) -> int: ... @overload @staticmethod def Read(file: str) -> int: ... @@ -759,6 +779,8 @@ class Interface_MSG: @staticmethod def Translated(key: str) -> str: ... def Value(self) -> str: ... + @staticmethod + def Write(rootkey: Optional[str] = "") -> Tuple[int, str]: ... class Interface_MapAsciiStringHasher: @staticmethod @@ -926,6 +948,7 @@ class Interface_ShareTool: def IsShared(self, ent: Standard_Transient) -> bool: ... def Model(self) -> Interface_InterfaceModel: ... def NbTypedSharings(self, ent: Standard_Transient, atype: Standard_Type) -> int: ... + def Print(self, iter: Interface_EntityIterator) -> str: ... def RootEntities(self) -> Interface_EntityIterator: ... def Shareds(self, ent: Standard_Transient) -> Interface_EntityIterator: ... def Sharings(self, ent: Standard_Transient) -> Interface_EntityIterator: ... @@ -1023,6 +1046,7 @@ class Interface_Static(Interface_TypedValue): def IsUpdated(name: str) -> bool: ... @staticmethod def Items(mode: Optional[int] = 0, criter: Optional[str] = "") -> TColStd_HSequenceOfHAsciiString: ... + def PrintStatic(self) -> str: ... @staticmethod def RVal(name: str) -> float: ... @staticmethod diff --git a/src/SWIG_files/wrapper/InterfaceGraphic.i b/src/SWIG_files/wrapper/InterfaceGraphic.i index 565c38cb9..7d8f5020c 100644 --- a/src/SWIG_files/wrapper/InterfaceGraphic.i +++ b/src/SWIG_files/wrapper/InterfaceGraphic.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_interfacegraphic. %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Intf.i b/src/SWIG_files/wrapper/Intf.i index 9ed05b693..c9d6c5a99 100644 --- a/src/SWIG_files/wrapper/Intf.i +++ b/src/SWIG_files/wrapper/Intf.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intf.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Intrv.i b/src/SWIG_files/wrapper/Intrv.i index d6b0c63b8..aa5ae394c 100644 --- a/src/SWIG_files/wrapper/Intrv.i +++ b/src/SWIG_files/wrapper/Intrv.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_intrv.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/LDOM.i b/src/SWIG_files/wrapper/LDOM.i index af0ac989e..5d1800839 100644 --- a/src/SWIG_files/wrapper/LDOM.i +++ b/src/SWIG_files/wrapper/LDOM.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_ldom.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/LProp.i b/src/SWIG_files/wrapper/LProp.i index 5064d0343..714458329 100644 --- a/src/SWIG_files/wrapper/LProp.i +++ b/src/SWIG_files/wrapper/LProp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_lprop.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/LProp3d.i b/src/SWIG_files/wrapper/LProp3d.i index 80c4cdc5a..0b81c7387 100644 --- a/src/SWIG_files/wrapper/LProp3d.i +++ b/src/SWIG_files/wrapper/LProp3d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_lprop3d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Law.i b/src/SWIG_files/wrapper/Law.i index 0e7d0cbc0..10999da41 100644 --- a/src/SWIG_files/wrapper/Law.i +++ b/src/SWIG_files/wrapper/Law.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_law.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/LocOpe.i b/src/SWIG_files/wrapper/LocOpe.i index 16e8d069d..16cef0494 100644 --- a/src/SWIG_files/wrapper/LocOpe.i +++ b/src/SWIG_files/wrapper/LocOpe.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_locope.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/LocalAnalysis.i b/src/SWIG_files/wrapper/LocalAnalysis.i index 3fef0ff8b..3e0227cd2 100644 --- a/src/SWIG_files/wrapper/LocalAnalysis.i +++ b/src/SWIG_files/wrapper/LocalAnalysis.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_localanalysis.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -107,6 +108,42 @@ LocalAnalysis_CurvatureNotDefined = LocalAnalysis_StatusErrorType.LocalAnalysis_ %rename(localanalysis) LocalAnalysis; class LocalAnalysis { public: + /****************** Dump ******************/ + /**** md5 signature: 0c461d717d7298d3576332c66a4c9d44 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +surfconti: LocalAnalysis_SurfaceContinuity + +Return +------- +o: Standard_OStream + +Description +----------- +This class compute s and gives tools to check the local continuity between two points situated on 2 curves. //! this function gives information about a variable curvecontinuity. +") Dump; + static void Dump(const LocalAnalysis_SurfaceContinuity & surfconti, std::ostream &OutValue); + + /****************** Dump ******************/ + /**** md5 signature: 74ee8e149b67cec4713e41bac235b420 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +curvconti: LocalAnalysis_CurveContinuity + +Return +------- +o: Standard_OStream + +Description +----------- +This function gives information about a variable surfacecontinuity. +") Dump; + static void Dump(const LocalAnalysis_CurveContinuity & curvconti, std::ostream &OutValue); + }; @@ -740,3 +777,14 @@ No available documentation. /* class aliases */ %pythoncode { } +/* deprecated methods */ +%pythoncode { +@deprecated +def localanalysis_Dump(*args): + return localanalysis.Dump(*args) + +@deprecated +def localanalysis_Dump(*args): + return localanalysis.Dump(*args) + +} diff --git a/src/SWIG_files/wrapper/LocalAnalysis.pyi b/src/SWIG_files/wrapper/LocalAnalysis.pyi index 28a92a51b..c44e6c8e9 100644 --- a/src/SWIG_files/wrapper/LocalAnalysis.pyi +++ b/src/SWIG_files/wrapper/LocalAnalysis.pyi @@ -23,7 +23,12 @@ LocalAnalysis_NormalNotDefined = LocalAnalysis_StatusErrorType.LocalAnalysis_Nor LocalAnalysis_CurvatureNotDefined = LocalAnalysis_StatusErrorType.LocalAnalysis_CurvatureNotDefined class localanalysis: - pass + @overload + @staticmethod + def Dump(surfconti: LocalAnalysis_SurfaceContinuity) -> str: ... + @overload + @staticmethod + def Dump(curvconti: LocalAnalysis_CurveContinuity) -> str: ... class LocalAnalysis_CurveContinuity: def __init__(self, Curv1: Geom_Curve, u1: float, Curv2: Geom_Curve, u2: float, Order: GeomAbs_Shape, EpsNul: Optional[float] = 0.001, EpsC0: Optional[float] = 0.001, EpsC1: Optional[float] = 0.001, EpsC2: Optional[float] = 0.001, EpsG1: Optional[float] = 0.001, EpsG2: Optional[float] = 0.001, Percent: Optional[float] = 0.01, Maxlen: Optional[float] = 10000) -> None: ... diff --git a/src/SWIG_files/wrapper/MAT.i b/src/SWIG_files/wrapper/MAT.i index a1acf9c35..899aa258a 100644 --- a/src/SWIG_files/wrapper/MAT.i +++ b/src/SWIG_files/wrapper/MAT.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_mat.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/MAT2d.i b/src/SWIG_files/wrapper/MAT2d.i index 134fd84fb..b63bd9d9b 100644 --- a/src/SWIG_files/wrapper/MAT2d.i +++ b/src/SWIG_files/wrapper/MAT2d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_mat2d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Media.i b/src/SWIG_files/wrapper/Media.i index 3be88d799..1076c1365 100644 --- a/src/SWIG_files/wrapper/Media.i +++ b/src/SWIG_files/wrapper/Media.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_media.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/MeshVS.i b/src/SWIG_files/wrapper/MeshVS.i index 3eeca4210..6f9cc387c 100644 --- a/src/SWIG_files/wrapper/MeshVS.i +++ b/src/SWIG_files/wrapper/MeshVS.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_meshvs.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Message.i b/src/SWIG_files/wrapper/Message.i index 359bfc6d5..641760ccd 100644 --- a/src/SWIG_files/wrapper/Message.i +++ b/src/SWIG_files/wrapper/Message.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_message.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -816,10 +817,22 @@ Converts message metric to osd memory info type. @param themetric [in] message m class Message_Alert : public Standard_Transient { public: - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1308,10 +1321,22 @@ Empty constructor. Message_Attribute(TCollection_AsciiString theName = TCollection_AsciiString()); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1476,10 +1501,22 @@ Clears collected alerts with specified type @param thetype an alert type. void Clear(const opencascade::handle & theType); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2104,10 +2141,22 @@ Returns sequence of printers the sequence can be modified. Message_SequenceOfPrinters & ChangePrinters(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2755,7 +2804,7 @@ Send a string message with specified trace level. the object is converted to str %feature("autodoc", " Parameters ---------- -theStream: Standard_SStream +theStream: std::stringstream theGravity: Message_Gravity Return @@ -2766,7 +2815,7 @@ Description ----------- Send a string message with specified trace level. stream is converted to string value. default implementation calls first method send(). ") SendStringStream; - virtual void SendStringStream(const Standard_SStream & theStream, const Message_Gravity theGravity); + virtual void SendStringStream(const std::stringstream & theStream, const Message_Gravity theGravity); /****************** SetTraceLevel ******************/ /**** md5 signature: 76564510956a50ca65a88b0d62efe400 ****/ @@ -3108,19 +3157,58 @@ Removes all activated metrics. ") ClearMetrics; void ClearMetrics(); + /****************** Dump ******************/ + /**** md5 signature: c086355fe494bcbcf3ea9cc5c4ebee71 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theOS: Standard_OStream + +Description +----------- +Dumps all collected alerts to stream. +") Dump; + void Dump(std::ostream &OutValue); + + /****************** Dump ******************/ + /**** md5 signature: d701e8989524635f96b7e9629956e021 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +theGravity: Message_Gravity + +Return +------- +theOS: Standard_OStream + +Description +----------- +Dumps collected alerts with specified gravity to stream. +") Dump; + void Dump(std::ostream &OutValue, Message_Gravity theGravity); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3439,10 +3527,22 @@ Returns class provided hierarchy of alerts if created or create if the parameter opencascade::handle CompositeAlerts(const Standard_Boolean theToCreate = Standard_False); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3544,10 +3644,22 @@ Constructor with string argument. Message_AttributeMeter(TCollection_AsciiString theName = TCollection_AsciiString()); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3766,10 +3878,22 @@ Constructor with string argument. Message_AttributeObject(const opencascade::handle & theObject, TCollection_AsciiString theName = TCollection_AsciiString()); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3827,7 +3951,7 @@ class Message_AttributeStream : public Message_Attribute { %feature("autodoc", " Parameters ---------- -theStream: Standard_SStream +theStream: std::stringstream theName: str (optional, default to TCollection_AsciiString()) Return @@ -3838,13 +3962,25 @@ Description ----------- Constructor with string argument. ") Message_AttributeStream; - Message_AttributeStream(const Standard_SStream & theStream, TCollection_AsciiString theName = TCollection_AsciiString()); + Message_AttributeStream(const std::stringstream & theStream, TCollection_AsciiString theName = TCollection_AsciiString()); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3855,7 +3991,7 @@ Constructor with string argument. %feature("autodoc", " Parameters ---------- -theStream: Standard_SStream +theStream: std::stringstream Return ------- @@ -3865,7 +4001,7 @@ Description ----------- Sets stream value. ") SetStream; - void SetStream(const Standard_SStream & theStream); + void SetStream(const std::stringstream & theStream); /****************** Stream ******************/ /**** md5 signature: bf624542447549e8d924a142424a736a ****/ @@ -3963,6 +4099,26 @@ Returns reference to the output stream. ") GetStream; Standard_OStream & GetStream(); + /****************** SetConsoleTextColor ******************/ + /**** md5 signature: 1e71fea88218cee7455b23d16ccf2510 ****/ + %feature("compactdefaultargs") SetConsoleTextColor; + %feature("autodoc", " +Parameters +---------- +theOStream: Standard_OStream * +theTextColor: Message_ConsoleColor +theIsIntenseText: bool (optional, default to false) + +Return +------- +None + +Description +----------- +Setup console text color. //! on windows, this would affect active terminal color output. on other systems, this would put special terminal codes; the terminal should support these codes or them will appear in text otherwise. the same will happen when stream is redirected into text file. //! beware that within multi-threaded environment inducing console colors might lead to colored text mixture due to concurrency. +") SetConsoleTextColor; + static void SetConsoleTextColor(Standard_OStream * theOStream, Message_ConsoleColor theTextColor, bool theIsIntenseText = false); + /****************** SetToColorize ******************/ /**** md5 signature: b4f903af5677d00a1f393de87002a6a5 ****/ %feature("compactdefaultargs") SetToColorize; @@ -4096,7 +4252,7 @@ Send a string message with specified trace level. the object is converted to str %feature("autodoc", " Parameters ---------- -theStream: Standard_SStream +theStream: std::stringstream theGravity: Message_Gravity Return @@ -4107,7 +4263,7 @@ Description ----------- Send a string message with specified trace level. stream is converted to string value. default implementation calls first method send(). ") SendStringStream; - virtual void SendStringStream(const Standard_SStream & theStream, const Message_Gravity theGravity); + virtual void SendStringStream(const std::stringstream & theStream, const Message_Gravity theGravity); /****************** SetReport ******************/ /**** md5 signature: f93d4cd16d2a9be962c8ab7766dddef1 ****/ @@ -4321,4 +4477,8 @@ def Message_AttributeMeter_StopAlert(*args): def Message_AttributeMeter_UndefinedMetricValue(*args): return Message_AttributeMeter.UndefinedMetricValue(*args) +@deprecated +def Message_PrinterOStream_SetConsoleTextColor(*args): + return Message_PrinterOStream.SetConsoleTextColor(*args) + } diff --git a/src/SWIG_files/wrapper/Message.pyi b/src/SWIG_files/wrapper/Message.pyi index d2493b8c2..fa635ce29 100644 --- a/src/SWIG_files/wrapper/Message.pyi +++ b/src/SWIG_files/wrapper/Message.pyi @@ -405,6 +405,7 @@ class message: def MetricToString(theType: Message_MetricType) -> str: ... class Message_Alert(Standard_Transient): + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetMessageKey(self) -> str: ... def Merge(self, theTarget: Message_Alert) -> bool: ... def SupportsMerge(self) -> bool: ... @@ -449,6 +450,7 @@ class Message_Algorithm(Standard_Transient): class Message_Attribute(Standard_Transient): def __init__(self, theName: Optional[str] = TCollection_AsciiString()) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetMessageKey(self) -> str: ... def GetName(self) -> str: ... def SetName(self, theName: str) -> None: ... @@ -463,6 +465,7 @@ class Message_CompositeAlerts(Standard_Transient): def Clear(self, theGravity: Message_Gravity) -> None: ... @overload def Clear(self, theType: Standard_Type) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def HasAlert(self, theAlert: Message_Alert) -> bool: ... @overload @@ -516,6 +519,7 @@ class Message_Messenger(Standard_Transient): def __init__(self, thePrinter: Message_Printer) -> None: ... def AddPrinter(self, thePrinter: Message_Printer) -> bool: ... def ChangePrinters(self) -> Message_SequenceOfPrinters: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Printers(self) -> Message_SequenceOfPrinters: ... def RemovePrinter(self, thePrinter: Message_Printer) -> bool: ... def RemovePrinters(self, theType: Standard_Type) -> int: ... @@ -581,7 +585,6 @@ class Message_Printer(Standard_Transient): @overload def Send(self, theString: str, theGravity: Message_Gravity) -> None: ... def SendObject(self, theObject: Standard_Transient, theGravity: Message_Gravity) -> None: ... - def SendStringStream(self, theStream: Standard_SStream, theGravity: Message_Gravity) -> None: ... def SetTraceLevel(self, theTraceLevel: Message_Gravity) -> None: ... class Message_ProgressIndicator(Standard_Transient): @@ -615,6 +618,11 @@ class Message_Report(Standard_Transient): @overload def Clear(self, theType: Standard_Type) -> None: ... def ClearMetrics(self) -> None: ... + @overload + def Dump(self) -> str: ... + @overload + def Dump(self, theGravity: Message_Gravity) -> str: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetAlerts(self, theGravity: Message_Gravity) -> Message_ListOfAlert: ... @overload def HasAlert(self, theType: Standard_Type) -> bool: ... @@ -641,6 +649,7 @@ class Message_AlertExtended(Message_Alert): def AddAlert(theReport: Message_Report, theAttribute: Message_Attribute, theGravity: Message_Gravity) -> Message_Alert: ... def Attribute(self) -> Message_Attribute: ... def CompositeAlerts(self, theToCreate: Optional[bool] = False) -> Message_CompositeAlerts: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetMessageKey(self) -> str: ... def Merge(self, theTarget: Message_Alert) -> bool: ... def SetAttribute(self, theAttribute: Message_Attribute) -> None: ... @@ -648,6 +657,7 @@ class Message_AlertExtended(Message_Alert): class Message_AttributeMeter(Message_Attribute): def __init__(self, theName: Optional[str] = TCollection_AsciiString()) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def HasMetric(self, theMetric: Message_MetricType) -> bool: ... def IsMetricValid(self, theMetric: Message_MetricType) -> bool: ... @staticmethod @@ -665,12 +675,12 @@ class Message_AttributeMeter(Message_Attribute): class Message_AttributeObject(Message_Attribute): def __init__(self, theObject: Standard_Transient, theName: Optional[str] = TCollection_AsciiString()) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Object(self) -> Standard_Transient: ... def SetObject(self, theObject: Standard_Transient) -> None: ... class Message_AttributeStream(Message_Attribute): - def __init__(self, theStream: Standard_SStream, theName: Optional[str] = TCollection_AsciiString()) -> None: ... - def SetStream(self, theStream: Standard_SStream) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Stream(self) -> Standard_SStream: ... class Message_PrinterOStream(Message_Printer): @@ -680,6 +690,8 @@ class Message_PrinterOStream(Message_Printer): def __init__(self, theFileName: str, theDoAppend: bool, theTraceLevel: Optional[Message_Gravity] = Message_Info) -> None: ... def Close(self) -> None: ... def GetStream(self) -> Standard_OStream: ... + @staticmethod + def SetConsoleTextColor(theOStream: Standard_OStream, theTextColor: Message_ConsoleColor, theIsIntenseText: Optional[bool] = false) -> None: ... def SetToColorize(self, theToColorize: bool) -> None: ... def ToColorize(self) -> bool: ... @@ -690,7 +702,6 @@ class Message_PrinterToReport(Message_Printer): def __init__(self) -> None: ... def Report(self) -> Message_Report: ... def SendObject(self, theObject: Standard_Transient, theGravity: Message_Gravity) -> None: ... - def SendStringStream(self, theStream: Standard_SStream, theGravity: Message_Gravity) -> None: ... def SetReport(self, theReport: Message_Report) -> None: ... class Message_ProgressSentry(Message_ProgressScope): diff --git a/src/SWIG_files/wrapper/MoniTool.i b/src/SWIG_files/wrapper/MoniTool.i index 2df17f2df..364532000 100644 --- a/src/SWIG_files/wrapper/MoniTool.i +++ b/src/SWIG_files/wrapper/MoniTool.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_monitool.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -2086,22 +2087,40 @@ Returns map of timers. ") Dictionary; static MoniTool_DataMapOfTimer & Dictionary(); + /****************** Dump ******************/ + /**** md5 signature: ba17251f1205c984d981679cb87ee281 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +ostr: Standard_OStream + +Description +----------- +Dumps current state of a timer shortly (one-line output). +") Dump; + void Dump(std::ostream &OutValue); + + /****************** DumpTimers ******************/ + /**** md5 signature: a163d6e3a2170cc59ce7e312bac33510 ****/ + %feature("compactdefaultargs") DumpTimers; + %feature("autodoc", " +Parameters +---------- + +Return +------- +ostr: Standard_OStream + +Description +----------- +Dumps contents of the whole dictionary. +") DumpTimers; + static void DumpTimers(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpTimersToString() { - std::stringstream s; - self->DumpTimers(s); - return s.str();} - }; /****************** GetAmendments ******************/ /**** md5 signature: c2be8078ab69a477345c7d01bfe03646 ****/ %feature("compactdefaultargs") GetAmendments; @@ -2816,22 +2835,40 @@ Returns the value as transient object, only for object/entity remark that the 'h ") ObjectValue; opencascade::handle ObjectValue(); + /****************** Print ******************/ + /**** md5 signature: d481ea44f76183e17a04f4e32b90f550 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; +Description +----------- +Prints definition, specification, and actual status and value. +") Print; + virtual void Print(std::ostream &OutValue); + + /****************** PrintValue ******************/ + /**** md5 signature: a5c0ed204815d55a64ad2d065f7106ab ****/ + %feature("compactdefaultargs") PrintValue; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +Prints only the value. +") PrintValue; + void PrintValue(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintValueToString() { - std::stringstream s; - self->PrintValue(s); - return s.str();} - }; /****************** RealLimit ******************/ /**** md5 signature: 89c72e2e3893a95f4283fcadf76436b4 ****/ %feature("compactdefaultargs") RealLimit; @@ -3455,6 +3492,10 @@ def MoniTool_Timer_ComputeAmendments(*args): def MoniTool_Timer_Dictionary(*args): return MoniTool_Timer.Dictionary(*args) +@deprecated +def MoniTool_Timer_DumpTimers(*args): + return MoniTool_Timer.DumpTimers(*args) + @deprecated def MoniTool_Timer_GetAmendments(*args): return MoniTool_Timer.GetAmendments(*args) diff --git a/src/SWIG_files/wrapper/MoniTool.pyi b/src/SWIG_files/wrapper/MoniTool.pyi index 49123f8a2..77d5e85f7 100644 --- a/src/SWIG_files/wrapper/MoniTool.pyi +++ b/src/SWIG_files/wrapper/MoniTool.pyi @@ -203,6 +203,9 @@ class MoniTool_Timer(Standard_Transient): def Count(self) -> int: ... @staticmethod def Dictionary() -> MoniTool_DataMapOfTimer: ... + def Dump(self) -> str: ... + @staticmethod + def DumpTimers() -> str: ... @staticmethod def GetAmendments() -> Tuple[float, float, float, float]: ... def IsRunning(self) -> int: ... @@ -268,6 +271,8 @@ class MoniTool_TypedValue(Standard_Transient): def ObjectType(self) -> Standard_Type: ... def ObjectTypeName(self) -> str: ... def ObjectValue(self) -> Standard_Transient: ... + def Print(self) -> str: ... + def PrintValue(self) -> str: ... def RealLimit(self, max: bool) -> Tuple[bool, float]: ... def RealValue(self) -> float: ... def Satisfies(self, hval: TCollection_HAsciiString) -> bool: ... diff --git a/src/SWIG_files/wrapper/NCollection.i b/src/SWIG_files/wrapper/NCollection.i index df926d4e5..9531e5d4d 100644 --- a/src/SWIG_files/wrapper/NCollection.i +++ b/src/SWIG_files/wrapper/NCollection.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_ncollection.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/NLPlate.i b/src/SWIG_files/wrapper/NLPlate.i index 5fe51bfb9..bf92a8118 100644 --- a/src/SWIG_files/wrapper/NLPlate.i +++ b/src/SWIG_files/wrapper/NLPlate.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_nlplate.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/OSD.i b/src/SWIG_files/wrapper/OSD.i index 38ef52e8f..9098e36bd 100644 --- a/src/SWIG_files/wrapper/OSD.i +++ b/src/SWIG_files/wrapper/OSD.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_osd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/PCDM.i b/src/SWIG_files/wrapper/PCDM.i index 7ea68f35d..2078733ec 100644 --- a/src/SWIG_files/wrapper/PCDM.i +++ b/src/SWIG_files/wrapper/PCDM.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_pcdm.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -259,6 +260,25 @@ No available documentation. ") FileDriverType; static PCDM_TypeOfFileDriver FileDriverType(TCollection_AsciiString aFileName, opencascade::handle & aBaseDriver); + /****************** FileDriverType ******************/ + /**** md5 signature: 86ad52e7b1f77003aaab8c0233051baf ****/ + %feature("compactdefaultargs") FileDriverType; + %feature("autodoc", " +Parameters +---------- +theIStream: str +theBaseDriver: Storage_BaseDriver + +Return +------- +PCDM_TypeOfFileDriver + +Description +----------- +No available documentation. +") FileDriverType; + static PCDM_TypeOfFileDriver FileDriverType(std::istream & theIStream, opencascade::handle & theBaseDriver); + }; @@ -298,6 +318,25 @@ Tries to get a format in the file. returns an empty string if the file could not ") FileFormat; static TCollection_ExtendedString FileFormat(TCollection_ExtendedString aFileName); + /****************** FileFormat ******************/ + /**** md5 signature: 290efbfac7ae6d5a7f55f592df7bd7f7 ****/ + %feature("compactdefaultargs") FileFormat; + %feature("autodoc", " +Parameters +---------- +theIStream: str +theData: Storage_Data + +Return +------- +TCollection_ExtendedString + +Description +----------- +Tries to get a format from the stream. returns an empty string if the file could not be read or does not have a fileformat information. +") FileFormat; + static TCollection_ExtendedString FileFormat(std::istream & theIStream, opencascade::handle & theData); + /****************** Open ******************/ /**** md5 signature: a144cbf2785ef2f8f31a70359be3305c ****/ %feature("compactdefaultargs") Open; @@ -588,6 +627,29 @@ Retrieves the content of the file into a new document. ") Read; virtual void Read(TCollection_ExtendedString aFileName, const opencascade::handle & aNewDocument, const opencascade::handle & anApplication, const opencascade::handle & theFilter = opencascade::handle(), const Message_ProgressRange & theProgress = Message_ProgressRange()); + /****************** Read ******************/ + /**** md5 signature: 8f1b39567f4c794c23a8f443996b71d0 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +theIStream: str +theStorageData: Storage_Data +theDoc: CDM_Document +theApplication: CDM_Application +theFilter: PCDM_ReaderFilter (optional, default to opencascade::handle()) +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +No available documentation. +") Read; + virtual void Read(std::istream & theIStream, const opencascade::handle & theStorageData, const opencascade::handle & theDoc, const opencascade::handle & theApplication, const opencascade::handle & theFilter = opencascade::handle(), const Message_ProgressRange & theProgress = Message_ProgressRange()); + }; @@ -1173,6 +1235,25 @@ No available documentation. ") Write; virtual void Write(const opencascade::handle & aDocument, TCollection_ExtendedString aFileName, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Write ******************/ + /**** md5 signature: 8baf1d701c86c68efb7596bfc9c38f31 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theDocument: CDM_Document +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theOStream: Standard_OStream + +Description +----------- +Write to theostream. +") Write; + virtual void Write(const opencascade::handle & theDocument, std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + }; @@ -1622,6 +1703,25 @@ Warning! raises drivererror if an error occurs during inside the make method. st ") Write; virtual void Write(const opencascade::handle & aDocument, TCollection_ExtendedString aFileName, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Write ******************/ + /**** md5 signature: 1593005190d18463c833b2c78ffb13a5 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theDocument: CDM_Document +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theOStream: Standard_OStream + +Description +----------- +Write to theostream. +") Write; + virtual void Write(const opencascade::handle & theDocument, std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + }; @@ -1657,6 +1757,14 @@ class PCDM_Document: def pcdm_FileDriverType(*args): return pcdm.FileDriverType(*args) +@deprecated +def pcdm_FileDriverType(*args): + return pcdm.FileDriverType(*args) + +@deprecated +def PCDM_ReadWriter_FileFormat(*args): + return PCDM_ReadWriter.FileFormat(*args) + @deprecated def PCDM_ReadWriter_FileFormat(*args): return PCDM_ReadWriter.FileFormat(*args) diff --git a/src/SWIG_files/wrapper/PCDM.pyi b/src/SWIG_files/wrapper/PCDM.pyi index bff231299..c201f3c44 100644 --- a/src/SWIG_files/wrapper/PCDM.pyi +++ b/src/SWIG_files/wrapper/PCDM.pyi @@ -127,11 +127,17 @@ class pcdm: @overload @staticmethod def FileDriverType(aFileName: str, aBaseDriver: Storage_BaseDriver) -> PCDM_TypeOfFileDriver: ... + @overload + @staticmethod + def FileDriverType(theIStream: str, theBaseDriver: Storage_BaseDriver) -> PCDM_TypeOfFileDriver: ... class PCDM_ReadWriter(Standard_Transient): @overload @staticmethod def FileFormat(aFileName: str) -> str: ... + @overload + @staticmethod + def FileFormat(theIStream: str, theData: Storage_Data) -> str: ... @staticmethod def Open(aDriver: Storage_BaseDriver, aFileName: str, anOpenMode: Storage_OpenMode) -> None: ... def ReadDocumentVersion(self, aFileName: str, theMsgDriver: Message_Messenger) -> int: ... @@ -154,6 +160,8 @@ class PCDM_Reader(Standard_Transient): def GetStatus(self) -> PCDM_ReaderStatus: ... @overload def Read(self, aFileName: str, aNewDocument: CDM_Document, anApplication: CDM_Application, theFilter: Optional[PCDM_ReaderFilter] = PCDM_ReaderFilter(), theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def Read(self, theIStream: str, theStorageData: Storage_Data, theDoc: CDM_Document, theApplication: CDM_Application, theFilter: Optional[PCDM_ReaderFilter] = PCDM_ReaderFilter(), theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... class PCDM_ReaderFilter(Standard_Transient): @overload @@ -207,6 +215,8 @@ class PCDM_ReferenceIterator(Standard_Transient): class PCDM_Writer(Standard_Transient): @overload def Write(self, aDocument: CDM_Document, aFileName: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def Write(self, theDocument: CDM_Document, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... class PCDM_ReadWriter_1(PCDM_ReadWriter): def __init__(self) -> None: ... @@ -241,6 +251,8 @@ class PCDM_StorageDriver(PCDM_Writer): def SetStoreStatus(self, theStoreStatus: PCDM_StoreStatus) -> None: ... @overload def Write(self, aDocument: CDM_Document, aFileName: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def Write(self, theDocument: CDM_Document, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... #classnotwrapped class PCDM_DOMHeaderParser: ... diff --git a/src/SWIG_files/wrapper/PLib.i b/src/SWIG_files/wrapper/PLib.i index 6ee9c32b1..b418d0d70 100644 --- a/src/SWIG_files/wrapper/PLib.i +++ b/src/SWIG_files/wrapper/PLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_plib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Plate.i b/src/SWIG_files/wrapper/Plate.i index 34aa91793..49d5bc576 100644 --- a/src/SWIG_files/wrapper/Plate.i +++ b/src/SWIG_files/wrapper/Plate.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_plate.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Plugin.i b/src/SWIG_files/wrapper/Plugin.i index b4d9fb9d1..478c0ccd6 100644 --- a/src/SWIG_files/wrapper/Plugin.i +++ b/src/SWIG_files/wrapper/Plugin.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_plugin.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Poly.i b/src/SWIG_files/wrapper/Poly.i index a593174c6..103717058 100644 --- a/src/SWIG_files/wrapper/Poly.i +++ b/src/SWIG_files/wrapper/Poly.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_poly.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -194,6 +195,60 @@ Compute node normals for face triangulation as mean normal of surrounding triang ") ComputeNormals; static void ComputeNormals(const opencascade::handle & Tri); + /****************** Dump ******************/ + /**** md5 signature: 20ef821c6b6ca818ea67764cc6c404e0 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +T: Poly_Triangulation + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the triangulation. this is a call to the previous method with comapct set to false. +") Dump; + static void Dump(const opencascade::handle & T, std::ostream &OutValue); + + /****************** Dump ******************/ + /**** md5 signature: 124fa6bb0d1c932fed8d7c2f072153ff ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +P: Poly_Polygon3D + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the 3d polygon. this is a call to the previous method with comapct set to false. +") Dump; + static void Dump(const opencascade::handle & P, std::ostream &OutValue); + + /****************** Dump ******************/ + /**** md5 signature: cec175f277279955d3c47430641a6e45 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +P: Poly_Polygon2D + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the 2d polygon. this is a call to the previous method with comapct set to false. +") Dump; + static void Dump(const opencascade::handle & P, std::ostream &OutValue); + /****************** Intersect ******************/ /**** md5 signature: 71cc08bc38965ffeef03bdfbfe9c34a4 ****/ %feature("compactdefaultargs") Intersect; @@ -259,27 +314,117 @@ Computes parameters of the point p on triangle defined by points p1, p2, and p3, ") PointOnTriangle; static Standard_Real PointOnTriangle(const gp_XY & P1, const gp_XY & P2, const gp_XY & P3, const gp_XY & P, gp_XY & UV); + /****************** ReadPolygon2D ******************/ + /**** md5 signature: 5203f6d8bfde5b08c5cdc75dc617276a ****/ + %feature("compactdefaultargs") ReadPolygon2D; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +opencascade::handle + +Description +----------- +Reads a 2d polygon from the stream . +") ReadPolygon2D; + static opencascade::handle ReadPolygon2D(std::istream & IS); + + /****************** ReadPolygon3D ******************/ + /**** md5 signature: b03d53c160a0fe0fe5c347003d67f6e3 ****/ + %feature("compactdefaultargs") ReadPolygon3D; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +opencascade::handle + +Description +----------- +Reads a 3d polygon from the stream . +") ReadPolygon3D; + static opencascade::handle ReadPolygon3D(std::istream & IS); + + /****************** ReadTriangulation ******************/ + /**** md5 signature: ed5c32c8ff81d9265e69f08077c31530 ****/ + %feature("compactdefaultargs") ReadTriangulation; + %feature("autodoc", " +Parameters +---------- +IS: str + +Return +------- +opencascade::handle + +Description +----------- +Reads a triangulation from the stream . +") ReadTriangulation; + static opencascade::handle ReadTriangulation(std::istream & IS); + + /****************** Write ******************/ + /**** md5 signature: bbcae193e547f8e4d5c04a8c44cf6fdd ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +T: Poly_Triangulation +Compact: bool (optional, default to Standard_True) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of the triangulation on the stream . if is true this is a 'save' format intended to be read back with the read method. if compact is false it is a 'dump' format intended to be informative. +") Write; + static void Write(const opencascade::handle & T, std::ostream &OutValue, const Standard_Boolean Compact = Standard_True); + + /****************** Write ******************/ + /**** md5 signature: a0bed661a393965709bba5b5fe673585 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +P: Poly_Polygon3D +Compact: bool (optional, default to Standard_True) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of the 3d polygon

on the stream . if is true this is a 'save' format intended to be read back with the read method. if compact is false it is a 'dump' format intended to be informative. +") Write; + static void Write(const opencascade::handle & P, std::ostream &OutValue, const Standard_Boolean Compact = Standard_True); + + /****************** Write ******************/ + /**** md5 signature: b1b1fb366e3d9a725c25026564e0ba21 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +P: Poly_Polygon2D +Compact: bool (optional, default to Standard_True) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of the 2d polygon

on the stream . if is true this is a 'save' format intended to be read back with the read method. if compact is false it is a 'dump' format intended to be informative. +") Write; + static void Write(const opencascade::handle & P, std::ostream &OutValue, const Standard_Boolean Compact = Standard_True); - %feature("autodoc", "1"); - %extend{ - void ReadPolygon2DFromString(std::string src) { - std::stringstream s(src); - self->ReadPolygon2D(s);} - }; - - %feature("autodoc", "1"); - %extend{ - void ReadPolygon3DFromString(std::string src) { - std::stringstream s(src); - self->ReadPolygon3D(s);} - }; - - %feature("autodoc", "1"); - %extend{ - void ReadTriangulationFromString(std::string src) { - std::stringstream s(src); - self->ReadTriangulation(s);} - }; }; @@ -966,14 +1111,23 @@ Description ") Clear; void Clear(const opencascade::handle &); + /****************** Dump ******************/ + /**** md5 signature: c7b7f3310b5193de5f2365d935cd2c95 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theStream: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetIndex ******************/ /**** md5 signature: be68311c24420307bc05134408d2c9e3 ****/ %feature("compactdefaultargs") GetIndex; @@ -1560,14 +1714,23 @@ Description ") Deflection; Standard_Real Deflection(); + /****************** Dump ******************/ + /**** md5 signature: 67deed0701458c3d54847bd8f3e44642 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +&: Standard_OStream + +Description +----------- +/** * debugging output. */. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** FindTriangle ******************/ /**** md5 signature: 0bd57b9c3b2e3b0b46985d4808a94564 ****/ %feature("compactdefaultargs") FindTriangle; @@ -2604,10 +2767,22 @@ Sets the deflection of this polygon. void Deflection(const Standard_Real theDefl); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2781,10 +2956,22 @@ Sets the deflection of this polygon. see more on deflection in poly_polygon2d. void Deflection(const Standard_Real theDefl); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2984,10 +3171,22 @@ Sets the deflection of this polygon. see more on deflection in poly_polygones2d. void Deflection(const Standard_Real theDefl); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3538,10 +3737,22 @@ Loads triangulation data into new poly_triangulation object from some deferred s virtual opencascade::handle DetachedLoadDeferredData(const opencascade::handle & theFileSystem = opencascade::handle()); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4401,6 +4612,18 @@ def poly_Catenate(*args): def poly_ComputeNormals(*args): return poly.ComputeNormals(*args) +@deprecated +def poly_Dump(*args): + return poly.Dump(*args) + +@deprecated +def poly_Dump(*args): + return poly.Dump(*args) + +@deprecated +def poly_Dump(*args): + return poly.Dump(*args) + @deprecated def poly_Intersect(*args): return poly.Intersect(*args) @@ -4413,6 +4636,30 @@ def poly_IntersectTriLine(*args): def poly_PointOnTriangle(*args): return poly.PointOnTriangle(*args) +@deprecated +def poly_ReadPolygon2D(*args): + return poly.ReadPolygon2D(*args) + +@deprecated +def poly_ReadPolygon3D(*args): + return poly.ReadPolygon3D(*args) + +@deprecated +def poly_ReadTriangulation(*args): + return poly.ReadTriangulation(*args) + +@deprecated +def poly_Write(*args): + return poly.Write(*args) + +@deprecated +def poly_Write(*args): + return poly.Write(*args) + +@deprecated +def poly_Write(*args): + return poly.Write(*args) + @deprecated def Poly_MergeNodesTool_MergeNodes(*args): return Poly_MergeNodesTool.MergeNodes(*args) diff --git a/src/SWIG_files/wrapper/Poly.pyi b/src/SWIG_files/wrapper/Poly.pyi index aed6b624e..697185efe 100644 --- a/src/SWIG_files/wrapper/Poly.pyi +++ b/src/SWIG_files/wrapper/Poly.pyi @@ -62,12 +62,36 @@ class poly: def Catenate(lstTri: Poly_ListOfTriangulation) -> Poly_Triangulation: ... @staticmethod def ComputeNormals(Tri: Poly_Triangulation) -> None: ... + @overload + @staticmethod + def Dump(T: Poly_Triangulation) -> str: ... + @overload + @staticmethod + def Dump(P: Poly_Polygon3D) -> str: ... + @overload + @staticmethod + def Dump(P: Poly_Polygon2D) -> str: ... @staticmethod def Intersect(theTri: Poly_Triangulation, theAxis: gp_Ax1, theIsClosest: bool, theTriangle: Poly_Triangle) -> Tuple[bool, float]: ... @staticmethod def IntersectTriLine(theStart: gp_XYZ, theDir: gp_Dir, theV0: gp_XYZ, theV1: gp_XYZ, theV2: gp_XYZ) -> Tuple[int, float]: ... @staticmethod def PointOnTriangle(P1: gp_XY, P2: gp_XY, P3: gp_XY, P: gp_XY, UV: gp_XY) -> float: ... + @staticmethod + def ReadPolygon2D(IS: str) -> Poly_Polygon2D: ... + @staticmethod + def ReadPolygon3D(IS: str) -> Poly_Polygon3D: ... + @staticmethod + def ReadTriangulation(IS: str) -> Poly_Triangulation: ... + @overload + @staticmethod + def Write(T: Poly_Triangulation, Compact: Optional[bool] = True) -> str: ... + @overload + @staticmethod + def Write(P: Poly_Polygon3D, Compact: Optional[bool] = True) -> str: ... + @overload + @staticmethod + def Write(P: Poly_Polygon2D, Compact: Optional[bool] = True) -> str: ... class Poly_ArrayOfNodes(): @overload @@ -129,6 +153,7 @@ class Poly_CoherentNode(gp_XYZ): @overload def __init__(self, thePnt: gp_XYZ) -> None: ... def AddTriangle(self, theTri: Poly_CoherentTriangle, theA: NCollection_BaseAllocator) -> None: ... + def Dump(self) -> str: ... def GetIndex(self) -> int: ... def GetNormal(self) -> gp_XYZ: ... def GetU(self) -> float: ... @@ -174,6 +199,7 @@ class Poly_CoherentTriangulation(Standard_Transient): def Clone(self, theAlloc: NCollection_BaseAllocator) -> Poly_CoherentTriangulation: ... def ComputeLinks(self) -> int: ... def Deflection(self) -> float: ... + def Dump(self) -> str: ... def FindTriangle(self, theLink: Poly_CoherentLink, pTri_list: List[Poly_CoherentTriangle]) -> bool: ... def GetTriangulation(self) -> Poly_Triangulation: ... def MaxNode(self) -> int: ... @@ -246,6 +272,7 @@ class Poly_Polygon2D(Standard_Transient): def Deflection(self) -> float: ... @overload def Deflection(self, theDefl: float) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def NbNodes(self) -> int: ... def Nodes(self) -> TColgp_Array1OfPnt2d: ... @@ -263,6 +290,7 @@ class Poly_Polygon3D(Standard_Transient): def Deflection(self) -> float: ... @overload def Deflection(self, theDefl: float) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def HasParameters(self) -> bool: ... def NbNodes(self) -> int: ... def Nodes(self) -> TColgp_Array1OfPnt: ... @@ -282,6 +310,7 @@ class Poly_PolygonOnTriangulation(Standard_Transient): def Deflection(self) -> float: ... @overload def Deflection(self, theDefl: float) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def HasParameters(self) -> bool: ... def NbNodes(self) -> int: ... def Node(self, theIndex: int) -> int: ... @@ -330,6 +359,7 @@ class Poly_Triangulation(Standard_Transient): @overload def Deflection(self, theDeflection: float) -> None: ... def DetachedLoadDeferredData(self, theFileSystem: Optional[OSD_FileSystem] = OSD_FileSystem()) -> Poly_Triangulation: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def HasCachedMinMax(self) -> bool: ... def HasDeferredData(self) -> bool: ... def HasGeometry(self) -> bool: ... diff --git a/src/SWIG_files/wrapper/Precision.i b/src/SWIG_files/wrapper/Precision.i index cfdc071ae..66dfb2c9a 100644 --- a/src/SWIG_files/wrapper/Precision.i +++ b/src/SWIG_files/wrapper/Precision.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_precision.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ProjLib.i b/src/SWIG_files/wrapper/ProjLib.i index c22890366..d0911d14f 100644 --- a/src/SWIG_files/wrapper/ProjLib.i +++ b/src/SWIG_files/wrapper/ProjLib.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_projlib.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Prs3d.i b/src/SWIG_files/wrapper/Prs3d.i index 9e3cc00f2..07ddd5ae1 100644 --- a/src/SWIG_files/wrapper/Prs3d.i +++ b/src/SWIG_files/wrapper/Prs3d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_prs3d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -962,10 +963,22 @@ Returns standard_true if the hidden lines are to be drawn. by default the hidden Standard_Boolean DrawHiddenLine(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3273,10 +3286,22 @@ Do nothing - axis-aligned bounding box should be initialized from parent structu virtual void CalculateBoundBox(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3667,10 +3692,22 @@ No available documentation. const opencascade::handle & Aspect(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4084,10 +4121,22 @@ Returns true if the given part is used in axes of aspect. Standard_Boolean DrawDatumPart(Prs3d_DatumParts thePart); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4432,10 +4481,22 @@ Returns arrow tail size. Standard_Real ArrowTailSize(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4890,10 +4951,22 @@ Returns the line aspect. this is defined as the set of color, type and thickness const opencascade::handle & Aspect(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5104,10 +5177,22 @@ Returns true if the display of isoparameters is allowed. Standard_Boolean DisplayIso(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5429,10 +5514,22 @@ No available documentation. const opencascade::handle & Aspect(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5619,10 +5716,22 @@ Returns the polygons color. const Quantity_Color & Color(const Aspect_TypeOfFacingModel aModel = Aspect_TOFM_FRONT_SIDE); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5812,10 +5921,22 @@ Returns the purely textual attributes used in the display of text. these include const opencascade::handle & Aspect(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/Prs3d.pyi b/src/SWIG_files/wrapper/Prs3d.pyi index 76f3897ab..90835c836 100644 --- a/src/SWIG_files/wrapper/Prs3d.pyi +++ b/src/SWIG_files/wrapper/Prs3d.pyi @@ -276,6 +276,7 @@ class Prs3d_Drawer(Graphic3d_PresentationAttributes): def DisableDrawHiddenLine(self) -> None: ... def Discretisation(self) -> int: ... def DrawHiddenLine(self) -> bool: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EnableDrawHiddenLine(self) -> None: ... def FaceBoundaryAspect(self) -> Prs3d_LineAspect: ... def FaceBoundaryDraw(self) -> bool: ... @@ -441,6 +442,7 @@ class Prs3d_Point: class Prs3d_PresentationShadow(Graphic3d_Structure): def __init__(self, theViewer: Graphic3d_StructureManager, thePrs: Graphic3d_Structure) -> None: ... def CalculateBoundBox(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ParentAffinity(self) -> Graphic3d_ViewAffinity: ... def ParentId(self) -> int: ... @@ -485,6 +487,7 @@ class Prs3d_ArrowAspect(Prs3d_BasicAspect): def __init__(self, theAspect: Graphic3d_AspectLine3d) -> None: ... def Angle(self) -> float: ... def Aspect(self) -> Graphic3d_AspectLine3d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsZoomable(self) -> bool: ... def Length(self) -> float: ... def SetAngle(self, anAngle: float) -> None: ... @@ -525,6 +528,7 @@ class Prs3d_DatumAspect(Prs3d_BasicAspect): def CopyAspectsFrom(self, theOther: Prs3d_DatumAspect) -> None: ... def DatumAxes(self) -> Prs3d_DatumAxes: ... def DrawDatumPart(self, thePart: Prs3d_DatumParts) -> bool: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def LineAspect(self, thePart: Prs3d_DatumParts) -> Prs3d_LineAspect: ... def PointAspect(self) -> Prs3d_PointAspect: ... def SetArrowAspect(self, theAspect: Prs3d_ArrowAspect) -> None: ... @@ -549,6 +553,7 @@ class Prs3d_DimensionAspect(Prs3d_BasicAspect): def ArrowAspect(self) -> Prs3d_ArrowAspect: ... def ArrowOrientation(self) -> Prs3d_DimensionArrowOrientation: ... def ArrowTailSize(self) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ExtensionSize(self) -> float: ... def IsArrows3d(self) -> bool: ... def IsText3d(self) -> bool: ... @@ -580,6 +585,7 @@ class Prs3d_LineAspect(Prs3d_BasicAspect): @overload def __init__(self, theAspect: Graphic3d_AspectLine3d) -> None: ... def Aspect(self) -> Graphic3d_AspectLine3d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def SetAspect(self, theAspect: Graphic3d_AspectLine3d) -> None: ... def SetColor(self, theColor: Quantity_Color) -> None: ... def SetTypeOfLine(self, theType: Aspect_TypeOfLine) -> None: ... @@ -595,6 +601,7 @@ class Prs3d_PlaneAspect(Prs3d_BasicAspect): def DisplayEdges(self) -> bool: ... def DisplayEdgesArrows(self) -> bool: ... def DisplayIso(self) -> bool: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EdgesAspect(self) -> Prs3d_LineAspect: ... def IsoAspect(self) -> Prs3d_LineAspect: ... def IsoDistance(self) -> float: ... @@ -618,6 +625,7 @@ class Prs3d_PointAspect(Prs3d_BasicAspect): @overload def __init__(self, theAspect: Graphic3d_AspectMarker3d) -> None: ... def Aspect(self) -> Graphic3d_AspectMarker3d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetTexture(self) -> Graphic3d_MarkerImage: ... def GetTextureSize(self) -> Tuple[int, int]: ... def SetAspect(self, theAspect: Graphic3d_AspectMarker3d) -> None: ... @@ -632,6 +640,7 @@ class Prs3d_ShadingAspect(Prs3d_BasicAspect): def __init__(self, theAspect: Graphic3d_AspectFillArea3d) -> None: ... def Aspect(self) -> Graphic3d_AspectFillArea3d: ... def Color(self, aModel: Optional[Aspect_TypeOfFacingModel] = Aspect_TOFM_FRONT_SIDE) -> Quantity_Color: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Material(self, aModel: Optional[Aspect_TypeOfFacingModel] = Aspect_TOFM_FRONT_SIDE) -> Graphic3d_MaterialAspect: ... def SetAspect(self, theAspect: Graphic3d_AspectFillArea3d) -> None: ... def SetColor(self, aColor: Quantity_Color, aModel: Optional[Aspect_TypeOfFacingModel] = Aspect_TOFM_BOTH_SIDE) -> None: ... @@ -646,6 +655,7 @@ class Prs3d_TextAspect(Prs3d_BasicAspect): def __init__(self, theAspect: Graphic3d_AspectText3d) -> None: ... def Angle(self) -> float: ... def Aspect(self) -> Graphic3d_AspectText3d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Height(self) -> float: ... def HorizontalJustification(self) -> Graphic3d_HorizontalTextAlignment: ... def Orientation(self) -> Graphic3d_TextPath: ... diff --git a/src/SWIG_files/wrapper/PrsDim.i b/src/SWIG_files/wrapper/PrsDim.i index f73cf2107..3c367d15f 100644 --- a/src/SWIG_files/wrapper/PrsDim.i +++ b/src/SWIG_files/wrapper/PrsDim.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_prsdim.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/PrsMgr.i b/src/SWIG_files/wrapper/PrsMgr.i index fac8d4b88..7da3995f0 100644 --- a/src/SWIG_files/wrapper/PrsMgr.i +++ b/src/SWIG_files/wrapper/PrsMgr.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_prsmgr.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -406,10 +407,22 @@ Return presentation display status; prsmgr_displaystatus_none by default. PrsMgr_DisplayStatus DisplayStatus(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1516,10 +1529,22 @@ Display structure. virtual void Display(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/PrsMgr.pyi b/src/SWIG_files/wrapper/PrsMgr.pyi index 49479cd3f..73af975ab 100644 --- a/src/SWIG_files/wrapper/PrsMgr.pyi +++ b/src/SWIG_files/wrapper/PrsMgr.pyi @@ -99,6 +99,7 @@ class PrsMgr_PresentableObject(Standard_Transient): def DefaultDisplayMode(self) -> int: ... def DisplayMode(self) -> int: ... def DisplayStatus(self) -> PrsMgr_DisplayStatus: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def DynamicHilightAttributes(self) -> Prs3d_Drawer: ... def HasColor(self) -> bool: ... def HasDisplayMode(self) -> bool: ... @@ -179,6 +180,7 @@ class PrsMgr_Presentation(Graphic3d_Structure): def Clear(self, theWithDestruction: Optional[bool] = True) -> None: ... def Compute(self) -> None: ... def Display(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Erase(self) -> None: ... def Highlight(self, theStyle: Prs3d_Drawer) -> None: ... def IsDisplayed(self) -> bool: ... diff --git a/src/SWIG_files/wrapper/Quantity.i b/src/SWIG_files/wrapper/Quantity.i index 0bd43235e..0896305b3 100644 --- a/src/SWIG_files/wrapper/Quantity.i +++ b/src/SWIG_files/wrapper/Quantity.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_quantity.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -2279,10 +2280,22 @@ Returns the distance between two colors. it's a value between 0 and the square r Standard_Real Distance(const Quantity_Color & theColor); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2349,10 +2362,22 @@ Returns the hue component (hue angle) of the color in degrees within range [0.0; Standard_Real Hue(); - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -2648,7 +2673,7 @@ def __eq__(self, right): %extend Quantity_Color { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -2656,7 +2681,7 @@ def __eq__(self, right): %pythoncode { def __setstate__(self, state): inst = Quantity_Color() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Quantity_Color') @@ -2718,7 +2743,7 @@ Returns true if two colors are equal. %extend Quantity_ColorHasher { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -2726,7 +2751,7 @@ Returns true if two colors are equal. %pythoncode { def __setstate__(self, state): inst = Quantity_ColorHasher() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Quantity_ColorHasher') @@ -2953,10 +2978,22 @@ Convert srgb components into linear rgb using opengl specs formula. static NCollection_Vec4 Convert_sRGB_To_LinearRGB(const NCollection_Vec4 & theRGB); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2975,10 +3012,22 @@ Return rgb color value. const Quantity_Color & GetRGB(); - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -3111,7 +3160,7 @@ def __eq__(self, right): %extend Quantity_ColorRGBA { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -3119,7 +3168,7 @@ def __eq__(self, right): %pythoncode { def __setstate__(self, state): inst = Quantity_ColorRGBA() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Quantity_ColorRGBA') @@ -3181,7 +3230,7 @@ Returns true if two colors are equal. %extend Quantity_ColorRGBAHasher { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -3189,7 +3238,7 @@ Returns true if two colors are equal. %pythoncode { def __setstate__(self, state): inst = Quantity_ColorRGBAHasher() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Quantity_ColorRGBAHasher') @@ -3605,7 +3654,7 @@ def __eq__(self, right): %extend Quantity_Date { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -3613,7 +3662,7 @@ def __eq__(self, right): %pythoncode { def __setstate__(self, state): inst = Quantity_Date() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Quantity_Date') @@ -3943,7 +3992,7 @@ def __eq__(self, right): %extend Quantity_Period { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -3951,7 +4000,7 @@ def __eq__(self, right): %pythoncode { def __setstate__(self, state): inst = Quantity_Period() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of Quantity_Period') diff --git a/src/SWIG_files/wrapper/Quantity.pyi b/src/SWIG_files/wrapper/Quantity.pyi index 1c8fd9e48..5c19d502b 100644 --- a/src/SWIG_files/wrapper/Quantity.pyi +++ b/src/SWIG_files/wrapper/Quantity.pyi @@ -1157,12 +1157,14 @@ class Quantity_Color: def Delta(self, theColor: Quantity_Color) -> Tuple[float, float]: ... def DeltaE2000(self, theOther: Quantity_Color) -> float: ... def Distance(self, theColor: Quantity_Color) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def Epsilon() -> float: ... def Green(self) -> float: ... @staticmethod def HlsRgb(theH: float, theL: float, theS: float) -> Tuple[float, float, float]: ... def Hue(self) -> float: ... + def InitFromJson(self, json_string: str) -> bool: ... def IsDifferent(self, theOther: Quantity_Color) -> bool: ... def IsEqual(self, theOther: Quantity_Color) -> bool: ... def Light(self) -> float: ... @@ -1216,7 +1218,9 @@ class Quantity_ColorRGBA: def Convert_LinearRGB_To_sRGB(theRGB: float) -> float: ... @staticmethod def Convert_sRGB_To_LinearRGB(theRGB: float) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetRGB(self) -> Quantity_Color: ... + def InitFromJson(self, json_string: str) -> bool: ... def IsDifferent(self, theOther: Quantity_ColorRGBA) -> bool: ... def IsEqual(self, theOther: Quantity_ColorRGBA) -> bool: ... def SetAlpha(self, theAlpha: float) -> None: ... diff --git a/src/SWIG_files/wrapper/RWGltf.i b/src/SWIG_files/wrapper/RWGltf.i index 0f9552e33..30ff5bc8f 100644 --- a/src/SWIG_files/wrapper/RWGltf.i +++ b/src/SWIG_files/wrapper/RWGltf.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwgltf.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1697,18 +1698,17 @@ Main constructor. %feature("autodoc", " Parameters ---------- -theBinFile: std::ostream theStyle: XCAFPrs_Style Return ------- -None +theBinFile: std::ostream Description ----------- Add material images into glb stream. @param thebinfile [in] [out] output file stream @param thestyle [in] material images to add. ") AddGlbImages; - void AddGlbImages(std::ostream & theBinFile, const XCAFPrs_Style & theStyle); + void AddGlbImages(std::ostream &OutValue, const XCAFPrs_Style & theStyle); /****************** AddImages ******************/ /**** md5 signature: 3aa5121db2a6a900aa23f78102a3d9de ****/ diff --git a/src/SWIG_files/wrapper/RWGltf.pyi b/src/SWIG_files/wrapper/RWGltf.pyi index a8b368a5e..7f0947f3f 100644 --- a/src/SWIG_files/wrapper/RWGltf.pyi +++ b/src/SWIG_files/wrapper/RWGltf.pyi @@ -270,6 +270,7 @@ class RWGltf_GltfLatePrimitiveArray(RWMesh_TriangulationSource): class RWGltf_GltfMaterialMap(RWMesh_MaterialMap): def __init__(self, theFile: str, theDefSamplerId: int) -> None: ... + def AddGlbImages(self, theStyle: XCAFPrs_Style) -> str: ... def AddImages(self, theWriter: RWGltf_GltfOStreamWriter, theStyle: XCAFPrs_Style) -> bool: ... def AddMaterial(self, theWriter: RWGltf_GltfOStreamWriter, theStyle: XCAFPrs_Style) -> bool: ... def AddTextures(self, theWriter: RWGltf_GltfOStreamWriter, theStyle: XCAFPrs_Style) -> bool: ... diff --git a/src/SWIG_files/wrapper/RWHeaderSection.i b/src/SWIG_files/wrapper/RWHeaderSection.i index 2de7182ce..dfa49e9c0 100644 --- a/src/SWIG_files/wrapper/RWHeaderSection.i +++ b/src/SWIG_files/wrapper/RWHeaderSection.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwheadersection.h %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWMesh.i b/src/SWIG_files/wrapper/RWMesh.i index 746554052..fc4c5e52e 100644 --- a/src/SWIG_files/wrapper/RWMesh.i +++ b/src/SWIG_files/wrapper/RWMesh.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwmesh.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWObj.i b/src/SWIG_files/wrapper/RWObj.i index 91d5a5498..175e0ee97 100644 --- a/src/SWIG_files/wrapper/RWObj.i +++ b/src/SWIG_files/wrapper/RWObj.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwobj.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWPly.i b/src/SWIG_files/wrapper/RWPly.i index 6c8a6dcf3..9b0af8560 100644 --- a/src/SWIG_files/wrapper/RWPly.i +++ b/src/SWIG_files/wrapper/RWPly.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwply.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepAP203.i b/src/SWIG_files/wrapper/RWStepAP203.i index 0e7b8db6a..459fd1bc4 100644 --- a/src/SWIG_files/wrapper/RWStepAP203.i +++ b/src/SWIG_files/wrapper/RWStepAP203.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepap203.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepAP214.i b/src/SWIG_files/wrapper/RWStepAP214.i index 62b3a6014..444e352ff 100644 --- a/src/SWIG_files/wrapper/RWStepAP214.i +++ b/src/SWIG_files/wrapper/RWStepAP214.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepap214.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepAP242.i b/src/SWIG_files/wrapper/RWStepAP242.i index e0f58d191..6998c9d12 100644 --- a/src/SWIG_files/wrapper/RWStepAP242.i +++ b/src/SWIG_files/wrapper/RWStepAP242.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepap242.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepBasic.i b/src/SWIG_files/wrapper/RWStepBasic.i index 852343b29..28b4afbac 100644 --- a/src/SWIG_files/wrapper/RWStepBasic.i +++ b/src/SWIG_files/wrapper/RWStepBasic.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepbasic.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepDimTol.i b/src/SWIG_files/wrapper/RWStepDimTol.i index 7946dcaa1..f484367be 100644 --- a/src/SWIG_files/wrapper/RWStepDimTol.i +++ b/src/SWIG_files/wrapper/RWStepDimTol.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepdimtol.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepElement.i b/src/SWIG_files/wrapper/RWStepElement.i index c968d7b07..9b92b70b1 100644 --- a/src/SWIG_files/wrapper/RWStepElement.i +++ b/src/SWIG_files/wrapper/RWStepElement.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepelement.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepFEA.i b/src/SWIG_files/wrapper/RWStepFEA.i index 17bd63803..98c181873 100644 --- a/src/SWIG_files/wrapper/RWStepFEA.i +++ b/src/SWIG_files/wrapper/RWStepFEA.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepfea.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepGeom.i b/src/SWIG_files/wrapper/RWStepGeom.i index d4c175b4c..f298ec327 100644 --- a/src/SWIG_files/wrapper/RWStepGeom.i +++ b/src/SWIG_files/wrapper/RWStepGeom.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepgeom.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepKinematics.i b/src/SWIG_files/wrapper/RWStepKinematics.i index 70ccaf48f..258626812 100644 --- a/src/SWIG_files/wrapper/RWStepKinematics.i +++ b/src/SWIG_files/wrapper/RWStepKinematics.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepkinematics. %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepRepr.i b/src/SWIG_files/wrapper/RWStepRepr.i index 8f3ed50ce..c85bdb2c0 100644 --- a/src/SWIG_files/wrapper/RWStepRepr.i +++ b/src/SWIG_files/wrapper/RWStepRepr.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwsteprepr.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepShape.i b/src/SWIG_files/wrapper/RWStepShape.i index 0fd410077..639d7374f 100644 --- a/src/SWIG_files/wrapper/RWStepShape.i +++ b/src/SWIG_files/wrapper/RWStepShape.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepshape.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStepVisual.i b/src/SWIG_files/wrapper/RWStepVisual.i index e6687d800..7dfd0d619 100644 --- a/src/SWIG_files/wrapper/RWStepVisual.i +++ b/src/SWIG_files/wrapper/RWStepVisual.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstepvisual.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/RWStl.i b/src/SWIG_files/wrapper/RWStl.i index bed7d3669..041dca6e8 100644 --- a/src/SWIG_files/wrapper/RWStl.i +++ b/src/SWIG_files/wrapper/RWStl.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_rwstl.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Resource.i b/src/SWIG_files/wrapper/Resource.i index 8e0172d5c..85b8db428 100644 --- a/src/SWIG_files/wrapper/Resource.i +++ b/src/SWIG_files/wrapper/Resource.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_resource.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/STEPCAFControl.i b/src/SWIG_files/wrapper/STEPCAFControl.i index d8a248bda..58ef7dca3 100644 --- a/src/SWIG_files/wrapper/STEPCAFControl.i +++ b/src/SWIG_files/wrapper/STEPCAFControl.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepcafcontrol.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1861,7 +1862,7 @@ Loads a file and returns the read status provided for use like single-file reade Parameters ---------- theName: str -theIStream: std::istream +theIStream: str Return ------- @@ -2542,17 +2543,16 @@ Writes all the produced models into file in case of multimodel with extern refer %feature("autodoc", " Parameters ---------- -theStream: std::ostream Return ------- -IFSelect_ReturnStatus +theStream: std::ostream Description ----------- Writes all the produced models into the stream. provided for use like single-file writer. ") WriteStream; - IFSelect_ReturnStatus WriteStream(std::ostream & theStream); + IFSelect_ReturnStatus WriteStream(std::ostream &OutValue); /****************** Writer ******************/ /**** md5 signature: 056d4f3221d283b7d58d92ddd5c40dd7 ****/ diff --git a/src/SWIG_files/wrapper/STEPCAFControl.pyi b/src/SWIG_files/wrapper/STEPCAFControl.pyi index 40f26f2cd..872028666 100644 --- a/src/SWIG_files/wrapper/STEPCAFControl.pyi +++ b/src/SWIG_files/wrapper/STEPCAFControl.pyi @@ -163,6 +163,7 @@ class STEPCAFControl_Reader: @overload def Perform(self, filename: str, doc: TDocStd_Document, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> bool: ... def ReadFile(self, theFileName: str) -> IFSelect_ReturnStatus: ... + def ReadStream(self, theName: str, theIStream: str) -> IFSelect_ReturnStatus: ... def Reader(self) -> STEPControl_Reader: ... def SetColorMode(self, colormode: bool) -> None: ... def SetGDTMode(self, gdtmode: bool) -> None: ... @@ -212,6 +213,7 @@ class STEPCAFControl_Writer: @overload def Transfer(self, theLabelSeq: TDF_LabelSequence, theMode: Optional[STEPControl_StepModelType] = STEPControl_AsIs, theIsMulti: Optional[str] = 0, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> bool: ... def Write(self, theFileName: str) -> IFSelect_ReturnStatus: ... + def WriteStream(self) -> Tuple[IFSelect_ReturnStatus, str]: ... def Writer(self) -> STEPControl_Writer: ... # harray1 classes diff --git a/src/SWIG_files/wrapper/STEPConstruct.i b/src/SWIG_files/wrapper/STEPConstruct.i index 2e5c439b6..5de6c0694 100644 --- a/src/SWIG_files/wrapper/STEPConstruct.i +++ b/src/SWIG_files/wrapper/STEPConstruct.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepconstruct.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/STEPControl.i b/src/SWIG_files/wrapper/STEPControl.i index e49036895..93ba51a4c 100644 --- a/src/SWIG_files/wrapper/STEPControl.i +++ b/src/SWIG_files/wrapper/STEPControl.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepcontrol.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -955,17 +956,16 @@ Writes a step model in the file identified by filename. %feature("autodoc", " Parameters ---------- -theOStream: std::ostream Return ------- -IFSelect_ReturnStatus +theOStream: std::ostream Description ----------- Writes a step model in the std::ostream. ") WriteStream; - IFSelect_ReturnStatus WriteStream(std::ostream & theOStream); + IFSelect_ReturnStatus WriteStream(std::ostream &OutValue); }; diff --git a/src/SWIG_files/wrapper/STEPControl.pyi b/src/SWIG_files/wrapper/STEPControl.pyi index 6b26f1f10..c2730840c 100644 --- a/src/SWIG_files/wrapper/STEPControl.pyi +++ b/src/SWIG_files/wrapper/STEPControl.pyi @@ -94,6 +94,7 @@ class STEPControl_Writer: def UnsetTolerance(self) -> None: ... def WS(self) -> XSControl_WorkSession: ... def Write(self, theFileName: str) -> IFSelect_ReturnStatus: ... + def WriteStream(self) -> Tuple[IFSelect_ReturnStatus, str]: ... # harray1 classes # harray2 classes diff --git a/src/SWIG_files/wrapper/STEPEdit.i b/src/SWIG_files/wrapper/STEPEdit.i index a59c7406a..26b782d95 100644 --- a/src/SWIG_files/wrapper/STEPEdit.i +++ b/src/SWIG_files/wrapper/STEPEdit.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepedit.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/STEPSelections.i b/src/SWIG_files/wrapper/STEPSelections.i index a4856097a..a10eff504 100644 --- a/src/SWIG_files/wrapper/STEPSelections.i +++ b/src/SWIG_files/wrapper/STEPSelections.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepselections.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -259,14 +260,23 @@ No available documentation. ") STEPSelections_AssemblyExplorer; STEPSelections_AssemblyExplorer(const Interface_Graph & G); + /****************** Dump ******************/ + /**** md5 signature: e60d722f65a7811be636699da7600e78 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +os: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** FillListWithGraph ******************/ /**** md5 signature: 22e0b69a9c944196630d2867ebc6b70f ****/ %feature("compactdefaultargs") FillListWithGraph; diff --git a/src/SWIG_files/wrapper/STEPSelections.pyi b/src/SWIG_files/wrapper/STEPSelections.pyi index ee178b4de..b72dbc5fd 100644 --- a/src/SWIG_files/wrapper/STEPSelections.pyi +++ b/src/SWIG_files/wrapper/STEPSelections.pyi @@ -54,6 +54,7 @@ class STEPSelections_AssemblyComponent(Standard_Transient): class STEPSelections_AssemblyExplorer: def __init__(self, G: Interface_Graph) -> None: ... + def Dump(self) -> str: ... def FillListWithGraph(self, cmp: STEPSelections_AssemblyComponent) -> None: ... def FindItemWithNAUO(self, nauo: StepRepr_NextAssemblyUsageOccurrence) -> Standard_Transient: ... def FindSDRWithProduct(self, product: StepBasic_ProductDefinition) -> StepShape_ShapeDefinitionRepresentation: ... diff --git a/src/SWIG_files/wrapper/Select3D.i b/src/SWIG_files/wrapper/Select3D.i index 508db729c..cce0df534 100644 --- a/src/SWIG_files/wrapper/Select3D.i +++ b/src/SWIG_files/wrapper/Select3D.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_select3d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -514,10 +515,22 @@ Returns center of the box. if location transformation is set, it will be applied virtual gp_Pnt CenterOfGeometry(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -858,10 +871,22 @@ Returns center of the face. if location transformation is set, it will be applie virtual gp_Pnt CenterOfGeometry(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1004,10 +1029,22 @@ Returns center of point. if location transformation is set, it will be applied. virtual gp_Pnt CenterOfGeometry(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1146,10 +1183,22 @@ Returns center of the segment. if location transformation is set, it will be app virtual gp_Pnt CenterOfGeometry(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1550,10 +1599,22 @@ No available documentation. virtual gp_Pnt CenterOfGeometry(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1735,10 +1796,22 @@ Returns center of the point set. if location transformation is set, it will be a virtual gp_Pnt CenterOfGeometry(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1974,10 +2047,22 @@ Removes all sensitive entities from the list used at the time of construction, o void Clear(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2413,10 +2498,22 @@ Returns center of the point set. if location transformation is set, it will be a virtual gp_Pnt CenterOfGeometry(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2632,10 +2729,22 @@ Returns center of triangulation. if location transformation is set, it will be a virtual gp_Pnt CenterOfGeometry(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3311,10 +3420,22 @@ Returns center of the wire. if location transformation is set, it will be applie virtual gp_Pnt CenterOfGeometry(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/Select3D.pyi b/src/SWIG_files/wrapper/Select3D.pyi index 95b9ea586..eff45a6a6 100644 --- a/src/SWIG_files/wrapper/Select3D.pyi +++ b/src/SWIG_files/wrapper/Select3D.pyi @@ -77,6 +77,7 @@ class Select3D_SensitiveBox(Select3D_SensitiveEntity): def __init__(self, theOwnerId: SelectMgr_EntityOwner, theXMin: float, theYMin: float, theZMin: float, theXMax: float, theYMax: float, theZMax: float) -> None: ... def BoundingBox(self) -> Select3D_BndBox3d: ... def CenterOfGeometry(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetConnected(self) -> Select3D_SensitiveEntity: ... def Matches(self, theMgr: SelectBasics_SelectingVolumeManager, thePickResult: SelectBasics_PickResult) -> bool: ... def NbSubElements(self) -> int: ... @@ -103,6 +104,7 @@ class Select3D_SensitiveFace(Select3D_SensitiveEntity): def BVH(self) -> None: ... def BoundingBox(self) -> Select3D_BndBox3d: ... def CenterOfGeometry(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetConnected(self) -> Select3D_SensitiveEntity: ... def GetPoints(self, theHArrayOfPnt: TColgp_HArray1OfPnt) -> None: ... def Matches(self, theMgr: SelectBasics_SelectingVolumeManager, thePickResult: SelectBasics_PickResult) -> bool: ... @@ -113,6 +115,7 @@ class Select3D_SensitivePoint(Select3D_SensitiveEntity): def __init__(self, theOwnerId: SelectMgr_EntityOwner, thePoint: gp_Pnt) -> None: ... def BoundingBox(self) -> Select3D_BndBox3d: ... def CenterOfGeometry(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetConnected(self) -> Select3D_SensitiveEntity: ... def Matches(self, theMgr: SelectBasics_SelectingVolumeManager, thePickResult: SelectBasics_PickResult) -> bool: ... def NbSubElements(self) -> int: ... @@ -123,6 +126,7 @@ class Select3D_SensitiveSegment(Select3D_SensitiveEntity): def __init__(self, theOwnerId: SelectMgr_EntityOwner, theFirstPnt: gp_Pnt, theLastPnt: gp_Pnt) -> None: ... def BoundingBox(self) -> Select3D_BndBox3d: ... def CenterOfGeometry(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def EndPoint(self) -> gp_Pnt: ... @overload @@ -155,6 +159,7 @@ class Select3D_SensitiveTriangle(Select3D_SensitiveEntity): def BoundingBox(self) -> Select3D_BndBox3d: ... def Center3D(self) -> gp_Pnt: ... def CenterOfGeometry(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetConnected(self) -> Select3D_SensitiveEntity: ... def Matches(self, theMgr: SelectBasics_SelectingVolumeManager, thePickResult: SelectBasics_PickResult) -> bool: ... def NbSubElements(self) -> int: ... @@ -167,6 +172,7 @@ class Select3D_InteriorSensitivePointSet(Select3D_SensitiveSet): def Box(self, theIdx: int) -> Select3D_BndBox3d: ... def Center(self, theIdx: int, theAxis: int) -> float: ... def CenterOfGeometry(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetPoints(self, theHArrayOfPnt: TColgp_HArray1OfPnt) -> None: ... def NbSubElements(self) -> int: ... def Size(self) -> int: ... @@ -186,6 +192,7 @@ class Select3D_SensitiveGroup(Select3D_SensitiveSet): def Center(self, theIdx: int, theAxis: int) -> float: ... def CenterOfGeometry(self) -> gp_Pnt: ... def Clear(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Entities(self) -> Select3D_IndexedMapOfEntity: ... def GetConnected(self) -> Select3D_SensitiveEntity: ... def IsIn(self, theSensitive: Select3D_SensitiveEntity) -> bool: ... @@ -217,6 +224,7 @@ class Select3D_SensitivePoly(Select3D_SensitiveSet): def Box(self, theIdx: int) -> Select3D_BndBox3d: ... def Center(self, theIdx: int, theAxis: int) -> float: ... def CenterOfGeometry(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetPoint3d(self, thePntIdx: int) -> gp_Pnt: ... def Matches(self, theMgr: SelectBasics_SelectingVolumeManager, thePickResult: SelectBasics_PickResult) -> bool: ... def NbSubElements(self) -> int: ... @@ -231,6 +239,7 @@ class Select3D_SensitivePrimitiveArray(Select3D_SensitiveSet): def Box(self, theIdx: int) -> Select3D_BndBox3d: ... def Center(self, theIdx: int, theAxis: int) -> float: ... def CenterOfGeometry(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetConnected(self) -> Select3D_SensitiveEntity: ... def HasInitLocation(self) -> bool: ... @overload @@ -278,6 +287,7 @@ class Select3D_SensitiveWire(Select3D_SensitiveSet): def Box(self, theIdx: int) -> Select3D_BndBox3d: ... def Center(self, theIdx: int, theAxis: int) -> float: ... def CenterOfGeometry(self) -> gp_Pnt: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetConnected(self) -> Select3D_SensitiveEntity: ... def GetEdges(self) -> False: ... def GetLastDetected(self) -> Select3D_SensitiveEntity: ... diff --git a/src/SWIG_files/wrapper/SelectBasics.i b/src/SWIG_files/wrapper/SelectBasics.i index 2763ea934..929e99619 100644 --- a/src/SWIG_files/wrapper/SelectBasics.i +++ b/src/SWIG_files/wrapper/SelectBasics.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_selectbasics.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -413,10 +414,22 @@ Calculates distance from 3d projection of user-defined selection point to the gi virtual Standard_Real DistToGeometryCenter(const gp_Pnt & theCOG); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/SelectBasics.pyi b/src/SWIG_files/wrapper/SelectBasics.pyi index c1958ab14..c18061970 100644 --- a/src/SWIG_files/wrapper/SelectBasics.pyi +++ b/src/SWIG_files/wrapper/SelectBasics.pyi @@ -38,6 +38,7 @@ class SelectBasics_PickResult: class SelectBasics_SelectingVolumeManager: def DetectedPoint(self, theDepth: float) -> gp_Pnt: ... def DistToGeometryCenter(self, theCOG: gp_Pnt) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetActiveSelectionType(self) -> int: ... def GetFarPickedPnt(self) -> gp_Pnt: ... def GetMousePosition(self) -> gp_Pnt2d: ... diff --git a/src/SWIG_files/wrapper/SelectMgr.i b/src/SWIG_files/wrapper/SelectMgr.i index 522bd4c19..915054ccc 100644 --- a/src/SWIG_files/wrapper/SelectMgr.i +++ b/src/SWIG_files/wrapper/SelectMgr.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_selectmgr.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -498,10 +499,22 @@ Measures distance between 3d projection of user-picked screen point and given po virtual Standard_Real DistToGeometryCenter(const gp_Pnt & theCOG); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1163,10 +1176,22 @@ Returns true if this owner points to a part of object and false for entire objec Standard_Boolean ComesFromDecomposition(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1745,10 +1770,22 @@ Computes sensitive primitives for the given selection mode - key interface metho virtual void ComputeSelection(const opencascade::handle & theSelection, const Standard_Integer theMode); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2227,10 +2264,22 @@ Returns true if this objects set contains theobject given. Standard_Boolean Contains(const opencascade::handle & theObject); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2498,10 +2547,22 @@ Measures distance between 3d projection of user-picked screen point and given po virtual Standard_Real DistToGeometryCenter(const gp_Pnt & theCOG); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3302,10 +3363,22 @@ No available documentation. void Destroy(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3888,10 +3961,22 @@ Clears up all resources and memory. void Clear(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4093,10 +4178,22 @@ Returns the main unclipped range; [-inf, inf] by default. Bnd_Range & ChangeUnclipRange(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4230,10 +4327,22 @@ Measures distance between start axis point and given point thecog. virtual Standard_Real DistToGeometryCenter(const gp_Pnt & theCOG); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/SelectMgr.pyi b/src/SWIG_files/wrapper/SelectMgr.pyi index 60a43b51e..e662364e2 100644 --- a/src/SWIG_files/wrapper/SelectMgr.pyi +++ b/src/SWIG_files/wrapper/SelectMgr.pyi @@ -158,6 +158,7 @@ class SelectMgr_BaseIntersector(Standard_Transient): def Camera(self) -> Graphic3d_Camera: ... def DetectedPoint(self, theDepth: float) -> gp_Pnt: ... def DistToGeometryCenter(self, theCOG: gp_Pnt) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetFarPnt(self) -> gp_Pnt: ... def GetMousePosition(self) -> gp_Pnt2d: ... def GetNearPnt(self) -> gp_Pnt: ... @@ -206,6 +207,7 @@ class SelectMgr_EntityOwner(Standard_Transient): def __init__(self, theOwner: SelectMgr_EntityOwner, aPriority: Optional[int] = 0) -> None: ... def Clear(self, thePrsMgr: PrsMgr_PresentationManager, theMode: Optional[int] = 0) -> None: ... def ComesFromDecomposition(self) -> bool: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def HandleMouseClick(self, thePoint: Graphic3d_Vec2i, theButton: Aspect_VKeyMouse, theModifiers: Aspect_VKeyFlags, theIsDoubleClick: bool) -> bool: ... def HasLocation(self) -> bool: ... def HasSelectable(self) -> bool: ... @@ -246,6 +248,7 @@ class SelectMgr_SelectableObject(PrsMgr_PresentableObject): def ClearSelected(self) -> None: ... def ClearSelections(self, update: Optional[bool] = False) -> None: ... def ComputeSelection(self, theSelection: SelectMgr_Selection, theMode: int) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ErasePresentations(self, theToRemove: bool) -> None: ... def GetAssemblyOwner(self) -> SelectMgr_EntityOwner: ... def GetHilightPresentation(self, thePrsMgr: PrsMgr_PresentationManager) -> Prs3d_Presentation: ... @@ -275,6 +278,7 @@ class SelectMgr_SelectableObjectSet: def Append(self, theObject: SelectMgr_SelectableObject) -> bool: ... def ChangeSubset(self, theObject: SelectMgr_SelectableObject) -> None: ... def Contains(self, theObject: SelectMgr_SelectableObject) -> bool: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def IsEmpty(self) -> bool: ... def MarkDirty(self) -> None: ... @@ -295,6 +299,7 @@ class SelectMgr_SelectingVolumeManager(SelectBasics_SelectingVolumeManager): def Camera(self) -> Graphic3d_Camera: ... def DetectedPoint(self, theDepth: float) -> gp_Pnt: ... def DistToGeometryCenter(self, theCOG: gp_Pnt) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetActiveSelectionType(self) -> int: ... def GetFarPickedPnt(self) -> gp_Pnt: ... def GetMousePosition(self) -> gp_Pnt2d: ... @@ -353,6 +358,7 @@ class SelectMgr_Selection(Standard_Transient): def ChangeEntities(self) -> False: ... def Clear(self) -> None: ... def Destroy(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Entities(self) -> False: ... def GetSelectionState(self) -> SelectMgr_StateOfSelection: ... def IsEmpty(self) -> bool: ... @@ -394,6 +400,7 @@ class SelectMgr_SensitiveEntity(Standard_Transient): def __init__(self, theEntity: Select3D_SensitiveEntity) -> None: ... def BaseSensitive(self) -> Select3D_SensitiveEntity: ... def Clear(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsActiveForSelection(self) -> bool: ... def ResetSelectionActiveStatus(self) -> None: ... def SetActiveForSelection(self) -> None: ... @@ -408,6 +415,7 @@ class SelectMgr_ViewClipRange: def AddClipSubRange(self, theRange: Bnd_Range) -> None: ... def AddClippingPlanes(self, thePlanes: Graphic3d_SequenceOfHClipPlane, thePickRay: gp_Ax1) -> None: ... def ChangeUnclipRange(self) -> Bnd_Range: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetNearestDepth(self, theRange: Bnd_Range) -> Tuple[bool, float]: ... def IsClipped(self, theDepth: float) -> bool: ... def SetVoid(self) -> None: ... @@ -417,6 +425,7 @@ class SelectMgr_AxisIntersector(SelectMgr_BaseIntersector): def Build(self) -> None: ... def DetectedPoint(self, theDepth: float) -> gp_Pnt: ... def DistToGeometryCenter(self, theCOG: gp_Pnt) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetFarPnt(self) -> gp_Pnt: ... def GetNearPnt(self) -> gp_Pnt: ... def GetViewRayDirection(self) -> gp_Dir: ... diff --git a/src/SWIG_files/wrapper/ShapeAlgo.i b/src/SWIG_files/wrapper/ShapeAlgo.i index b8d7749bd..e65e8fba2 100644 --- a/src/SWIG_files/wrapper/ShapeAlgo.i +++ b/src/SWIG_files/wrapper/ShapeAlgo.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapealgo.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ShapeAnalysis.i b/src/SWIG_files/wrapper/ShapeAnalysis.i index 167230470..7a9713766 100644 --- a/src/SWIG_files/wrapper/ShapeAnalysis.i +++ b/src/SWIG_files/wrapper/ShapeAnalysis.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapeanalysis.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ShapeBuild.i b/src/SWIG_files/wrapper/ShapeBuild.i index 85777cb9e..76252e5d3 100644 --- a/src/SWIG_files/wrapper/ShapeBuild.i +++ b/src/SWIG_files/wrapper/ShapeBuild.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapebuild.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ShapeConstruct.i b/src/SWIG_files/wrapper/ShapeConstruct.i index 6f54ef883..46b81761c 100644 --- a/src/SWIG_files/wrapper/ShapeConstruct.i +++ b/src/SWIG_files/wrapper/ShapeConstruct.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapeconstruct.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ShapeCustom.i b/src/SWIG_files/wrapper/ShapeCustom.i index 3b6249605..78cf2927f 100644 --- a/src/SWIG_files/wrapper/ShapeCustom.i +++ b/src/SWIG_files/wrapper/ShapeCustom.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapecustom.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ShapeExtend.i b/src/SWIG_files/wrapper/ShapeExtend.i index e2f5737ed..3953956dc 100644 --- a/src/SWIG_files/wrapper/ShapeExtend.i +++ b/src/SWIG_files/wrapper/ShapeExtend.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapeextend.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ShapeFix.i b/src/SWIG_files/wrapper/ShapeFix.i index d01695c9f..ac58edf9f 100644 --- a/src/SWIG_files/wrapper/ShapeFix.i +++ b/src/SWIG_files/wrapper/ShapeFix.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapefix.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ShapeProcess.i b/src/SWIG_files/wrapper/ShapeProcess.i index 3431f3c9c..17257ec8e 100644 --- a/src/SWIG_files/wrapper/ShapeProcess.i +++ b/src/SWIG_files/wrapper/ShapeProcess.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapeprocess.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ShapeProcessAPI.i b/src/SWIG_files/wrapper/ShapeProcessAPI.i index e97b3174e..3c06a4613 100644 --- a/src/SWIG_files/wrapper/ShapeProcessAPI.i +++ b/src/SWIG_files/wrapper/ShapeProcessAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapeprocessapi.h %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/ShapeUpgrade.i b/src/SWIG_files/wrapper/ShapeUpgrade.i index b87d5dcca..c3311aeea 100644 --- a/src/SWIG_files/wrapper/ShapeUpgrade.i +++ b/src/SWIG_files/wrapper/ShapeUpgrade.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_shapeupgrade.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Standard.i b/src/SWIG_files/wrapper/Standard.i index 6b500b7e5..f7793de80 100644 --- a/src/SWIG_files/wrapper/Standard.i +++ b/src/SWIG_files/wrapper/Standard.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_standard.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -799,14 +800,23 @@ No available documentation. ") IsSame; Standard_Boolean IsSame(const Standard_GUID & uid); + /****************** ShallowDump ******************/ + /**** md5 signature: 81ee27b22dec06425d33dc871c4cc32d ****/ + %feature("compactdefaultargs") ShallowDump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +aStream: Standard_OStream + +Description +----------- +Display the guid with the following format: //! '00000000-0000-0000-0000-000000000000'. +") ShallowDump; + void ShallowDump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string ShallowDumpToString() { - std::stringstream s; - self->ShallowDump(s); - return s.str();} - }; /****************** ToCString ******************/ /**** md5 signature: bf4dad3d25b8e651de1bf421311dfc4f ****/ %feature("compactdefaultargs") ToCString; @@ -1458,14 +1468,23 @@ Used to construct an instance of the exception object as a handle. ") NewInstance; static opencascade::handle NewInstance(Standard_CString theMessage, Standard_CString theStackTrace); + /****************** Print ******************/ + /**** md5 signature: 938e58a4c905f64555b1dcca06400750 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theStream: Standard_OStream + +Description +----------- +Prints on the stream @p thestream the exception name followed by the error message. //! note: there is a short-cut @c operator<< (standard_ostream&, opencascade::handle&). +") Print; + void Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Raise ******************/ /**** md5 signature: 91c037d4badacf1008e024b8b4afb779 ****/ %feature("compactdefaultargs") Raise; @@ -1490,7 +1509,7 @@ Raises an exception of type 'failure' and associates an error message to it. the %feature("autodoc", " Parameters ---------- -aReason: Standard_SStream +aReason: std::stringstream Return ------- @@ -1500,7 +1519,7 @@ Description ----------- Raises an exception of type 'failure' and associates an error message to it. the message can be constructed at run-time. ") Raise; - static void Raise(const Standard_SStream & aReason); + static void Raise(const std::stringstream & aReason); /****************** Reraise ******************/ /**** md5 signature: 657c2a99b33e637f9ff1c137fe6e034b ****/ @@ -1539,7 +1558,7 @@ No available documentation. %feature("autodoc", " Parameters ---------- -aReason: Standard_SStream +aReason: std::stringstream Return ------- @@ -1549,7 +1568,7 @@ Description ----------- Reraises a caught exception and changes its error message. ") Reraise; - void Reraise(const Standard_SStream & aReason); + void Reraise(const std::stringstream & aReason); /****************** SetDefaultStackTraceLength ******************/ /**** md5 signature: 0a05375e4fbc3fd48e63e470f065603f ****/ @@ -2003,7 +2022,7 @@ Raises exception with specified message string. %feature("autodoc", " Parameters ---------- -theMessage: Standard_SStream +theMessage: std::stringstream Return ------- @@ -2013,7 +2032,7 @@ Description ----------- Raises exception with specified message string. ") Raise; - static void Raise(Standard_SStream & theMessage); + static void Raise(std::stringstream & theMessage); /****************** SetMessageString ******************/ /**** md5 signature: d5bbb32eb858a536bd5764be9d18926b ****/ @@ -2118,14 +2137,23 @@ Returns descriptor of the base class in the hierarchy. ") Parent; const opencascade::handle & Parent(); + /****************** Print ******************/ + /**** md5 signature: 938e58a4c905f64555b1dcca06400750 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theStream: Standard_OStream + +Description +----------- +Prints type (address of descriptor + name) to a stream. +") Print; + void Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Register ******************/ /**** md5 signature: 8e6b8df94dcb0fc4b1d9d92877cf9314 ****/ %feature("compactdefaultargs") Register; diff --git a/src/SWIG_files/wrapper/Standard.pyi b/src/SWIG_files/wrapper/Standard.pyi index 9799b0b17..a94a9695a 100644 --- a/src/SWIG_files/wrapper/Standard.pyi +++ b/src/SWIG_files/wrapper/Standard.pyi @@ -110,6 +110,7 @@ class Standard_GUID: def IsEqual(string1: Standard_GUID, string2: Standard_GUID) -> bool: ... def IsNotSame(self, uid: Standard_GUID) -> bool: ... def IsSame(self, uid: Standard_GUID) -> bool: ... + def ShallowDump(self) -> str: ... def ToCString(self, aStrGuid: Standard_PCharacter) -> None: ... def ToExtString(self, aStrGuid: Standard_PExtCharacter) -> None: ... def ToUUID(self) -> Standard_UUID: ... @@ -169,18 +170,14 @@ class Standard_Failure(Standard_Transient): @overload @staticmethod def NewInstance(theMessage: str, theStackTrace: str) -> Standard_Failure: ... + def Print(self) -> str: ... @overload @staticmethod def Raise(aMessage: Optional[str] = "") -> None: ... @overload - @staticmethod - def Raise(aReason: Standard_SStream) -> None: ... - @overload def Reraise(self) -> None: ... @overload def Reraise(self, aMessage: str) -> None: ... - @overload - def Reraise(self, aReason: Standard_SStream) -> None: ... @staticmethod def SetDefaultStackTraceLength(theNbStackTraces: int) -> None: ... def SetMessageString(self, theMessage: str) -> None: ... @@ -217,9 +214,6 @@ class Standard_OutOfMemory(Standard_ProgramError): @overload @staticmethod def Raise(theMessage: Optional[str] = "") -> None: ... - @overload - @staticmethod - def Raise(theMessage: Standard_SStream) -> None: ... def SetMessageString(self, aMessage: str) -> None: ... class Standard_Persistent(Standard_Transient): @@ -230,6 +224,7 @@ class Standard_Persistent(Standard_Transient): class Standard_Type(Standard_Transient): def Name(self) -> str: ... def Parent(self) -> Standard_Type: ... + def Print(self) -> str: ... @staticmethod def Register(theSystemName: str, theName: str, theSize: int, theParent: Standard_Type) -> Standard_Type: ... def Size(self) -> int: ... diff --git a/src/SWIG_files/wrapper/StdFail.i b/src/SWIG_files/wrapper/StdFail.i index d861f52a8..302de0072 100644 --- a/src/SWIG_files/wrapper/StdFail.i +++ b/src/SWIG_files/wrapper/StdFail.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stdfail.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StdPrs.i b/src/SWIG_files/wrapper/StdPrs.i index 77edde691..9375593cc 100644 --- a/src/SWIG_files/wrapper/StdPrs.i +++ b/src/SWIG_files/wrapper/StdPrs.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stdprs.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StdSelect.i b/src/SWIG_files/wrapper/StdSelect.i index 65d40044d..b4a331dfa 100644 --- a/src/SWIG_files/wrapper/StdSelect.i +++ b/src/SWIG_files/wrapper/StdSelect.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stdselect.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -305,10 +306,22 @@ Clears the presentation manager object apm of all shapes with the selection mode virtual void Clear(const opencascade::handle & aPM, const Standard_Integer aMode = 0); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -948,10 +961,22 @@ No available documentation. virtual void Compute(const opencascade::handle & thePrsMgr, const opencascade::handle & thePrs, const Standard_Integer theMode); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/StdSelect.pyi b/src/SWIG_files/wrapper/StdSelect.pyi index 10a241d78..9960b35df 100644 --- a/src/SWIG_files/wrapper/StdSelect.pyi +++ b/src/SWIG_files/wrapper/StdSelect.pyi @@ -73,6 +73,7 @@ class StdSelect_BRepOwner(SelectMgr_EntityOwner): @overload def __init__(self, aShape: TopoDS_Shape, theOrigin: SelectMgr_SelectableObject, aPriority: Optional[int] = 0, FromDecomposition: Optional[bool] = False) -> None: ... def Clear(self, aPM: PrsMgr_PresentationManager, aMode: Optional[int] = 0) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def HasHilightMode(self) -> bool: ... def HasShape(self) -> bool: ... def HilightMode(self) -> int: ... @@ -122,6 +123,7 @@ class StdSelect_FaceFilter(SelectMgr_Filter): class StdSelect_Shape(PrsMgr_PresentableObject): def __init__(self, theShape: TopoDS_Shape, theDrawer: Optional[Prs3d_Drawer] = Prs3d_Drawer()) -> None: ... def Compute(self, thePrsMgr: PrsMgr_PresentationManager, thePrs: Prs3d_Presentation, theMode: int) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Shape(self) -> TopoDS_Shape: ... @overload diff --git a/src/SWIG_files/wrapper/StepAP203.i b/src/SWIG_files/wrapper/StepAP203.i index 76c230389..5e025d72f 100644 --- a/src/SWIG_files/wrapper/StepAP203.i +++ b/src/SWIG_files/wrapper/StepAP203.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepap203.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepAP209.i b/src/SWIG_files/wrapper/StepAP209.i index 21b06c454..a0bc2790a 100644 --- a/src/SWIG_files/wrapper/StepAP209.i +++ b/src/SWIG_files/wrapper/StepAP209.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepap209.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepAP214.i b/src/SWIG_files/wrapper/StepAP214.i index 0577f8eb6..0fd5f9fb7 100644 --- a/src/SWIG_files/wrapper/StepAP214.i +++ b/src/SWIG_files/wrapper/StepAP214.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepap214.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepAP242.i b/src/SWIG_files/wrapper/StepAP242.i index 6967f8e0d..2fd29b256 100644 --- a/src/SWIG_files/wrapper/StepAP242.i +++ b/src/SWIG_files/wrapper/StepAP242.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepap242.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepBasic.i b/src/SWIG_files/wrapper/StepBasic.i index 2c5a3b222..3ee059755 100644 --- a/src/SWIG_files/wrapper/StepBasic.i +++ b/src/SWIG_files/wrapper/StepBasic.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepbasic.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepData.i b/src/SWIG_files/wrapper/StepData.i index 62a081f51..78aca01bd 100644 --- a/src/SWIG_files/wrapper/StepData.i +++ b/src/SWIG_files/wrapper/StepData.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepdata.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -4060,6 +4061,44 @@ Creates a stepdumper, able to work on a given stepmodel (which defines the total ") StepData_StepDumper; StepData_StepDumper(const opencascade::handle & amodel, const opencascade::handle & protocol, const Standard_Integer mode = 0); + /****************** Dump ******************/ + /**** md5 signature: 51a252c8de81ad50ec4845852573a9a5 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient +level: int + +Return +------- +S: Standard_OStream + +Description +----------- +Dumps a entity on an messenger. returns true if success, false, if the entity to dump has not been recognized by the protocol. can have one of these values: - 0: prints the type only, as known in step files (steptype) if has not been regognized by the protocol, or if its type is complex, the steptype is replaced by the display of the cdl type. complex type are well processed by level 1. - 1: dumps the entity, completely (whatever it has simple or complex type) but alone. - 2: dumps the entity completely, plus the item its refers to at first level (a header message designates the starting entity of the dump) - 3: dumps the entity and its referred items at any levels //! for levels 1,2,3, the numbers displayed (form #nnn) are the numbers of the corresponding entities in the model. +") Dump; + Standard_Boolean Dump(std::ostream &OutValue, const opencascade::handle & ent, const Standard_Integer level); + + /****************** Dump ******************/ + /**** md5 signature: 2c2fad53a5ea53ff96aa2a4598e4e028 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +num: int +level: int + +Return +------- +S: Standard_OStream + +Description +----------- +Works as dump with a transient, but directly takes the entity designated by its number in the model returns false, also if is out of range. +") Dump; + Standard_Boolean Dump(std::ostream &OutValue, const Standard_Integer num, const Standard_Integer level); + /****************** StepWriter ******************/ /**** md5 signature: 96c8201dd445aa612be97bdda77742fe ****/ %feature("compactdefaultargs") StepWriter; @@ -4144,6 +4183,24 @@ Erases specific labels, i.e. clears the map (entity-ident). ") ClearLabels; void ClearLabels(); + /****************** DumpHeader ******************/ + /**** md5 signature: 56f8df745054635fd7397075063f4387 ****/ + %feature("compactdefaultargs") DumpHeader; + %feature("autodoc", " +Parameters +---------- +level: int (optional, default to 0) + +Return +------- +S: Standard_OStream + +Description +----------- +Dumps the header, with the header protocol of stepdata. if the header protocol is not defined, for each header entity, prints its type. else sends the header under the form of header section of an ascii step file is not used because header is not so big. +") DumpHeader; + void DumpHeader(std::ostream &OutValue, const Standard_Integer level = 0); + /****************** Entity ******************/ /**** md5 signature: 1676edef20e54d8138d1f2a308537826 ****/ %feature("compactdefaultargs") Entity; @@ -4286,6 +4343,24 @@ Returns a new empty model, same type as , i.e. stepmodel. ") NewEmptyModel; opencascade::handle NewEmptyModel(); + /****************** PrintLabel ******************/ + /**** md5 signature: 70ad5739c870581f6dca5167f0b3bae0 ****/ + %feature("compactdefaultargs") PrintLabel; + %feature("autodoc", " +Parameters +---------- +ent: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Prints label specific to step norm for a given entity, i.e. if a labelident has been recorded, its value with '#', else the number in the model with '#' and between (). +") PrintLabel; + void PrintLabel(const opencascade::handle & ent, std::ostream &OutValue); + /****************** SetIdentLabel ******************/ /**** md5 signature: d8211ff55cd283602d612ccf9779dc4a ****/ %feature("compactdefaultargs") SetIdentLabel; @@ -5633,14 +5708,23 @@ Open a sublist with its type then a '('. ") OpenTypedSub; void OpenTypedSub(Standard_CString subtype); + /****************** Print ******************/ + /**** md5 signature: 2eb8b686c42ac7926ce46f27d6e81985 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +Writes result on an output defined as an ostream then clears it. +") Print; + Standard_Boolean Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Send ******************/ /**** md5 signature: 834a80f8fb88341c53a16609c1df2e80 ****/ %feature("compactdefaultargs") Send; diff --git a/src/SWIG_files/wrapper/StepData.pyi b/src/SWIG_files/wrapper/StepData.pyi index a86a66d43..b8f7c05ba 100644 --- a/src/SWIG_files/wrapper/StepData.pyi +++ b/src/SWIG_files/wrapper/StepData.pyi @@ -328,6 +328,10 @@ class StepData_SelectType: class StepData_StepDumper: def __init__(self, amodel: StepData_StepModel, protocol: StepData_Protocol, mode: Optional[int] = 0) -> None: ... + @overload + def Dump(self, ent: Standard_Transient, level: int) -> Tuple[bool, str]: ... + @overload + def Dump(self, num: int, level: int) -> Tuple[bool, str]: ... def StepWriter(self) -> StepData_StepWriter: ... class StepData_StepModel(Interface_InterfaceModel): @@ -335,6 +339,7 @@ class StepData_StepModel(Interface_InterfaceModel): def AddHeaderEntity(self, ent: Standard_Transient) -> None: ... def ClearHeader(self) -> None: ... def ClearLabels(self) -> None: ... + def DumpHeader(self, level: Optional[int] = 0) -> str: ... def Entity(self, num: int) -> Standard_Transient: ... def GetFromAnother(self, other: Interface_InterfaceModel) -> None: ... def HasHeaderEntity(self, atype: Standard_Type) -> bool: ... @@ -344,6 +349,7 @@ class StepData_StepModel(Interface_InterfaceModel): def IsInitializedUnit(self) -> bool: ... def LocalLengthUnit(self) -> float: ... def NewEmptyModel(self) -> Interface_InterfaceModel: ... + def PrintLabel(self, ent: Standard_Transient) -> str: ... def SetIdentLabel(self, ent: Standard_Transient, ident: int) -> None: ... def SetLocalLengthUnit(self, theUnit: float) -> None: ... def SetSourceCodePage(self, theCode: Resource_FormatType) -> None: ... @@ -426,6 +432,7 @@ class StepData_StepWriter: def NewLine(self, evenempty: bool) -> None: ... def OpenSub(self) -> None: ... def OpenTypedSub(self, subtype: str) -> None: ... + def Print(self) -> Tuple[bool, str]: ... @overload def Send(self, val: int) -> None: ... @overload diff --git a/src/SWIG_files/wrapper/StepDimTol.i b/src/SWIG_files/wrapper/StepDimTol.i index 06049e4d8..a09016eb1 100644 --- a/src/SWIG_files/wrapper/StepDimTol.i +++ b/src/SWIG_files/wrapper/StepDimTol.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepdimtol.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepElement.i b/src/SWIG_files/wrapper/StepElement.i index 9e8c8d083..5c69800e3 100644 --- a/src/SWIG_files/wrapper/StepElement.i +++ b/src/SWIG_files/wrapper/StepElement.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepelement.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepFEA.i b/src/SWIG_files/wrapper/StepFEA.i index b842f622a..50e7d4558 100644 --- a/src/SWIG_files/wrapper/StepFEA.i +++ b/src/SWIG_files/wrapper/StepFEA.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepfea.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepGeom.i b/src/SWIG_files/wrapper/StepGeom.i index de45b936a..6934ad521 100644 --- a/src/SWIG_files/wrapper/StepGeom.i +++ b/src/SWIG_files/wrapper/StepGeom.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepgeom.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepKinematics.i b/src/SWIG_files/wrapper/StepKinematics.i index 248526685..a62bc4a94 100644 --- a/src/SWIG_files/wrapper/StepKinematics.i +++ b/src/SWIG_files/wrapper/StepKinematics.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepkinematics.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepRepr.i b/src/SWIG_files/wrapper/StepRepr.i index 93e893733..8dfc5570e 100644 --- a/src/SWIG_files/wrapper/StepRepr.i +++ b/src/SWIG_files/wrapper/StepRepr.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_steprepr.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepShape.i b/src/SWIG_files/wrapper/StepShape.i index 90b151276..8d40ee5cb 100644 --- a/src/SWIG_files/wrapper/StepShape.i +++ b/src/SWIG_files/wrapper/StepShape.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepshape.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepToGeom.i b/src/SWIG_files/wrapper/StepToGeom.i index 89bb8a8c9..f8f131b27 100644 --- a/src/SWIG_files/wrapper/StepToGeom.i +++ b/src/SWIG_files/wrapper/StepToGeom.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_steptogeom.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepToTopoDS.i b/src/SWIG_files/wrapper/StepToTopoDS.i index f8e3825c4..e8411361f 100644 --- a/src/SWIG_files/wrapper/StepToTopoDS.i +++ b/src/SWIG_files/wrapper/StepToTopoDS.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_steptotopods.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StepVisual.i b/src/SWIG_files/wrapper/StepVisual.i index 5d5b652a0..16162b6a4 100644 --- a/src/SWIG_files/wrapper/StepVisual.i +++ b/src/SWIG_files/wrapper/StepVisual.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stepvisual.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/StlAPI.i b/src/SWIG_files/wrapper/StlAPI.i index 533a01e05..3fd787bb7 100644 --- a/src/SWIG_files/wrapper/StlAPI.i +++ b/src/SWIG_files/wrapper/StlAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_stlapi.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Storage.i b/src/SWIG_files/wrapper/Storage.i index cb2924667..b5e7ea470 100644 --- a/src/SWIG_files/wrapper/Storage.i +++ b/src/SWIG_files/wrapper/Storage.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_storage.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Sweep.i b/src/SWIG_files/wrapper/Sweep.i index 15d1dfaf3..71f3c88d5 100644 --- a/src/SWIG_files/wrapper/Sweep.i +++ b/src/SWIG_files/wrapper/Sweep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_sweep.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TColGeom.i b/src/SWIG_files/wrapper/TColGeom.i index c079dc15d..afc7a38e0 100644 --- a/src/SWIG_files/wrapper/TColGeom.i +++ b/src/SWIG_files/wrapper/TColGeom.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tcolgeom.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TColGeom2d.i b/src/SWIG_files/wrapper/TColGeom2d.i index 5c05ff486..0474fa25b 100644 --- a/src/SWIG_files/wrapper/TColGeom2d.i +++ b/src/SWIG_files/wrapper/TColGeom2d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tcolgeom2d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TColQuantity.i b/src/SWIG_files/wrapper/TColQuantity.i index 054a00532..de4635314 100644 --- a/src/SWIG_files/wrapper/TColQuantity.i +++ b/src/SWIG_files/wrapper/TColQuantity.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tcolquantity.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TColStd.i b/src/SWIG_files/wrapper/TColStd.i index cf0dc0ef0..4195d9221 100644 --- a/src/SWIG_files/wrapper/TColStd.i +++ b/src/SWIG_files/wrapper/TColStd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tcolstd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1070,14 +1071,23 @@ No available documentation. ") Remove; Standard_Boolean Remove(const Standard_Integer aKey); + /****************** Statistics ******************/ + /**** md5 signature: 1a1dab8d9fff60f7ef456c28f93e75d1 ****/ + %feature("compactdefaultargs") Statistics; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theStream: Standard_OStream + +Description +----------- +Prints useful statistics about the map. it can be used to test the quality of the hashcoding. +") Statistics; + void Statistics(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string StatisticsToString() { - std::stringstream s; - self->Statistics(s); - return s.str();} - }; /****************** Subtract ******************/ /**** md5 signature: 190f8077cde18ce8900964ed206c3e98 ****/ %feature("compactdefaultargs") Subtract; diff --git a/src/SWIG_files/wrapper/TColStd.pyi b/src/SWIG_files/wrapper/TColStd.pyi index 451070b60..67bfabc26 100644 --- a/src/SWIG_files/wrapper/TColStd.pyi +++ b/src/SWIG_files/wrapper/TColStd.pyi @@ -480,6 +480,7 @@ class TColStd_PackedMapOfInteger: def NbBuckets(self) -> int: ... def ReSize(self, NbBuckets: int) -> None: ... def Remove(self, aKey: int) -> bool: ... + def Statistics(self) -> str: ... # harray1 classes diff --git a/src/SWIG_files/wrapper/TColgp.i b/src/SWIG_files/wrapper/TColgp.i index ce27ba706..50f7f9284 100644 --- a/src/SWIG_files/wrapper/TColgp.i +++ b/src/SWIG_files/wrapper/TColgp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tcolgp.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TCollection.i b/src/SWIG_files/wrapper/TCollection.i index 66455e623..7c8d67865 100644 --- a/src/SWIG_files/wrapper/TCollection.i +++ b/src/SWIG_files/wrapper/TCollection.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tcollection.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -1207,21 +1208,41 @@ Inserts the string other at the beginning of this ascii string. example tcollect ") Prepend; void Prepend(TCollection_AsciiString other); + /****************** Print ******************/ + /**** md5 signature: 0edf3bdce48a694eb17a295e551bde0f ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +astream: Standard_OStream + +Description +----------- +Displays on a stream. +") Print; + void Print(std::ostream &OutValue); + + /****************** Read ******************/ + /**** md5 signature: e0872b647041ae5015cfaa77802dd596 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +astream: str + +Return +------- +None + +Description +----------- +Read from a stream. +") Read; + void Read(std::istream & astream); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; - - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; /****************** RealValue ******************/ /**** md5 signature: 8a0c7a2ab7b53f6fb68a06ec0dbc6aa7 ****/ %feature("compactdefaultargs") RealValue; @@ -2442,14 +2463,23 @@ Returns expected cstring length in utf8 coding. it can be used for memory calcul ") LengthOfCString; Standard_Integer LengthOfCString(); + /****************** Print ******************/ + /**** md5 signature: 0edf3bdce48a694eb17a295e551bde0f ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +astream: Standard_OStream + +Description +----------- +Displays . +") Print; + void Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Remove ******************/ /**** md5 signature: f18035a636fe6904f989e7a0f0dd31b8 ****/ %feature("compactdefaultargs") Remove; @@ -3526,14 +3556,23 @@ Inserts the other string at the beginning of the string example: before m ") Prepend; void Prepend(const opencascade::handle & other); + /****************** Print ******************/ + /**** md5 signature: 0edf3bdce48a694eb17a295e551bde0f ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +astream: Standard_OStream + +Description +----------- +Prints this string on the stream . +") Print; + void Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** RealValue ******************/ /**** md5 signature: 8a0c7a2ab7b53f6fb68a06ec0dbc6aa7 ****/ %feature("compactdefaultargs") RealValue; @@ -4263,14 +4302,23 @@ Returns number of characters in . this is the same functionality as 'strle ") Length; Standard_Integer Length(); + /****************** Print ******************/ + /**** md5 signature: 0edf3bdce48a694eb17a295e551bde0f ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +astream: Standard_OStream + +Description +----------- +Displays . +") Print; + void Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Remove ******************/ /**** md5 signature: f18035a636fe6904f989e7a0f0dd31b8 ****/ %feature("compactdefaultargs") Remove; diff --git a/src/SWIG_files/wrapper/TCollection.pyi b/src/SWIG_files/wrapper/TCollection.pyi index 6dd06f880..a4da23194 100644 --- a/src/SWIG_files/wrapper/TCollection.pyi +++ b/src/SWIG_files/wrapper/TCollection.pyi @@ -117,6 +117,8 @@ class TCollection_AsciiString: def Location(self, N: int, C: str, FromIndex: int, ToIndex: int) -> int: ... def LowerCase(self) -> None: ... def Prepend(self, other: str) -> None: ... + def Print(self) -> str: ... + def Read(self, astream: str) -> None: ... def RealValue(self) -> float: ... def Remove(self, where: int, ahowmany: Optional[int] = 1) -> None: ... @overload @@ -213,6 +215,7 @@ class TCollection_ExtendedString: def IsLess(self, other: str) -> bool: ... def Length(self) -> int: ... def LengthOfCString(self) -> int: ... + def Print(self) -> str: ... def Remove(self, where: int, ahowmany: Optional[int] = 1) -> None: ... def RemoveAll(self, what: Standard_ExtCharacter) -> None: ... def Search(self, what: str) -> int: ... @@ -293,6 +296,7 @@ class TCollection_HAsciiString(Standard_Transient): def Location(self, N: int, C: str, FromIndex: int, ToIndex: int) -> int: ... def LowerCase(self) -> None: ... def Prepend(self, other: TCollection_HAsciiString) -> None: ... + def Print(self) -> str: ... def RealValue(self) -> float: ... def Remove(self, where: int, ahowmany: Optional[int] = 1) -> None: ... @overload @@ -356,6 +360,7 @@ class TCollection_HExtendedString(Standard_Transient): def IsLess(self, other: TCollection_HExtendedString) -> bool: ... def IsSameState(self, other: TCollection_HExtendedString) -> bool: ... def Length(self) -> int: ... + def Print(self) -> str: ... def Remove(self, where: int, ahowmany: Optional[int] = 1) -> None: ... def RemoveAll(self, what: Standard_ExtCharacter) -> None: ... def Search(self, what: TCollection_HExtendedString) -> int: ... diff --git a/src/SWIG_files/wrapper/TDF.i b/src/SWIG_files/wrapper/TDF.i index 08abf6b65..36d128da4 100644 --- a/src/SWIG_files/wrapper/TDF.i +++ b/src/SWIG_files/wrapper/TDF.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tdf.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -600,23 +601,63 @@ Makes an attributedelta because has been resumed. ") DeltaOnResume; virtual opencascade::handle DeltaOnResume(); + /****************** Dump ******************/ + /**** md5 signature: 87047991ca121f6cb65c2957eca41f1b ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dumps the minimum information about on . +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} }; + /****************** ExtendedDump ******************/ + /**** md5 signature: 2d076f5290434752ed1effb636fb5839 ****/ + %feature("compactdefaultargs") ExtendedDump; + %feature("autodoc", " +Parameters +---------- +aFilter: TDF_IDFilter +aMap: TDF_AttributeIndexedMap + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps the attribute content on , using like this: if an attribute is not in the map, first put add it to the map and then dump it. use the map rank instead of dumping each attribute field. +") ExtendedDump; + virtual void ExtendedDump(std::ostream &OutValue, const TDF_IDFilter & aFilter, TDF_AttributeIndexedMap & aMap); + /****************** FindAttribute ******************/ /**** md5 signature: 5f4fd12b74a27c4216127d1ce8d3b78a ****/ %feature("compactdefaultargs") FindAttribute; @@ -954,19 +995,40 @@ Returns the reference attribute. ") Attribute; opencascade::handle Attribute(); + /****************** Dump ******************/ + /**** md5 signature: 99b366a47dee674026948ac42a91f968 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the contents. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1952,19 +2014,40 @@ No available documentation. ") Destroy; void Destroy(); + /****************** Dump ******************/ + /**** md5 signature: cfe815398c9c4191063c65e53f786693 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps the data on . +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2297,14 +2380,23 @@ Returns true if the label is in the data set. ") ContainsLabel; Standard_Boolean ContainsLabel(const TDF_Label & aLabel); + /****************** Dump ******************/ + /**** md5 signature: cfe815398c9c4191063c65e53f786693 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps the minimum information about on . +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsEmpty ******************/ /**** md5 signature: 6ab5e1ad63f93168856ab126dd374b81 ****/ %feature("compactdefaultargs") IsEmpty; @@ -2399,19 +2491,40 @@ Returns the field . ") BeginTime; Standard_Integer BeginTime(); + /****************** Dump ******************/ + /**** md5 signature: e60d722f65a7811be636699da7600e78 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2582,14 +2695,23 @@ Copies into the contents of . is cleared before copy. ") Copy; void Copy(const TDF_IDFilter & fromFilter); + /****************** Dump ******************/ + /**** md5 signature: 43df1fb908adbf242957532375689066 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +Writes the contents of to . +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IDList ******************/ /**** md5 signature: 51f584875347d58754d482e26d1410b6 ****/ %feature("compactdefaultargs") IDList; @@ -2868,22 +2990,59 @@ Returns the depth of the label in the data framework. this corresponds to the nu ") Depth; Standard_Integer Depth(); + /****************** Dump ******************/ + /**** md5 signature: cfe815398c9c4191063c65e53f786693 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps the minimum information about on . +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); + + /****************** EntryDump ******************/ + /**** md5 signature: b1831f922bafdab54839dc202c26f4f7 ****/ + %feature("compactdefaultargs") EntryDump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps the label entry. +") EntryDump; + void EntryDump(std::ostream &OutValue); + + /****************** ExtendedDump ******************/ + /**** md5 signature: af33a4abcb3b7b5ccf7bc889f69d60fb ****/ + %feature("compactdefaultargs") ExtendedDump; + %feature("autodoc", " +Parameters +---------- +aFilter: TDF_IDFilter +aMap: TDF_AttributeIndexedMap + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps the label on and its attributes rank in if their ids are kept by . +") ExtendedDump; + void ExtendedDump(std::ostream &OutValue, const TDF_IDFilter & aFilter, TDF_AttributeIndexedMap & aMap); - %feature("autodoc", "1"); - %extend{ - std::string EntryDumpToString() { - std::stringstream s; - self->EntryDump(s); - return s.str();} - }; /****************** Father ******************/ /**** md5 signature: a0f1cf18875c9b067fe3f49cfc73a13d ****/ %feature("compactdefaultargs") Father; @@ -3507,6 +3666,26 @@ Clears the relocation dictionary, but lets the self relocation flag to its curre ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: 2a7064c79887abf6a938c73a57576fd9 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +dumpLabels: bool +dumpAttributes: bool +dumpTransients: bool + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps the relocation table. +") Dump; + Standard_OStream & Dump(const Standard_Boolean dumpLabels, const Standard_Boolean dumpAttributes, const Standard_Boolean dumpTransients, std::ostream &OutValue); + /****************** HasRelocation ******************/ /**** md5 signature: a28d159840ab7cb08cc986078d0af75d ****/ %feature("compactdefaultargs") HasRelocation; @@ -3768,6 +3947,42 @@ Decreases the reference counters of the labels of to , a ") DeductLabels; static void DeductLabels(TDF_LabelList & aLabelList, TDF_LabelIntegerMap & aLabelMap); + /****************** DeepDump ******************/ + /**** md5 signature: 0865990b45a67afdb1d24c85517acea1 ****/ + %feature("compactdefaultargs") DeepDump; + %feature("autodoc", " +Parameters +---------- +aDF: TDF_Data + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps and its labels and their attributes. +") DeepDump; + static void DeepDump(std::ostream &OutValue, const opencascade::handle & aDF); + + /****************** DeepDump ******************/ + /**** md5 signature: e4b5cb2df81a0376aea19a2db84fdb98 ****/ + %feature("compactdefaultargs") DeepDump; + %feature("autodoc", " +Parameters +---------- +aLabel: TDF_Label + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps , its children and their attributes. +") DeepDump; + static void DeepDump(std::ostream &OutValue, const TDF_Label & aLabel); + /****************** Entry ******************/ /**** md5 signature: 5846182a2901126a6abbd7b994d69204 ****/ %feature("compactdefaultargs") Entry; @@ -3787,6 +4002,44 @@ Returns the entry for the label alabel in the form of the ascii character string ") Entry; static void Entry(const TDF_Label & aLabel, TCollection_AsciiString & anEntry); + /****************** ExtendedDeepDump ******************/ + /**** md5 signature: 0090a78df835b64f97d365e375094233 ****/ + %feature("compactdefaultargs") ExtendedDeepDump; + %feature("autodoc", " +Parameters +---------- +aDF: TDF_Data +aFilter: TDF_IDFilter + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps and its labels and their attributes, if their ids are kept by . dumps also the attributes content. +") ExtendedDeepDump; + static void ExtendedDeepDump(std::ostream &OutValue, const opencascade::handle & aDF, const TDF_IDFilter & aFilter); + + /****************** ExtendedDeepDump ******************/ + /**** md5 signature: ad0131438f9321268f1740e7da980209 ****/ + %feature("compactdefaultargs") ExtendedDeepDump; + %feature("autodoc", " +Parameters +---------- +aLabel: TDF_Label +aFilter: TDF_IDFilter + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps , its children and their attributes, if their ids are kept by . dumps also the attributes content. +") ExtendedDeepDump; + static void ExtendedDeepDump(std::ostream &OutValue, const TDF_Label & aLabel, const TDF_IDFilter & aFilter); + /****************** IsSelfContained ******************/ /**** md5 signature: 022b907b8de1841e61e891cd408215cc ****/ %feature("compactdefaultargs") IsSelfContained; @@ -4178,10 +4431,22 @@ Returns the data from tdf. opencascade::handle Data(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4443,10 +4708,22 @@ Applies the delta to the attribute. void Apply(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4480,19 +4757,40 @@ No available documentation. ") TDF_Reference; TDF_Reference(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4671,10 +4969,22 @@ No available documentation. TDF_TagSource(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5072,10 +5382,26 @@ def TDF_Tool_CountLabels(*args): def TDF_Tool_DeductLabels(*args): return TDF_Tool.DeductLabels(*args) +@deprecated +def TDF_Tool_DeepDump(*args): + return TDF_Tool.DeepDump(*args) + +@deprecated +def TDF_Tool_DeepDump(*args): + return TDF_Tool.DeepDump(*args) + @deprecated def TDF_Tool_Entry(*args): return TDF_Tool.Entry(*args) +@deprecated +def TDF_Tool_ExtendedDeepDump(*args): + return TDF_Tool.ExtendedDeepDump(*args) + +@deprecated +def TDF_Tool_ExtendedDeepDump(*args): + return TDF_Tool.ExtendedDeepDump(*args) + @deprecated def TDF_Tool_IsSelfContained(*args): return TDF_Tool.IsSelfContained(*args) diff --git a/src/SWIG_files/wrapper/TDF.pyi b/src/SWIG_files/wrapper/TDF.pyi index 815712b73..c915d71b3 100644 --- a/src/SWIG_files/wrapper/TDF.pyi +++ b/src/SWIG_files/wrapper/TDF.pyi @@ -195,6 +195,9 @@ class TDF_Attribute(Standard_Transient): def DeltaOnModification(self, aDelta: TDF_DeltaOnModification) -> None: ... def DeltaOnRemoval(self) -> TDF_DeltaOnRemoval: ... def DeltaOnResume(self) -> TDF_DeltaOnResume: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... + def ExtendedDump(self, aFilter: TDF_IDFilter, aMap: TDF_AttributeIndexedMap) -> str: ... @overload def FindAttribute(self, anID: Standard_GUID, anAttribute: TDF_Attribute) -> bool: ... def Forget(self, aTransaction: int) -> None: ... @@ -219,6 +222,8 @@ class TDF_Attribute(Standard_Transient): class TDF_AttributeDelta(Standard_Transient): def Apply(self) -> None: ... def Attribute(self) -> TDF_Attribute: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ID(self) -> Standard_GUID: ... def Label(self) -> TDF_Label: ... @@ -323,6 +328,8 @@ class TDF_Data(Standard_Transient): def __init__(self) -> None: ... def AllowModification(self, isAllowed: bool) -> None: ... def Destroy(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetLabel(self, anEntry: str, aLabel: TDF_Label) -> bool: ... def IsAccessByEntries(self) -> bool: ... def IsApplicable(self, aDelta: TDF_Delta) -> bool: ... @@ -345,6 +352,7 @@ class TDF_DataSet(Standard_Transient): def Clear(self) -> None: ... def ContainsAttribute(self, anAttribute: TDF_Attribute) -> bool: ... def ContainsLabel(self, aLabel: TDF_Label) -> bool: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... def IsEmpty(self) -> bool: ... def Labels(self) -> TDF_LabelMap: ... def Roots(self) -> TDF_LabelList: ... @@ -353,6 +361,8 @@ class TDF_Delta(Standard_Transient): def __init__(self) -> None: ... def AttributeDeltas(self) -> TDF_AttributeDeltaList: ... def BeginTime(self) -> int: ... + def Dump(self) -> str: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EndTime(self) -> int: ... def IsApplicable(self, aCurrentTime: int) -> bool: ... def IsEmpty(self) -> bool: ... @@ -364,6 +374,7 @@ class TDF_IDFilter: def __init__(self, ignoreMode: Optional[bool] = True) -> None: ... def Assign(self, theFilter: TDF_IDFilter) -> None: ... def Copy(self, fromFilter: TDF_IDFilter) -> None: ... + def Dump(self) -> str: ... def IDList(self, anIDList: TDF_IDList) -> None: ... @overload def Ignore(self, anID: Standard_GUID) -> None: ... @@ -392,6 +403,9 @@ class TDF_Label: def AttributesModified(self) -> bool: ... def Data(self) -> TDF_Data: ... def Depth(self) -> int: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def EntryDump(self) -> str: ... + def ExtendedDump(self, aFilter: TDF_IDFilter, aMap: TDF_AttributeIndexedMap) -> str: ... def Father(self) -> TDF_Label: ... @overload def FindAttribute(self, anID: Standard_GUID, anAttribute: TDF_Attribute) -> bool: ... @@ -439,6 +453,7 @@ class TDF_RelocationTable(Standard_Transient): def AfterRelocate(self) -> bool: ... def AttributeTable(self) -> TDF_AttributeDataMap: ... def Clear(self) -> None: ... + def Dump(self, dumpLabels: bool, dumpAttributes: bool, dumpTransients: bool) -> Tuple[Standard_OStream, str]: ... @overload def HasRelocation(self, aSourceLabel: TDF_Label, aTargetLabel: TDF_Label) -> bool: ... @overload @@ -463,10 +478,22 @@ class TDF_Tool: def CountLabels(aLabelList: TDF_LabelList, aLabelMap: TDF_LabelIntegerMap) -> None: ... @staticmethod def DeductLabels(aLabelList: TDF_LabelList, aLabelMap: TDF_LabelIntegerMap) -> None: ... + @overload + @staticmethod + def DeepDump(aDF: TDF_Data) -> str: ... + @overload + @staticmethod + def DeepDump(aLabel: TDF_Label) -> str: ... @staticmethod def Entry(aLabel: TDF_Label, anEntry: str) -> None: ... @overload @staticmethod + def ExtendedDeepDump(aDF: TDF_Data, aFilter: TDF_IDFilter) -> str: ... + @overload + @staticmethod + def ExtendedDeepDump(aLabel: TDF_Label, aFilter: TDF_IDFilter) -> str: ... + @overload + @staticmethod def IsSelfContained(aLabel: TDF_Label) -> bool: ... @overload @staticmethod @@ -517,6 +544,7 @@ class TDF_Transaction: def Abort(self) -> None: ... def Commit(self, withDelta: Optional[bool] = False) -> TDF_Delta: ... def Data(self) -> TDF_Data: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Initialize(self, aDF: TDF_Data) -> None: ... def IsOpen(self) -> bool: ... def Name(self) -> str: ... @@ -540,9 +568,12 @@ class TDF_DeltaOnRemoval(TDF_AttributeDelta): class TDF_DeltaOnResume(TDF_AttributeDelta): def __init__(self, anAtt: TDF_Attribute) -> None: ... def Apply(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... class TDF_Reference(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Get(self) -> TDF_Label: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -559,6 +590,7 @@ class TDF_Reference(TDF_Attribute): class TDF_TagSource(TDF_Attribute): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Get(self) -> int: ... @staticmethod def GetID() -> Standard_GUID: ... diff --git a/src/SWIG_files/wrapper/TDataStd.i b/src/SWIG_files/wrapper/TDataStd.i index d31190c77..48207c4b4 100644 --- a/src/SWIG_files/wrapper/TDataStd.i +++ b/src/SWIG_files/wrapper/TDataStd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tdatastd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -229,6 +230,24 @@ Appends to the list of the attributes ids of this package. caution: < ") IDList; static void IDList(TDF_IDList & anIDList); + /****************** Print ******************/ + /**** md5 signature: 34ef93cfb1f41df788d00d50ea442396 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +DIM: TDataStd_RealEnum + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the name of the real dimension as a string on the stream and returns . +") Print; + static Standard_OStream & Print(const TDataStd_RealEnum DIM, std::ostream &OutValue); + }; @@ -256,19 +275,40 @@ No available documentation. ") TDataStd_AsciiString; TDataStd_AsciiString(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -492,19 +532,40 @@ No available documentation. ") TDataStd_BooleanArray; TDataStd_BooleanArray(); + /****************** Dump ******************/ + /**** md5 signature: b935d5dd68e95802ac42f7875d3b6b15 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -843,19 +904,40 @@ No available documentation. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1209,19 +1291,40 @@ Makes a deltaonmodification between and . ") DeltaOnModification; virtual opencascade::handle DeltaOnModification(const opencascade::handle & anOldAttribute); + /****************** Dump ******************/ + /**** md5 signature: b935d5dd68e95802ac42f7875d3b6b15 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1661,19 +1764,40 @@ No available documentation. ") TDataStd_Current; TDataStd_Current(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2103,19 +2227,40 @@ No available documentation. ") TDataStd_Expression; TDataStd_Expression(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2350,19 +2495,40 @@ Makes a deltaonmodification between and . ") DeltaOnModification; virtual opencascade::handle DeltaOnModification(const opencascade::handle & anOldAttribute); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2703,19 +2869,40 @@ No available documentation. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3665,19 +3852,40 @@ Makes a deltaonmodification between and . ") DeltaOnModification; virtual opencascade::handle DeltaOnModification(const opencascade::handle & anOldAttribute); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3907,19 +4115,40 @@ No available documentation. ") TDataStd_Integer; TDataStd_Integer(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4193,19 +4422,40 @@ Makes a deltaonmodification between and . ") DeltaOnModification; virtual opencascade::handle DeltaOnModification(const opencascade::handle & anOldAttribute); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4546,19 +4796,40 @@ No available documentation. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5052,19 +5323,40 @@ Clear data. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5849,19 +6141,40 @@ No available documentation. ") TDataStd_Real; TDataStd_Real(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6166,19 +6479,40 @@ Makes a deltaonmodification between and . ") DeltaOnModification; virtual opencascade::handle DeltaOnModification(const opencascade::handle & anOldAttribute); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6519,19 +6853,40 @@ No available documentation. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6904,19 +7259,40 @@ No available documentation. ") TDataStd_ReferenceArray; TDataStd_ReferenceArray(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7274,19 +7650,40 @@ No available documentation. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7785,19 +8182,40 @@ Returns the depth of this tree node in the overall tree node structure. in other ") Depth; Standard_Integer Depth(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -8415,19 +8833,40 @@ No available documentation. ") TDataStd_UAttribute; TDataStd_UAttribute(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -8623,19 +9062,40 @@ If is assigned delete the associated expression attribute. ") Desassign; void Desassign(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -8971,14 +9431,23 @@ No available documentation. ") TDataStd_Comment; TDataStd_Comment(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -9125,14 +9594,23 @@ Creates a new sub-label and sets the sub-directory dir on that label. ") AddDirectory; static opencascade::handle AddDirectory(const opencascade::handle & dir); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Find ******************/ /**** md5 signature: c975c2b1384d4b33c2a54d78edf27d11 ****/ %feature("compactdefaultargs") Find; @@ -9243,14 +9721,23 @@ No available documentation. ") TDataStd_Name; TDataStd_Name(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -9419,14 +9906,23 @@ Tool to create an real attribute from , insert it in a new son label of < ") Append; opencascade::handle Append(const Standard_Integer value, const Standard_Boolean isExported = Standard_False); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Find ******************/ /**** md5 signature: 400d5175f4317bb9f7f5240746dcd5c9 ****/ %feature("compactdefaultargs") Find; @@ -9519,19 +10015,40 @@ No available documentation. ") TDataStd_Relation; TDataStd_Relation(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -9640,14 +10157,23 @@ No available documentation. ") TDataStd_Tick; TDataStd_Tick(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -9738,6 +10264,10 @@ class TDataStd_HLabelArray1 : public TDataStd_LabelArray1, public Standard_Trans def tdatastd_IDList(*args): return tdatastd.IDList(*args) +@deprecated +def tdatastd_Print(*args): + return tdatastd.Print(*args) + @deprecated def TDataStd_AsciiString_GetID(*args): return TDataStd_AsciiString.GetID(*args) diff --git a/src/SWIG_files/wrapper/TDataStd.pyi b/src/SWIG_files/wrapper/TDataStd.pyi index b0a4ad3ca..d5a105c4e 100644 --- a/src/SWIG_files/wrapper/TDataStd.pyi +++ b/src/SWIG_files/wrapper/TDataStd.pyi @@ -73,9 +73,13 @@ TDataStd_ANGULAR = TDataStd_RealEnum.TDataStd_ANGULAR class tdatastd: @staticmethod def IDList(anIDList: TDF_IDList) -> None: ... + @staticmethod + def Print(DIM: TDataStd_RealEnum) -> Tuple[Standard_OStream, str]: ... class TDataStd_AsciiString(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Get(self) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -99,6 +103,8 @@ class TDataStd_AsciiString(TDF_Attribute): class TDataStd_BooleanArray(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... @@ -128,6 +134,8 @@ class TDataStd_BooleanList(TDF_Attribute): def __init__(self) -> None: ... def Append(self, value: bool) -> None: ... def Clear(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Extent(self) -> int: ... def First(self) -> bool: ... @staticmethod @@ -158,6 +166,8 @@ class TDataStd_ByteArray(TDF_Attribute): def __init__(self) -> None: ... def ChangeArray(self, newArray: TColStd_HArray1OfByte, isCheckItems: Optional[bool] = True) -> None: ... def DeltaOnModification(self, anOldAttribute: TDF_Attribute) -> TDF_DeltaOnModification: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetDelta(self) -> bool: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -197,6 +207,8 @@ class TDataStd_ChildNodeIterator: class TDataStd_Current(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def Get(acces: TDF_Label) -> TDF_Label: ... @staticmethod @@ -234,6 +246,8 @@ class TDataStd_DeltaOnModificationOfRealArray(TDF_DeltaOnModification): class TDataStd_Expression(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetExpression(self) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -252,6 +266,8 @@ class TDataStd_ExtStringArray(TDF_Attribute): def Array(self) -> TColStd_HArray1OfExtendedString: ... def ChangeArray(self, newArray: TColStd_HArray1OfExtendedString, isCheckItems: Optional[bool] = True) -> None: ... def DeltaOnModification(self, anOldAttribute: TDF_Attribute) -> TDF_DeltaOnModification: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetDelta(self) -> bool: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -281,6 +297,8 @@ class TDataStd_ExtStringList(TDF_Attribute): def __init__(self) -> None: ... def Append(self, value: str) -> None: ... def Clear(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Extent(self) -> int: ... def First(self) -> str: ... @staticmethod @@ -374,6 +392,8 @@ class TDataStd_IntPackedMap(TDF_Attribute): def Clear(self) -> bool: ... def Contains(self, theKey: int) -> bool: ... def DeltaOnModification(self, anOldAttribute: TDF_Attribute) -> TDF_DeltaOnModification: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Extent(self) -> int: ... def GetDelta(self) -> bool: ... def GetHMap(self) -> TColStd_HPackedMapOfInteger: ... @@ -392,6 +412,8 @@ class TDataStd_IntPackedMap(TDF_Attribute): class TDataStd_Integer(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Get(self) -> int: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -418,6 +440,8 @@ class TDataStd_IntegerArray(TDF_Attribute): def Array(self) -> TColStd_HArray1OfInteger: ... def ChangeArray(self, newArray: TColStd_HArray1OfInteger, isCheckItems: Optional[bool] = True) -> None: ... def DeltaOnModification(self, anOldAttribute: TDF_Attribute) -> TDF_DeltaOnModification: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetDelta(self) -> bool: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -447,6 +471,8 @@ class TDataStd_IntegerList(TDF_Attribute): def __init__(self) -> None: ... def Append(self, value: int) -> None: ... def Clear(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Extent(self) -> int: ... def First(self) -> int: ... @staticmethod @@ -485,6 +511,8 @@ class TDataStd_NamedData(TDF_Attribute): def ChangeReals(self, theReals: TDataStd_DataMapOfStringReal) -> None: ... def ChangeStrings(self, theStrings: TDataStd_DataMapOfStringString) -> None: ... def Clear(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetArrayOfIntegers(self, theName: str) -> TColStd_HArray1OfInteger: ... def GetArrayOfReals(self, theName: str) -> TColStd_HArray1OfReal: ... def GetArraysOfIntegersContainer(self) -> TDataStd_DataMapOfStringHArray1OfInteger: ... @@ -536,6 +564,8 @@ class TDataStd_NamedData(TDF_Attribute): class TDataStd_Real(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Get(self) -> float: ... def GetDimension(self) -> TDataStd_RealEnum: ... @staticmethod @@ -564,6 +594,8 @@ class TDataStd_RealArray(TDF_Attribute): def Array(self) -> TColStd_HArray1OfReal: ... def ChangeArray(self, newArray: TColStd_HArray1OfReal, isCheckItems: Optional[bool] = True) -> None: ... def DeltaOnModification(self, anOldAttribute: TDF_Attribute) -> TDF_DeltaOnModification: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetDelta(self) -> bool: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -593,6 +625,8 @@ class TDataStd_RealList(TDF_Attribute): def __init__(self) -> None: ... def Append(self, value: float) -> None: ... def Clear(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Extent(self) -> int: ... def First(self) -> float: ... @staticmethod @@ -624,6 +658,8 @@ class TDataStd_RealList(TDF_Attribute): class TDataStd_ReferenceArray(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... @@ -654,6 +690,8 @@ class TDataStd_ReferenceList(TDF_Attribute): def __init__(self) -> None: ... def Append(self, value: TDF_Label) -> None: ... def Clear(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Extent(self) -> int: ... def First(self) -> TDF_Label: ... @staticmethod @@ -699,6 +737,8 @@ class TDataStd_TreeNode(TDF_Attribute): def BeforeForget(self) -> None: ... def BeforeUndo(self, anAttDelta: TDF_AttributeDelta, forceIt: Optional[bool] = False) -> bool: ... def Depth(self) -> int: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Father(self) -> TDataStd_TreeNode: ... @staticmethod def Find(L: TDF_Label, T: TDataStd_TreeNode) -> bool: ... @@ -745,6 +785,8 @@ class TDataStd_TreeNode(TDF_Attribute): class TDataStd_UAttribute(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def ID(self) -> Standard_GUID: ... def NewEmpty(self) -> TDF_Attribute: ... def Paste(self, into: TDF_Attribute, RT: TDF_RelocationTable) -> None: ... @@ -759,6 +801,8 @@ class TDataStd_Variable(TDF_Attribute): def Assign(self) -> TDataStd_Expression: ... def Constant(self, status: bool) -> None: ... def Desassign(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Expression(self) -> TDataStd_Expression: ... def Get(self) -> float: ... @staticmethod @@ -791,6 +835,7 @@ class TDataStd_Variable(TDF_Attribute): class TDataStd_Comment(TDataStd_GenericExtString): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... @overload @@ -810,6 +855,7 @@ class TDataStd_Directory(TDataStd_GenericEmpty): def __init__(self) -> None: ... @staticmethod def AddDirectory(dir: TDataStd_Directory) -> TDataStd_Directory: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def Find(current: TDF_Label, D: TDataStd_Directory) -> bool: ... @staticmethod @@ -822,6 +868,7 @@ class TDataStd_Directory(TDataStd_GenericEmpty): class TDataStd_Name(TDataStd_GenericExtString): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... @overload @@ -843,6 +890,7 @@ class TDataStd_NoteBook(TDataStd_GenericEmpty): def Append(self, value: float, isExported: Optional[bool] = False) -> TDataStd_Real: ... @overload def Append(self, value: int, isExported: Optional[bool] = False) -> TDataStd_Integer: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def Find(current: TDF_Label, N: TDataStd_NoteBook) -> bool: ... @staticmethod @@ -853,6 +901,8 @@ class TDataStd_NoteBook(TDataStd_GenericEmpty): class TDataStd_Relation(TDataStd_Expression): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... def GetRelation(self) -> str: ... @@ -863,6 +913,7 @@ class TDataStd_Relation(TDataStd_Expression): class TDataStd_Tick(TDataStd_GenericEmpty): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... diff --git a/src/SWIG_files/wrapper/TDataXtd.i b/src/SWIG_files/wrapper/TDataXtd.i index 426927d10..8f782f92f 100644 --- a/src/SWIG_files/wrapper/TDataXtd.i +++ b/src/SWIG_files/wrapper/TDataXtd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tdataxtd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -277,6 +278,42 @@ Appends to the list of the attributes ids of this package. caution: < ") IDList; static void IDList(TDF_IDList & anIDList); + /****************** Print ******************/ + /**** md5 signature: b887e0f1c5d77aad7c10be1a19a24553 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +GEO: TDataXtd_GeometryEnum + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the name of the geometry dimension as a string on the stream and returns . +") Print; + static Standard_OStream & Print(const TDataXtd_GeometryEnum GEO, std::ostream &OutValue); + + /****************** Print ******************/ + /**** md5 signature: 8cb942ce210f9a734cdf2fc0bed8e8c5 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +CTR: TDataXtd_ConstraintEnum + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the name of the constraint as a string on the stream and returns . +") Print; + static Standard_OStream & Print(const TDataXtd_ConstraintEnum CTR, std::ostream &OutValue); + }; @@ -304,14 +341,23 @@ No available documentation. ") TDataXtd_Axis; TDataXtd_Axis(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -436,14 +482,23 @@ Collects constraints on childs for label . ") CollectChildConstraints; static void CollectChildConstraints(const TDF_Label & aLabel, TDF_LabelList & TheList); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetGeometry ******************/ /**** md5 signature: 11769af2e389c68724cfcb5f085ee941 ****/ %feature("compactdefaultargs") GetGeometry; @@ -1043,14 +1098,23 @@ Returns the cylinder attribute defined by the topological attribute s and the cy ") Cylinder; static Standard_Boolean Cylinder(const opencascade::handle & S, gp_Cylinder & G); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Ellipse ******************/ /**** md5 signature: 8f6f76d68f97a2ead65bf6d14c1f45c2 ****/ %feature("compactdefaultargs") Ellipse; @@ -1480,14 +1544,23 @@ No available documentation. ") TDataXtd_Placement; TDataXtd_Placement(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -1561,14 +1634,23 @@ No available documentation. ") TDataXtd_Plane; TDataXtd_Plane(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -1661,14 +1743,23 @@ No available documentation. ") TDataXtd_Point; TDataXtd_Point(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -2586,14 +2677,23 @@ No available documentation. ") TDataXtd_Shape; TDataXtd_Shape(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Find ******************/ /**** md5 signature: b7eef569fb5abc3a63bf9482c967edfd ****/ %feature("compactdefaultargs") Find; @@ -2772,14 +2872,23 @@ Sets the deflection of this triangulation to thedeflection. see more on deflecti ") Deflection; void Deflection(const Standard_Real theDeflection); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Get ******************/ /**** md5 signature: 1b44a31d5fb6444cba54e6b97ce6cc73 ****/ %feature("compactdefaultargs") Get; @@ -3308,14 +3417,23 @@ No available documentation. ") ComputeTrsfs; void ComputeTrsfs(TDataXtd_Array1OfTrsf & Trsfs); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetPatternID ******************/ /**** md5 signature: 96f86031c210757be1a52536bbd3cdef ****/ %feature("compactdefaultargs") GetPatternID; @@ -3661,6 +3779,14 @@ class TDataXtd_HArray1OfTrsf : public TDataXtd_Array1OfTrsf, public Standard_Tra def tdataxtd_IDList(*args): return tdataxtd.IDList(*args) +@deprecated +def tdataxtd_Print(*args): + return tdataxtd.Print(*args) + +@deprecated +def tdataxtd_Print(*args): + return tdataxtd.Print(*args) + @deprecated def TDataXtd_Axis_GetID(*args): return TDataXtd_Axis.GetID(*args) diff --git a/src/SWIG_files/wrapper/TDataXtd.pyi b/src/SWIG_files/wrapper/TDataXtd.pyi index 6802a45be..5148a9168 100644 --- a/src/SWIG_files/wrapper/TDataXtd.pyi +++ b/src/SWIG_files/wrapper/TDataXtd.pyi @@ -113,9 +113,16 @@ TDataXtd_CYLINDER = TDataXtd_GeometryEnum.TDataXtd_CYLINDER class tdataxtd: @staticmethod def IDList(anIDList: TDF_IDList) -> None: ... + @overload + @staticmethod + def Print(GEO: TDataXtd_GeometryEnum) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Print(CTR: TDataXtd_ConstraintEnum) -> Tuple[Standard_OStream, str]: ... class TDataXtd_Axis(TDataStd_GenericEmpty): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... @@ -131,6 +138,7 @@ class TDataXtd_Constraint(TDF_Attribute): def ClearGeometries(self) -> None: ... @staticmethod def CollectChildConstraints(aLabel: TDF_Label, TheList: TDF_LabelList) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... def GetGeometry(self, Index: int) -> TNaming_NamedShape: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -193,6 +201,7 @@ class TDataXtd_Geometry(TDF_Attribute): @overload @staticmethod def Cylinder(S: TNaming_NamedShape, G: gp_Cylinder) -> bool: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @overload @staticmethod def Ellipse(L: TDF_Label, G: gp_Elips) -> bool: ... @@ -244,6 +253,7 @@ class TDataXtd_Pattern(TDF_Attribute): class TDataXtd_Placement(TDataStd_GenericEmpty): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... @@ -252,6 +262,7 @@ class TDataXtd_Placement(TDataStd_GenericEmpty): class TDataXtd_Plane(TDataStd_GenericEmpty): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... @@ -264,6 +275,7 @@ class TDataXtd_Plane(TDataStd_GenericEmpty): class TDataXtd_Point(TDataStd_GenericEmpty): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... @@ -343,6 +355,7 @@ class TDataXtd_Presentation(TDF_Attribute): class TDataXtd_Shape(TDataStd_GenericEmpty): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def Find(current: TDF_Label, S: TDataXtd_Shape) -> bool: ... @staticmethod @@ -362,6 +375,7 @@ class TDataXtd_Triangulation(TDF_Attribute): def Deflection(self) -> float: ... @overload def Deflection(self, theDeflection: float) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... def Get(self) -> Poly_Triangulation: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -410,6 +424,7 @@ class TDataXtd_PatternStd(TDataXtd_Pattern): @overload def Axis2Reversed(self) -> bool: ... def ComputeTrsfs(self, Trsfs: TDataXtd_Array1OfTrsf) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetPatternID() -> Standard_GUID: ... @overload diff --git a/src/SWIG_files/wrapper/TDocStd.i b/src/SWIG_files/wrapper/TDocStd.i index bed8a988e..7af983cd4 100644 --- a/src/SWIG_files/wrapper/TDocStd.i +++ b/src/SWIG_files/wrapper/TDocStd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tdocstd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -257,10 +258,22 @@ Sets up resources and registers read and storage drivers for the specified forma void DefineFormat(TCollection_AsciiString theFormat, TCollection_AsciiString theDescription, TCollection_AsciiString theExtension, const opencascade::handle & theReader, const opencascade::handle & theWriter); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -479,6 +492,47 @@ Retrieves the document from specified file. in order not to override a version o ") Open; PCDM_ReaderStatus Open(TCollection_ExtendedString thePath, opencascade::handle & theDoc, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Open ******************/ + /**** md5 signature: 0ef7ff81a9f94d40a9c406ad8408cc09 ****/ + %feature("compactdefaultargs") Open; + %feature("autodoc", " +Parameters +---------- +theIStream: str +theDoc: TDocStd_Document +theFilter: PCDM_ReaderFilter +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +PCDM_ReaderStatus + +Description +----------- +Retrieves document from standard stream. @param[in,out] theistream input seekable stream @param[out] thedoc result document @param[in] thefilter optional filter to skip attributes or parts of the retrieved tree @param[in] therange optional progress indicator return reading status. +") Open; + PCDM_ReaderStatus Open(std::istream & theIStream, opencascade::handle & theDoc, const opencascade::handle & theFilter, const Message_ProgressRange & theRange = Message_ProgressRange()); + + /****************** Open ******************/ + /**** md5 signature: 08fc54e2a4001e3e0afb35cd9d37fb13 ****/ + %feature("compactdefaultargs") Open; + %feature("autodoc", " +Parameters +---------- +theIStream: str +theDoc: TDocStd_Document +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +PCDM_ReaderStatus + +Description +----------- +Retrieves document from standard stream. @param[in,out] theistream input seekable stream @param[out] thedoc result document @param[in] therange optional progress indicator return reading status. +") Open; + PCDM_ReaderStatus Open(std::istream & theIStream, opencascade::handle & theDoc, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** ReadingFormats ******************/ /**** md5 signature: 6dff661583c284b08e2b917089276643 ****/ %feature("compactdefaultargs") ReadingFormats; @@ -582,6 +636,25 @@ Save the active document in the file in the path ; o verwrites the ") SaveAs; PCDM_StoreStatus SaveAs(const opencascade::handle & theDoc, TCollection_ExtendedString path, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** SaveAs ******************/ + /**** md5 signature: db53da11f07b421bf2ee6cddab4eae1d ****/ + %feature("compactdefaultargs") SaveAs; + %feature("autodoc", " +Parameters +---------- +theDoc: TDocStd_Document +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theOStream: Standard_OStream + +Description +----------- +Save thedoc to standard seekable stream theostream. the stream should support seek functionality. +") SaveAs; + PCDM_StoreStatus SaveAs(const opencascade::handle & theDoc, std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** SaveAs ******************/ /**** md5 signature: fc9f357e438e352135774e1dd7c1bb0f ****/ %feature("compactdefaultargs") SaveAs; @@ -603,6 +676,26 @@ Save the active document in the file in the path . overwrite the f ") SaveAs; PCDM_StoreStatus SaveAs(const opencascade::handle & theDoc, TCollection_ExtendedString path, TCollection_ExtendedString & theStatusMessage, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** SaveAs ******************/ + /**** md5 signature: 6e4c5f32518d14bdcee71e9747c533a8 ****/ + %feature("compactdefaultargs") SaveAs; + %feature("autodoc", " +Parameters +---------- +theDoc: TDocStd_Document +theStatusMessage: str +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theOStream: Standard_OStream + +Description +----------- +Save thedoc to standard seekable stream theostream. the stream should support seek functionality. +") SaveAs; + PCDM_StoreStatus SaveAs(const opencascade::handle & theDoc, std::ostream &OutValue, TCollection_ExtendedString & theStatusMessage, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** WritingFormats ******************/ /**** md5 signature: a5407beb640b0ebe68c0c3306feeeddb ****/ %feature("compactdefaultargs") WritingFormats; @@ -650,14 +743,23 @@ No available documentation. ") TDocStd_ApplicationDelta; TDocStd_ApplicationDelta(); + /****************** Dump ******************/ + /**** md5 signature: 43df1fb908adbf242957532375689066 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetDocuments ******************/ /**** md5 signature: 3949b6234d6a0eb9778487caa2291ad4 ****/ %feature("compactdefaultargs") GetDocuments; @@ -938,10 +1040,22 @@ Returns current storage format version of the document. static TDocStd_FormatVersion CurrentStorageFormatVersion(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1645,14 +1759,23 @@ No available documentation. ") Contains; static Standard_Boolean Contains(const TDF_Label & alabel); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Get ******************/ /**** md5 signature: bd123f000340e7375ce09c289c0daf49 ****/ %feature("compactdefaultargs") Get; @@ -1957,14 +2080,23 @@ Returns the added documents to the transaction manager. ") Documents; const TDocStd_SequenceOfDocument & Documents(); + /****************** DumpTransaction ******************/ + /**** md5 signature: 4eb314c9880f16b84a5b19db7c403e6c ****/ + %feature("compactdefaultargs") DumpTransaction; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theOS: Standard_OStream + +Description +----------- +Dumps transactions in undos and redos. +") DumpTransaction; + void DumpTransaction(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpTransactionToString() { - std::stringstream s; - self->DumpTransaction(s); - return s.str();} - }; /****************** GetAvailableRedos ******************/ /**** md5 signature: 500cc68e983f9a7d304824d6e36eaecc ****/ %feature("compactdefaultargs") GetAvailableRedos; @@ -2196,19 +2328,40 @@ No available documentation. ") TDocStd_Owner; TDocStd_Owner(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2641,14 +2794,23 @@ Returns the contents of the document identified by adocentry. adocentry provides ") DocumentEntry; const TCollection_AsciiString & DocumentEntry(); + /****************** Dump ******************/ + /**** md5 signature: f10ae7331e480cfb94f59763803fa51d ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps the attribute on . +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -2937,14 +3099,23 @@ Returns a null handle. ") BackupCopy; opencascade::handle BackupCopy(); + /****************** Dump ******************/ + /**** md5 signature: f10ae7331e480cfb94f59763803fa51d ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +Dumps the attribute on . +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; diff --git a/src/SWIG_files/wrapper/TDocStd.pyi b/src/SWIG_files/wrapper/TDocStd.pyi index 522604d15..55675159e 100644 --- a/src/SWIG_files/wrapper/TDocStd.pyi +++ b/src/SWIG_files/wrapper/TDocStd.pyi @@ -80,6 +80,7 @@ class TDocStd_Application(CDF_Application): def __init__(self) -> None: ... def Close(self, aDoc: TDocStd_Document) -> None: ... def DefineFormat(self, theFormat: str, theDescription: str, theExtension: str, theReader: PCDM_RetrievalDriver, theWriter: PCDM_StorageDriver) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetDocument(self, index: int, aDoc: TDocStd_Document) -> None: ... def InitDocument(self, aDoc: CDM_Document) -> None: ... def IsDriverLoaded(self) -> bool: ... @@ -96,6 +97,10 @@ class TDocStd_Application(CDF_Application): def Open(self, thePath: str, theDoc: TDocStd_Document, theFilter: PCDM_ReaderFilter, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> PCDM_ReaderStatus: ... @overload def Open(self, thePath: str, theDoc: TDocStd_Document, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> PCDM_ReaderStatus: ... + @overload + def Open(self, theIStream: str, theDoc: TDocStd_Document, theFilter: PCDM_ReaderFilter, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> PCDM_ReaderStatus: ... + @overload + def Open(self, theIStream: str, theDoc: TDocStd_Document, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> PCDM_ReaderStatus: ... def ReadingFormats(self, theFormats: TColStd_SequenceOfAsciiString) -> None: ... def Resources(self) -> Resource_Manager: ... def ResourcesName(self) -> str: ... @@ -106,11 +111,16 @@ class TDocStd_Application(CDF_Application): @overload def SaveAs(self, theDoc: TDocStd_Document, path: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> PCDM_StoreStatus: ... @overload + def SaveAs(self, theDoc: TDocStd_Document, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> Tuple[PCDM_StoreStatus, str]: ... + @overload def SaveAs(self, theDoc: TDocStd_Document, path: str, theStatusMessage: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> PCDM_StoreStatus: ... + @overload + def SaveAs(self, theDoc: TDocStd_Document, theStatusMessage: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> Tuple[PCDM_StoreStatus, str]: ... def WritingFormats(self, theFormats: TColStd_SequenceOfAsciiString) -> None: ... class TDocStd_ApplicationDelta(Standard_Transient): def __init__(self) -> None: ... + def Dump(self) -> str: ... def GetDocuments(self) -> TDocStd_SequenceOfDocument: ... def GetName(self) -> str: ... def SetName(self, theName: str) -> None: ... @@ -134,6 +144,7 @@ class TDocStd_Document(CDM_Document): def CommitCommand(self) -> bool: ... @staticmethod def CurrentStorageFormatVersion() -> TDocStd_FormatVersion: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EmptyLabelsSavingMode(self) -> bool: ... @staticmethod def Get(L: TDF_Label) -> TDocStd_Document: ... @@ -189,6 +200,7 @@ class TDocStd_Modified(TDF_Attribute): def Clear(self) -> None: ... @staticmethod def Contains(alabel: TDF_Label) -> bool: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @overload @staticmethod def Get(access: TDF_Label) -> TDF_LabelMap: ... @@ -220,6 +232,7 @@ class TDocStd_MultiTransactionManager(Standard_Transient): @overload def CommitCommand(self, theName: str) -> bool: ... def Documents(self) -> TDocStd_SequenceOfDocument: ... + def DumpTransaction(self) -> str: ... def GetAvailableRedos(self) -> TDocStd_SequenceOfApplicationDelta: ... def GetAvailableUndos(self) -> TDocStd_SequenceOfApplicationDelta: ... def GetUndoLimit(self) -> int: ... @@ -237,6 +250,8 @@ class TDocStd_MultiTransactionManager(Standard_Transient): class TDocStd_Owner(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload @staticmethod def GetDocument(ofdata: TDF_Data) -> TDocStd_Document: ... @@ -279,6 +294,7 @@ class TDocStd_XLink(TDF_Attribute): def DocumentEntry(self, aDocEntry: str) -> None: ... @overload def DocumentEntry(self) -> str: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... @@ -307,6 +323,7 @@ class TDocStd_XLinkIterator: class TDocStd_XLinkRoot(TDF_Attribute): def BackupCopy(self) -> TDF_Attribute: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... diff --git a/src/SWIG_files/wrapper/TFunction.i b/src/SWIG_files/wrapper/TFunction.i index 965d76929..fa4924bd8 100644 --- a/src/SWIG_files/wrapper/TFunction.i +++ b/src/SWIG_files/wrapper/TFunction.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tfunction.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -337,14 +338,23 @@ Removes all drivers. returns true if the driver has been removed successfully. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: cfe815398c9c4191063c65e53f786693 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** FindDriver ******************/ /**** md5 signature: 40071a232ea53c66f7cc98d78279429a ****/ %feature("compactdefaultargs") FindDriver; @@ -445,19 +455,40 @@ No available documentation. ") TFunction_Function; TFunction_Function(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -769,14 +800,23 @@ Defines a reference to the function as a previous one. ") AddPrevious; Standard_Boolean AddPrevious(const TDF_Label & func); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -1408,14 +1448,23 @@ Returns the current list of functions. if the iterator uses the execution status ") Current; virtual const TDF_LabelList & Current(); + /****************** Dump ******************/ + /**** md5 signature: ee51cac270c7787d1809a1cb8cf01d91 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetMaxNbThreads ******************/ /**** md5 signature: f69c96860a70a701f350c27debbc0ecf ****/ %feature("compactdefaultargs") GetMaxNbThreads; @@ -1599,14 +1648,23 @@ Sets status of execution. ") Done; void Done(const Standard_Boolean status); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +Prints th data of the attributes (touched, impacted and valid labels). +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -1937,14 +1995,23 @@ Returns the scope of functions for modification. warning: don't use this method ") ChangeFunctions; TFunction_DoubleMapOfIntegerLabel & ChangeFunctions(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetFreeID ******************/ /**** md5 signature: 34e64d8664d6cf8b1d7cb4b452f9928a ****/ %feature("compactdefaultargs") GetFreeID; diff --git a/src/SWIG_files/wrapper/TFunction.pyi b/src/SWIG_files/wrapper/TFunction.pyi index 7ecc9ef9c..315c024d1 100644 --- a/src/SWIG_files/wrapper/TFunction.pyi +++ b/src/SWIG_files/wrapper/TFunction.pyi @@ -61,6 +61,7 @@ class TFunction_DriverTable(Standard_Transient): def __init__(self) -> None: ... def AddDriver(self, guid: Standard_GUID, driver: TFunction_Driver, thread: Optional[int] = 0) -> bool: ... def Clear(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... def FindDriver(self, guid: Standard_GUID, driver: TFunction_Driver, thread: Optional[int] = 0) -> bool: ... @staticmethod def Get() -> TFunction_DriverTable: ... @@ -69,6 +70,8 @@ class TFunction_DriverTable(Standard_Transient): class TFunction_Function(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Failed(self) -> bool: ... def GetDriverGUID(self) -> Standard_GUID: ... def GetFailure(self) -> int: ... @@ -98,6 +101,7 @@ class TFunction_GraphNode(TDF_Attribute): def AddPrevious(self, funcID: int) -> bool: ... @overload def AddPrevious(self, func: TDF_Label) -> bool: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... def GetNext(self) -> TColStd_MapOfInteger: ... @@ -155,6 +159,7 @@ class TFunction_Iterator: @overload def __init__(self, Access: TDF_Label) -> None: ... def Current(self) -> TDF_LabelList: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... def GetMaxNbThreads(self) -> int: ... def GetStatus(self, func: TDF_Label) -> TFunction_ExecutionStatus: ... def GetUsageOfExecutionStatus(self) -> bool: ... @@ -168,6 +173,7 @@ class TFunction_Logbook(TDF_Attribute): def __init__(self) -> None: ... def Clear(self) -> None: ... def Done(self, status: bool) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def GetID() -> Standard_GUID: ... def GetImpacted(self) -> TDF_LabelMap: ... @@ -196,6 +202,7 @@ class TFunction_Scope(TDF_Attribute): def __init__(self) -> None: ... def AddFunction(self, L: TDF_Label) -> bool: ... def ChangeFunctions(self) -> TFunction_DoubleMapOfIntegerLabel: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... def GetFreeID(self) -> int: ... @overload def GetFunction(self, L: TDF_Label) -> int: ... diff --git a/src/SWIG_files/wrapper/TNaming.i b/src/SWIG_files/wrapper/TNaming.i index bc0fcadbf..dfe6c2c22 100644 --- a/src/SWIG_files/wrapper/TNaming.i +++ b/src/SWIG_files/wrapper/TNaming.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tnaming.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -369,6 +370,60 @@ Returns true if outer wire is found and the found wire in . ") OuterWire; static Standard_Boolean OuterWire(const TopoDS_Face & theFace, TopoDS_Wire & theWire); + /****************** Print ******************/ + /**** md5 signature: 2b639b8df3fe00401374dd95e415224e ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +EVOL: TNaming_Evolution + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the evolution as a string on the stream and returns . +") Print; + static Standard_OStream & Print(const TNaming_Evolution EVOL, std::ostream &OutValue); + + /****************** Print ******************/ + /**** md5 signature: 0086f15e63801a19d591d96a9d20bb2a ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +NAME: TNaming_NameType + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the name of name type as a string on the stream and returns . +") Print; + static Standard_OStream & Print(const TNaming_NameType NAME, std::ostream &OutValue); + + /****************** Print ******************/ + /**** md5 signature: acadfcdd30dbbb74b400e87246c92ac0 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +ACCESS: TDF_Label + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the content of usedshapes private attribute as a string table on the stream and returns . +") Print; + static Standard_OStream & Print(const TDF_Label & ACCESS, std::ostream &OutValue); + /****************** Replicate ******************/ /**** md5 signature: b05536a641bcb5721eea10c9d85c5058 ****/ %feature("compactdefaultargs") Replicate; @@ -1646,10 +1701,22 @@ No available documentation. const TDF_Label & ContextLabel(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2031,19 +2098,40 @@ Makes a deltaonremoval on because has disappeared from the ds. ") DeltaOnRemoval; virtual opencascade::handle DeltaOnRemoval(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dumps the attribute on . +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2254,23 +2342,63 @@ No available documentation. ") ChangeName; TNaming_Name & ChangeName(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} }; + /****************** ExtendedDump ******************/ + /**** md5 signature: cdafdec412b1ac94fc1e049a6ac0bb97 ****/ + %feature("compactdefaultargs") ExtendedDump; + %feature("autodoc", " +Parameters +---------- +aFilter: TDF_IDFilter +aMap: TDF_AttributeIndexedMap + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") ExtendedDump; + virtual void ExtendedDump(std::ostream &OutValue, const TDF_IDFilter & aFilter, TDF_AttributeIndexedMap & aMap); + /****************** GetID ******************/ /**** md5 signature: afe6002d90f641ca3ea8c9ae9f8fe97c ****/ %feature("compactdefaultargs") GetID; @@ -2926,10 +3054,22 @@ No available documentation. TNaming_RefShape(const TopoDS_Shape & S); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4456,19 +4596,40 @@ No available documentation. ") Destroy; void Destroy(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Description +----------- +Dumps the attribute on . +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4631,6 +4792,18 @@ def tnaming_OuterShell(*args): def tnaming_OuterWire(*args): return tnaming.OuterWire(*args) +@deprecated +def tnaming_Print(*args): + return tnaming.Print(*args) + +@deprecated +def tnaming_Print(*args): + return tnaming.Print(*args) + +@deprecated +def tnaming_Print(*args): + return tnaming.Print(*args) + @deprecated def tnaming_Replicate(*args): return tnaming.Replicate(*args) diff --git a/src/SWIG_files/wrapper/TNaming.pyi b/src/SWIG_files/wrapper/TNaming.pyi index ac8d526a0..e8406815b 100644 --- a/src/SWIG_files/wrapper/TNaming.pyi +++ b/src/SWIG_files/wrapper/TNaming.pyi @@ -130,6 +130,15 @@ class tnaming: def OuterWire(theFace: TopoDS_Face, theWire: TopoDS_Wire) -> bool: ... @overload @staticmethod + def Print(EVOL: TNaming_Evolution) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Print(NAME: TNaming_NameType) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Print(ACCESS: TDF_Label) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod def Replicate(NS: TNaming_NamedShape, T: gp_Trsf, L: TDF_Label) -> None: ... @overload @staticmethod @@ -242,6 +251,7 @@ class TNaming_Name: def ContextLabel(self, theLab: TDF_Label) -> None: ... @overload def ContextLabel(self) -> TDF_Label: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Index(self, I: int) -> None: ... @overload @@ -281,6 +291,8 @@ class TNaming_NamedShape(TDF_Attribute): @overload def DeltaOnModification(self, aDelta: TDF_DeltaOnModification) -> None: ... def DeltaOnRemoval(self) -> TDF_DeltaOnRemoval: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Evolution(self) -> TNaming_Evolution: ... def Get(self) -> TopoDS_Shape: ... @staticmethod @@ -297,6 +309,9 @@ class TNaming_NamedShape(TDF_Attribute): class TNaming_Naming(TDF_Attribute): def __init__(self) -> None: ... def ChangeName(self) -> TNaming_Name: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... + def ExtendedDump(self, aFilter: TDF_IDFilter, aMap: TDF_AttributeIndexedMap) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... def GetName(self) -> TNaming_Name: ... @@ -358,6 +373,7 @@ class TNaming_RefShape: def __init__(self) -> None: ... @overload def __init__(self, S: TopoDS_Shape) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def FirstUse(self, aPtr: TNaming_PtrNode) -> None: ... @overload @@ -496,6 +512,8 @@ class TNaming_UsedShapes(TDF_Attribute): def DeltaOnAddition(self) -> TDF_DeltaOnAddition: ... def DeltaOnRemoval(self) -> TDF_DeltaOnRemoval: ... def Destroy(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... def ID(self) -> Standard_GUID: ... diff --git a/src/SWIG_files/wrapper/TObj.i b/src/SWIG_files/wrapper/TObj.i index ccd4c96e0..a5d31d3d3 100644 --- a/src/SWIG_files/wrapper/TObj.i +++ b/src/SWIG_files/wrapper/TObj.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tobj.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -173,10 +174,22 @@ Create the ocaf document from scratch. virtual Standard_Boolean CreateNewDocument(opencascade::handle & theDoc, TCollection_ExtendedString theFormat); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -263,6 +276,25 @@ Loading the ocaf document from a file. ") LoadDocument; virtual Standard_Boolean LoadDocument(TCollection_ExtendedString theSourceFile, opencascade::handle & theTargetDoc); + /****************** LoadDocument ******************/ + /**** md5 signature: 6198a02fdef7071ddc8d32deda295e03 ****/ + %feature("compactdefaultargs") LoadDocument; + %feature("autodoc", " +Parameters +---------- +theIStream: str +theTargetDoc: TDocStd_Document + +Return +------- +bool + +Description +----------- +Loading the ocaf document from a stream. +") LoadDocument; + virtual Standard_Boolean LoadDocument(std::istream & theIStream, opencascade::handle & theTargetDoc); + /****************** Messenger ******************/ /**** md5 signature: fe56be9196543a6602ef636ef1016498 ****/ %feature("compactdefaultargs") Messenger; @@ -308,6 +340,24 @@ Saving the ocaf document to a file. ") SaveDocument; virtual Standard_Boolean SaveDocument(const opencascade::handle & theSourceDoc, TCollection_ExtendedString theTargetFile); + /****************** SaveDocument ******************/ + /**** md5 signature: 732e0f95697794910e7302feb84b3e76 ****/ + %feature("compactdefaultargs") SaveDocument; + %feature("autodoc", " +Parameters +---------- +theSourceDoc: TDocStd_Document + +Return +------- +theOStream: Standard_OStream + +Description +----------- +Saving the ocaf document to a stream. +") SaveDocument; + virtual Standard_Boolean SaveDocument(const opencascade::handle & theSourceDoc, std::ostream &OutValue); + /****************** SetVerbose ******************/ /**** md5 signature: ec07929ffcbc58b57cfe36e4754b10e9 ****/ %feature("compactdefaultargs") SetVerbose; @@ -980,13 +1030,24 @@ Load the ocaf model from a file. if the filename is empty or file does not exist ") Load; virtual Standard_Boolean Load(TCollection_ExtendedString theFile); + /****************** Load ******************/ + /**** md5 signature: 2ffa69b46ac088fac64bbec0e462308b ****/ + %feature("compactdefaultargs") Load; + %feature("autodoc", " +Parameters +---------- +theIStream: str + +Return +------- +bool + +Description +----------- +Load the ocaf model from a stream. if case of failure, it initializes the model by empty data. +") Load; + virtual Standard_Boolean Load(std::istream & theIStream); - %feature("autodoc", "1"); - %extend{ - void LoadFromString(std::string src) { - std::stringstream s(src); - self->Load(s);} - }; /****************** Messenger ******************/ /**** md5 signature: 77a43db9d3d7b7c3ed75b149057d7c93 ****/ %feature("compactdefaultargs") Messenger; @@ -1096,14 +1157,23 @@ Save the model to a file. ") SaveAs; virtual Standard_Boolean SaveAs(TCollection_ExtendedString theFile); + /****************** SaveAs ******************/ + /**** md5 signature: f456613ed7926d7d36f3530cb69cdf3e ****/ + %feature("compactdefaultargs") SaveAs; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theOStream: Standard_OStream + +Description +----------- +Save the model to a stream. +") SaveAs; + virtual Standard_Boolean SaveAs(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string SaveAsToString() { - std::stringstream s; - self->SaveAs(s); - return s.str();} - }; /****************** SetLabel ******************/ /**** md5 signature: cc470d5ce9738c8709b266c2b6c1b90a ****/ %feature("compactdefaultargs") SetLabel; @@ -2161,14 +2231,23 @@ Creates and returns a new object of the registered type if the type is not regis ") CreateNewObject; static opencascade::handle CreateNewObject(Standard_CString theType, const TDF_Label & theLabel); + /****************** DumpTypes ******************/ + /**** md5 signature: 6b281615817b960184bb20e020b9d659 ****/ + %feature("compactdefaultargs") DumpTypes; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theOs: Standard_OStream + +Description +----------- +Dumps names of all the types registered for persistence to the specified stream. +") DumpTypes; + static void DumpTypes(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpTypesToString() { - std::stringstream s; - self->DumpTypes(s); - return s.str();} - }; }; @@ -3355,14 +3434,23 @@ Empty constructor. ") TObj_TXYZ; TObj_TXYZ(); + /****************** Dump ******************/ + /**** md5 signature: a70630ee0dbc4de065e099a9519a2a06 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theOS: Standard_OStream + +Description +----------- +This method dumps the attribute value into the stream. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Get ******************/ /**** md5 signature: d4d7c3399f4d5d1d9662bdcf64101489 ****/ %feature("compactdefaultargs") Get; @@ -4115,6 +4203,10 @@ def TObj_Object_GetObj(*args): def TObj_Persistence_CreateNewObject(*args): return TObj_Persistence.CreateNewObject(*args) +@deprecated +def TObj_Persistence_DumpTypes(*args): + return TObj_Persistence.DumpTypes(*args) + @deprecated def TObj_TIntSparseArray_GetID(*args): return TObj_TIntSparseArray.GetID(*args) diff --git a/src/SWIG_files/wrapper/TObj.pyi b/src/SWIG_files/wrapper/TObj.pyi index b9945c728..64dd475e8 100644 --- a/src/SWIG_files/wrapper/TObj.pyi +++ b/src/SWIG_files/wrapper/TObj.pyi @@ -55,6 +55,7 @@ TObj_Forced = TObj_DeletingMode.TObj_Forced class TObj_Application(TDocStd_Application): def CreateNewDocument(self, theDoc: TDocStd_Document, theFormat: str) -> bool: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def ErrorMessage(self, theMsg: str, theLevel: Message_Gravity) -> None: ... @overload @@ -64,10 +65,14 @@ class TObj_Application(TDocStd_Application): def IsVerbose(self) -> bool: ... @overload def LoadDocument(self, theSourceFile: str, theTargetDoc: TDocStd_Document) -> bool: ... + @overload + def LoadDocument(self, theIStream: str, theTargetDoc: TDocStd_Document) -> bool: ... def Messenger(self) -> Message_Messenger: ... def ResourcesName(self) -> str: ... @overload def SaveDocument(self, theSourceDoc: TDocStd_Document, theTargetFile: str) -> bool: ... + @overload + def SaveDocument(self, theSourceDoc: TDocStd_Document) -> Tuple[bool, str]: ... def SetVerbose(self, isVerbose: bool) -> None: ... class TObj_Assistant: @@ -129,6 +134,8 @@ class TObj_Model(Standard_Transient): def IsRegisteredName(self, theName: TCollection_HExtendedString, theDictionary: TObj_TNameContainer) -> bool: ... @overload def Load(self, theFile: str) -> bool: ... + @overload + def Load(self, theIStream: str) -> bool: ... def Messenger(self) -> Message_Messenger: ... def NewEmpty(self) -> TObj_Model: ... def OpenCommand(self) -> None: ... @@ -137,6 +144,8 @@ class TObj_Model(Standard_Transient): def Save(self) -> bool: ... @overload def SaveAs(self, theFile: str) -> bool: ... + @overload + def SaveAs(self) -> Tuple[bool, str]: ... def SetLabel(self, theLabel: TDF_Label) -> None: ... def SetMessenger(self, theMsgr: Message_Messenger) -> None: ... def SetModified(self, theModified: bool) -> None: ... @@ -212,6 +221,8 @@ class TObj_ObjectIterator(Standard_Transient): class TObj_Persistence: @staticmethod def CreateNewObject(theType: str, theLabel: TDF_Label) -> TObj_Object: ... + @staticmethod + def DumpTypes() -> str: ... class TObj_TIntSparseArray(TDF_Attribute): def __init__(self) -> None: ... @@ -310,6 +321,7 @@ class TObj_TReference(TDF_Attribute): class TObj_TXYZ(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... def Get(self) -> gp_XYZ: ... @staticmethod def GetID() -> Standard_GUID: ... diff --git a/src/SWIG_files/wrapper/TPrsStd.i b/src/SWIG_files/wrapper/TPrsStd.i index bbaa799b3..3044b1069 100644 --- a/src/SWIG_files/wrapper/TPrsStd.i +++ b/src/SWIG_files/wrapper/TPrsStd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tprsstd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -303,10 +304,22 @@ Display presentation of object in ais viewer. if = true then aisobject void Display(const Standard_Boolean update = Standard_False); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -926,10 +939,22 @@ No available documentation. TPrsStd_AISViewer(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/TPrsStd.pyi b/src/SWIG_files/wrapper/TPrsStd.pyi index bac3ab577..9de8617f9 100644 --- a/src/SWIG_files/wrapper/TPrsStd.pyi +++ b/src/SWIG_files/wrapper/TPrsStd.pyi @@ -24,6 +24,7 @@ class TPrsStd_AISPresentation(TDF_Attribute): def BeforeUndo(self, anAttDelta: TDF_AttributeDelta, forceIt: Optional[bool] = False) -> bool: ... def Color(self) -> Quantity_NameOfColor: ... def Display(self, update: Optional[bool] = False) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Erase(self, remove: Optional[bool] = False) -> None: ... def GetAIS(self) -> AIS_InteractiveObject: ... def GetDriverGUID(self) -> Standard_GUID: ... @@ -72,6 +73,7 @@ class TPrsStd_AISPresentation(TDF_Attribute): class TPrsStd_AISViewer(TDF_Attribute): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload @staticmethod def Find(acces: TDF_Label, A: TPrsStd_AISViewer) -> bool: ... diff --git a/src/SWIG_files/wrapper/TShort.i b/src/SWIG_files/wrapper/TShort.i index 44a9c9b1b..77086eead 100644 --- a/src/SWIG_files/wrapper/TShort.i +++ b/src/SWIG_files/wrapper/TShort.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_tshort.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TopAbs.i b/src/SWIG_files/wrapper/TopAbs.i index 07a3e36db..31d3778b0 100644 --- a/src/SWIG_files/wrapper/TopAbs.i +++ b/src/SWIG_files/wrapper/TopAbs.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topabs.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -181,6 +182,60 @@ Compose the orientation and . this composition is not symmetric (if y ") Compose; static TopAbs_Orientation Compose(const TopAbs_Orientation Or1, const TopAbs_Orientation Or2); + /****************** Print ******************/ + /**** md5 signature: f2bc915db789eecaddaf7f8a542302b9 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +theShapeType: TopAbs_ShapeEnum + +Return +------- +theStream: Standard_OStream + +Description +----------- +Prints the name of shape type as a string on the stream. +") Print; + static Standard_OStream & Print(const TopAbs_ShapeEnum theShapeType, std::ostream &OutValue); + + /****************** Print ******************/ + /**** md5 signature: 6ad8c3d2eaff28edc070aae5129544a1 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +theOrientation: TopAbs_Orientation + +Return +------- +theStream: Standard_OStream + +Description +----------- +Prints the name of the orientation as a string on the stream. +") Print; + static Standard_OStream & Print(const TopAbs_Orientation theOrientation, std::ostream &OutValue); + + /****************** Print ******************/ + /**** md5 signature: 9a9b3768d9e4f7b3106175734ca85d5b ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +St: TopAbs_State + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the name of the state as a string on the stream and returns . +") Print; + static Standard_OStream & Print(const TopAbs_State St, std::ostream &OutValue); + /****************** Reverse ******************/ /**** md5 signature: 24070ddabf8011f0d7eb29a4dc573a82 ****/ %feature("compactdefaultargs") Reverse; @@ -332,6 +387,18 @@ def topabs_Complement(*args): def topabs_Compose(*args): return topabs.Compose(*args) +@deprecated +def topabs_Print(*args): + return topabs.Print(*args) + +@deprecated +def topabs_Print(*args): + return topabs.Print(*args) + +@deprecated +def topabs_Print(*args): + return topabs.Print(*args) + @deprecated def topabs_Reverse(*args): return topabs.Reverse(*args) diff --git a/src/SWIG_files/wrapper/TopAbs.pyi b/src/SWIG_files/wrapper/TopAbs.pyi index f7262d13c..b7dea6cfd 100644 --- a/src/SWIG_files/wrapper/TopAbs.pyi +++ b/src/SWIG_files/wrapper/TopAbs.pyi @@ -53,6 +53,15 @@ class topabs: def Complement(Or: TopAbs_Orientation) -> TopAbs_Orientation: ... @staticmethod def Compose(Or1: TopAbs_Orientation, Or2: TopAbs_Orientation) -> TopAbs_Orientation: ... + @overload + @staticmethod + def Print(theShapeType: TopAbs_ShapeEnum) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Print(theOrientation: TopAbs_Orientation) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Print(St: TopAbs_State) -> Tuple[Standard_OStream, str]: ... @staticmethod def Reverse(Or: TopAbs_Orientation) -> TopAbs_Orientation: ... @overload diff --git a/src/SWIG_files/wrapper/TopBas.i b/src/SWIG_files/wrapper/TopBas.i index 064f77036..073cb30e2 100644 --- a/src/SWIG_files/wrapper/TopBas.i +++ b/src/SWIG_files/wrapper/TopBas.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topbas.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TopClass.i b/src/SWIG_files/wrapper/TopClass.i index 2dc81b458..eb0f0cc7b 100644 --- a/src/SWIG_files/wrapper/TopClass.i +++ b/src/SWIG_files/wrapper/TopClass.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topclass.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TopCnx.i b/src/SWIG_files/wrapper/TopCnx.i index 861280c78..981fac10a 100644 --- a/src/SWIG_files/wrapper/TopCnx.i +++ b/src/SWIG_files/wrapper/TopCnx.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topcnx.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TopExp.i b/src/SWIG_files/wrapper/TopExp.i index 2d25098de..6caeadd74 100644 --- a/src/SWIG_files/wrapper/TopExp.i +++ b/src/SWIG_files/wrapper/TopExp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topexp.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TopLoc.i b/src/SWIG_files/wrapper/TopLoc.i index 57008b819..930c362cb 100644 --- a/src/SWIG_files/wrapper/TopLoc.i +++ b/src/SWIG_files/wrapper/TopLoc.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_toploc.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -120,10 +121,22 @@ Constructs a datum3d form a trsf from gp. an error is raised if the trsf is not TopLoc_Datum3D(const gp_Trsf & T); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -141,14 +154,23 @@ Return transformation form. ") Form; gp_TrsfForm Form(); + /****************** ShallowDump ******************/ + /**** md5 signature: becb37fcb2ae0b90bde25605537706e5 ****/ + %feature("compactdefaultargs") ShallowDump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +Writes the contents of this datum3d to the stream s. +") ShallowDump; + void ShallowDump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string ShallowDumpToString() { - std::stringstream s; - self->ShallowDump(s); - return s.str();} - }; /****************** Transformation ******************/ /**** md5 signature: 4340f0c35d6856faf6f9daeca03f9595 ****/ %feature("compactdefaultargs") Transformation; @@ -211,10 +233,22 @@ Sets the elementary datum to sets the exponent to

. TopLoc_ItemLocation(const opencascade::handle & D, const Standard_Integer P); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -314,10 +348,22 @@ Returns / . TopLoc_Location Divided(const TopLoc_Location & Other); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -527,14 +573,23 @@ No available documentation. ") ScalePrec; static Standard_Real ScalePrec(); + /****************** ShallowDump ******************/ + /**** md5 signature: becb37fcb2ae0b90bde25605537706e5 ****/ + %feature("compactdefaultargs") ShallowDump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the contents of on the stream . +") ShallowDump; + void ShallowDump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string ShallowDumpToString() { - std::stringstream s; - self->ShallowDump(s); - return s.str();} - }; /****************** Transformation ******************/ /**** md5 signature: 567e6ee373139970f4679dbb49e28e7c ****/ %feature("compactdefaultargs") Transformation; diff --git a/src/SWIG_files/wrapper/TopLoc.pyi b/src/SWIG_files/wrapper/TopLoc.pyi index 61dc651b2..94573ddb6 100644 --- a/src/SWIG_files/wrapper/TopLoc.pyi +++ b/src/SWIG_files/wrapper/TopLoc.pyi @@ -19,12 +19,15 @@ class TopLoc_Datum3D(Standard_Transient): def __init__(self) -> None: ... @overload def __init__(self, T: gp_Trsf) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Form(self) -> gp_TrsfForm: ... + def ShallowDump(self) -> str: ... def Transformation(self) -> gp_Trsf: ... def Trsf(self) -> gp_Trsf: ... class TopLoc_ItemLocation: def __init__(self, D: TopLoc_Datum3D, P: int) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... class TopLoc_Location: @overload @@ -35,6 +38,7 @@ class TopLoc_Location: def __init__(self, D: TopLoc_Datum3D) -> None: ... def Clear(self) -> None: ... def Divided(self, Other: TopLoc_Location) -> TopLoc_Location: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FirstDatum(self) -> TopLoc_Datum3D: ... def FirstPower(self) -> int: ... def HashCode(self, theUpperBound: int) -> int: ... @@ -49,6 +53,7 @@ class TopLoc_Location: def Predivided(self, Other: TopLoc_Location) -> TopLoc_Location: ... @staticmethod def ScalePrec() -> float: ... + def ShallowDump(self) -> str: ... def Transformation(self) -> gp_Trsf: ... class TopLoc_SListNodeOfItemLocation(Standard_Transient): diff --git a/src/SWIG_files/wrapper/TopOpeBRep.i b/src/SWIG_files/wrapper/TopOpeBRep.i index 48d9a0464..89699de87 100644 --- a/src/SWIG_files/wrapper/TopOpeBRep.i +++ b/src/SWIG_files/wrapper/TopOpeBRep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topopebrep.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -284,6 +285,24 @@ typedef NCollection_Sequence TopOpeBRep_SequenceOfPoint2d; %rename(topopebrep) TopOpeBRep; class TopOpeBRep { public: + /****************** Print ******************/ + /**** md5 signature: 298bc80cbe2b2fc0f4814ac9efa8edb6 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +TLC: TopOpeBRep_TypeLineCurve + +Return +------- +OS: Standard_OStream + +Description +----------- +Prints the name of as a string on the stream and returns . +") Print; + static Standard_OStream & Print(const TopOpeBRep_TypeLineCurve TLC, std::ostream &OutValue); + }; @@ -3688,14 +3707,23 @@ No available documentation. ") DumpBipoint; void DumpBipoint(const TopOpeBRep_Bipoint & B, TCollection_AsciiString s1, TCollection_AsciiString s2); + /****************** DumpLineTransitions ******************/ + /**** md5 signature: edfe93f308df46bfc812b4b00425d99c ****/ + %feature("compactdefaultargs") DumpLineTransitions; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") DumpLineTransitions; + Standard_OStream & DumpLineTransitions(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpLineTransitionsToString() { - std::stringstream s; - self->DumpLineTransitions(s); - return s.str();} - }; /****************** DumpType ******************/ /**** md5 signature: b34c01a6723403b4978ae19d96842616 ****/ %feature("compactdefaultargs") DumpType; @@ -5523,14 +5551,23 @@ No available documentation. ") Current; const TopoDS_Shape Current(); + /****************** DumpCurrent ******************/ + /**** md5 signature: 2cfbfd895f7349c098bf212a528228ac ****/ + %feature("compactdefaultargs") DumpCurrent; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") DumpCurrent; + Standard_OStream & DumpCurrent(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpCurrentToString() { - std::stringstream s; - self->DumpCurrent(s); - return s.str();} - }; /****************** Index ******************/ /**** md5 signature: 407d80ef3037d55996765198adea3908 ****/ %feature("compactdefaultargs") Index; @@ -5677,6 +5714,44 @@ Updates vpointinter flag 'keep' with . ") ChangeKeep; void ChangeKeep(const Standard_Boolean keep); + /****************** Dump ******************/ + /**** md5 signature: 5579594f426ee060a7dba148d700be11 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +I: int +F: TopoDS_Face + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(const Standard_Integer I, const TopoDS_Face & F, std::ostream &OutValue); + + /****************** Dump ******************/ + /**** md5 signature: 1f8e051df2589ec6a071609bf7470fc1 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +F1: TopoDS_Face +F2: TopoDS_Face + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(const TopoDS_Face & F1, const TopoDS_Face & F2, std::ostream &OutValue); + /****************** Edge ******************/ /**** md5 signature: 69a02b36daf6e7cb7791cc5ef6d9ffd2 ****/ %feature("compactdefaultargs") Edge; @@ -6871,6 +6946,10 @@ class TopOpeBRep_HArray1OfVPointInter : public TopOpeBRep_Array1OfVPointInter, p } /* deprecated methods */ %pythoncode { +@deprecated +def topopebrep_Print(*args): + return topopebrep.Print(*args) + @deprecated def TopOpeBRep_FFTransitionTool_ProcessEdgeONTransition(*args): return TopOpeBRep_FFTransitionTool.ProcessEdgeONTransition(*args) diff --git a/src/SWIG_files/wrapper/TopOpeBRep.pyi b/src/SWIG_files/wrapper/TopOpeBRep.pyi index 89a087c9d..7657538e1 100644 --- a/src/SWIG_files/wrapper/TopOpeBRep.pyi +++ b/src/SWIG_files/wrapper/TopOpeBRep.pyi @@ -140,7 +140,8 @@ TopOpeBRep_HYPERBOLA = TopOpeBRep_TypeLineCurve.TopOpeBRep_HYPERBOLA TopOpeBRep_OTHERTYPE = TopOpeBRep_TypeLineCurve.TopOpeBRep_OTHERTYPE class topopebrep: - pass + @staticmethod + def Print(TLC: TopOpeBRep_TypeLineCurve) -> Tuple[Standard_OStream, str]: ... class TopOpeBRep_Bipoint: @overload @@ -405,6 +406,7 @@ class TopOpeBRep_LineInter: @overload def Curve(self, parmin: float, parmax: float) -> Geom_Curve: ... def DumpBipoint(self, B: TopOpeBRep_Bipoint, s1: str, s2: str) -> None: ... + def DumpLineTransitions(self) -> Tuple[Standard_OStream, str]: ... def DumpType(self) -> None: ... def DumpVPoint(self, I: int, s1: str, s2: str) -> None: ... def FaceFaceTransition(self, I: int) -> TopOpeBRepDS_Transition: ... @@ -541,6 +543,7 @@ class TopOpeBRep_ShapeScanner: def ChangeBoxSort(self) -> TopOpeBRepTool_BoxSort: ... def Clear(self) -> None: ... def Current(self) -> TopoDS_Shape: ... + def DumpCurrent(self) -> Tuple[Standard_OStream, str]: ... def Index(self) -> int: ... @overload def Init(self, E: TopoDS_Shape) -> None: ... @@ -554,6 +557,10 @@ class TopOpeBRep_VPointInter: def ArcOnS1(self) -> TopoDS_Shape: ... def ArcOnS2(self) -> TopoDS_Shape: ... def ChangeKeep(self, keep: bool) -> None: ... + @overload + def Dump(self, I: int, F: TopoDS_Face) -> Tuple[Standard_OStream, str]: ... + @overload + def Dump(self, F1: TopoDS_Face, F2: TopoDS_Face) -> Tuple[Standard_OStream, str]: ... def Edge(self, I: int) -> TopoDS_Shape: ... @overload def EdgeON(self, Eon: TopoDS_Shape, Par: float, I: int) -> None: ... diff --git a/src/SWIG_files/wrapper/TopOpeBRepBuild.i b/src/SWIG_files/wrapper/TopOpeBRepBuild.i index 0a474e611..c405c8c3c 100644 --- a/src/SWIG_files/wrapper/TopOpeBRepBuild.i +++ b/src/SWIG_files/wrapper/TopOpeBRepBuild.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topopebrepbuild.h %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -5198,14 +5199,23 @@ No available documentation. ") Current; void Current(TopAbs_State & s1, TopAbs_State & s2); + /****************** Dump ******************/ + /**** md5 signature: e60d722f65a7811be636699da7600e78 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Init ******************/ /**** md5 signature: 0de93ef32c53d091768788dca0e281fd ****/ %feature("compactdefaultargs") Init; @@ -5277,14 +5287,23 @@ No available documentation. ******************************/ class TopOpeBRepBuild_GTool { public: + /****************** Dump ******************/ + /**** md5 signature: 7ac13aaed5b6d1996e76f06146a4af9d ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + static void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GComDiff ******************/ /**** md5 signature: 728073c8bdab2220cb285e5911b15d15 ****/ %feature("compactdefaultargs") GComDiff; @@ -5630,14 +5649,80 @@ No available documentation. ") CopyPermuted; TopOpeBRepBuild_GTopo CopyPermuted(); + /****************** Dump ******************/ + /**** md5 signature: 8c9af92dbb883764baa3ebb3e5b82f7c ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +s: Standard_Address (optional, default to NULL) + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual void Dump(std::ostream &OutValue, const Standard_Address s = NULL); + + /****************** DumpSSB ******************/ + /**** md5 signature: f191eecc210b5827d05e7cd4594ead98 ****/ + %feature("compactdefaultargs") DumpSSB; + %feature("autodoc", " +Parameters +---------- +s1: TopAbs_State +s2: TopAbs_State +b: bool + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") DumpSSB; + static void DumpSSB(std::ostream &OutValue, const TopAbs_State s1, const TopAbs_State s2, const Standard_Boolean b); + + /****************** DumpType ******************/ + /**** md5 signature: 958d66f716a6ca18d4ec9ac299b310e2 ****/ + %feature("compactdefaultargs") DumpType; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") DumpType; + void DumpType(std::ostream &OutValue); + + /****************** DumpVal ******************/ + /**** md5 signature: 8a87e48d25d7176e71c93b30dca770f3 ****/ + %feature("compactdefaultargs") DumpVal; + %feature("autodoc", " +Parameters +---------- +s1: TopAbs_State +s2: TopAbs_State + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") DumpVal; + void DumpVal(std::ostream &OutValue, const TopAbs_State s1, const TopAbs_State s2); - %feature("autodoc", "1"); - %extend{ - std::string DumpTypeToString() { - std::stringstream s; - self->DumpType(s); - return s.str();} - }; /****************** GIndex ******************/ /**** md5 signature: 139dc2b2cf616d5e5205293f4637e677 ****/ %feature("compactdefaultargs") GIndex; @@ -7055,6 +7140,44 @@ No available documentation. ") DumpBB; virtual void DumpBB(); + /****************** DumpCheck ******************/ + /**** md5 signature: a08a701cbae28cab87a77d32a92880ac ****/ + %feature("compactdefaultargs") DumpCheck; + %feature("autodoc", " +Parameters +---------- +str: str +S: TopoDS_Shape +chk: bool + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") DumpCheck; + void DumpCheck(std::ostream &OutValue, TCollection_AsciiString str, const TopoDS_Shape & S, const Standard_Boolean chk); + + /****************** DumpName ******************/ + /**** md5 signature: e73ae5ec230cf0b21dee0ddf6cc25888 ****/ + %feature("compactdefaultargs") DumpName; + %feature("autodoc", " +Parameters +---------- +str: str + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") DumpName; + void DumpName(std::ostream &OutValue, TCollection_AsciiString str); + /****************** DumpSS ******************/ /**** md5 signature: cdc9acb51bec94239bc4daf1ba078420 ****/ %feature("compactdefaultargs") DumpSS; @@ -11166,6 +11289,10 @@ def TopOpeBRepBuild_CorrectFace2d_CheckList(*args): def TopOpeBRepBuild_CorrectFace2d_GetP2dFL(*args): return TopOpeBRepBuild_CorrectFace2d.GetP2dFL(*args) +@deprecated +def TopOpeBRepBuild_GTool_Dump(*args): + return TopOpeBRepBuild_GTool.Dump(*args) + @deprecated def TopOpeBRepBuild_GTool_GComDiff(*args): return TopOpeBRepBuild_GTool.GComDiff(*args) @@ -11202,6 +11329,10 @@ def TopOpeBRepBuild_GTool_GFusSame(*args): def TopOpeBRepBuild_GTool_GFusUnsh(*args): return TopOpeBRepBuild_GTool.GFusUnsh(*args) +@deprecated +def TopOpeBRepBuild_GTopo_DumpSSB(*args): + return TopOpeBRepBuild_GTopo.DumpSSB(*args) + @deprecated def TopOpeBRepBuild_Tools_CheckFaceClosed2d(*args): return TopOpeBRepBuild_Tools.CheckFaceClosed2d(*args) diff --git a/src/SWIG_files/wrapper/TopOpeBRepBuild.pyi b/src/SWIG_files/wrapper/TopOpeBRepBuild.pyi index 9741f0de4..91a24c5e5 100644 --- a/src/SWIG_files/wrapper/TopOpeBRepBuild.pyi +++ b/src/SWIG_files/wrapper/TopOpeBRepBuild.pyi @@ -463,6 +463,7 @@ class TopOpeBRepBuild_GIter: @overload def __init__(self, G: TopOpeBRepBuild_GTopo) -> None: ... def Current(self, s1: TopAbs_State, s2: TopAbs_State) -> None: ... + def Dump(self) -> str: ... @overload def Init(self) -> None: ... @overload @@ -471,6 +472,8 @@ class TopOpeBRepBuild_GIter: def Next(self) -> None: ... class TopOpeBRepBuild_GTool: + @staticmethod + def Dump() -> str: ... @staticmethod def GComDiff(s1: TopAbs_ShapeEnum, s2: TopAbs_ShapeEnum) -> TopOpeBRepBuild_GTopo: ... @staticmethod @@ -504,6 +507,11 @@ class TopOpeBRepBuild_GTopo: def Config1(self) -> TopOpeBRepDS_Config: ... def Config2(self) -> TopOpeBRepDS_Config: ... def CopyPermuted(self) -> TopOpeBRepBuild_GTopo: ... + def Dump(self, s: Optional[None] = None) -> str: ... + @staticmethod + def DumpSSB(s1: TopAbs_State, s2: TopAbs_State, b: bool) -> str: ... + def DumpType(self) -> str: ... + def DumpVal(self, s1: TopAbs_State, s2: TopAbs_State) -> str: ... def GIndex(self, S: TopAbs_State) -> int: ... def GState(self, I: int) -> TopAbs_State: ... def Index(self, II: int) -> Tuple[int, int]: ... @@ -614,6 +622,8 @@ class TopOpeBRepBuild_ShapeSet: @overload def DEBNumber(self) -> int: ... def DumpBB(self) -> None: ... + def DumpCheck(self, str: str, S: TopoDS_Shape, chk: bool) -> str: ... + def DumpName(self, str: str) -> str: ... def DumpSS(self) -> None: ... def FindNeighbours(self) -> None: ... def InitNeighbours(self, S: TopoDS_Shape) -> None: ... diff --git a/src/SWIG_files/wrapper/TopOpeBRepDS.i b/src/SWIG_files/wrapper/TopOpeBRepDS.i index bcb504e42..e905b7c99 100644 --- a/src/SWIG_files/wrapper/TopOpeBRepDS.i +++ b/src/SWIG_files/wrapper/TopOpeBRepDS.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topopebrepds.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -405,6 +406,100 @@ No available documentation. ") KindToShape; static TopAbs_ShapeEnum KindToShape(const TopOpeBRepDS_Kind K); + /****************** Print ******************/ + /**** md5 signature: 0ef9d8e552686e3841b3de5afdb9e892 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +S: TopAbs_State + +Return +------- +OS: Standard_OStream + +Description +----------- +No available documentation. +") Print; + static Standard_OStream & Print(const TopAbs_State S, std::ostream &OutValue); + + /****************** Print ******************/ + /**** md5 signature: 3a4129a4c2148a798a76811bead8b8ba ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +K: TopOpeBRepDS_Kind + +Return +------- +S: Standard_OStream + +Description +----------- +No available documentation. +") Print; + static Standard_OStream & Print(const TopOpeBRepDS_Kind K, std::ostream &OutValue); + + /****************** Print ******************/ + /**** md5 signature: 5d0e4822af3cf499d0d29a1903417a5b ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +K: TopOpeBRepDS_Kind +I: int +B: str (optional, default to "") +A: str (optional, default to "") + +Return +------- +S: Standard_OStream + +Description +----------- +No available documentation. +") Print; + static Standard_OStream & Print(const TopOpeBRepDS_Kind K, const Standard_Integer I, std::ostream &OutValue, TCollection_AsciiString B = "", TCollection_AsciiString A = ""); + + /****************** Print ******************/ + /**** md5 signature: 4d591b5485e1695cd7750b55883e11d9 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +T: TopAbs_ShapeEnum +I: int + +Return +------- +S: Standard_OStream + +Description +----------- +No available documentation. +") Print; + static Standard_OStream & Print(const TopAbs_ShapeEnum T, const Standard_Integer I, std::ostream &OutValue); + + /****************** Print ******************/ + /**** md5 signature: a5f6b6cef25348e934b1a293f0918f9b ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +C: TopOpeBRepDS_Config + +Return +------- +S: Standard_OStream + +Description +----------- +No available documentation. +") Print; + static Standard_OStream & Print(const TopOpeBRepDS_Config C, std::ostream &OutValue); + /****************** SPrint ******************/ /**** md5 signature: 8e8bd1974589e4b4a60a8ae1d385d1b2 ****/ %feature("compactdefaultargs") SPrint; @@ -1693,14 +1788,77 @@ Verifie que les vertex non samedomain sont bien nonsamedomain, que les vertex sa ") OneVertexOnPnt; Standard_Boolean OneVertexOnPnt(); + /****************** Print ******************/ + /**** md5 signature: 086af6ff7c70fce4047a52ee56d84e30 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +stat: TopOpeBRepDS_CheckStatus + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the name of checkstatus as a string. +") Print; + Standard_OStream & Print(const TopOpeBRepDS_CheckStatus stat, std::ostream &OutValue); + + /****************** PrintIntg ******************/ + /**** md5 signature: 87c9033c33359faee40e17ca777bad2d ****/ + %feature("compactdefaultargs") PrintIntg; + %feature("autodoc", " +Parameters +---------- + +Return +------- +S: Standard_OStream + +Description +----------- +No available documentation. +") PrintIntg; + Standard_OStream & PrintIntg(std::ostream &OutValue); + + /****************** PrintShape ******************/ + /**** md5 signature: c932bb977c67cb2dcc0f16639aaccff2 ****/ + %feature("compactdefaultargs") PrintShape; + %feature("autodoc", " +Parameters +---------- +SE: TopAbs_ShapeEnum + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the name of checkstatus as a string. +") PrintShape; + Standard_OStream & PrintShape(const TopAbs_ShapeEnum SE, std::ostream &OutValue); + + /****************** PrintShape ******************/ + /**** md5 signature: d41a7aa820a314e867e8755240d58f62 ****/ + %feature("compactdefaultargs") PrintShape; + %feature("autodoc", " +Parameters +---------- +index: int + +Return +------- +S: Standard_OStream + +Description +----------- +Prints the name of checkstatus as a string. +") PrintShape; + Standard_OStream & PrintShape(const Standard_Integer index, std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintIntgToString() { - std::stringstream s; - self->PrintIntg(s); - return s.str();} - }; }; @@ -9448,6 +9606,26 @@ def topopebrepds_IsTopology(*args): def topopebrepds_KindToShape(*args): return topopebrepds.KindToShape(*args) +@deprecated +def topopebrepds_Print(*args): + return topopebrepds.Print(*args) + +@deprecated +def topopebrepds_Print(*args): + return topopebrepds.Print(*args) + +@deprecated +def topopebrepds_Print(*args): + return topopebrepds.Print(*args) + +@deprecated +def topopebrepds_Print(*args): + return topopebrepds.Print(*args) + +@deprecated +def topopebrepds_Print(*args): + return topopebrepds.Print(*args) + @deprecated def topopebrepds_SPrint(*args): return topopebrepds.SPrint(*args) diff --git a/src/SWIG_files/wrapper/TopOpeBRepDS.pyi b/src/SWIG_files/wrapper/TopOpeBRepDS.pyi index f31f90494..26135a29f 100644 --- a/src/SWIG_files/wrapper/TopOpeBRepDS.pyi +++ b/src/SWIG_files/wrapper/TopOpeBRepDS.pyi @@ -115,6 +115,21 @@ class topopebrepds: def KindToShape(K: TopOpeBRepDS_Kind) -> TopAbs_ShapeEnum: ... @overload @staticmethod + def Print(S: TopAbs_State) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Print(K: TopOpeBRepDS_Kind) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Print(K: TopOpeBRepDS_Kind, I: int, B: Optional[str] = "", A: Optional[str] = "") -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Print(T: TopAbs_ShapeEnum, I: int) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod + def Print(C: TopOpeBRepDS_Config) -> Tuple[Standard_OStream, str]: ... + @overload + @staticmethod def SPrint(S: TopAbs_State) -> str: ... @overload @staticmethod @@ -228,6 +243,12 @@ class TopOpeBRepDS_Check(Standard_Transient): def ChkIntgSamDom(self) -> bool: ... def HDS(self) -> TopOpeBRepDS_HDataStructure: ... def OneVertexOnPnt(self) -> bool: ... + def Print(self, stat: TopOpeBRepDS_CheckStatus) -> Tuple[Standard_OStream, str]: ... + def PrintIntg(self) -> Tuple[Standard_OStream, str]: ... + @overload + def PrintShape(self, SE: TopAbs_ShapeEnum) -> Tuple[Standard_OStream, str]: ... + @overload + def PrintShape(self, index: int) -> Tuple[Standard_OStream, str]: ... class TopOpeBRepDS_Curve: @overload diff --git a/src/SWIG_files/wrapper/TopOpeBRepTool.i b/src/SWIG_files/wrapper/TopOpeBRepTool.i index a3298e7d9..bba0ffffa 100644 --- a/src/SWIG_files/wrapper/TopOpeBRepTool.i +++ b/src/SWIG_files/wrapper/TopOpeBRepTool.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topopebreptool.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -212,6 +213,24 @@ Builds up the correct list of faces from , using faulty shapes from ") MakeFaces; static Standard_Boolean MakeFaces(const TopoDS_Face & F, const TopTools_ListOfShape & LOF, const TopTools_IndexedMapOfOrientedShape & MshNOK, TopTools_ListOfShape & LOFF); + /****************** Print ******************/ + /**** md5 signature: f7153ca19881868c1f5cfcc1057b3413 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- +OCT: TopOpeBRepTool_OutCurveType + +Return +------- +S: Standard_OStream + +Description +----------- +Prints as string on stream ; returns . +") Print; + static Standard_OStream & Print(const TopOpeBRepTool_OutCurveType OCT, std::ostream &OutValue); + /****************** PurgeClosingEdges ******************/ /**** md5 signature: 3f09068948e5882f4cb7f9c6684a5042 ****/ %feature("compactdefaultargs") PurgeClosingEdges; @@ -3366,14 +3385,23 @@ Creates an explorer on the shape . //! is the type of shapes to sear ") TopOpeBRepTool_ShapeExplorer; TopOpeBRepTool_ShapeExplorer(const TopoDS_Shape & S, const TopAbs_ShapeEnum ToFind, const TopAbs_ShapeEnum ToAvoid = TopAbs_SHAPE); + /****************** DumpCurrent ******************/ + /**** md5 signature: db73845179d5206e02697128b933f101 ****/ + %feature("compactdefaultargs") DumpCurrent; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dump info on current shape to stream. +") DumpCurrent; + Standard_OStream & DumpCurrent(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpCurrentToString() { - std::stringstream s; - self->DumpCurrent(s); - return s.str();} - }; /****************** Index ******************/ /**** md5 signature: 0be2d384cf83d16771bb3f9c857c6326 ****/ %feature("compactdefaultargs") Index; @@ -5690,6 +5718,10 @@ def topopebreptool_CorrectONUVISO(*args): def topopebreptool_MakeFaces(*args): return topopebreptool.MakeFaces(*args) +@deprecated +def topopebreptool_Print(*args): + return topopebreptool.Print(*args) + @deprecated def topopebreptool_PurgeClosingEdges(*args): return topopebreptool.PurgeClosingEdges(*args) diff --git a/src/SWIG_files/wrapper/TopOpeBRepTool.pyi b/src/SWIG_files/wrapper/TopOpeBRepTool.pyi index 35a2f955e..1352870b9 100644 --- a/src/SWIG_files/wrapper/TopOpeBRepTool.pyi +++ b/src/SWIG_files/wrapper/TopOpeBRepTool.pyi @@ -58,6 +58,8 @@ class topopebreptool: def CorrectONUVISO(F: TopoDS_Face, Fsp: TopoDS_Face) -> bool: ... @staticmethod def MakeFaces(F: TopoDS_Face, LOF: TopTools_ListOfShape, MshNOK: TopTools_IndexedMapOfOrientedShape, LOFF: TopTools_ListOfShape) -> bool: ... + @staticmethod + def Print(OCT: TopOpeBRepTool_OutCurveType) -> Tuple[Standard_OStream, str]: ... @overload @staticmethod def PurgeClosingEdges(F: TopoDS_Face, FF: TopoDS_Face, MWisOld: TopTools_DataMapOfShapeInteger, MshNOK: TopTools_IndexedMapOfOrientedShape) -> bool: ... @@ -308,6 +310,7 @@ class TopOpeBRepTool_ShapeExplorer(TopExp_Explorer): def __init__(self) -> None: ... @overload def __init__(self, S: TopoDS_Shape, ToFind: TopAbs_ShapeEnum, ToAvoid: Optional[TopAbs_ShapeEnum] = TopAbs_SHAPE) -> None: ... + def DumpCurrent(self) -> Tuple[Standard_OStream, str]: ... def Index(self) -> int: ... def Init(self, S: TopoDS_Shape, ToFind: TopAbs_ShapeEnum, ToAvoid: Optional[TopAbs_ShapeEnum] = TopAbs_SHAPE) -> None: ... def Next(self) -> None: ... diff --git a/src/SWIG_files/wrapper/TopTools.i b/src/SWIG_files/wrapper/TopTools.i index 2c8670af0..8ea042aa6 100644 --- a/src/SWIG_files/wrapper/TopTools.i +++ b/src/SWIG_files/wrapper/TopTools.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_toptools.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -44,6 +45,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_toptools.html" #include #include #include +#include #include #include #include @@ -56,6 +58,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_toptools.html" %import NCollection.i %import TopoDS.i %import TopLoc.i +%import Message.i %import TopAbs.i %import TCollection.i @@ -311,6 +314,24 @@ This is to bypass an extraction bug. it will force the inclusion of standard_int ") Dummy; static void Dummy(const Standard_Integer I); + /****************** Dump ******************/ + /**** md5 signature: d8fbac42c489d0bae98b03b1387b21c5 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +Sh: TopoDS_Shape + +Return +------- +S: Standard_OStream + +Description +----------- +A set of shapes. can be dump, wrote or read. dumps the topological structure of on the stream . +") Dump; + static void Dump(const TopoDS_Shape & Sh, std::ostream &OutValue); + }; @@ -369,14 +390,23 @@ Clears the content of the set. ") Clear; void Clear(); + /****************** Dump ******************/ + /**** md5 signature: e60d722f65a7811be636699da7600e78 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the content of me on the stream . +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Index ******************/ /**** md5 signature: fbb01960bb9b443c36d99f6e7b11f6c5 ****/ %feature("compactdefaultargs") Index; @@ -413,21 +443,43 @@ Returns the location of index . ") Location; const TopLoc_Location & Location(const Standard_Integer I); + /****************** Read ******************/ + /**** md5 signature: e5ce096318e6663d7e9f744e8d66b70b ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the content of me from the stream . me is first cleared. +") Read; + void Read(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** Write ******************/ + /**** md5 signature: 6a95f1af9efa3b2eec48861a606241ee ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in a format that can be read back by read. +") Write; + void Write(std::ostream &OutValue, const Message_ProgressRange & theProgress = Message_ProgressRange()); - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; }; @@ -754,22 +806,58 @@ Clears the content of the set. this method can be redefined. ") Clear; virtual void Clear(); + /****************** Dump ******************/ + /**** md5 signature: d32daf6ada75088f1d8019b60f0a3a12 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the content of me on the stream . //! dumps the shapes from first to last. for each shape dump the type, the flags, the subshapes calls dumpgeometry(s) //! dumps the geometry calling dumpgeometry. //! dumps the locations. +") Dump; + virtual void Dump(std::ostream &OutValue); + + /****************** Dump ******************/ + /**** md5 signature: c9c059aea0364c06c52deb47fd3e508c ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps on the shape . dumps the orientation, the index of the tshape and the index of the location. +") Dump; + void Dump(const TopoDS_Shape & S, std::ostream &OutValue); + + /****************** DumpExtent ******************/ + /**** md5 signature: 87d4d6365aae6f521deeef6773174baf ****/ + %feature("compactdefaultargs") DumpExtent; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the number of objects in me on the stream . (number of shapes of each type). +") DumpExtent; + Standard_OStream & DumpExtent(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - - %feature("autodoc", "1"); - %extend{ - std::string DumpExtentToString() { - std::stringstream s; - self->DumpExtent(s); - return s.str();} - }; /****************** DumpExtent ******************/ /**** md5 signature: 953cfb15db6760ae7a9bad9220b58b2c ****/ %feature("compactdefaultargs") DumpExtent; @@ -788,14 +876,41 @@ Dumps the number of objects in me in the string s (number of shapes of each type ") DumpExtent; void DumpExtent(TCollection_AsciiString & S); + /****************** DumpGeometry ******************/ + /**** md5 signature: 653744bf97783eb78e2934b320b67e17 ****/ + %feature("compactdefaultargs") DumpGeometry; + %feature("autodoc", " +Parameters +---------- + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the geometry of me on the stream . +") DumpGeometry; + virtual void DumpGeometry(std::ostream &OutValue); + + /****************** DumpGeometry ******************/ + /**** md5 signature: b3c7ad4e016db98e090d5f57d68cefa1 ****/ + %feature("compactdefaultargs") DumpGeometry; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape + +Return +------- +OS: Standard_OStream + +Description +----------- +Dumps the geometry of on the stream . +") DumpGeometry; + virtual void DumpGeometry(const TopoDS_Shape & S, std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpGeometryToString() { - std::stringstream s; - self->DumpGeometry(s); - return s.str();} - }; /****************** FormatNb ******************/ /**** md5 signature: 4ba7a37f990f272738aa2003a22fc1da ****/ %feature("compactdefaultargs") FormatNb; @@ -853,20 +968,83 @@ Returns number of shapes read from file. ") NbShapes; Standard_Integer NbShapes(); + /****************** Read ******************/ + /**** md5 signature: d5549d1f1479104ba7c0f767b82c0b6d ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the content of me from the stream . me is first cleared. //! reads the locations. //! reads the geometry calling readgeometry. //! reads the shapes. for each shape reads the type. calls readgeometry(t,s). reads the flag, the subshapes. +") Read; + virtual void Read(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** Read ******************/ + /**** md5 signature: b491f021d6a632b4b6084137add9d6b1 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape +IS: str + +Return +------- +None + +Description +----------- +Reads from a shape and returns it in s. +") Read; + void Read(TopoDS_Shape & S, std::istream & IS); + + /****************** ReadGeometry ******************/ + /**** md5 signature: f2d381e51fecc68108716b044058cd47 ****/ + %feature("compactdefaultargs") ReadGeometry; + %feature("autodoc", " +Parameters +---------- +IS: str +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +Reads the geometry of me from the stream . +") ReadGeometry; + virtual void ReadGeometry(std::istream & IS, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** ReadGeometry ******************/ + /**** md5 signature: 4e371a9743f73b6a83ec48df91308b56 ****/ + %feature("compactdefaultargs") ReadGeometry; + %feature("autodoc", " +Parameters +---------- +T: TopAbs_ShapeEnum +IS: str +S: TopoDS_Shape + +Return +------- +None - %feature("autodoc", "1"); - %extend{ - void ReadFromString(std::string src) { - std::stringstream s(src); - self->Read(s);} - }; +Description +----------- +Reads the geometry of a shape of type from the stream and returns it in . +") ReadGeometry; + virtual void ReadGeometry(const TopAbs_ShapeEnum T, std::istream & IS, TopoDS_Shape & S); - %feature("autodoc", "1"); - %extend{ - void ReadGeometryFromString(std::string src) { - std::stringstream s(src); - self->ReadGeometry(s);} - }; /****************** SetFormatNb ******************/ /**** md5 signature: efa61c5f0aa586c699f53e1139cd95f9 ****/ %feature("compactdefaultargs") SetFormatNb; @@ -903,22 +1081,78 @@ Returns the sub-shape of index . ") Shape; const TopoDS_Shape Shape(const Standard_Integer I); + /****************** Write ******************/ + /**** md5 signature: 5f1f156d742c1fe03f970b14ab71611c ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the content of me on the stream in a format that can be read back by read. //! writes the locations. //! writes the geometry calling writegeometry. //! dumps the shapes from last to first. for each shape: write the type. calls writegeometry(s). write the flags, the subshapes. +") Write; + virtual void Write(std::ostream &OutValue, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** Write ******************/ + /**** md5 signature: 5b68b962cc3758ff010ddb00740bcb56 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes on the shape . writes the orientation, the index of the tshape and the index of the location. +") Write; + void Write(const TopoDS_Shape & S, std::ostream &OutValue); + + /****************** WriteGeometry ******************/ + /**** md5 signature: 75c884e05520446878220235ba67ae24 ****/ + %feature("compactdefaultargs") WriteGeometry; + %feature("autodoc", " +Parameters +---------- +theProgress: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the geometry of me on the stream in a format that can be read back by read. +") WriteGeometry; + virtual void WriteGeometry(std::ostream &OutValue, const Message_ProgressRange & theProgress = Message_ProgressRange()); + + /****************** WriteGeometry ******************/ + /**** md5 signature: 122b2c21a82fbea7b7f8cfce352176e9 ****/ + %feature("compactdefaultargs") WriteGeometry; + %feature("autodoc", " +Parameters +---------- +S: TopoDS_Shape + +Return +------- +OS: Standard_OStream + +Description +----------- +Writes the geometry of on the stream in a format that can be read back by read. +") WriteGeometry; + virtual void WriteGeometry(const TopoDS_Shape & S, std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string WriteToString() { - std::stringstream s; - self->Write(s); - return s.str();} - }; - - %feature("autodoc", "1"); - %extend{ - std::string WriteGeometryToString() { - std::stringstream s; - self->WriteGeometry(s); - return s.str();} - }; }; @@ -987,6 +1221,10 @@ class TopTools_HSequenceOfShape : public TopTools_SequenceOfShape, public Standa def toptools_Dummy(*args): return toptools.Dummy(*args) +@deprecated +def toptools_Dump(*args): + return toptools.Dump(*args) + @deprecated def TopTools_OrientedShapeMapHasher_HashCode(*args): return TopTools_OrientedShapeMapHasher.HashCode(*args) diff --git a/src/SWIG_files/wrapper/TopTools.pyi b/src/SWIG_files/wrapper/TopTools.pyi index 8ca852940..c7ea2f1be 100644 --- a/src/SWIG_files/wrapper/TopTools.pyi +++ b/src/SWIG_files/wrapper/TopTools.pyi @@ -5,6 +5,7 @@ from OCC.Core.Standard import * from OCC.Core.NCollection import * from OCC.Core.TopoDS import * from OCC.Core.TopLoc import * +from OCC.Core.Message import * from OCC.Core.TopAbs import * from OCC.Core.TCollection import * @@ -142,13 +143,18 @@ TopTools_FormatVersion_CURRENT = TopTools_FormatVersion.TopTools_FormatVersion_C class toptools: @staticmethod def Dummy(I: int) -> None: ... + @staticmethod + def Dump(Sh: TopoDS_Shape) -> str: ... class TopTools_LocationSet: def __init__(self) -> None: ... def Add(self, L: TopLoc_Location) -> int: ... def Clear(self) -> None: ... + def Dump(self) -> str: ... def Index(self, L: TopLoc_Location) -> int: ... def Location(self, I: int) -> TopLoc_Location: ... + def Read(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + def Write(self, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... class TopTools_MutexForShapeProvider: def __init__(self) -> None: ... @@ -178,13 +184,39 @@ class TopTools_ShapeSet: def Check(self, T: TopAbs_ShapeEnum, S: TopoDS_Shape) -> None: ... def Clear(self) -> None: ... @overload + def Dump(self) -> str: ... + @overload + def Dump(self, S: TopoDS_Shape) -> str: ... + @overload + def DumpExtent(self) -> Tuple[Standard_OStream, str]: ... + @overload def DumpExtent(self, S: str) -> None: ... + @overload + def DumpGeometry(self) -> str: ... + @overload + def DumpGeometry(self, S: TopoDS_Shape) -> str: ... def FormatNb(self) -> int: ... def Index(self, S: TopoDS_Shape) -> int: ... def Locations(self) -> TopTools_LocationSet: ... def NbShapes(self) -> int: ... + @overload + def Read(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def Read(self, S: TopoDS_Shape, IS: str) -> None: ... + @overload + def ReadGeometry(self, IS: str, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def ReadGeometry(self, T: TopAbs_ShapeEnum, IS: str, S: TopoDS_Shape) -> None: ... def SetFormatNb(self, theFormatNb: int) -> None: ... def Shape(self, I: int) -> TopoDS_Shape: ... + @overload + def Write(self, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + @overload + def Write(self, S: TopoDS_Shape) -> str: ... + @overload + def WriteGeometry(self, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... + @overload + def WriteGeometry(self, S: TopoDS_Shape) -> str: ... # harray1 classes diff --git a/src/SWIG_files/wrapper/TopTrans.i b/src/SWIG_files/wrapper/TopTrans.i index 0fb7f44c1..13cc45b49 100644 --- a/src/SWIG_files/wrapper/TopTrans.i +++ b/src/SWIG_files/wrapper/TopTrans.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_toptrans.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/TopoDS.i b/src/SWIG_files/wrapper/TopoDS.i index f1b82873f..14af9ebe4 100644 --- a/src/SWIG_files/wrapper/TopoDS.i +++ b/src/SWIG_files/wrapper/TopoDS.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topods.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -429,10 +430,22 @@ Constructor with shape argument. TopoDS_AlertAttribute(const TopoDS_Shape & theShape, TCollection_AsciiString theName = TCollection_AsciiString()); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1087,10 +1100,22 @@ Sets the convexness flag. void Convex(Standard_Boolean theIsConvex); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1769,10 +1794,22 @@ Sets the convexness flag. void Convex(Standard_Boolean theIsConvex); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/TopoDS.pyi b/src/SWIG_files/wrapper/TopoDS.pyi index 39e8d60da..b7e376576 100644 --- a/src/SWIG_files/wrapper/TopoDS.pyi +++ b/src/SWIG_files/wrapper/TopoDS.pyi @@ -51,6 +51,7 @@ class topods: class TopoDS_AlertAttribute(Message_AttributeStream): def __init__(self, theShape: TopoDS_Shape, theName: Optional[str] = TCollection_AsciiString()) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetShape(self) -> TopoDS_Shape: ... @staticmethod def Send(theMessenger: Message_Messenger, theShape: TopoDS_Shape) -> None: ... @@ -111,6 +112,7 @@ class TopoDS_Shape: def Convex(self) -> bool: ... @overload def Convex(self, theIsConvex: bool) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EmptyCopied(self) -> TopoDS_Shape: ... def EmptyCopy(self) -> None: ... @overload @@ -174,6 +176,7 @@ class TopoDS_TShape(Standard_Transient): def Convex(self) -> bool: ... @overload def Convex(self, theIsConvex: bool) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def EmptyCopy(self) -> TopoDS_TShape: ... @overload def Free(self) -> bool: ... diff --git a/src/SWIG_files/wrapper/TopoDSToStep.i b/src/SWIG_files/wrapper/TopoDSToStep.i index 6c4e0bbfe..a8b0a8b48 100644 --- a/src/SWIG_files/wrapper/TopoDSToStep.i +++ b/src/SWIG_files/wrapper/TopoDSToStep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_topodstostep.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Transfer.i b/src/SWIG_files/wrapper/Transfer.i index 9151cccc2..d9eb10a82 100644 --- a/src/SWIG_files/wrapper/Transfer.i +++ b/src/SWIG_files/wrapper/Transfer.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_transfer.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -2060,6 +2061,24 @@ Returns nesting level of transfers (managed by methods transcriptwith & co). sta ") NestingLevel; Standard_Integer NestingLevel(); + /****************** PrintTrace ******************/ + /**** md5 signature: 0a0a53bc4716a09a519c2ea2a9ac5776 ****/ + %feature("compactdefaultargs") PrintTrace; + %feature("autodoc", " +Parameters +---------- +start: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Prints a short information on a starting object. by default prints its dynamic type. can be redefined. +") PrintTrace; + virtual void PrintTrace(const opencascade::handle & start, std::ostream &OutValue); + /****************** Rebind ******************/ /**** md5 signature: e57d830e06b8d133bb4caf4c620470a2 ****/ %feature("compactdefaultargs") Rebind; @@ -4091,6 +4110,42 @@ In the list of mapped items (between 1 and nbmapped), searches for the first map ") NextMappedWithAttribute; Standard_Integer NextMappedWithAttribute(Standard_CString name, const Standard_Integer num0); + /****************** PrintStats ******************/ + /**** md5 signature: a0a8d2448d0f09b0c479b104db5da053 ****/ + %feature("compactdefaultargs") PrintStats; + %feature("autodoc", " +Parameters +---------- +mode: int + +Return +------- +S: Standard_OStream + +Description +----------- +Prints statistics on a given output, according mode. +") PrintStats; + void PrintStats(const Standard_Integer mode, std::ostream &OutValue); + + /****************** PrintTrace ******************/ + /**** md5 signature: 8380d2532e8d3f7819d2298d70b485c1 ****/ + %feature("compactdefaultargs") PrintTrace; + %feature("autodoc", " +Parameters +---------- +start: Transfer_Finder + +Return +------- +S: Standard_OStream + +Description +----------- +Specific printing to trace a finder (by its method valuetype). +") PrintTrace; + virtual void PrintTrace(const opencascade::handle & start, std::ostream &OutValue); + /****************** SetModel ******************/ /**** md5 signature: 70328a97cec44e457500ce3b002efc49 ****/ %feature("compactdefaultargs") SetModel; @@ -5040,6 +5095,42 @@ Returns the model used for starttrace. ") Model; opencascade::handle Model(); + /****************** PrintStats ******************/ + /**** md5 signature: a0a8d2448d0f09b0c479b104db5da053 ****/ + %feature("compactdefaultargs") PrintStats; + %feature("autodoc", " +Parameters +---------- +mode: int + +Return +------- +S: Standard_OStream + +Description +----------- +Prints statistics on a given output, according mode. +") PrintStats; + void PrintStats(const Standard_Integer mode, std::ostream &OutValue); + + /****************** PrintTrace ******************/ + /**** md5 signature: 52ba67cfb212004a5323c79b188c104d ****/ + %feature("compactdefaultargs") PrintTrace; + %feature("autodoc", " +Parameters +---------- +start: Standard_Transient + +Return +------- +S: Standard_OStream + +Description +----------- +Specific printing to trace an entity: prints label and type (if model is set). +") PrintTrace; + virtual void PrintTrace(const opencascade::handle & start, std::ostream &OutValue); + /****************** RootsForTransfer ******************/ /**** md5 signature: c79152a32ae4b6ec28313285c230ae8b ****/ %feature("compactdefaultargs") RootsForTransfer; diff --git a/src/SWIG_files/wrapper/Transfer.pyi b/src/SWIG_files/wrapper/Transfer.pyi index 6c5c5c443..f26d97ced 100644 --- a/src/SWIG_files/wrapper/Transfer.pyi +++ b/src/SWIG_files/wrapper/Transfer.pyi @@ -207,6 +207,7 @@ class Transfer_ProcessForTransient(Standard_Transient): def NbMapped(self) -> int: ... def NbRoots(self) -> int: ... def NestingLevel(self) -> int: ... + def PrintTrace(self, start: Standard_Transient) -> str: ... def Rebind(self, start: Standard_Transient, binder: Transfer_Binder) -> None: ... def Recognize(self, start: Standard_Transient) -> bool: ... def RemoveResult(self, start: Standard_Transient, level: int, compute: Optional[bool] = True) -> None: ... @@ -352,6 +353,8 @@ class Transfer_FinderProcess(Transfer_ProcessForFinder): def __init__(self, nb: Optional[int] = 10000) -> None: ... def Model(self) -> Interface_InterfaceModel: ... def NextMappedWithAttribute(self, name: str, num0: int) -> int: ... + def PrintStats(self, mode: int) -> str: ... + def PrintTrace(self, start: Transfer_Finder) -> str: ... def SetModel(self, model: Interface_InterfaceModel) -> None: ... def TransientMapper(self, obj: Standard_Transient) -> Transfer_TransientMapper: ... @@ -427,6 +430,8 @@ class Transfer_TransientProcess(Transfer_ProcessForTransient): def IsDataFail(self, ent: Standard_Transient) -> bool: ... def IsDataLoaded(self, ent: Standard_Transient) -> bool: ... def Model(self) -> Interface_InterfaceModel: ... + def PrintStats(self, mode: int) -> str: ... + def PrintTrace(self, start: Standard_Transient) -> str: ... def RootsForTransfer(self) -> TColStd_HSequenceOfTransient: ... def SetContext(self, name: str, ctx: Standard_Transient) -> None: ... def SetGraph(self, HG: Interface_HGraph) -> None: ... diff --git a/src/SWIG_files/wrapper/TransferBRep.i b/src/SWIG_files/wrapper/TransferBRep.i index 1e3b5582a..a7c0f8818 100644 --- a/src/SWIG_files/wrapper/TransferBRep.i +++ b/src/SWIG_files/wrapper/TransferBRep.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_transferbrep.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/UTL.i b/src/SWIG_files/wrapper/UTL.i index 15cd723c3..e2cc1c2b1 100644 --- a/src/SWIG_files/wrapper/UTL.i +++ b/src/SWIG_files/wrapper/UTL.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_utl.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/Units.i b/src/SWIG_files/wrapper/Units.i index 1fad0f338..773fa3596 100644 --- a/src/SWIG_files/wrapper/Units.i +++ b/src/SWIG_files/wrapper/Units.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_units.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/UnitsAPI.i b/src/SWIG_files/wrapper/UnitsAPI.i index 4405fc2da..b64ac71de 100644 --- a/src/SWIG_files/wrapper/UnitsAPI.i +++ b/src/SWIG_files/wrapper/UnitsAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_unitsapi.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/UnitsMethods.i b/src/SWIG_files/wrapper/UnitsMethods.i index def1a3ab0..d73577052 100644 --- a/src/SWIG_files/wrapper/UnitsMethods.i +++ b/src/SWIG_files/wrapper/UnitsMethods.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_unitsmethods.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/V3d.i b/src/SWIG_files/wrapper/V3d.i index 72a83001a..1f272d4e5 100644 --- a/src/SWIG_files/wrapper/V3d.i +++ b/src/SWIG_files/wrapper/V3d.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_v3d.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -553,10 +554,22 @@ No available documentation. void Display(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -879,10 +892,22 @@ No available documentation. virtual void Display(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1068,10 +1093,22 @@ Display trihedron. void Display(const V3d_View & theView); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2026,10 +2063,22 @@ Dumps the full contents of the view into the image file. this is an alias for to Standard_Boolean Dump(Standard_CString theFile, const Graphic3d_BufferType & theBufferType = Graphic3d_BT_RGB); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4999,10 +5048,22 @@ Return graphic driver instance. const opencascade::handle & Driver(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/V3d.pyi b/src/SWIG_files/wrapper/V3d.pyi index b362913b2..36d6568f0 100644 --- a/src/SWIG_files/wrapper/V3d.pyi +++ b/src/SWIG_files/wrapper/V3d.pyi @@ -197,6 +197,7 @@ class V3d_AmbientLight(Graphic3d_CLight): class V3d_CircularGrid(Aspect_CircularGrid): def __init__(self, aViewer: V3d_ViewerPointer, aColor: Quantity_Color, aTenthColor: Quantity_Color) -> None: ... def Display(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Erase(self) -> None: ... def GraphicValues(self) -> Tuple[float, float]: ... def IsDisplayed(self) -> bool: ... @@ -221,6 +222,7 @@ class V3d_PositionLight(Graphic3d_CLight): class V3d_RectangularGrid(Aspect_RectangularGrid): def __init__(self, aViewer: V3d_ViewerPointer, aColor: Quantity_Color, aTenthColor: Quantity_Color) -> None: ... def Display(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Erase(self) -> None: ... def GraphicValues(self) -> Tuple[float, float, float]: ... def IsDisplayed(self) -> bool: ... @@ -235,6 +237,7 @@ class V3d_Trihedron(Standard_Transient): def Display(self, theView: V3d_View) -> None: ... @overload def Display(self, theView: V3d_View) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Erase(self) -> None: ... def IsWireframe(self) -> bool: ... def Label(self, theAxis: V3d_TypeOfAxe) -> str: ... @@ -309,6 +312,7 @@ class V3d_View(Standard_Transient): def DiagnosticInformation(self, theDict: TColStd_IndexedDataMapOfStringString, theFlags: Graphic3d_DiagnosticInfo) -> None: ... def DoMapping(self) -> None: ... def Dump(self, theFile: str, theBufferType: Optional[Graphic3d_BufferType] = Graphic3d_BT_RGB) -> bool: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Eye(self) -> Tuple[float, float, float]: ... @overload def FitAll(self, theMargin: Optional[float] = 0.01, theToUpdate: Optional[bool] = True) -> None: ... @@ -523,6 +527,7 @@ class V3d_Viewer(Standard_Transient): def DelLight(self, theLight: V3d_Light) -> None: ... def DisplayPrivilegedPlane(self, theOnOff: bool, theSize: Optional[float] = 1) -> None: ... def Driver(self) -> Graphic3d_GraphicDriver: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Erase(self) -> None: ... def GetAllZLayers(self, theLayerSeq: TColStd_SequenceOfInteger) -> None: ... def GetGradientBackground(self) -> Aspect_GradientBackground: ... diff --git a/src/SWIG_files/wrapper/Vrml.i b/src/SWIG_files/wrapper/Vrml.i index 8a3d4a335..78a3eac72 100644 --- a/src/SWIG_files/wrapper/Vrml.i +++ b/src/SWIG_files/wrapper/Vrml.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_vrml.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -311,14 +312,41 @@ Vrml_POINT = Vrml_WWWAnchorMap.Vrml_POINT %rename(vrml) Vrml; class Vrml { public: + /****************** CommentWriter ******************/ + /**** md5 signature: e5bd2e2e43a6101d02a4c0fc033b4914 ****/ + %feature("compactdefaultargs") CommentWriter; + %feature("autodoc", " +Parameters +---------- +aComment: str + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") CommentWriter; + static Standard_OStream & CommentWriter(Standard_CString aComment, std::ostream &OutValue); + + /****************** VrmlHeaderWriter ******************/ + /**** md5 signature: e0e105d95fec65a919874d86d7edc262 ****/ + %feature("compactdefaultargs") VrmlHeaderWriter; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Writes a header in anostream (vrml file). writes one line of commentary in anostream (vrml file). +") VrmlHeaderWriter; + static Standard_OStream & VrmlHeaderWriter(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string VrmlHeaderWriterToString() { - std::stringstream s; - self->VrmlHeaderWriter(s); - return s.str();} - }; }; @@ -380,14 +408,23 @@ No available documentation. ") Justification; Vrml_AsciiTextJustification Justification(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetJustification ******************/ /**** md5 signature: 3950698a2301d05e87ab121d39eef7c5 ****/ %feature("compactdefaultargs") SetJustification; @@ -574,14 +611,23 @@ No available documentation. ") Parts; Vrml_ConeParts Parts(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetBottomRadius ******************/ /**** md5 signature: 83831c7af161fbeed20e59efdcef6cc9 ****/ %feature("compactdefaultargs") SetBottomRadius; @@ -896,14 +942,23 @@ No available documentation. ") Point; opencascade::handle Point(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetPoint ******************/ /**** md5 signature: 2531979fc318076a2efdf95b81e431c9 ****/ %feature("compactdefaultargs") SetPoint; @@ -984,14 +1039,23 @@ No available documentation. ") Height; Standard_Real Height(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetDepth ******************/ /**** md5 signature: 4ed376ce95444c7357cf149677ef5fde ****/ %feature("compactdefaultargs") SetDepth; @@ -1119,14 +1183,23 @@ No available documentation. ") Parts; Vrml_CylinderParts Parts(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Radius ******************/ /**** md5 signature: 506a8dc1140a54bd4146c24bb5357fbf ****/ %feature("compactdefaultargs") Radius; @@ -1294,14 +1367,23 @@ No available documentation. ") OnOff; Standard_Boolean OnOff(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetColor ******************/ /**** md5 signature: 5aebf70a123538e7dff670112c56db0d ****/ %feature("compactdefaultargs") SetColor; @@ -1421,14 +1503,23 @@ No available documentation. ") Family; Vrml_FontStyleFamily Family(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetFamily ******************/ /**** md5 signature: b0100e13b2e059fb2e8b420788ec2a61 ****/ %feature("compactdefaultargs") SetFamily; @@ -1536,14 +1627,23 @@ No available documentation. ") Vrml_Group; Vrml_Group(); + /****************** Print ******************/ + /**** md5 signature: a7a6d9b084f11fb866b7f1da61c9ed6a ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; }; @@ -1631,14 +1731,23 @@ No available documentation. ") NormalIndex; opencascade::handle NormalIndex(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetCoordIndex ******************/ /**** md5 signature: 8aac1fe12bc1ddfc66bc94e00112273c ****/ %feature("compactdefaultargs") SetCoordIndex; @@ -1813,14 +1922,23 @@ No available documentation. ") NormalIndex; opencascade::handle NormalIndex(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetCoordIndex ******************/ /**** md5 signature: 8aac1fe12bc1ddfc66bc94e00112273c ****/ %feature("compactdefaultargs") SetCoordIndex; @@ -1940,14 +2058,23 @@ No available documentation. ") Vrml_Info; Vrml_Info(TCollection_AsciiString aString = ""); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetString ******************/ /**** md5 signature: 019f64b9292447922865012d29fa7284 ****/ %feature("compactdefaultargs") SetString; @@ -2011,22 +2138,40 @@ Adds 'def ' in anostream (vrml file). ") Vrml_Instancing; Vrml_Instancing(TCollection_AsciiString aString); + /****************** DEF ******************/ + /**** md5 signature: fe8bfe9657d4f251c355fca5a13dd2a4 ****/ + %feature("compactdefaultargs") DEF; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds 'use ' in anostream (vrml file). +") DEF; + Standard_OStream & DEF(std::ostream &OutValue); + + /****************** USE ******************/ + /**** md5 signature: c92fba46c3b0b224b98b48141a9c9704 ****/ + %feature("compactdefaultargs") USE; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") USE; + Standard_OStream & USE(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DEFToString() { - std::stringstream s; - self->DEF(s); - return s.str();} - }; - - %feature("autodoc", "1"); - %extend{ - std::string USEToString() { - std::stringstream s; - self->USE(s); - return s.str();} - }; }; @@ -2086,14 +2231,23 @@ No available documentation. ") Center; gp_Vec Center(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Range ******************/ /**** md5 signature: bef409c2278798ac43ffa883362425bc ****/ %feature("compactdefaultargs") Range; @@ -2234,14 +2388,23 @@ No available documentation. ") EmissiveColor; opencascade::handle EmissiveColor(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetAmbientColor ******************/ /**** md5 signature: 7a2810fd7bedaae7bea499eb43ecaf68 ****/ %feature("compactdefaultargs") SetAmbientColor; @@ -2436,14 +2599,23 @@ No available documentation. ") Vrml_MaterialBinding; Vrml_MaterialBinding(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetValue ******************/ /**** md5 signature: 9a4a4ae4644775e0ec704e6ef977a484 ****/ %feature("compactdefaultargs") SetValue; @@ -2533,14 +2705,23 @@ No available documentation. ") Matrix; gp_Trsf Matrix(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetMatrix ******************/ /**** md5 signature: f79b6bacc75e1dffe6f1d2919243ae9b ****/ %feature("compactdefaultargs") SetMatrix; @@ -2604,14 +2785,23 @@ No available documentation. ") Vrml_Normal; Vrml_Normal(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetVector ******************/ /**** md5 signature: b29dd66700a7c683cf81610080b02141 ****/ %feature("compactdefaultargs") SetVector; @@ -2690,14 +2880,23 @@ No available documentation. ") Vrml_NormalBinding; Vrml_NormalBinding(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetValue ******************/ /**** md5 signature: 9a4a4ae4644775e0ec704e6ef977a484 ****/ %feature("compactdefaultargs") SetValue; @@ -2829,14 +3028,23 @@ No available documentation. ") Position; gp_Vec Position(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetFocalDistance ******************/ /**** md5 signature: a4382c9d94c6cdb3a408a0da734eb053 ****/ %feature("compactdefaultargs") SetFocalDistance; @@ -3009,14 +3217,23 @@ No available documentation. ") Position; gp_Vec Position(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetAngle ******************/ /**** md5 signature: bb3d72a5f4b071f4f97fb610aca9900b ****/ %feature("compactdefaultargs") SetAngle; @@ -3189,14 +3406,23 @@ No available documentation. ") OnOff; Standard_Boolean OnOff(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetColor ******************/ /**** md5 signature: 5aebf70a123538e7dff670112c56db0d ****/ %feature("compactdefaultargs") SetColor; @@ -3315,14 +3541,23 @@ No available documentation. ") NumPoints; Standard_Integer NumPoints(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetNumPoints ******************/ /**** md5 signature: 2c8c0cd8de922cf96b80a152f2efbd3b ****/ %feature("compactdefaultargs") SetNumPoints; @@ -3652,14 +3887,23 @@ No available documentation. ") Vrml_Rotation; Vrml_Rotation(const Vrml_SFRotation & aRotation); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Rotation ******************/ /**** md5 signature: df13dcf1c8ca3c02d862abf4780b0be5 ****/ %feature("compactdefaultargs") Rotation; @@ -4095,14 +4339,23 @@ No available documentation. ") Vrml_Scale; Vrml_Scale(const gp_Vec & aScaleFactor); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** ScaleFactor ******************/ /**** md5 signature: ddee81c1cf7d4715bc12bd5fcf83ddcc ****/ %feature("compactdefaultargs") ScaleFactor; @@ -4179,14 +4432,23 @@ No available documentation. ") Vrml_Separator; Vrml_Separator(); + /****************** Print ******************/ + /**** md5 signature: a7a6d9b084f11fb866b7f1da61c9ed6a ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** RenderCulling ******************/ /**** md5 signature: 9c2b5b6ae8ed9c9a82906bd6ee4c0f5c ****/ %feature("compactdefaultargs") RenderCulling; @@ -4279,14 +4541,23 @@ No available documentation. ") FaceType; Vrml_FaceType FaceType(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetAngle ******************/ /**** md5 signature: bae7a4d675d363cefe680523e72e869e ****/ %feature("compactdefaultargs") SetAngle; @@ -4417,14 +4688,23 @@ No available documentation. ") Vrml_Sphere; Vrml_Sphere(const Standard_Real aRadius = 1); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Radius ******************/ /**** md5 signature: 506a8dc1140a54bd4146c24bb5357fbf ****/ %feature("compactdefaultargs") Radius; @@ -4598,14 +4878,23 @@ No available documentation. ") OnOff; Standard_Boolean OnOff(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetColor ******************/ /**** md5 signature: 5aebf70a123538e7dff670112c56db0d ****/ %feature("compactdefaultargs") SetColor; @@ -4764,14 +5053,23 @@ No available documentation. ") Vrml_Switch; Vrml_Switch(const Standard_Integer aWhichChild = -1); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetWhichChild ******************/ /**** md5 signature: 903116d3053cda016d7b4d8c736e11f8 ****/ %feature("compactdefaultargs") SetWhichChild; @@ -4877,14 +5175,23 @@ No available documentation. ") Image; opencascade::handle Image(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetFilename ******************/ /**** md5 signature: 6a233cc8b98d909eb32820cdf5db7e12 ****/ %feature("compactdefaultargs") SetFilename; @@ -5044,14 +5351,23 @@ No available documentation. ") Center; gp_Vec2d Center(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Rotation ******************/ /**** md5 signature: 88f76ec12684cd0cd3209460634d1bdf ****/ %feature("compactdefaultargs") Rotation; @@ -5221,14 +5537,23 @@ No available documentation. ") Point; opencascade::handle Point(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetPoint ******************/ /**** md5 signature: 576fe8b6b9484adc1a8a9d7148ed1d10 ****/ %feature("compactdefaultargs") SetPoint; @@ -5311,14 +5636,23 @@ No available documentation. ") Center; gp_Vec Center(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** Rotation ******************/ /**** md5 signature: df13dcf1c8ca3c02d862abf4780b0be5 ****/ %feature("compactdefaultargs") Rotation; @@ -5488,14 +5822,23 @@ No available documentation. ") Vrml_TransformSeparator; Vrml_TransformSeparator(); + /****************** Print ******************/ + /**** md5 signature: a7a6d9b084f11fb866b7f1da61c9ed6a ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; }; @@ -5541,14 +5884,23 @@ No available documentation. ") Vrml_Translation; Vrml_Translation(const gp_Vec & aTranslation); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetTranslation ******************/ /**** md5 signature: 1646e68b1d3f51460ff79d25f8092903 ****/ %feature("compactdefaultargs") SetTranslation; @@ -5653,14 +6005,23 @@ No available documentation. ") Name; TCollection_AsciiString Name(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetDescription ******************/ /**** md5 signature: 24d19d040b0a10c936dfd6335381c7d8 ****/ %feature("compactdefaultargs") SetDescription; @@ -5801,14 +6162,23 @@ No available documentation. ") Name; TCollection_AsciiString Name(); + /****************** Print ******************/ + /**** md5 signature: fb65164879bb8268c90b67d68359a682 ****/ + %feature("compactdefaultargs") Print; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Print; + Standard_OStream & Print(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string PrintToString() { - std::stringstream s; - self->Print(s); - return s.str();} - }; /****************** SetBboxCenter ******************/ /**** md5 signature: 75eefe6a1bfe942ba05eca3afdd6a9bf ****/ %feature("compactdefaultargs") SetBboxCenter; @@ -5878,3 +6248,14 @@ No available documentation. /* class aliases */ %pythoncode { } +/* deprecated methods */ +%pythoncode { +@deprecated +def vrml_CommentWriter(*args): + return vrml.CommentWriter(*args) + +@deprecated +def vrml_VrmlHeaderWriter(*args): + return vrml.VrmlHeaderWriter(*args) + +} diff --git a/src/SWIG_files/wrapper/Vrml.pyi b/src/SWIG_files/wrapper/Vrml.pyi index 5a064d3e3..9e8fe2012 100644 --- a/src/SWIG_files/wrapper/Vrml.pyi +++ b/src/SWIG_files/wrapper/Vrml.pyi @@ -141,7 +141,10 @@ Vrml_MAP_NONE = Vrml_WWWAnchorMap.Vrml_MAP_NONE Vrml_POINT = Vrml_WWWAnchorMap.Vrml_POINT class vrml: - pass + @staticmethod + def CommentWriter(aComment: str) -> Tuple[Standard_OStream, str]: ... + @staticmethod + def VrmlHeaderWriter() -> Tuple[Standard_OStream, str]: ... class Vrml_AsciiText(Standard_Transient): @overload @@ -149,6 +152,7 @@ class Vrml_AsciiText(Standard_Transient): @overload def __init__(self, aString: TColStd_HArray1OfAsciiString, aSpacing: float, aJustification: Vrml_AsciiTextJustification, aWidth: float) -> None: ... def Justification(self) -> Vrml_AsciiTextJustification: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetJustification(self, aJustification: Vrml_AsciiTextJustification) -> None: ... def SetSpacing(self, aSpacing: float) -> None: ... def SetString(self, aString: TColStd_HArray1OfAsciiString) -> None: ... @@ -162,6 +166,7 @@ class Vrml_Cone: def BottomRadius(self) -> float: ... def Height(self) -> float: ... def Parts(self) -> Vrml_ConeParts: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetBottomRadius(self, aBottomRadius: float) -> None: ... def SetHeight(self, aHeight: float) -> None: ... def SetParts(self, aParts: Vrml_ConeParts) -> None: ... @@ -187,12 +192,14 @@ class Vrml_Coordinate3(Standard_Transient): @overload def __init__(self) -> None: ... def Point(self) -> TColgp_HArray1OfVec: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetPoint(self, aPoint: TColgp_HArray1OfVec) -> None: ... class Vrml_Cube: def __init__(self, aWidth: Optional[float] = 2, aHeight: Optional[float] = 2, aDepth: Optional[float] = 2) -> None: ... def Depth(self) -> float: ... def Height(self) -> float: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetDepth(self, aDepth: float) -> None: ... def SetHeight(self, aHeight: float) -> None: ... def SetWidth(self, aWidth: float) -> None: ... @@ -202,6 +209,7 @@ class Vrml_Cylinder: def __init__(self, aParts: Optional[Vrml_CylinderParts] = Vrml_CylinderALL, aRadius: Optional[float] = 1, aHeight: Optional[float] = 2) -> None: ... def Height(self) -> float: ... def Parts(self) -> Vrml_CylinderParts: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def Radius(self) -> float: ... def SetHeight(self, aHeight: float) -> None: ... def SetParts(self, aParts: Vrml_CylinderParts) -> None: ... @@ -216,6 +224,7 @@ class Vrml_DirectionalLight: def Direction(self) -> gp_Vec: ... def Intensity(self) -> float: ... def OnOff(self) -> bool: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetColor(self, aColor: Quantity_Color) -> None: ... def SetDirection(self, aDirection: gp_Vec) -> None: ... def SetIntensity(self, aIntensity: float) -> None: ... @@ -224,6 +233,7 @@ class Vrml_DirectionalLight: class Vrml_FontStyle: def __init__(self, aSize: Optional[float] = 10, aFamily: Optional[Vrml_FontStyleFamily] = Vrml_SERIF, aStyle: Optional[Vrml_FontStyleStyle] = Vrml_NONE) -> None: ... def Family(self) -> Vrml_FontStyleFamily: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetFamily(self, aFamily: Vrml_FontStyleFamily) -> None: ... def SetSize(self, aSize: float) -> None: ... def SetStyle(self, aStyle: Vrml_FontStyleStyle) -> None: ... @@ -232,6 +242,7 @@ class Vrml_FontStyle: class Vrml_Group: def __init__(self) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... class Vrml_IndexedFaceSet(Standard_Transient): @overload @@ -241,6 +252,7 @@ class Vrml_IndexedFaceSet(Standard_Transient): def CoordIndex(self) -> TColStd_HArray1OfInteger: ... def MaterialIndex(self) -> TColStd_HArray1OfInteger: ... def NormalIndex(self) -> TColStd_HArray1OfInteger: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetCoordIndex(self, aCoordIndex: TColStd_HArray1OfInteger) -> None: ... def SetMaterialIndex(self, aMaterialIndex: TColStd_HArray1OfInteger) -> None: ... def SetNormalIndex(self, aNormalIndex: TColStd_HArray1OfInteger) -> None: ... @@ -255,6 +267,7 @@ class Vrml_IndexedLineSet(Standard_Transient): def CoordIndex(self) -> TColStd_HArray1OfInteger: ... def MaterialIndex(self) -> TColStd_HArray1OfInteger: ... def NormalIndex(self) -> TColStd_HArray1OfInteger: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetCoordIndex(self, aCoordIndex: TColStd_HArray1OfInteger) -> None: ... def SetMaterialIndex(self, aMaterialIndex: TColStd_HArray1OfInteger) -> None: ... def SetNormalIndex(self, aNormalIndex: TColStd_HArray1OfInteger) -> None: ... @@ -263,11 +276,14 @@ class Vrml_IndexedLineSet(Standard_Transient): class Vrml_Info: def __init__(self, aString: Optional[str] = "") -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetString(self, aString: str) -> None: ... def String(self) -> str: ... class Vrml_Instancing: def __init__(self, aString: str) -> None: ... + def DEF(self) -> Tuple[Standard_OStream, str]: ... + def USE(self) -> Tuple[Standard_OStream, str]: ... class Vrml_LOD(Standard_Transient): @overload @@ -275,6 +291,7 @@ class Vrml_LOD(Standard_Transient): @overload def __init__(self, aRange: TColStd_HArray1OfReal, aCenter: gp_Vec) -> None: ... def Center(self) -> gp_Vec: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def Range(self) -> TColStd_HArray1OfReal: ... def SetCenter(self, aCenter: gp_Vec) -> None: ... def SetRange(self, aRange: TColStd_HArray1OfReal) -> None: ... @@ -287,6 +304,7 @@ class Vrml_Material(Standard_Transient): def AmbientColor(self) -> Quantity_HArray1OfColor: ... def DiffuseColor(self) -> Quantity_HArray1OfColor: ... def EmissiveColor(self) -> Quantity_HArray1OfColor: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetAmbientColor(self, aAmbientColor: Quantity_HArray1OfColor) -> None: ... def SetDiffuseColor(self, aDiffuseColor: Quantity_HArray1OfColor) -> None: ... def SetEmissiveColor(self, aEmissiveColor: Quantity_HArray1OfColor) -> None: ... @@ -302,6 +320,7 @@ class Vrml_MaterialBinding: def __init__(self, aValue: Vrml_MaterialBindingAndNormalBinding) -> None: ... @overload def __init__(self) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetValue(self, aValue: Vrml_MaterialBindingAndNormalBinding) -> None: ... def Value(self) -> Vrml_MaterialBindingAndNormalBinding: ... @@ -311,6 +330,7 @@ class Vrml_MatrixTransform: @overload def __init__(self, aMatrix: gp_Trsf) -> None: ... def Matrix(self) -> gp_Trsf: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetMatrix(self, aMatrix: gp_Trsf) -> None: ... class Vrml_Normal(Standard_Transient): @@ -318,6 +338,7 @@ class Vrml_Normal(Standard_Transient): def __init__(self, aVector: TColgp_HArray1OfVec) -> None: ... @overload def __init__(self) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetVector(self, aVector: TColgp_HArray1OfVec) -> None: ... def Vector(self) -> TColgp_HArray1OfVec: ... @@ -326,6 +347,7 @@ class Vrml_NormalBinding: def __init__(self, aValue: Vrml_MaterialBindingAndNormalBinding) -> None: ... @overload def __init__(self) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetValue(self, aValue: Vrml_MaterialBindingAndNormalBinding) -> None: ... def Value(self) -> Vrml_MaterialBindingAndNormalBinding: ... @@ -338,6 +360,7 @@ class Vrml_OrthographicCamera: def Height(self) -> float: ... def Orientation(self) -> Vrml_SFRotation: ... def Position(self) -> gp_Vec: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetFocalDistance(self, aFocalDistance: float) -> None: ... def SetHeight(self, aHeight: float) -> None: ... def SetOrientation(self, aOrientation: Vrml_SFRotation) -> None: ... @@ -352,6 +375,7 @@ class Vrml_PerspectiveCamera: def FocalDistance(self) -> float: ... def Orientation(self) -> Vrml_SFRotation: ... def Position(self) -> gp_Vec: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetAngle(self, aHeightAngle: float) -> None: ... def SetFocalDistance(self, aFocalDistance: float) -> None: ... def SetOrientation(self, aOrientation: Vrml_SFRotation) -> None: ... @@ -366,6 +390,7 @@ class Vrml_PointLight: def Intensity(self) -> float: ... def Location(self) -> gp_Vec: ... def OnOff(self) -> bool: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetColor(self, aColor: Quantity_Color) -> None: ... def SetIntensity(self, aIntensity: float) -> None: ... def SetLocation(self, aLocation: gp_Vec) -> None: ... @@ -374,6 +399,7 @@ class Vrml_PointLight: class Vrml_PointSet: def __init__(self, aStartIndex: Optional[int] = 0, aNumPoints: Optional[int] = -1) -> None: ... def NumPoints(self) -> int: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetNumPoints(self, aNumPoints: int) -> None: ... def SetStartIndex(self, aStartIndex: int) -> None: ... def StartIndex(self) -> int: ... @@ -407,6 +433,7 @@ class Vrml_Rotation: def __init__(self) -> None: ... @overload def __init__(self, aRotation: Vrml_SFRotation) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def Rotation(self) -> Vrml_SFRotation: ... def SetRotation(self, aRotation: Vrml_SFRotation) -> None: ... @@ -444,6 +471,7 @@ class Vrml_Scale: def __init__(self) -> None: ... @overload def __init__(self, aScaleFactor: gp_Vec) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def ScaleFactor(self) -> gp_Vec: ... def SetScaleFactor(self, aScaleFactor: gp_Vec) -> None: ... @@ -452,6 +480,7 @@ class Vrml_Separator: def __init__(self, aRenderCulling: Vrml_SeparatorRenderCulling) -> None: ... @overload def __init__(self) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def RenderCulling(self) -> Vrml_SeparatorRenderCulling: ... def SetRenderCulling(self, aRenderCulling: Vrml_SeparatorRenderCulling) -> None: ... @@ -459,6 +488,7 @@ class Vrml_ShapeHints: def __init__(self, aVertexOrdering: Optional[Vrml_VertexOrdering] = Vrml_UNKNOWN_ORDERING, aShapeType: Optional[Vrml_ShapeType] = Vrml_UNKNOWN_SHAPE_TYPE, aFaceType: Optional[Vrml_FaceType] = Vrml_CONVEX, aAngle: Optional[float] = 0.5) -> None: ... def Angle(self) -> float: ... def FaceType(self) -> Vrml_FaceType: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetAngle(self, aAngle: float) -> None: ... def SetFaceType(self, aFaceType: Vrml_FaceType) -> None: ... def SetShapeType(self, aShapeType: Vrml_ShapeType) -> None: ... @@ -468,6 +498,7 @@ class Vrml_ShapeHints: class Vrml_Sphere: def __init__(self, aRadius: Optional[float] = 1) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def Radius(self) -> float: ... def SetRadius(self, aRadius: float) -> None: ... @@ -483,6 +514,7 @@ class Vrml_SpotLight: def Intensity(self) -> float: ... def Location(self) -> gp_Vec: ... def OnOff(self) -> bool: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetColor(self, aColor: Quantity_Color) -> None: ... def SetCutOffAngle(self, aCutOffAngle: float) -> None: ... def SetDirection(self, aDirection: gp_Vec) -> None: ... @@ -493,6 +525,7 @@ class Vrml_SpotLight: class Vrml_Switch: def __init__(self, aWhichChild: Optional[int] = -1) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetWhichChild(self, aWhichChild: int) -> None: ... def WhichChild(self) -> int: ... @@ -503,6 +536,7 @@ class Vrml_Texture2: def __init__(self, aFilename: str, aImage: Vrml_SFImage, aWrapS: Vrml_Texture2Wrap, aWrapT: Vrml_Texture2Wrap) -> None: ... def Filename(self) -> str: ... def Image(self) -> Vrml_SFImage: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetFilename(self, aFilename: str) -> None: ... def SetImage(self, aImage: Vrml_SFImage) -> None: ... def SetWrapS(self, aWrapS: Vrml_Texture2Wrap) -> None: ... @@ -516,6 +550,7 @@ class Vrml_Texture2Transform: @overload def __init__(self, aTranslation: gp_Vec2d, aRotation: float, aScaleFactor: gp_Vec2d, aCenter: gp_Vec2d) -> None: ... def Center(self) -> gp_Vec2d: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def Rotation(self) -> float: ... def ScaleFactor(self) -> gp_Vec2d: ... def SetCenter(self, aCenter: gp_Vec2d) -> None: ... @@ -530,6 +565,7 @@ class Vrml_TextureCoordinate2(Standard_Transient): @overload def __init__(self, aPoint: TColgp_HArray1OfVec2d) -> None: ... def Point(self) -> TColgp_HArray1OfVec2d: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetPoint(self, aPoint: TColgp_HArray1OfVec2d) -> None: ... class Vrml_Transform: @@ -538,6 +574,7 @@ class Vrml_Transform: @overload def __init__(self, aTranslation: gp_Vec, aRotation: Vrml_SFRotation, aScaleFactor: gp_Vec, aScaleOrientation: Vrml_SFRotation, aCenter: gp_Vec) -> None: ... def Center(self) -> gp_Vec: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def Rotation(self) -> Vrml_SFRotation: ... def ScaleFactor(self) -> gp_Vec: ... def ScaleOrientation(self) -> Vrml_SFRotation: ... @@ -550,12 +587,14 @@ class Vrml_Transform: class Vrml_TransformSeparator: def __init__(self) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... class Vrml_Translation: @overload def __init__(self) -> None: ... @overload def __init__(self, aTranslation: gp_Vec) -> None: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetTranslation(self, aTranslation: gp_Vec) -> None: ... def Translation(self) -> gp_Vec: ... @@ -564,6 +603,7 @@ class Vrml_WWWAnchor: def Description(self) -> str: ... def Map(self) -> Vrml_WWWAnchorMap: ... def Name(self) -> str: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetDescription(self, aDescription: str) -> None: ... def SetMap(self, aMap: Vrml_WWWAnchorMap) -> None: ... def SetName(self, aName: str) -> None: ... @@ -576,6 +616,7 @@ class Vrml_WWWInline: def BboxCenter(self) -> gp_Vec: ... def BboxSize(self) -> gp_Vec: ... def Name(self) -> str: ... + def Print(self) -> Tuple[Standard_OStream, str]: ... def SetBboxCenter(self, aBboxCenter: gp_Vec) -> None: ... def SetBboxSize(self, aBboxSize: gp_Vec) -> None: ... def SetName(self, aName: str) -> None: ... diff --git a/src/SWIG_files/wrapper/VrmlAPI.i b/src/SWIG_files/wrapper/VrmlAPI.i index 9ddda5264..b63224dd9 100644 --- a/src/SWIG_files/wrapper/VrmlAPI.i +++ b/src/SWIG_files/wrapper/VrmlAPI.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_vrmlapi.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/VrmlConverter.i b/src/SWIG_files/wrapper/VrmlConverter.i index 8f9aa9615..746b33e01 100644 --- a/src/SWIG_files/wrapper/VrmlConverter.i +++ b/src/SWIG_files/wrapper/VrmlConverter.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_vrmlconverter.htm %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -161,6 +162,67 @@ VrmlConverter_SpotLight = VrmlConverter_TypeOfLight.VrmlConverter_SpotLight ****************************/ class VrmlConverter_Curve { public: + /****************** Add ******************/ + /**** md5 signature: f77568c42bfd62e2909598e33b21279c ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aCurve: Adaptor3d_Curve +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds to the ostream the drawing of the curve acurve. the aspect is defined by lineaspect in adrawer. +") Add; + static void Add(const Adaptor3d_Curve & aCurve, const opencascade::handle & aDrawer, std::ostream &OutValue); + + /****************** Add ******************/ + /**** md5 signature: 3196c4271392c6a3ad65b906ad2f2f95 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aCurve: Adaptor3d_Curve +U1: float +U2: float +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds to the ostream the drawing of the curve acurve. the aspect is defined by lineaspect in adrawer. the drawing will be limited between the points of parameter u1 and u2. +") Add; + static void Add(const Adaptor3d_Curve & aCurve, const Standard_Real U1, const Standard_Real U2, const opencascade::handle & aDrawer, std::ostream &OutValue); + + /****************** Add ******************/ + /**** md5 signature: 4d8e1f226cc328fcdf9186ef585c5a61 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aCurve: Adaptor3d_Curve +U1: float +U2: float +aNbPoints: int + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds to the ostream the drawing of the curve acurve. the aspect is the current aspect. the drawing will be limited between the points of parameter u1 and u2. anbpoints defines number of points on one interval. +") Add; + static void Add(const Adaptor3d_Curve & aCurve, const Standard_Real U1, const Standard_Real U2, std::ostream &OutValue, const Standard_Integer aNbPoints); + }; @@ -175,6 +237,128 @@ class VrmlConverter_Curve { **************************************/ class VrmlConverter_DeflectionCurve { public: + /****************** Add ******************/ + /**** md5 signature: fa3cf6474a22907885c6263224b0cf1a ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aCurve: Adaptor3d_Curve +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds to the ostream the drawing of the curve acurve with respect to the maximal chordial deviation defined by the drawer adrawer. the aspect is defined by lineaspect in adrawer. +") Add; + static void Add(std::ostream &OutValue, Adaptor3d_Curve & aCurve, const opencascade::handle & aDrawer); + + /****************** Add ******************/ + /**** md5 signature: 39f475f2bc1fcbcd57f32d9efba5b2a0 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aCurve: Adaptor3d_Curve +U1: float +U2: float +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds to the ostream the drawing of the curve acurve with respect to the maximal chordial deviation defined by the drawer adrawer. the aspect is defined by lineaspect in adrawer. the drawing will be limited between the points of parameter u1 and u2. +") Add; + static void Add(std::ostream &OutValue, Adaptor3d_Curve & aCurve, const Standard_Real U1, const Standard_Real U2, const opencascade::handle & aDrawer); + + /****************** Add ******************/ + /**** md5 signature: 9eb6209c6c437e1de208c514bbc6c3bc ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aCurve: Adaptor3d_Curve +aDeflection: float +aLimit: float + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds to the ostream the drawing of the curve acurve with respect to the maximal chordial deviation adeflection. the aspect is the current aspect. +") Add; + static void Add(std::ostream &OutValue, Adaptor3d_Curve & aCurve, const Standard_Real aDeflection, const Standard_Real aLimit); + + /****************** Add ******************/ + /**** md5 signature: 970b94fef97d65ba55ddab3b8061c036 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aCurve: Adaptor3d_Curve +aDeflection: float +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds to the ostream the drawing of the curve acurve with respect to the maximal chordial deviation adeflection. the aspect is the current aspect. +") Add; + static void Add(std::ostream &OutValue, Adaptor3d_Curve & aCurve, const Standard_Real aDeflection, const opencascade::handle & aDrawer); + + /****************** Add ******************/ + /**** md5 signature: cfb82f5b167e71e8335c2fb562364aae ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aCurve: Adaptor3d_Curve +U1: float +U2: float +aDeflection: float + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds to the ostream the drawing of the curve acurve with respect to the maximal chordial deviation adeflection. the aspect is the current aspect the drawing will be limited between the points of parameter u1 and u2. +") Add; + static void Add(std::ostream &OutValue, Adaptor3d_Curve & aCurve, const Standard_Real U1, const Standard_Real U2, const Standard_Real aDeflection); + + /****************** Add ******************/ + /**** md5 signature: ee27b5c0244974cd4e5e8d540e9f3dd4 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aCurve: Adaptor3d_Curve +aParams: TColStd_HArray1OfReal +aNbNodes: int +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds to the ostream the drawing of the curve acurve with the array of parameters to retrieve points on curve. +") Add; + static void Add(std::ostream &OutValue, const Adaptor3d_Curve & aCurve, const opencascade::handle & aParams, const Standard_Integer aNbNodes, const opencascade::handle & aDrawer); + }; @@ -846,6 +1030,26 @@ Returns true if the drawing of the wire is enabled. *******************************/ class VrmlConverter_HLRShape { public: + /****************** Add ******************/ + /**** md5 signature: 30e4fe59d2964122c8eb4a1e0b4e7266 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aShape: TopoDS_Shape +aDrawer: VrmlConverter_Drawer +aProjector: VrmlConverter_Projector + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Add; + static void Add(std::ostream &OutValue, const TopoDS_Shape & aShape, const opencascade::handle & aDrawer, const opencascade::handle & aProjector); + }; @@ -1107,14 +1311,23 @@ No available documentation. ") VrmlConverter_Projector; VrmlConverter_Projector(const TopTools_Array1OfShape & Shapes, const Standard_Real Focus, const Standard_Real DX, const Standard_Real DY, const Standard_Real DZ, const Standard_Real XUp, const Standard_Real YUp, const Standard_Real ZUp, const VrmlConverter_TypeOfCamera Camera = VrmlConverter_NoCamera, const VrmlConverter_TypeOfLight Light = VrmlConverter_NoLight); + /****************** Add ******************/ + /**** md5 signature: fe7a6c17a63ece511d1868bb0e2144ae ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOStream: Standard_OStream + +Description +----------- +Adds into anostream if they are defined in create. perspectivecamera, orthographiccamera, directionlight, pointlight, spotlight with matrixtransform from vrmlconverter;. +") Add; + void Add(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string AddToString() { - std::stringstream s; - self->Add(s); - return s.str();} - }; /****************** Camera ******************/ /**** md5 signature: b0f9e1c3deb52397f7725e2e4fefc65e ****/ %feature("compactdefaultargs") Camera; @@ -1206,6 +1419,25 @@ No available documentation. **********************************/ class VrmlConverter_ShadedShape { public: + /****************** Add ******************/ + /**** md5 signature: 6853d47fdcd987a19eaa45ce2ad05bc1 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aShape: TopoDS_Shape +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Add; + static void Add(std::ostream &OutValue, const TopoDS_Shape & aShape, const opencascade::handle & aDrawer); + /****************** ComputeNormal ******************/ /**** md5 signature: 94eb9e8b7db2c9db0658575ebc46926f ****/ %feature("compactdefaultargs") ComputeNormal; @@ -1393,6 +1625,87 @@ No available documentation. *************************************************/ class VrmlConverter_WFDeflectionRestrictedFace { public: + /****************** Add ******************/ + /**** md5 signature: 13df692750a7fcf225b5286ed599cc3e ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aFace: BRepAdaptor_Surface +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Add; + static void Add(std::ostream &OutValue, const opencascade::handle & aFace, const opencascade::handle & aDrawer); + + /****************** Add ******************/ + /**** md5 signature: 90da66cc4406b2e2f1bfc7074ed66a78 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aFace: BRepAdaptor_Surface +DrawUIso: bool +DrawVIso: bool +Deflection: float +NBUiso: int +NBViso: int +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Add; + static void Add(std::ostream &OutValue, const opencascade::handle & aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso, const opencascade::handle & aDrawer); + + /****************** AddUIso ******************/ + /**** md5 signature: 4aee442358ca971c2da6856dad976df1 ****/ + %feature("compactdefaultargs") AddUIso; + %feature("autodoc", " +Parameters +---------- +aFace: BRepAdaptor_Surface +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") AddUIso; + static void AddUIso(std::ostream &OutValue, const opencascade::handle & aFace, const opencascade::handle & aDrawer); + + /****************** AddVIso ******************/ + /**** md5 signature: ef51abaf211cf460780b49e6f72a0132 ****/ + %feature("compactdefaultargs") AddVIso; + %feature("autodoc", " +Parameters +---------- +aFace: BRepAdaptor_Surface +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") AddVIso; + static void AddVIso(std::ostream &OutValue, const opencascade::handle & aFace, const opencascade::handle & aDrawer); + }; @@ -1407,6 +1720,25 @@ class VrmlConverter_WFDeflectionRestrictedFace { ****************************************/ class VrmlConverter_WFDeflectionShape { public: + /****************** Add ******************/ + /**** md5 signature: 6853d47fdcd987a19eaa45ce2ad05bc1 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aShape: TopoDS_Shape +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Add; + static void Add(std::ostream &OutValue, const TopoDS_Shape & aShape, const opencascade::handle & aDrawer); + }; @@ -1421,6 +1753,86 @@ class VrmlConverter_WFDeflectionShape { ***************************************/ class VrmlConverter_WFRestrictedFace { public: + /****************** Add ******************/ + /**** md5 signature: 13df692750a7fcf225b5286ed599cc3e ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aFace: BRepAdaptor_Surface +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Add; + static void Add(std::ostream &OutValue, const opencascade::handle & aFace, const opencascade::handle & aDrawer); + + /****************** Add ******************/ + /**** md5 signature: b4d3ff4ee1870e7fad0600d75e3d4ecf ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aFace: BRepAdaptor_Surface +DrawUIso: bool +DrawVIso: bool +NBUiso: int +NBViso: int +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Add; + static void Add(std::ostream &OutValue, const opencascade::handle & aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Integer NBUiso, const Standard_Integer NBViso, const opencascade::handle & aDrawer); + + /****************** AddUIso ******************/ + /**** md5 signature: 4aee442358ca971c2da6856dad976df1 ****/ + %feature("compactdefaultargs") AddUIso; + %feature("autodoc", " +Parameters +---------- +aFace: BRepAdaptor_Surface +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") AddUIso; + static void AddUIso(std::ostream &OutValue, const opencascade::handle & aFace, const opencascade::handle & aDrawer); + + /****************** AddVIso ******************/ + /**** md5 signature: ef51abaf211cf460780b49e6f72a0132 ****/ + %feature("compactdefaultargs") AddVIso; + %feature("autodoc", " +Parameters +---------- +aFace: BRepAdaptor_Surface +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") AddVIso; + static void AddVIso(std::ostream &OutValue, const opencascade::handle & aFace, const opencascade::handle & aDrawer); + }; @@ -1435,6 +1847,25 @@ class VrmlConverter_WFRestrictedFace { ******************************/ class VrmlConverter_WFShape { public: + /****************** Add ******************/ + /**** md5 signature: 6853d47fdcd987a19eaa45ce2ad05bc1 ****/ + %feature("compactdefaultargs") Add; + %feature("autodoc", " +Parameters +---------- +aShape: TopoDS_Shape +aDrawer: VrmlConverter_Drawer + +Return +------- +anOStream: Standard_OStream + +Description +----------- +No available documentation. +") Add; + static void Add(std::ostream &OutValue, const TopoDS_Shape & aShape, const opencascade::handle & aDrawer); + }; @@ -1532,8 +1963,92 @@ No available documentation. } /* deprecated methods */ %pythoncode { +@deprecated +def VrmlConverter_Curve_Add(*args): + return VrmlConverter_Curve.Add(*args) + +@deprecated +def VrmlConverter_Curve_Add(*args): + return VrmlConverter_Curve.Add(*args) + +@deprecated +def VrmlConverter_Curve_Add(*args): + return VrmlConverter_Curve.Add(*args) + +@deprecated +def VrmlConverter_DeflectionCurve_Add(*args): + return VrmlConverter_DeflectionCurve.Add(*args) + +@deprecated +def VrmlConverter_DeflectionCurve_Add(*args): + return VrmlConverter_DeflectionCurve.Add(*args) + +@deprecated +def VrmlConverter_DeflectionCurve_Add(*args): + return VrmlConverter_DeflectionCurve.Add(*args) + +@deprecated +def VrmlConverter_DeflectionCurve_Add(*args): + return VrmlConverter_DeflectionCurve.Add(*args) + +@deprecated +def VrmlConverter_DeflectionCurve_Add(*args): + return VrmlConverter_DeflectionCurve.Add(*args) + +@deprecated +def VrmlConverter_DeflectionCurve_Add(*args): + return VrmlConverter_DeflectionCurve.Add(*args) + +@deprecated +def VrmlConverter_HLRShape_Add(*args): + return VrmlConverter_HLRShape.Add(*args) + +@deprecated +def VrmlConverter_ShadedShape_Add(*args): + return VrmlConverter_ShadedShape.Add(*args) + @deprecated def VrmlConverter_ShadedShape_ComputeNormal(*args): return VrmlConverter_ShadedShape.ComputeNormal(*args) +@deprecated +def VrmlConverter_WFDeflectionRestrictedFace_Add(*args): + return VrmlConverter_WFDeflectionRestrictedFace.Add(*args) + +@deprecated +def VrmlConverter_WFDeflectionRestrictedFace_Add(*args): + return VrmlConverter_WFDeflectionRestrictedFace.Add(*args) + +@deprecated +def VrmlConverter_WFDeflectionRestrictedFace_AddUIso(*args): + return VrmlConverter_WFDeflectionRestrictedFace.AddUIso(*args) + +@deprecated +def VrmlConverter_WFDeflectionRestrictedFace_AddVIso(*args): + return VrmlConverter_WFDeflectionRestrictedFace.AddVIso(*args) + +@deprecated +def VrmlConverter_WFDeflectionShape_Add(*args): + return VrmlConverter_WFDeflectionShape.Add(*args) + +@deprecated +def VrmlConverter_WFRestrictedFace_Add(*args): + return VrmlConverter_WFRestrictedFace.Add(*args) + +@deprecated +def VrmlConverter_WFRestrictedFace_Add(*args): + return VrmlConverter_WFRestrictedFace.Add(*args) + +@deprecated +def VrmlConverter_WFRestrictedFace_AddUIso(*args): + return VrmlConverter_WFRestrictedFace.AddUIso(*args) + +@deprecated +def VrmlConverter_WFRestrictedFace_AddVIso(*args): + return VrmlConverter_WFRestrictedFace.AddVIso(*args) + +@deprecated +def VrmlConverter_WFShape_Add(*args): + return VrmlConverter_WFShape.Add(*args) + } diff --git a/src/SWIG_files/wrapper/VrmlConverter.pyi b/src/SWIG_files/wrapper/VrmlConverter.pyi index 17d3ad63e..9fd0b6b69 100644 --- a/src/SWIG_files/wrapper/VrmlConverter.pyi +++ b/src/SWIG_files/wrapper/VrmlConverter.pyi @@ -36,10 +36,35 @@ VrmlConverter_PointLight = VrmlConverter_TypeOfLight.VrmlConverter_PointLight VrmlConverter_SpotLight = VrmlConverter_TypeOfLight.VrmlConverter_SpotLight class VrmlConverter_Curve: - pass + @overload + @staticmethod + def Add(aCurve: Adaptor3d_Curve, aDrawer: VrmlConverter_Drawer) -> str: ... + @overload + @staticmethod + def Add(aCurve: Adaptor3d_Curve, U1: float, U2: float, aDrawer: VrmlConverter_Drawer) -> str: ... + @overload + @staticmethod + def Add(aCurve: Adaptor3d_Curve, U1: float, U2: float, aNbPoints: int) -> str: ... class VrmlConverter_DeflectionCurve: - pass + @overload + @staticmethod + def Add(aCurve: Adaptor3d_Curve, aDrawer: VrmlConverter_Drawer) -> str: ... + @overload + @staticmethod + def Add(aCurve: Adaptor3d_Curve, U1: float, U2: float, aDrawer: VrmlConverter_Drawer) -> str: ... + @overload + @staticmethod + def Add(aCurve: Adaptor3d_Curve, aDeflection: float, aLimit: float) -> str: ... + @overload + @staticmethod + def Add(aCurve: Adaptor3d_Curve, aDeflection: float, aDrawer: VrmlConverter_Drawer) -> str: ... + @overload + @staticmethod + def Add(aCurve: Adaptor3d_Curve, U1: float, U2: float, aDeflection: float) -> str: ... + @overload + @staticmethod + def Add(aCurve: Adaptor3d_Curve, aParams: TColStd_HArray1OfReal, aNbNodes: int, aDrawer: VrmlConverter_Drawer) -> str: ... class VrmlConverter_Drawer(Standard_Transient): def __init__(self) -> None: ... @@ -86,7 +111,8 @@ class VrmlConverter_Drawer(Standard_Transient): def WireDraw(self) -> bool: ... class VrmlConverter_HLRShape: - pass + @staticmethod + def Add(aShape: TopoDS_Shape, aDrawer: VrmlConverter_Drawer, aProjector: VrmlConverter_Projector) -> str: ... class VrmlConverter_LineAspect(Standard_Transient): @overload @@ -110,6 +136,7 @@ class VrmlConverter_PointAspect(Standard_Transient): class VrmlConverter_Projector(Standard_Transient): def __init__(self, Shapes: TopTools_Array1OfShape, Focus: float, DX: float, DY: float, DZ: float, XUp: float, YUp: float, ZUp: float, Camera: Optional[VrmlConverter_TypeOfCamera] = VrmlConverter_NoCamera, Light: Optional[VrmlConverter_TypeOfLight] = VrmlConverter_NoLight) -> None: ... + def Add(self) -> str: ... def Camera(self) -> VrmlConverter_TypeOfCamera: ... def Light(self) -> VrmlConverter_TypeOfLight: ... def Projector(self) -> HLRAlgo_Projector: ... @@ -117,6 +144,8 @@ class VrmlConverter_Projector(Standard_Transient): def SetLight(self, aLight: VrmlConverter_TypeOfLight) -> None: ... class VrmlConverter_ShadedShape: + @staticmethod + def Add(aShape: TopoDS_Shape, aDrawer: VrmlConverter_Drawer) -> str: ... @staticmethod def ComputeNormal(aFace: TopoDS_Face, pc: Poly_Connect, Nor: TColgp_Array1OfDir) -> None: ... @@ -132,16 +161,36 @@ class VrmlConverter_ShadingAspect(Standard_Transient): def ShapeHints(self) -> Vrml_ShapeHints: ... class VrmlConverter_WFDeflectionRestrictedFace: - pass + @overload + @staticmethod + def Add(aFace: BRepAdaptor_Surface, aDrawer: VrmlConverter_Drawer) -> str: ... + @overload + @staticmethod + def Add(aFace: BRepAdaptor_Surface, DrawUIso: bool, DrawVIso: bool, Deflection: float, NBUiso: int, NBViso: int, aDrawer: VrmlConverter_Drawer) -> str: ... + @staticmethod + def AddUIso(aFace: BRepAdaptor_Surface, aDrawer: VrmlConverter_Drawer) -> str: ... + @staticmethod + def AddVIso(aFace: BRepAdaptor_Surface, aDrawer: VrmlConverter_Drawer) -> str: ... class VrmlConverter_WFDeflectionShape: - pass + @staticmethod + def Add(aShape: TopoDS_Shape, aDrawer: VrmlConverter_Drawer) -> str: ... class VrmlConverter_WFRestrictedFace: - pass + @overload + @staticmethod + def Add(aFace: BRepAdaptor_Surface, aDrawer: VrmlConverter_Drawer) -> str: ... + @overload + @staticmethod + def Add(aFace: BRepAdaptor_Surface, DrawUIso: bool, DrawVIso: bool, NBUiso: int, NBViso: int, aDrawer: VrmlConverter_Drawer) -> str: ... + @staticmethod + def AddUIso(aFace: BRepAdaptor_Surface, aDrawer: VrmlConverter_Drawer) -> str: ... + @staticmethod + def AddVIso(aFace: BRepAdaptor_Surface, aDrawer: VrmlConverter_Drawer) -> str: ... class VrmlConverter_WFShape: - pass + @staticmethod + def Add(aShape: TopoDS_Shape, aDrawer: VrmlConverter_Drawer) -> str: ... class VrmlConverter_IsoAspect(VrmlConverter_LineAspect): @overload diff --git a/src/SWIG_files/wrapper/VrmlData.i b/src/SWIG_files/wrapper/VrmlData.i index 1df61dbd5..4cc98c93f 100644 --- a/src/SWIG_files/wrapper/VrmlData.i +++ b/src/SWIG_files/wrapper/VrmlData.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_vrmldata.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -509,14 +510,23 @@ Description ") Allocator; const opencascade::handle & Allocator(); + /****************** Dump ******************/ + /**** md5 signature: c7b7f3310b5193de5f2365d935cd2c95 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theStream: Standard_OStream + +Description +----------- +/** * diagnostic dump of the contents */. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** FindNode ******************/ /**** md5 signature: bb943cbcf67db155aea431d31d5e4097 ****/ %feature("compactdefaultargs") FindNode; diff --git a/src/SWIG_files/wrapper/VrmlData.pyi b/src/SWIG_files/wrapper/VrmlData.pyi index c6c7de38b..9453eb741 100644 --- a/src/SWIG_files/wrapper/VrmlData.pyi +++ b/src/SWIG_files/wrapper/VrmlData.pyi @@ -90,6 +90,7 @@ class VrmlData_Node(Standard_Transient): class VrmlData_Scene: def AddNode(self, theN: VrmlData_Node, isTopLevel: Optional[bool] = True) -> VrmlData_Node: ... def Allocator(self) -> NCollection_IncAllocator: ... + def Dump(self) -> str: ... @overload def FindNode(self, theName: str, theType: Optional[Standard_Type] = 0) -> VrmlData_Node: ... @overload diff --git a/src/SWIG_files/wrapper/XBRepMesh.i b/src/SWIG_files/wrapper/XBRepMesh.i index 142d34301..1bb1aa4bf 100644 --- a/src/SWIG_files/wrapper/XBRepMesh.i +++ b/src/SWIG_files/wrapper/XBRepMesh.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xbrepmesh.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XCAFApp.i b/src/SWIG_files/wrapper/XCAFApp.i index eee017a43..d9ccfd265 100644 --- a/src/SWIG_files/wrapper/XCAFApp.i +++ b/src/SWIG_files/wrapper/XCAFApp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xcafapp.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -91,10 +92,22 @@ from OCC.Core.Exception import * class XCAFApp_Application : public TDocStd_Application { public: - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/XCAFApp.pyi b/src/SWIG_files/wrapper/XCAFApp.pyi index 07fa98ac4..d699479a6 100644 --- a/src/SWIG_files/wrapper/XCAFApp.pyi +++ b/src/SWIG_files/wrapper/XCAFApp.pyi @@ -8,6 +8,7 @@ from OCC.Core.CDM import * class XCAFApp_Application(TDocStd_Application): + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def GetApplication() -> XCAFApp_Application: ... def InitDocument(self, aDoc: CDM_Document) -> None: ... diff --git a/src/SWIG_files/wrapper/XCAFDimTolObjects.i b/src/SWIG_files/wrapper/XCAFDimTolObjects.i index df5b83304..678fcfc55 100644 --- a/src/SWIG_files/wrapper/XCAFDimTolObjects.i +++ b/src/SWIG_files/wrapper/XCAFDimTolObjects.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xcafdimtolobjects %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -852,10 +853,22 @@ Adds a modifier to the datum sequence of modifiers. void AddModifier(const XCAFDimTolObjects_DatumSingleModif theModifier); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1513,10 +1526,22 @@ Adds a modifier to the dimension sequence of modifiers. void AddModifier(const XCAFDimTolObjects_DimensionModif theModifier); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2437,10 +2462,22 @@ Adds a tolerance modifier to the sequence of modifiers. void AddModifier(const XCAFDimTolObjects_GeomToleranceModif theModifier); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/XCAFDimTolObjects.pyi b/src/SWIG_files/wrapper/XCAFDimTolObjects.pyi index 5b12232d6..5b578482a 100644 --- a/src/SWIG_files/wrapper/XCAFDimTolObjects.pyi +++ b/src/SWIG_files/wrapper/XCAFDimTolObjects.pyi @@ -533,6 +533,7 @@ class XCAFDimTolObjects_DatumObject(Standard_Transient): @overload def __init__(self, theObj: XCAFDimTolObjects_DatumObject) -> None: ... def AddModifier(self, theModifier: XCAFDimTolObjects_DatumSingleModif) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetDatumTarget(self) -> TopoDS_Shape: ... def GetDatumTargetAxis(self) -> gp_Ax2: ... def GetDatumTargetLength(self) -> float: ... @@ -580,6 +581,7 @@ class XCAFDimTolObjects_DimensionObject(Standard_Transient): def __init__(self, theObj: XCAFDimTolObjects_DimensionObject) -> None: ... def AddDescription(self, theDescription: TCollection_HAsciiString, theName: TCollection_HAsciiString) -> None: ... def AddModifier(self, theModifier: XCAFDimTolObjects_DimensionModif) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetAngularQualifier(self) -> XCAFDimTolObjects_AngularQualifier: ... def GetClassOfTolerance(self) -> Tuple[bool, bool, XCAFDimTolObjects_DimensionFormVariance, XCAFDimTolObjects_DimensionGrade]: ... def GetDescription(self, theNumber: int) -> TCollection_HAsciiString: ... @@ -642,6 +644,7 @@ class XCAFDimTolObjects_GeomToleranceObject(Standard_Transient): @overload def __init__(self, theObj: XCAFDimTolObjects_GeomToleranceObject) -> None: ... def AddModifier(self, theModifier: XCAFDimTolObjects_GeomToleranceModif) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetAffectedPlane(self) -> gp_Pln: ... def GetAffectedPlaneType(self) -> XCAFDimTolObjects_ToleranceZoneAffectedPlane: ... def GetAxis(self) -> gp_Ax2: ... diff --git a/src/SWIG_files/wrapper/XCAFDoc.i b/src/SWIG_files/wrapper/XCAFDoc.i index 0be93bf0c..34f33ae6c 100644 --- a/src/SWIG_files/wrapper/XCAFDoc.i +++ b/src/SWIG_files/wrapper/XCAFDoc.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xcafdoc.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -538,19 +539,40 @@ Class methods =============. ") XCAFDoc_Area; XCAFDoc_Area(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -988,10 +1010,22 @@ Constructs an item id from a formatted path, where label entries are separated b XCAFDoc_AssemblyItemId(TCollection_AsciiString theString); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1178,19 +1212,40 @@ Reverts the reference to empty state. ") ClearExtraRef; void ClearExtraRef(); + /****************** Dump ******************/ + /**** md5 signature: 5900f1be94c8ace2c0d3b27c867f6964 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +theOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -1665,19 +1720,40 @@ Class methods =============. ") XCAFDoc_Centroid; XCAFDoc_Centroid(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2190,10 +2266,22 @@ No available documentation. XCAFDoc_Color(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2591,10 +2679,22 @@ Returns the label under which colors are stored. TDF_Label BaseLabel(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3373,10 +3473,22 @@ No available documentation. XCAFDoc_Datum(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3616,10 +3728,22 @@ No available documentation. XCAFDoc_DimTol(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -3918,10 +4042,22 @@ Returns the label under which gd&t table is stored. TDF_Label BaseLabel(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -4684,10 +4820,22 @@ No available documentation. XCAFDoc_Dimension(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -5692,19 +5840,40 @@ Return index of , or zero if there is no such graphnode. ") ChildIndex; Standard_Integer ChildIndex(const opencascade::handle & Ch); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6181,10 +6350,22 @@ Returns the label under which layers are stored. TDF_Label BaseLabel(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -6823,19 +7004,40 @@ No available documentation. ") XCAFDoc_LengthUnit; XCAFDoc_LengthUnit(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7051,10 +7253,22 @@ Class methods =============. XCAFDoc_Location(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7215,10 +7429,22 @@ No available documentation. XCAFDoc_Material(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7474,10 +7700,22 @@ Returns the label under which colors are stored. TDF_Label BaseLabel(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7674,19 +7912,40 @@ Returns internal xcafdoc_shapetool tool. %nodefaultctor XCAFDoc_Note; class XCAFDoc_Note : public TDF_Attribute { public: + /****************** Dump ******************/ + /**** md5 signature: 5900f1be94c8ace2c0d3b27c867f6964 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +theOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -8146,14 +8405,23 @@ Deletes all notes that aren't linked to annotated items. eturn number of deleted ") DeleteOrphanNotes; Standard_Integer DeleteOrphanNotes(); + /****************** Dump ******************/ + /**** md5 signature: 5900f1be94c8ace2c0d3b27c867f6964 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** FindAnnotatedItem ******************/ /**** md5 signature: 7e562ae1ec4bb3d6b2a750f4a95ec514 ****/ %feature("compactdefaultargs") FindAnnotatedItem; @@ -8815,10 +9083,22 @@ Creates an empty tool. XCAFDoc_ShapeMapTool(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -9151,23 +9431,82 @@ Compute a sequence of simple shapes. ") ComputeSimpleShapes; void ComputeSimpleShapes(); + /****************** Dump ******************/ + /**** md5 signature: 9525c4d4f916b1cfc4b55811ff206921 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- +deep: bool + +Return +------- +theDumpLog: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(std::ostream &OutValue, const Standard_Boolean deep); + + /****************** Dump ******************/ + /**** md5 signature: 312419919cb512dd33889a5d722f75a9 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theDumpLog: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} }; + /****************** DumpShape ******************/ + /**** md5 signature: b32ec97d93175bc3ce06699fc7ba1c6b ****/ + %feature("compactdefaultargs") DumpShape; + %feature("autodoc", " +Parameters +---------- +L: TDF_Label +level: int (optional, default to 0) +deep: bool (optional, default to Standard_False) + +Return +------- +theDumpLog: Standard_OStream + +Description +----------- +Print to std::ostream type of shape found on label and the entry of , with tabs before. if , print also tshape and location addresses. +") DumpShape; + static void DumpShape(std::ostream &OutValue, const TDF_Label & L, const Standard_Integer level = 0, const Standard_Boolean deep = Standard_False); + /****************** Expand ******************/ /**** md5 signature: 303313cc4599e4d88e82e690ea6d0ec6 ****/ %feature("compactdefaultargs") Expand; @@ -10911,10 +11250,22 @@ Return pbr material or convert common into pbr material. XCAFDoc_VisMaterialPBR ConvertToPbrMaterial(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -11313,10 +11664,22 @@ Empty constructor. XCAFDoc_VisMaterialCommon(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -11378,10 +11741,22 @@ Empty constructor. XCAFDoc_VisMaterialPBR(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -11873,19 +12248,40 @@ Class methods =============. ") XCAFDoc_Volume; XCAFDoc_Volume(); + /****************** Dump ******************/ + /**** md5 signature: 3398f1042b24f9ae49f7e8da6125f793 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; +Return +------- +anOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + virtual Standard_OStream & Dump(std::ostream &OutValue); + + + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -12026,14 +12422,23 @@ Returns byte data array. ") Data; const opencascade::handle & Data(); + /****************** Dump ******************/ + /**** md5 signature: 5900f1be94c8ace2c0d3b27c867f6964 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Get ******************/ /**** md5 signature: 02af6bbbdbedcc1ca4399ebdbd529b59 ****/ %feature("compactdefaultargs") Get; @@ -12295,14 +12700,23 @@ Returns the comment text. ") Comment; const TCollection_ExtendedString & Comment(); + /****************** Dump ******************/ + /**** md5 signature: 5900f1be94c8ace2c0d3b27c867f6964 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theOS: Standard_OStream + +Description +----------- +No available documentation. +") Dump; + Standard_OStream & Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Get ******************/ /**** md5 signature: 821f268035461249ad0ec3f1760ab2ea ****/ %feature("compactdefaultargs") Get; @@ -13090,6 +13504,10 @@ def XCAFDoc_ShapeMapTool_Set(*args): def XCAFDoc_ShapeTool_AutoNaming(*args): return XCAFDoc_ShapeTool.AutoNaming(*args) +@deprecated +def XCAFDoc_ShapeTool_DumpShape(*args): + return XCAFDoc_ShapeTool.DumpShape(*args) + @deprecated def XCAFDoc_ShapeTool_FindSHUO(*args): return XCAFDoc_ShapeTool.FindSHUO(*args) diff --git a/src/SWIG_files/wrapper/XCAFDoc.pyi b/src/SWIG_files/wrapper/XCAFDoc.pyi index 8109afc7f..4973246c0 100644 --- a/src/SWIG_files/wrapper/XCAFDoc.pyi +++ b/src/SWIG_files/wrapper/XCAFDoc.pyi @@ -100,6 +100,8 @@ class xcafdoc: class XCAFDoc_Area(TDataStd_Real): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Get(self) -> float: ... @overload @@ -139,6 +141,7 @@ class XCAFDoc_AssemblyItemId: def __init__(self, thePath: TColStd_ListOfAsciiString) -> None: ... @overload def __init__(self, theString: str) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetPath(self) -> TColStd_ListOfAsciiString: ... @overload def Init(self, thePath: TColStd_ListOfAsciiString) -> None: ... @@ -154,6 +157,8 @@ class XCAFDoc_AssemblyItemId: class XCAFDoc_AssemblyItemRef(TDF_Attribute): def __init__(self) -> None: ... def ClearExtraRef(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def Get(theLabel: TDF_Label) -> XCAFDoc_AssemblyItemRef: ... def GetGUID(self) -> Standard_GUID: ... @@ -201,6 +206,8 @@ class XCAFDoc_AssemblyTool: class XCAFDoc_Centroid(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Get(self) -> gp_Pnt: ... @overload @@ -250,6 +257,7 @@ class XCAFDoc_ClippingPlaneTool(TDataStd_GenericEmpty): class XCAFDoc_Color(TDF_Attribute): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetAlpha(self) -> float: ... def GetColor(self) -> Quantity_Color: ... def GetColorRGBA(self) -> Quantity_ColorRGBA: ... @@ -291,6 +299,7 @@ class XCAFDoc_ColorTool(TDataStd_GenericEmpty): @staticmethod def AutoNaming() -> bool: ... def BaseLabel(self) -> TDF_Label: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def FindColor(self, col: Quantity_Color, lab: TDF_Label) -> bool: ... @overload @@ -369,6 +378,7 @@ class XCAFDoc_ColorTool(TDataStd_GenericEmpty): class XCAFDoc_Datum(TDF_Attribute): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetDescription(self) -> TCollection_HAsciiString: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -391,6 +401,7 @@ class XCAFDoc_Datum(TDF_Attribute): class XCAFDoc_DimTol(TDF_Attribute): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetDescription(self) -> TCollection_HAsciiString: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -417,6 +428,7 @@ class XCAFDoc_DimTolTool(TDataStd_GenericEmpty): def AddDimension(self) -> TDF_Label: ... def AddGeomTolerance(self) -> TDF_Label: ... def BaseLabel(self) -> TDF_Label: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FindDatum(self, theName: TCollection_HAsciiString, theDescription: TCollection_HAsciiString, theIdentification: TCollection_HAsciiString, lab: TDF_Label) -> bool: ... @overload def FindDimTol(self, theKind: int, theVal: TColStd_HArray1OfReal, theName: TCollection_HAsciiString, theDescription: TCollection_HAsciiString, lab: TDF_Label) -> bool: ... @@ -473,6 +485,7 @@ class XCAFDoc_DimTolTool(TDataStd_GenericEmpty): class XCAFDoc_Dimension(TDataStd_GenericEmpty): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... def GetObject(self) -> XCAFDimTolObjects_DimensionObject: ... @@ -583,6 +596,8 @@ class XCAFDoc_GraphNode(TDF_Attribute): def __init__(self) -> None: ... def BeforeForget(self) -> None: ... def ChildIndex(self, Ch: XCAFDoc_GraphNode) -> int: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FatherIndex(self, F: XCAFDoc_GraphNode) -> int: ... @staticmethod def Find(L: TDF_Label, G: XCAFDoc_GraphNode) -> bool: ... @@ -624,6 +639,7 @@ class XCAFDoc_LayerTool(TDataStd_GenericEmpty): @overload def AddLayer(self, theLayer: str, theToFindVisible: bool) -> TDF_Label: ... def BaseLabel(self) -> TDF_Label: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def FindLayer(self, aLayer: str, lab: TDF_Label) -> bool: ... @overload @@ -685,6 +701,8 @@ class XCAFDoc_LayerTool(TDataStd_GenericEmpty): class XCAFDoc_LengthUnit(TDF_Attribute): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... def GetUnitName(self) -> str: ... @@ -707,6 +725,7 @@ class XCAFDoc_LengthUnit(TDF_Attribute): class XCAFDoc_Location(TDF_Attribute): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Get(self) -> TopLoc_Location: ... @staticmethod def GetID() -> Standard_GUID: ... @@ -722,6 +741,7 @@ class XCAFDoc_Location(TDF_Attribute): class XCAFDoc_Material(TDF_Attribute): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetDensName(self) -> TCollection_HAsciiString: ... def GetDensValType(self) -> TCollection_HAsciiString: ... def GetDensity(self) -> float: ... @@ -743,6 +763,7 @@ class XCAFDoc_MaterialTool(TDataStd_GenericEmpty): def __init__(self) -> None: ... def AddMaterial(self, aName: TCollection_HAsciiString, aDescription: TCollection_HAsciiString, aDensity: float, aDensName: TCollection_HAsciiString, aDensValType: TCollection_HAsciiString) -> TDF_Label: ... def BaseLabel(self) -> TDF_Label: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def GetDensityForShape(ShapeL: TDF_Label) -> float: ... @staticmethod @@ -761,6 +782,8 @@ class XCAFDoc_MaterialTool(TDataStd_GenericEmpty): def ShapeTool(self) -> XCAFDoc_ShapeTool: ... class XCAFDoc_Note(TDF_Attribute): + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def Get(theLabel: TDF_Label) -> XCAFDoc_Note: ... def GetObject(self) -> XCAFNoteObjects_NoteObject: ... @@ -798,6 +821,7 @@ class XCAFDoc_NotesTool(TDataStd_GenericEmpty): def DeleteNote(self, theNoteLabel: TDF_Label) -> bool: ... def DeleteNotes(self, theNoteLabels: TDF_LabelSequence) -> int: ... def DeleteOrphanNotes(self) -> int: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @overload def FindAnnotatedItem(self, theItemId: XCAFDoc_AssemblyItemId) -> TDF_Label: ... @overload @@ -861,6 +885,7 @@ class XCAFDoc_NotesTool(TDataStd_GenericEmpty): class XCAFDoc_ShapeMapTool(TDF_Attribute): def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @staticmethod def GetID() -> Standard_GUID: ... def GetMap(self) -> TopTools_IndexedMapOfShape: ... @@ -889,6 +914,13 @@ class XCAFDoc_ShapeTool(TDataStd_GenericEmpty): def BaseLabel(self) -> TDF_Label: ... def ComputeShapes(self, L: TDF_Label) -> None: ... def ComputeSimpleShapes(self) -> None: ... + @overload + def Dump(self, deep: bool) -> Tuple[Standard_OStream, str]: ... + @overload + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... + @staticmethod + def DumpShape(L: TDF_Label, level: Optional[int] = 0, deep: Optional[bool] = False) -> str: ... def Expand(self, Shape: TDF_Label) -> bool: ... def FindComponent(self, theShape: TopoDS_Shape, Labels: TDF_LabelSequence) -> bool: ... def FindMainShape(self, sub: TopoDS_Shape) -> TDF_Label: ... @@ -1038,6 +1070,7 @@ class XCAFDoc_VisMaterial(TDF_Attribute): def CommonMaterial(self) -> XCAFDoc_VisMaterialCommon: ... def ConvertToCommonMaterial(self) -> XCAFDoc_VisMaterialCommon: ... def ConvertToPbrMaterial(self) -> XCAFDoc_VisMaterialPBR: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def FaceCulling(self) -> Graphic3d_TypeOfBackfacingModel: ... def FillAspect(self, theAspect: Graphic3d_Aspects) -> None: ... def FillMaterialAspect(self, theAspect: Graphic3d_MaterialAspect) -> None: ... @@ -1065,10 +1098,12 @@ class XCAFDoc_VisMaterial(TDF_Attribute): class XCAFDoc_VisMaterialCommon: def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsEqual(self, theOther: XCAFDoc_VisMaterialCommon) -> bool: ... class XCAFDoc_VisMaterialPBR: def __init__(self) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsEqual(self, theOther: XCAFDoc_VisMaterialPBR) -> bool: ... class XCAFDoc_VisMaterialTool(TDF_Attribute): @@ -1115,6 +1150,8 @@ class XCAFDoc_VisMaterialTool(TDF_Attribute): class XCAFDoc_Volume(TDataStd_Real): def __init__(self) -> None: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... @overload def Get(self) -> float: ... @overload @@ -1132,6 +1169,7 @@ class XCAFDoc_Volume(TDataStd_Real): class XCAFDoc_NoteBinData(XCAFDoc_Note): def __init__(self) -> None: ... def Data(self) -> TColStd_HArray1OfByte: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def Get(theLabel: TDF_Label) -> XCAFDoc_NoteBinData: ... @staticmethod @@ -1157,6 +1195,7 @@ class XCAFDoc_NoteBinData(XCAFDoc_Note): class XCAFDoc_NoteComment(XCAFDoc_Note): def __init__(self) -> None: ... def Comment(self) -> str: ... + def Dump(self) -> Tuple[Standard_OStream, str]: ... @staticmethod def Get(theLabel: TDF_Label) -> XCAFDoc_NoteComment: ... @staticmethod diff --git a/src/SWIG_files/wrapper/XCAFNoteObjects.i b/src/SWIG_files/wrapper/XCAFNoteObjects.i index 898ea0e11..5bd9a2fad 100644 --- a/src/SWIG_files/wrapper/XCAFNoteObjects.i +++ b/src/SWIG_files/wrapper/XCAFNoteObjects.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xcafnoteobjects.h %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XCAFPrs.i b/src/SWIG_files/wrapper/XCAFPrs.i index f586d10ae..461d52c52 100644 --- a/src/SWIG_files/wrapper/XCAFPrs.i +++ b/src/SWIG_files/wrapper/XCAFPrs.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xcafprs.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -836,10 +837,22 @@ Return base color texture. const opencascade::handle & BaseColorTexture(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} diff --git a/src/SWIG_files/wrapper/XCAFPrs.pyi b/src/SWIG_files/wrapper/XCAFPrs.pyi index 866a87462..9f81c5d74 100644 --- a/src/SWIG_files/wrapper/XCAFPrs.pyi +++ b/src/SWIG_files/wrapper/XCAFPrs.pyi @@ -90,6 +90,7 @@ class XCAFPrs_Driver(TPrsStd_Driver): class XCAFPrs_Style: def __init__(self) -> None: ... def BaseColorTexture(self) -> Image_Texture: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetColorCurv(self) -> Quantity_Color: ... def GetColorSurf(self) -> Quantity_Color: ... def GetColorSurfRGBA(self) -> Quantity_ColorRGBA: ... diff --git a/src/SWIG_files/wrapper/XCAFView.i b/src/SWIG_files/wrapper/XCAFView.i index 5461102c6..9a4be1f51 100644 --- a/src/SWIG_files/wrapper/XCAFView.i +++ b/src/SWIG_files/wrapper/XCAFView.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xcafview.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XSControl.i b/src/SWIG_files/wrapper/XSControl.i index 442be0977..19571d2f2 100644 --- a/src/SWIG_files/wrapper/XSControl.i +++ b/src/SWIG_files/wrapper/XSControl.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xscontrol.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -993,6 +994,25 @@ Prints the check list attached to loaded data, on the standard trace file (start ") PrintCheckLoad; void PrintCheckLoad(const Standard_Boolean failsonly, const IFSelect_PrintCount mode); + /****************** PrintCheckLoad ******************/ + /**** md5 signature: ca487156a90b4b3b2c6320bc467c731d ****/ + %feature("compactdefaultargs") PrintCheckLoad; + %feature("autodoc", " +Parameters +---------- +failsonly: bool +mode: IFSelect_PrintCount + +Return +------- +theStream: Standard_OStream + +Description +----------- +Prints the check list attached to loaded data. +") PrintCheckLoad; + void PrintCheckLoad(std::ostream &OutValue, const Standard_Boolean failsonly, const IFSelect_PrintCount mode); + /****************** PrintCheckTransfer ******************/ /**** md5 signature: 6750f68e6aed952f2529ea394507d25f ****/ %feature("compactdefaultargs") PrintCheckTransfer; @@ -1012,6 +1032,25 @@ Displays check results for the last translation of iges or step entities to open ") PrintCheckTransfer; void PrintCheckTransfer(const Standard_Boolean failsonly, const IFSelect_PrintCount mode); + /****************** PrintCheckTransfer ******************/ + /**** md5 signature: 09d1abfff46e1d492cfc6662fd49988d ****/ + %feature("compactdefaultargs") PrintCheckTransfer; + %feature("autodoc", " +Parameters +---------- +failsonly: bool +mode: IFSelect_PrintCount + +Return +------- +theStream: Standard_OStream + +Description +----------- +Displays check results for the last translation of iges or step entities to open cascade entities. +") PrintCheckTransfer; + void PrintCheckTransfer(std::ostream &OutValue, const Standard_Boolean failsonly, const IFSelect_PrintCount mode); + /****************** PrintStatsTransfer ******************/ /**** md5 signature: 148fec90ff7b063449e9624a36399cda ****/ %feature("compactdefaultargs") PrintStatsTransfer; @@ -1031,6 +1070,25 @@ Displays the statistics for the last translation. what defines the kind of stati ") PrintStatsTransfer; void PrintStatsTransfer(const Standard_Integer what, const Standard_Integer mode = 0); + /****************** PrintStatsTransfer ******************/ + /**** md5 signature: fc32c8e9efabbaf8d728d672c3d2b5bb ****/ + %feature("compactdefaultargs") PrintStatsTransfer; + %feature("autodoc", " +Parameters +---------- +what: int +mode: int (optional, default to 0) + +Return +------- +theStream: Standard_OStream + +Description +----------- +Displays the statistics for the last translation. +") PrintStatsTransfer; + void PrintStatsTransfer(std::ostream &OutValue, const Standard_Integer what, const Standard_Integer mode = 0); + /****************** ReadFile ******************/ /**** md5 signature: 0c5675761cd6df0c5f286882695ad872 ****/ %feature("compactdefaultargs") ReadFile; @@ -1056,7 +1114,7 @@ Loads a file and returns the read status zero for a model which compies with the Parameters ---------- theName: str -theIStream: std::istream +theIStream: str Return ------- @@ -1939,6 +1997,25 @@ Returns the currently set interfacemodel. ") Model; const opencascade::handle & Model(); + /****************** PrintStats ******************/ + /**** md5 signature: 1c7ce9a7eeef2971ad247597c52d38d8 ****/ + %feature("compactdefaultargs") PrintStats; + %feature("autodoc", " +Parameters +---------- +theWhat: int +theMode: int (optional, default to 0) + +Return +------- +theStream: Standard_OStream + +Description +----------- +Prints statistics on current trace file, according and . see printstatsprocess for details. +") PrintStats; + void PrintStats(std::ostream &OutValue, const Standard_Integer theWhat, const Standard_Integer theMode = 0); + /****************** PrintStatsOnList ******************/ /**** md5 signature: 163b44563c2a8ec32944ebf6b8b54c19 ****/ %feature("compactdefaultargs") PrintStatsOnList; @@ -3702,6 +3779,25 @@ Returns the norm controller itself. ") NormAdaptor; const opencascade::handle & NormAdaptor(); + /****************** PrintTransferStatus ******************/ + /**** md5 signature: 00bdb09211e1e6bb5ba474ef2dd4ac70 ****/ + %feature("compactdefaultargs") PrintTransferStatus; + %feature("autodoc", " +Parameters +---------- +theNum: int +theWri: bool + +Return +------- +theS: Standard_OStream + +Description +----------- +Prints the transfer status of a transferred item, as being the mapped n0 , from mapwriter if is true, or from mapreader if is false returns true when done, false else (i.e. num out of range). +") PrintTransferStatus; + Standard_Boolean PrintTransferStatus(const Standard_Integer theNum, const Standard_Boolean theWri, std::ostream &OutValue); + /****************** Result ******************/ /**** md5 signature: 648bf58b2605b71bf5b4112cce9715c1 ****/ %feature("compactdefaultargs") Result; diff --git a/src/SWIG_files/wrapper/XSControl.pyi b/src/SWIG_files/wrapper/XSControl.pyi index 88d642b5e..057ab0245 100644 --- a/src/SWIG_files/wrapper/XSControl.pyi +++ b/src/SWIG_files/wrapper/XSControl.pyi @@ -92,10 +92,17 @@ class XSControl_Reader: @overload def PrintCheckLoad(self, failsonly: bool, mode: IFSelect_PrintCount) -> None: ... @overload + def PrintCheckLoad(self, failsonly: bool, mode: IFSelect_PrintCount) -> str: ... + @overload def PrintCheckTransfer(self, failsonly: bool, mode: IFSelect_PrintCount) -> None: ... @overload + def PrintCheckTransfer(self, failsonly: bool, mode: IFSelect_PrintCount) -> str: ... + @overload def PrintStatsTransfer(self, what: int, mode: Optional[int] = 0) -> None: ... + @overload + def PrintStatsTransfer(self, what: int, mode: Optional[int] = 0) -> str: ... def ReadFile(self, filename: str) -> IFSelect_ReturnStatus: ... + def ReadStream(self, theName: str, theIStream: str) -> IFSelect_ReturnStatus: ... def RootForTransfer(self, num: Optional[int] = 1) -> Standard_Transient: ... def SetNorm(self, norm: str) -> bool: ... def SetWS(self, WS: XSControl_WorkSession, scratch: Optional[bool] = True) -> None: ... @@ -155,6 +162,7 @@ class XSControl_TransferReader(Standard_Transient): def LastCheckList(self) -> Interface_CheckIterator: ... def LastTransferList(self, theRoots: bool) -> TColStd_HSequenceOfTransient: ... def Model(self) -> Interface_InterfaceModel: ... + def PrintStats(self, theWhat: int, theMode: Optional[int] = 0) -> str: ... @staticmethod def PrintStatsOnList(theTP: Transfer_TransientProcess, theList: TColStd_HSequenceOfTransient, theWhat: int, theMode: Optional[int] = 0) -> None: ... @staticmethod @@ -268,6 +276,7 @@ class XSControl_WorkSession(IFSelect_WorkSession): def MapReader(self) -> Transfer_TransientProcess: ... def NewModel(self) -> Interface_InterfaceModel: ... def NormAdaptor(self) -> XSControl_Controller: ... + def PrintTransferStatus(self, theNum: int, theWri: bool) -> Tuple[bool, str]: ... def Result(self, theEnt: Standard_Transient, theMode: int) -> Standard_Transient: ... def SelectNorm(self, theNormName: str) -> bool: ... def SelectedNorm(self, theRsc: Optional[bool] = False) -> str: ... diff --git a/src/SWIG_files/wrapper/XmlDrivers.i b/src/SWIG_files/wrapper/XmlDrivers.i index d630e5802..6f511987f 100644 --- a/src/SWIG_files/wrapper/XmlDrivers.i +++ b/src/SWIG_files/wrapper/XmlDrivers.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmldrivers.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlLDrivers.i b/src/SWIG_files/wrapper/XmlLDrivers.i index 608d58362..ce9610a4f 100644 --- a/src/SWIG_files/wrapper/XmlLDrivers.i +++ b/src/SWIG_files/wrapper/XmlLDrivers.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlldrivers.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -240,6 +241,29 @@ No available documentation. ") Read; virtual void Read(TCollection_ExtendedString theFileName, const opencascade::handle & theNewDocument, const opencascade::handle & theApplication, const opencascade::handle & theFilter = opencascade::handle(), const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Read ******************/ + /**** md5 signature: 4a77300577377854b68d84da8ab8bdf0 ****/ + %feature("compactdefaultargs") Read; + %feature("autodoc", " +Parameters +---------- +theIStream: str +theStorageData: Storage_Data +theDoc: CDM_Document +theApplication: CDM_Application +theFilter: PCDM_ReaderFilter (optional, default to opencascade::handle()) +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +None + +Description +----------- +No available documentation. +") Read; + virtual void Read(std::istream & theIStream, const opencascade::handle & theStorageData, const opencascade::handle & theDoc, const opencascade::handle & theApplication, const opencascade::handle & theFilter = opencascade::handle(), const Message_ProgressRange & theRange = Message_ProgressRange()); + }; @@ -312,6 +336,25 @@ No available documentation. ") Write; virtual void Write(const opencascade::handle & theDocument, TCollection_ExtendedString theFileName, const Message_ProgressRange & theRange = Message_ProgressRange()); + /****************** Write ******************/ + /**** md5 signature: 1593005190d18463c833b2c78ffb13a5 ****/ + %feature("compactdefaultargs") Write; + %feature("autodoc", " +Parameters +---------- +theDocument: CDM_Document +theRange: Message_ProgressRange (optional, default to Message_ProgressRange()) + +Return +------- +theOStream: Standard_OStream + +Description +----------- +No available documentation. +") Write; + virtual void Write(const opencascade::handle & theDocument, std::ostream &OutValue, const Message_ProgressRange & theRange = Message_ProgressRange()); + }; diff --git a/src/SWIG_files/wrapper/XmlLDrivers.pyi b/src/SWIG_files/wrapper/XmlLDrivers.pyi index eb4b3089a..5a41b7765 100644 --- a/src/SWIG_files/wrapper/XmlLDrivers.pyi +++ b/src/SWIG_files/wrapper/XmlLDrivers.pyi @@ -42,12 +42,16 @@ class XmlLDrivers_DocumentRetrievalDriver(PCDM_RetrievalDriver): def AttributeDrivers(self, theMsgDriver: Message_Messenger) -> XmlMDF_ADriverTable: ... @overload def Read(self, theFileName: str, theNewDocument: CDM_Document, theApplication: CDM_Application, theFilter: Optional[PCDM_ReaderFilter] = PCDM_ReaderFilter(), theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def Read(self, theIStream: str, theStorageData: Storage_Data, theDoc: CDM_Document, theApplication: CDM_Application, theFilter: Optional[PCDM_ReaderFilter] = PCDM_ReaderFilter(), theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... class XmlLDrivers_DocumentStorageDriver(PCDM_StorageDriver): def __init__(self, theCopyright: str) -> None: ... def AttributeDrivers(self, theMsgDriver: Message_Messenger) -> XmlMDF_ADriverTable: ... @overload def Write(self, theDocument: CDM_Document, theFileName: str, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... + @overload + def Write(self, theDocument: CDM_Document, theRange: Optional[Message_ProgressRange] = Message_ProgressRange()) -> str: ... class XmlLDrivers_NamespaceDef: @overload diff --git a/src/SWIG_files/wrapper/XmlMDF.i b/src/SWIG_files/wrapper/XmlMDF.i index ab02f2f66..fee739263 100644 --- a/src/SWIG_files/wrapper/XmlMDF.i +++ b/src/SWIG_files/wrapper/XmlMDF.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlmdf.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlMDataStd.i b/src/SWIG_files/wrapper/XmlMDataStd.i index 456eb4a8c..68a84acef 100644 --- a/src/SWIG_files/wrapper/XmlMDataStd.i +++ b/src/SWIG_files/wrapper/XmlMDataStd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlmdatastd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlMDataXtd.i b/src/SWIG_files/wrapper/XmlMDataXtd.i index f520a86b6..515c83f97 100644 --- a/src/SWIG_files/wrapper/XmlMDataXtd.i +++ b/src/SWIG_files/wrapper/XmlMDataXtd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlmdataxtd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlMDocStd.i b/src/SWIG_files/wrapper/XmlMDocStd.i index 9223678bd..e124067cc 100644 --- a/src/SWIG_files/wrapper/XmlMDocStd.i +++ b/src/SWIG_files/wrapper/XmlMDocStd.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlmdocstd.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlMFunction.i b/src/SWIG_files/wrapper/XmlMFunction.i index 4f4da6328..1fbea5c50 100644 --- a/src/SWIG_files/wrapper/XmlMFunction.i +++ b/src/SWIG_files/wrapper/XmlMFunction.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlmfunction.html %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlMNaming.i b/src/SWIG_files/wrapper/XmlMNaming.i index 2db2694ec..39213f3bd 100644 --- a/src/SWIG_files/wrapper/XmlMNaming.i +++ b/src/SWIG_files/wrapper/XmlMNaming.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlmnaming.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlMXCAFDoc.i b/src/SWIG_files/wrapper/XmlMXCAFDoc.i index bfbbe82ee..27f798b33 100644 --- a/src/SWIG_files/wrapper/XmlMXCAFDoc.i +++ b/src/SWIG_files/wrapper/XmlMXCAFDoc.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlmxcafdoc.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlObjMgt.i b/src/SWIG_files/wrapper/XmlObjMgt.i index d2b940289..60cf3ba52 100644 --- a/src/SWIG_files/wrapper/XmlObjMgt.i +++ b/src/SWIG_files/wrapper/XmlObjMgt.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlobjmgt.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlTObjDrivers.i b/src/SWIG_files/wrapper/XmlTObjDrivers.i index 0d02569eb..5776f8367 100644 --- a/src/SWIG_files/wrapper/XmlTObjDrivers.i +++ b/src/SWIG_files/wrapper/XmlTObjDrivers.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmltobjdrivers.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/XmlXCAFDrivers.i b/src/SWIG_files/wrapper/XmlXCAFDrivers.i index 436d6106d..f18dfd69d 100644 --- a/src/SWIG_files/wrapper/XmlXCAFDrivers.i +++ b/src/SWIG_files/wrapper/XmlXCAFDrivers.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_xmlxcafdrivers.ht %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/gce.i b/src/SWIG_files/wrapper/gce.i index 414ae9a9d..f4a7129ba 100644 --- a/src/SWIG_files/wrapper/gce.i +++ b/src/SWIG_files/wrapper/gce.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gce.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ diff --git a/src/SWIG_files/wrapper/generator.log b/src/SWIG_files/wrapper/generator.log index 64aa108f4..d50edeaa1 100644 --- a/src/SWIG_files/wrapper/generator.log +++ b/src/SWIG_files/wrapper/generator.log @@ -2,13 +2,13 @@ ############################ Running pythonocc-generator. ############################ -git revision : 5e59e69 +git revision : aeba585 -operating system : Linux 64bit 6.2.0-34-generic +operating system : Linux 64bit 6.5.0-18-generic occt version targeted : 7.7.2 -date : 2023-10-21 07:41:36.499236 +date : 2024-02-22 14:15:04.324859 ############################ [INFO ] Processing toolkit TKBO === @@ -303,9 +303,14 @@ date : 2023-10-21 07:41:36.499236 [INFO ] Class: BinTools_CurveSet [INFO ] Class: BinTools_LocationSet [INFO ] Class: BinTools_ShapeSetBase +[WARNI] [TypeHint] Skipping type std::istream, should contain _ +[WARNI] [TypeHint] Skipping type std::istream, should contain _ +[WARNI] [TypeHint] param name missing or '&', skip method type hint +[WARNI] [TypeHint] param name missing or '&', skip method type hint [INFO ] Class: BinTools_SurfaceSet [INFO ] Class: BinTools_ShapeReader [INFO ] Class: BinTools_ShapeSet +[WARNI] [TypeHint] Skipping type std::istream, should contain _ [INFO ] Class: BinTools_ShapeWriter [WARNI] [TypeHint] Skipping unknown type uint64_t, uint64 not in module list [INFO ] operand << cannot be wrapped @@ -396,6 +401,7 @@ date : 2023-10-21 07:41:36.499236 [WARNI] [TypeHint] Skipping unknown type uint64_t, uint64 not in module list [WARNI] [TypeHint] Skipping unknown type uint64_t, uint64 not in module list [WARNI] [TypeHint] Skipping unknown type uint64_t, uint64 not in module list +[WARNI] [TypeHint] Skipping unknown type uint64_t, uint64 not in module list [INFO ] Class: BinLDrivers_DocumentStorageDriver [INFO ] ## Processing module BinMDF [WARNI] This template type cannot be handled: NCollection_DataMap, opencascade::handle, TColStd_MapTransientHasher> @@ -4416,7 +4422,6 @@ date : 2023-10-21 07:41:36.499236 [INFO ] Class: RWGltf_GltfLatePrimitiveArray [WARNI] [TypeHint] Skipping type NCollection_Sequence, seems to be a template [INFO ] Class: RWGltf_GltfMaterialMap -[WARNI] [TypeHint] Skipping type std::ostream &, should contain _ [INFO ] Class: RWGltf_GltfOStreamWriter [WARNI] [TypeHint] Skipping type rapidjson::OStreamWrapper &, should contain _ [INFO ] Class: RWGltf_GltfPrimArrayData @@ -4616,7 +4621,6 @@ date : 2023-10-21 07:41:36.499236 [INFO ] [TypeHint] More than 1 constructor, @overload decorator needed. [INFO ] Class: STEPControl_Writer [INFO ] [TypeHint] More than 1 constructor, @overload decorator needed. -[WARNI] [TypeHint] Skipping type std::ostream &, should contain _ [INFO ] ## Processing module STEPEdit [INFO ] Class: STEPEdit [INFO ] Class: STEPEdit_EditContext @@ -8452,11 +8456,9 @@ date : 2023-10-21 07:41:36.499236 [INFO ] Class: STEPCAFControl_Reader [INFO ] [TypeHint] More than 1 constructor, @overload decorator needed. [WARNI] [TypeHint] Skipping type NCollection_DataMap, because of trailing : [INFO ] Class: IFSelect_Act [INFO ] Class: IFSelect_BasicDumper @@ -8879,7 +8879,6 @@ date : 2023-10-21 07:41:36.499236 [INFO ] Class: XSControl_Functions [INFO ] Class: XSControl_Reader [INFO ] [TypeHint] More than 1 constructor, @overload decorator needed. -[WARNI] [TypeHint] Skipping type std::istream &, should contain _ [INFO ] Class: XSControl_SelectForTransfer [INFO ] [TypeHint] More than 1 constructor, @overload decorator needed. [INFO ] Class: XSControl_SignTransferStatus @@ -9079,6 +9078,7 @@ date : 2023-10-21 07:41:36.499236 [INFO ] Class: Message_MsgFile [INFO ] Class: Message_Printer [INFO ] Class Message_Printer is abstract, using %nodefaultctor. +[WARNI] [TypeHint] Skipping type const std::stringstream &, should contain _ [INFO ] Class: Message_ProgressIndicator [INFO ] Class Message_ProgressIndicator is abstract, using %nodefaultctor. [INFO ] Class: Message_ProgressRange @@ -9090,10 +9090,13 @@ date : 2023-10-21 07:41:36.499236 [INFO ] Class: Message_AttributeMeter [INFO ] Class: Message_AttributeObject [INFO ] Class: Message_AttributeStream +[WARNI] [TypeHint] Skipping type const std::stringstream &, should contain _ +[WARNI] [TypeHint] Skipping type const std::stringstream &, should contain _ [INFO ] Class: Message_PrinterOStream [INFO ] [TypeHint] More than 1 constructor, @overload decorator needed. [INFO ] Class: Message_PrinterSystemLog [INFO ] Class: Message_PrinterToReport +[WARNI] [TypeHint] Skipping type const std::stringstream &, should contain _ [INFO ] Class: Message_ProgressSentry [INFO ] ## Processing module NCollection [INFO ] Found HSEQUENCE definitionHClassName: _SequenceType_ @@ -9182,12 +9185,15 @@ date : 2023-10-21 07:41:36.499236 [INFO ] Class: Standard_Failure [INFO ] Wrap nested class Standard_Failure::StringRef [INFO ] [TypeHint] More than 1 constructor, @overload decorator needed. +[WARNI] [TypeHint] Skipping type const std::stringstream &, should contain _ +[WARNI] [TypeHint] Skipping type const std::stringstream &, should contain _ [INFO ] operand = cannot be wrapped [INFO ] Class: Standard_MMgrOpt [INFO ] explicitly excluded method Standard_MMgrOpt::32213e26879b7b9d5ec9e1af79f3f5b8 [INFO ] Class: Standard_MMgrRaw [INFO ] Class: Standard_MMgrTBBalloc [INFO ] Class: Standard_OutOfMemory +[WARNI] [TypeHint] Skipping type std::stringstream &, should contain _ [INFO ] Class: Standard_Persistent [INFO ] Creating Get and Set methods for method TypeNum [INFO ] Class: Standard_Type @@ -9383,7 +9389,7 @@ date : 2023-10-21 07:41:36.499236 [INFO ] Class: UnitsMethods [INFO ] ################################################# -SWIG interface file generation completed in 17.22s +SWIG interface file generation completed in 17.48s ################################################# [INFO ] Number of classes: 4770 diff --git a/src/SWIG_files/wrapper/gp.i b/src/SWIG_files/wrapper/gp.i index 9dbec9815..91072c802 100644 --- a/src/SWIG_files/wrapper/gp.i +++ b/src/SWIG_files/wrapper/gp.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_gp.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -488,19 +489,43 @@ Returns the direction of . const gp_Dir Direction(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} }; - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -958,7 +983,7 @@ Translates this axis by: the vector (thep1, thep2) defined from point thep1 to p %extend gp_Ax1 { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -966,7 +991,7 @@ Translates this axis by: the vector (thep1, thep2) defined from point thep1 to p %pythoncode { def __setstate__(self, state): inst = gp_Ax1() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Ax1') @@ -1080,19 +1105,43 @@ Returns the main direction of . const gp_Dir Direction(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} }; - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -1567,7 +1616,7 @@ Returns the 'ydirection' of . %extend gp_Ax2 { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -1575,7 +1624,7 @@ Returns the 'ydirection' of . %pythoncode { def __setstate__(self, state): inst = gp_Ax2() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Ax2') @@ -1665,10 +1714,22 @@ Creates - a coordinate system where its origin is the origin of thea and its 'x gp_Ax22d(const gp_Ax2d & theA, const Standard_Boolean theIsSense = Standard_True); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2111,7 +2172,7 @@ Returns the 'ydirection' of . %extend gp_Ax22d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -2119,7 +2180,7 @@ Returns the 'ydirection' of . %pythoncode { def __setstate__(self, state): inst = gp_Ax22d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Ax22d') @@ -2200,10 +2261,22 @@ Returns the direction of . const gp_Dir2d Direction(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -2625,7 +2698,7 @@ Translates an axis placement from the point thep1 to the point thep2. %extend gp_Ax2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -2633,7 +2706,7 @@ Translates an axis placement from the point thep1 to the point thep2. %pythoncode { def __setstate__(self, state): inst = gp_Ax2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Ax2d') @@ -2791,19 +2864,43 @@ Returns the main direction of . const gp_Dir Direction(); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} }; - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -3317,7 +3414,7 @@ Reverses the z direction of . %extend gp_Ax3 { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -3325,7 +3422,7 @@ Reverses the z direction of . %pythoncode { def __setstate__(self, state): inst = gp_Ax3() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Ax3') @@ -3906,7 +4003,7 @@ Returns the 'yaxis' of the circle. this axis and the 'xaxis' define the plane of %extend gp_Circ { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -3914,7 +4011,7 @@ Returns the 'yaxis' of the circle. this axis and the 'xaxis' define the plane of %pythoncode { def __setstate__(self, state): inst = gp_Circ() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Circ') @@ -4558,7 +4655,7 @@ Returns the y axis of the circle. reverses the direction of the circle. %extend gp_Circ2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -4566,7 +4663,7 @@ Returns the y axis of the circle. reverses the direction of the circle. %pythoncode { def __setstate__(self, state): inst = gp_Circ2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Circ2d') @@ -5176,7 +5273,7 @@ Returns the yaxis of the reference plane. %extend gp_Cone { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -5184,7 +5281,7 @@ Returns the yaxis of the reference plane. %pythoncode { def __setstate__(self, state): inst = gp_Cone() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Cone') @@ -5749,7 +5846,7 @@ Returns the axis y of the cylinder. %extend gp_Cylinder { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -5757,7 +5854,7 @@ Returns the axis y of the cylinder. %pythoncode { def __setstate__(self, state): inst = gp_Cylinder() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Cylinder') @@ -6029,19 +6126,43 @@ Computes the triple scalar product * (thev1 ^ thev2). warnings: the compu Standard_Real DotCross(const gp_Dir & theV1, const gp_Dir & theV2); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} }; - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -6531,7 +6652,7 @@ No available documentation. %extend gp_Dir { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -6539,7 +6660,7 @@ No available documentation. %pythoncode { def __setstate__(self, state): inst = gp_Dir() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Dir') @@ -6715,10 +6836,22 @@ Computes the scalar product. Standard_Real Dot(const gp_Dir2d & theOther); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -7138,7 +7271,7 @@ No available documentation. %extend gp_Dir2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -7146,7 +7279,7 @@ No available documentation. %pythoncode { def __setstate__(self, state): inst = gp_Dir2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Dir2d') @@ -7782,7 +7915,7 @@ Returns the 'yaxis' of the ellipse whose unit vector is the 'x direction' or the %extend gp_Elips { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -7790,7 +7923,7 @@ Returns the 'yaxis' of the ellipse whose unit vector is the 'x direction' or the %pythoncode { def __setstate__(self, state): inst = gp_Elips() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Elips') @@ -8477,7 +8610,7 @@ Returns the minor axis of the ellipse. reverses the direction of the circle. %extend gp_Elips2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -8485,7 +8618,7 @@ Returns the minor axis of the ellipse. reverses the direction of the circle. %pythoncode { def __setstate__(self, state): inst = gp_Elips2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Elips2d') @@ -8553,10 +8686,22 @@ Creates a transformation based on the matrix them and the vector thev where them gp_GTrsf(const gp_Mat & theM, const gp_XYZ & theV); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -8972,7 +9117,7 @@ def __imul__(self, right): %extend gp_GTrsf { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -8980,7 +9125,7 @@ def __imul__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_GTrsf() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_GTrsf') @@ -9443,7 +9588,7 @@ def __imul__(self, right): %extend gp_GTrsf2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -9451,7 +9596,7 @@ def __imul__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_GTrsf2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_GTrsf2d') @@ -10139,7 +10284,7 @@ Computes an axis, whose - the origin is the center of this hyperbola, and - the %extend gp_Hypr { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -10147,7 +10292,7 @@ Computes an axis, whose - the origin is the center of this hyperbola, and - the %pythoncode { def __setstate__(self, state): inst = gp_Hypr() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Hypr') @@ -10886,7 +11031,7 @@ Computes an axis whose - the origin is the center of this hyperbola, and - the u %extend gp_Hypr2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -10894,7 +11039,7 @@ Computes an axis whose - the origin is the center of this hyperbola, and - the u %pythoncode { def __setstate__(self, state): inst = gp_Hypr2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Hypr2d') @@ -11508,7 +11653,7 @@ Translates a line from the point thep1 to the point thep2. %extend gp_Lin { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -11516,7 +11661,7 @@ Translates a line from the point thep1 to the point thep2. %pythoncode { def __setstate__(self, state): inst = gp_Lin() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Lin') @@ -12133,7 +12278,7 @@ Translates a line from the point thep1 to the point thep2. %extend gp_Lin2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -12141,7 +12286,7 @@ Translates a line from the point thep1 to the point thep2. %pythoncode { def __setstate__(self, state): inst = gp_Lin2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Lin2d') @@ -12347,10 +12492,22 @@ Divides all the coefficients of the matrix by scalar. gp_Mat Divided(const Standard_Real theScalar); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -12975,7 +13132,7 @@ def __itruediv__(self, right): %extend gp_Mat { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -12983,7 +13140,7 @@ def __itruediv__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_Mat() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Mat') @@ -13730,7 +13887,7 @@ def __itruediv__(self, right): %extend gp_Mat2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -13738,7 +13895,7 @@ def __itruediv__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_Mat2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Mat2d') @@ -14296,7 +14453,7 @@ It is an axis parallel to the directrix of the parabola. the location point of t %extend gp_Parab { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -14304,7 +14461,7 @@ It is an axis parallel to the directrix of the parabola. the location point of t %pythoncode { def __setstate__(self, state): inst = gp_Parab() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Parab') @@ -14882,7 +15039,7 @@ Translates a parabola from the point thep1 to the point thep2. %extend gp_Parab2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -14890,7 +15047,7 @@ Translates a parabola from the point thep1 to the point thep2. %pythoncode { def __setstate__(self, state): inst = gp_Parab2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Parab2d') @@ -15118,10 +15275,22 @@ Computes the distance between two planes. Standard_Real Distance(const gp_Pln & theOther); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -15613,7 +15782,7 @@ Returns the y axis of the plane. %extend gp_Pln { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -15621,7 +15790,7 @@ Returns the y axis of the plane. %pythoncode { def __setstate__(self, state): inst = gp_Pln() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Pln') @@ -15791,19 +15960,43 @@ Computes the distance between two points. Standard_Real Distance(const gp_Pnt & theOther); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} }; - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -16309,7 +16502,7 @@ For this point, returns its z coordinate. %extend gp_Pnt { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -16317,7 +16510,7 @@ For this point, returns its z coordinate. %pythoncode { def __setstate__(self, state): inst = gp_Pnt() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Pnt') @@ -16465,10 +16658,22 @@ Computes the distance between two points. Standard_Real Distance(const gp_Pnt2d & theOther); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -16906,7 +17111,7 @@ For this point, returns its y coordinate. %extend gp_Pnt2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -16914,7 +17119,7 @@ For this point, returns its y coordinate. %pythoncode { def __setstate__(self, state): inst = gp_Pnt2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Pnt2d') @@ -17788,7 +17993,7 @@ def __isub__(self, right): %extend gp_Quaternion { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -17796,7 +18001,7 @@ def __isub__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_Quaternion() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Quaternion') @@ -17929,7 +18134,7 @@ Set interpolated quaternion for thet position (from 0.0 to 1.0). %extend gp_QuaternionNLerp { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -17937,7 +18142,7 @@ Set interpolated quaternion for thet position (from 0.0 to 1.0). %pythoncode { def __setstate__(self, state): inst = gp_QuaternionNLerp() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_QuaternionNLerp') @@ -18070,7 +18275,7 @@ Set interpolated quaternion for thet position (from 0.0 to 1.0). %extend gp_QuaternionSLerp { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -18078,7 +18283,7 @@ Set interpolated quaternion for thet position (from 0.0 to 1.0). %pythoncode { def __setstate__(self, state): inst = gp_QuaternionSLerp() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_QuaternionSLerp') @@ -18638,7 +18843,7 @@ Returns the axis y of the sphere. %extend gp_Sphere { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -18646,7 +18851,7 @@ Returns the axis y of the sphere. %pythoncode { def __setstate__(self, state): inst = gp_Sphere() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Sphere') @@ -19261,7 +19466,7 @@ Returns the axis y of the torus. %extend gp_Torus { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -19269,7 +19474,7 @@ Returns the axis y of the torus. %pythoncode { def __setstate__(self, state): inst = gp_Torus() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Torus') @@ -19318,10 +19523,22 @@ Creates a 3d transformation from the 2d transformation thet. the resulting trans gp_Trsf(const gp_Trsf2d & theT); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -19384,10 +19601,22 @@ Computes the homogeneous vectorial part of the transformation. it is a 3*3 matri const gp_Mat HVectorialPart(); - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -19975,7 +20204,7 @@ def __imul__(self, right): %extend gp_Trsf { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -19983,7 +20212,7 @@ def __imul__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_Trsf() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Trsf') @@ -20536,7 +20765,7 @@ def __imul__(self, right): %extend gp_Trsf2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -20544,7 +20773,7 @@ def __imul__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_Trsf2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Trsf2d') @@ -20943,10 +21172,22 @@ Computes the triple scalar product * (thev1 ^ thev2). Standard_Real DotCross(const gp_Vec & theV1, const gp_Vec & theV2); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -21842,7 +22083,7 @@ def __itruediv__(self, right): %extend gp_Vec { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -21850,7 +22091,7 @@ def __itruediv__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_Vec() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Vec') @@ -22939,7 +23180,7 @@ def __itruediv__(self, right): %extend gp_Vec2d { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -22947,7 +23188,7 @@ def __itruediv__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_Vec2d() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_Vec2d') @@ -23806,7 +24047,7 @@ def __itruediv__(self, right): %extend gp_XY { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -23814,7 +24055,7 @@ def __itruediv__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_XY() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_XY') @@ -24147,10 +24388,22 @@ Computes the triple scalar product. Standard_Real DotCross(const gp_XYZ & theCoord1, const gp_XYZ & theCoord2); - /****************** DumpJsonToString ******************/ - %feature("autodoc", "Json string serializer."); + /****************** DumpJson ******************/ + %feature("autodoc", " +Parameters +---------- +depth: int, default=-1 + +Return +------- +str + +Description +----------- +Dump the object to JSON string. +") DumpJson; %extend{ - std::string DumpJsonToString(int depth=-1) { + std::string DumpJson(int depth=-1) { std::stringstream s; self->DumpJson(s, depth); return "{" + s.str() + "}" ;} @@ -24169,10 +24422,22 @@ Returns a const ptr to coordinates location. is useful for algorithms, but does const Standard_Real * GetData(); - /****************** InitFromJsonString ******************/ - %feature("autodoc", "1"); + /****************** InitFromJson ******************/ + %feature("autodoc", " +Parameters +---------- +json_string: the string + +Return +------- +bool + +Description +----------- +Init the object from a JSON string. +") InitFromJson; %extend{ - bool InitFromJsonString(std::string json_string) { + bool InitFromJson(std::string json_string) { std::stringstream s(json_string); Standard_Integer pos=2; return self->InitFromJson(s, pos);} @@ -24860,7 +25125,7 @@ def __itruediv__(self, right): %extend gp_XYZ { %pythoncode { def __getstate__(self): - return self.DumpJsonToString() + return self.DumpJson() } }; @@ -24868,7 +25133,7 @@ def __itruediv__(self, right): %pythoncode { def __setstate__(self, state): inst = gp_XYZ() - if inst.InitFromJsonString(state): + if inst.InitFromJson(state): self.this = inst.this else: raise IOError('Failed to set state of gp_XYZ') diff --git a/src/SWIG_files/wrapper/gp.pyi b/src/SWIG_files/wrapper/gp.pyi index 26ad78d3c..c255ace94 100644 --- a/src/SWIG_files/wrapper/gp.pyi +++ b/src/SWIG_files/wrapper/gp.pyi @@ -127,6 +127,8 @@ class gp_Ax1: def __init__(self, theP: gp_Pnt, theV: gp_Dir) -> None: ... def Angle(self, theOther: gp_Ax1) -> float: ... def Direction(self) -> gp_Dir: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... + def InitFromJson(self, json_string: str) -> bool: ... def IsCoaxial(self, Other: gp_Ax1, AngularTolerance: float, LinearTolerance: float) -> bool: ... def IsNormal(self, theOther: gp_Ax1, theAngularTolerance: float) -> bool: ... def IsOpposite(self, theOther: gp_Ax1, theAngularTolerance: float) -> bool: ... @@ -173,6 +175,8 @@ class gp_Ax2: def Angle(self, theOther: gp_Ax2) -> float: ... def Axis(self) -> gp_Ax1: ... def Direction(self) -> gp_Dir: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... + def InitFromJson(self, json_string: str) -> bool: ... @overload def IsCoplanar(self, Other: gp_Ax2, LinearTolerance: float, AngularTolerance: float) -> bool: ... @overload @@ -221,6 +225,7 @@ class gp_Ax22d: def __init__(self, theP: gp_Pnt2d, theV: gp_Dir2d, theIsSense: Optional[bool] = True) -> None: ... @overload def __init__(self, theA: gp_Ax2d, theIsSense: Optional[bool] = True) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Location(self) -> gp_Pnt2d: ... @overload def Mirror(self, theP: gp_Pnt2d) -> None: ... @@ -262,6 +267,7 @@ class gp_Ax2d: def __init__(self, theP: gp_Pnt2d, theV: gp_Dir2d) -> None: ... def Angle(self, theOther: gp_Ax2d) -> float: ... def Direction(self) -> gp_Dir2d: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsCoaxial(self, Other: gp_Ax2d, AngularTolerance: float, LinearTolerance: float) -> bool: ... def IsNormal(self, theOther: gp_Ax2d, theAngularTolerance: float) -> bool: ... def IsOpposite(self, theOther: gp_Ax2d, theAngularTolerance: float) -> bool: ... @@ -308,6 +314,8 @@ class gp_Ax3: def Axis(self) -> gp_Ax1: ... def Direct(self) -> bool: ... def Direction(self) -> gp_Dir: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... + def InitFromJson(self, json_string: str) -> bool: ... @overload def IsCoplanar(self, theOther: gp_Ax3, theLinearTolerance: float, theAngularTolerance: float) -> bool: ... @overload @@ -563,6 +571,8 @@ class gp_Dir: def Crossed(self, theRight: gp_Dir) -> gp_Dir: ... def Dot(self, theOther: gp_Dir) -> float: ... def DotCross(self, theV1: gp_Dir, theV2: gp_Dir) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... + def InitFromJson(self, json_string: str) -> bool: ... def IsEqual(self, theOther: gp_Dir, theAngularTolerance: float) -> bool: ... def IsNormal(self, theOther: gp_Dir, theAngularTolerance: float) -> bool: ... def IsOpposite(self, theOther: gp_Dir, theAngularTolerance: float) -> bool: ... @@ -614,6 +624,7 @@ class gp_Dir2d: def Coord(self) -> Tuple[float, float]: ... def Crossed(self, theRight: gp_Dir2d) -> float: ... def Dot(self, theOther: gp_Dir2d) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsEqual(self, theOther: gp_Dir2d, theAngularTolerance: float) -> bool: ... def IsNormal(self, theOther: gp_Dir2d, theAngularTolerance: float) -> bool: ... def IsOpposite(self, theOther: gp_Dir2d, theAngularTolerance: float) -> bool: ... @@ -756,6 +767,7 @@ class gp_GTrsf: def __init__(self, theT: gp_Trsf) -> None: ... @overload def __init__(self, theM: gp_Mat, theV: gp_XYZ) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Form(self) -> gp_TrsfForm: ... def Invert(self) -> None: ... def Inverted(self) -> gp_GTrsf: ... @@ -1051,6 +1063,7 @@ class gp_Mat: def Diagonal(self) -> gp_XYZ: ... def Divide(self, theScalar: float) -> None: ... def Divided(self, theScalar: float) -> gp_Mat: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Invert(self) -> None: ... def Inverted(self) -> gp_Mat: ... def IsSingular(self) -> bool: ... @@ -1243,6 +1256,7 @@ class gp_Pln: def Distance(self, theL: gp_Lin) -> float: ... @overload def Distance(self, theOther: gp_Pln) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Location(self) -> gp_Pnt: ... @overload def Mirror(self, theP: gp_Pnt) -> None: ... @@ -1301,6 +1315,8 @@ class gp_Pnt: @overload def Coord(self) -> gp_XYZ: ... def Distance(self, theOther: gp_Pnt) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... + def InitFromJson(self, json_string: str) -> bool: ... def IsEqual(self, theOther: gp_Pnt, theLinearTolerance: float) -> bool: ... @overload def Mirror(self, theP: gp_Pnt) -> None: ... @@ -1357,6 +1373,7 @@ class gp_Pnt2d: @overload def Coord(self) -> gp_XY: ... def Distance(self, theOther: gp_Pnt2d) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsEqual(self, theOther: gp_Pnt2d, theLinearTolerance: float) -> bool: ... @overload def Mirror(self, theP: gp_Pnt2d) -> None: ... @@ -1576,12 +1593,14 @@ class gp_Trsf: def __init__(self) -> None: ... @overload def __init__(self, theT: gp_Trsf2d) -> None: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def Form(self) -> gp_TrsfForm: ... @overload def GetRotation(self, theAxis: gp_XYZ) -> Tuple[bool, float]: ... @overload def GetRotation(self) -> gp_Quaternion: ... def HVectorialPart(self) -> gp_Mat: ... + def InitFromJson(self, json_string: str) -> bool: ... def Invert(self) -> None: ... def Inverted(self) -> gp_Trsf: ... def IsNegative(self) -> bool: ... @@ -1697,6 +1716,7 @@ class gp_Vec: def Divided(self, theScalar: float) -> gp_Vec: ... def Dot(self, theOther: gp_Vec) -> float: ... def DotCross(self, theV1: gp_Vec, theV2: gp_Vec) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def IsEqual(self, theOther: gp_Vec, theLinearTolerance: float, theAngularTolerance: float) -> bool: ... def IsNormal(self, theOther: gp_Vec, theAngularTolerance: float) -> bool: ... def IsOpposite(self, theOther: gp_Vec, theAngularTolerance: float) -> bool: ... @@ -1907,7 +1927,9 @@ class gp_XYZ: def Divided(self, theScalar: float) -> gp_XYZ: ... def Dot(self, theOther: gp_XYZ) -> float: ... def DotCross(self, theCoord1: gp_XYZ, theCoord2: gp_XYZ) -> float: ... + def DumpJson(self, depth: Optional[int]=-1) -> str: ... def GetData(self) -> float: ... + def InitFromJson(self, json_string: str) -> bool: ... def IsEqual(self, theOther: gp_XYZ, theTolerance: float) -> bool: ... def Modulus(self) -> float: ... @overload diff --git a/src/SWIG_files/wrapper/math.i b/src/SWIG_files/wrapper/math.i index 4fab74b09..d1b000e86 100644 --- a/src/SWIG_files/wrapper/math.i +++ b/src/SWIG_files/wrapper/math.i @@ -34,6 +34,7 @@ https://www.opencascade.com/doc/occt-7.7.0/refman/html/package_math.html" %include ../common/EnumTemplates.i %include ../common/Operators.i %include ../common/OccHandle.i +%include ../common/IOStream.i %{ @@ -284,14 +285,23 @@ Initializes the computation of the minimum of a function with nbvariables. toler ") math_BFGS; math_BFGS(const Standard_Integer NbVariables, const Standard_Real Tolerance = 1.0e-8, const Standard_Integer NbIterations = 200, const Standard_Real ZEPS = 1.0e-12); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Gradient ******************/ /**** md5 signature: 6c3691fb2b0bb6085965955bdcce0a12 ****/ %feature("compactdefaultargs") Gradient; @@ -494,14 +504,23 @@ Returns the value of the derivative at the root. exception notdone is raised if ") Derivative; Standard_Real Derivative(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redifine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -676,14 +695,23 @@ Given two initial values this class computes a bracketing triplet of abscissae a ") math_BracketMinimum; math_BracketMinimum(math_Function & F, const Standard_Real A, const Standard_Real B, const Standard_Real FA, const Standard_Real FB); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** FunctionValues ******************/ /**** md5 signature: 1c73efc8bd333bc361f9878adf3d2f5e ****/ %feature("compactdefaultargs") FunctionValues; @@ -845,14 +873,23 @@ The brent method is used to find the root of the function f between the bounds b ") math_BracketedRoot; math_BracketedRoot(math_Function & F, const Standard_Real Bound1, const Standard_Real Bound2, const Standard_Real Tolerance, const Standard_Integer NbIterations = 100, const Standard_Real ZEPS = 1.0e-12); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -960,14 +997,23 @@ This constructor should be used in a sub-class to initialize correctly all the f ") math_BrentMinimum; math_BrentMinimum(const Standard_Real TolX, const Standard_Real Fbx, const Standard_Integer NbIterations = 100, const Standard_Real ZEPS = 1.0e-12); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -1323,14 +1369,23 @@ Returns the value of the determinant of the previously lu decomposed matrix a. z ") Determinant; Standard_Real Determinant(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Inverse ******************/ /**** md5 signature: 3ac969006d2d462bc1e6ea2d7d8929e6 ****/ %feature("compactdefaultargs") Inverse; @@ -1490,14 +1545,23 @@ Computes the real root of the polynomial ax + b. ") math_DirectPolynomialRoots; math_DirectPolynomialRoots(const Standard_Real A, const Standard_Real B); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** InfiniteRoots ******************/ /**** md5 signature: 6c844bee82586a7c3f4a33590d02fc3c ****/ %feature("compactdefaultargs") InfiniteRoots; @@ -1858,14 +1922,23 @@ Initializes the computation of the minimum of f. warning: constructor does not p ") math_FRPR; math_FRPR(const math_MultipleVarFunctionWithGradient & theFunction, const Standard_Real theTolerance, const Standard_Integer theNbIterations = 200, const Standard_Real theZEPS = 1.0e-12); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Gradient ******************/ /**** md5 signature: 6c3691fb2b0bb6085965955bdcce0a12 ****/ %feature("compactdefaultargs") Gradient; @@ -2086,14 +2159,23 @@ The algorithm uses the sample to find intervals on which the function is null. a ") math_FunctionAllRoots; math_FunctionAllRoots(math_FunctionWithDerivative & F, const math_FunctionSample & S, const Standard_Real EpsX, const Standard_Real EpsF, const Standard_Real EpsNul); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetInterval ******************/ /**** md5 signature: 6687e7adaceb5b49c509c22d7f0c75d8 ****/ %feature("compactdefaultargs") GetInterval; @@ -2278,14 +2360,23 @@ Returns the value of the derivative at the root. exception notdone is raised if ") Derivative; Standard_Real Derivative(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -2377,14 +2468,23 @@ Calculates all the real roots of a function f-k within the range a..b. without c ") math_FunctionRoots; math_FunctionRoots(math_FunctionWithDerivative & F, const Standard_Real A, const Standard_Real B, const Standard_Integer NbSample, const Standard_Real EpsX = 0.0, const Standard_Real EpsF = 0.0, const Standard_Real EpsNull = 0.0, const Standard_Real K = 0.0); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsAllNull ******************/ /**** md5 signature: e00a1caef8eb3e9a54836fe956196c51 ****/ %feature("compactdefaultargs") IsAllNull; @@ -2700,14 +2800,23 @@ Outputs the matrix value of the derivative at the root in der. exception notdone ") Derivative; void Derivative(math_Matrix & Der); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** FunctionSetErrors ******************/ /**** md5 signature: 5c3b5fe11df662477290ea4121b545af ****/ %feature("compactdefaultargs") FunctionSetErrors; @@ -2947,14 +3056,23 @@ This routine returns the value of the determinant of the previously lu decompose ") Determinant; Standard_Real Determinant(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Invert ******************/ /**** md5 signature: 3042934a9caa618d22aceb841b1bb048 ****/ %feature("compactdefaultargs") Invert; @@ -3056,14 +3174,23 @@ Given an input n x m matrix a with n >= m this constructor performs the lu decom ") math_GaussLeastSquare; math_GaussLeastSquare(const math_Matrix & A, const Standard_Real MinPivot = 1.0e-20); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -3131,14 +3258,23 @@ The gauss-legendre integration with order = points of integration for each unkno ") math_GaussMultipleIntegration; math_GaussMultipleIntegration(math_MultipleVarFunction & F, const math_Vector & Lower, const math_Vector & Upper, const math_IntegerVector & Order); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -3200,14 +3336,23 @@ The gauss-legendre integration with order = points of integration for each unkno ") math_GaussSetIntegration; math_GaussSetIntegration(math_FunctionSet & F, const math_Vector & Lower, const math_Vector & Upper, const math_IntegerVector & Order); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -3304,14 +3449,23 @@ The gauss-legendre integration with n = order points of integration and given to ") math_GaussSingleIntegration; math_GaussSingleIntegration(math_Function & F, const Standard_Real Lower, const Standard_Real Upper, const Standard_Integer Order, const Standard_Real Tol); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -3715,14 +3869,23 @@ Returns the matrix sol of all the solutions of the system a.x = b. exception not ") AllValues; const math_Matrix & AllValues(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -3901,14 +4064,23 @@ Adds the integervector 'theright' to an integervector. an exception is raised if ") Added; math_IntegerVector Added(const math_IntegerVector & theRight); + /****************** Dump ******************/ + /**** md5 signature: 85af5cb6e1b130aa09c69332795e4c2f ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theO: Standard_OStream + +Description +----------- +Prints on the stream theo information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Init ******************/ /**** md5 signature: 1fe27bc9df2ed19eff044a233606ff79 ****/ %feature("compactdefaultargs") Init; @@ -4441,14 +4613,23 @@ Given a real n x n matrix a, this constructor computes all its eigenvalues and e ") math_Jacobi; math_Jacobi(const math_Matrix & A); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -4975,14 +5156,23 @@ Divides all the elements of a matrix by the value . an exception is raise ") Divided; math_Matrix Divided(const Standard_Real Right); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Init ******************/ /**** md5 signature: 6aef026ef1fcb18a844e723ac935cd4b ****/ %feature("compactdefaultargs") Init; @@ -5864,14 +6054,23 @@ Returns the value of the derivative at the root. exception notdone is raised if ") Derivative; Standard_Real Derivative(); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -6029,14 +6228,23 @@ Outputs the matrix value of the derivative at the root in der. exception notdone ") Derivative; void Derivative(math_Matrix & Der); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** FunctionSetErrors ******************/ /**** md5 signature: f60cf743c92edccf04b38617ec21af42 ****/ %feature("compactdefaultargs") FunctionSetErrors; @@ -6241,14 +6449,23 @@ The tolerance required on the solution is given by tolerance. iteration are stop ") math_NewtonMinimum; math_NewtonMinimum(const math_MultipleVarFunctionWithHessian & theFunction, const Standard_Real theTolerance = Precision::Confusion(), const Standard_Integer theNbIterations = 40, const Standard_Real theConvexity = 1.0e-6, const Standard_Boolean theWithSingularity = Standard_True); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints on the stream o information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** GetStatus ******************/ /**** md5 signature: f0121c820ebe3b5d3aba6ff3efc32974 ****/ %feature("compactdefaultargs") GetStatus; @@ -6608,14 +6825,23 @@ Constructor. initialize new entity. ") math_Powell; math_Powell(const math_MultipleVarFunction & theFunction, const Standard_Real theTolerance, const Standard_Integer theNbIterations = 200, const Standard_Real theZEPS = 1.0e-12); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -6756,14 +6982,23 @@ Given as input an n x m matrix a with n < m, n = m or n > m this constructor per ") math_SVD; math_SVD(const math_Matrix & A); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** IsDone ******************/ /**** md5 signature: ec0624071ec7da54b3d9dacc7bcb05f9 ****/ %feature("compactdefaultargs") IsDone; @@ -6897,14 +7132,23 @@ Given the three coefficients c, d and e, it performs the resolution of c*cos(x) ") math_TrigonometricFunctionRoots; math_TrigonometricFunctionRoots(const Standard_Real C, const Standard_Real D, const Standard_Real E, const Standard_Real InfBound, const Standard_Real SupBound); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** InfiniteRoots ******************/ /**** md5 signature: 6c844bee82586a7c3f4a33590d02fc3c ****/ %feature("compactdefaultargs") InfiniteRoots; @@ -7042,14 +7286,23 @@ Returns the duale variables v of the systeme. ") Duale; void Duale(math_Vector & V); + /****************** Dump ******************/ + /**** md5 signature: d37b43e0b2386dc096d5d707876db157 ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +o: Standard_OStream + +Description +----------- +Prints information on the current state of the object. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Error ******************/ /**** md5 signature: b1e838c6dcbfa6a1bf16d1bc7e40df88 ****/ %feature("compactdefaultargs") Error; @@ -7418,14 +7671,23 @@ Divides a vector by the value 'theright'. an exception is raised if 'theright' = ") Divided; math_Vector Divided(const Standard_Real theRight); + /****************** Dump ******************/ + /**** md5 signature: 85af5cb6e1b130aa09c69332795e4c2f ****/ + %feature("compactdefaultargs") Dump; + %feature("autodoc", " +Parameters +---------- + +Return +------- +theO: Standard_OStream + +Description +----------- +Prints information on the current state of the object. is used to redefine the operator <<. +") Dump; + void Dump(std::ostream &OutValue); - %feature("autodoc", "1"); - %extend{ - std::string DumpToString() { - std::stringstream s; - self->Dump(s); - return s.str();} - }; /****************** Init ******************/ /**** md5 signature: aa5adf884f0373c9b54359f444273ad5 ****/ %feature("compactdefaultargs") Init; diff --git a/src/SWIG_files/wrapper/math.pyi b/src/SWIG_files/wrapper/math.pyi index 393c2f6dc..1921b8eb1 100644 --- a/src/SWIG_files/wrapper/math.pyi +++ b/src/SWIG_files/wrapper/math.pyi @@ -61,6 +61,7 @@ class math: class math_BFGS: def __init__(self, NbVariables: int, Tolerance: Optional[float] = 1.0e-8, NbIterations: Optional[int] = 200, ZEPS: Optional[float] = 1.0e-12) -> None: ... + def Dump(self) -> str: ... @overload def Gradient(self) -> math_Vector: ... @overload @@ -79,6 +80,7 @@ class math_BFGS: class math_BissecNewton: def __init__(self, theXTolerance: float) -> None: ... def Derivative(self) -> float: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def IsSolutionReached(self, theFunction: math_FunctionWithDerivative) -> bool: ... def Perform(self, F: math_FunctionWithDerivative, Bound1: float, Bound2: float, NbIterations: Optional[int] = 100) -> None: ... @@ -94,6 +96,7 @@ class math_BracketMinimum: def __init__(self, F: math_Function, A: float, B: float, FA: float) -> None: ... @overload def __init__(self, F: math_Function, A: float, B: float, FA: float, FB: float) -> None: ... + def Dump(self) -> str: ... def FunctionValues(self) -> Tuple[float, float, float]: ... def IsDone(self) -> bool: ... def Perform(self, F: math_Function) -> None: ... @@ -104,6 +107,7 @@ class math_BracketMinimum: class math_BracketedRoot: def __init__(self, F: math_Function, Bound1: float, Bound2: float, Tolerance: float, NbIterations: Optional[int] = 100, ZEPS: Optional[float] = 1.0e-12) -> None: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def NbIterations(self) -> int: ... def Root(self) -> float: ... @@ -114,6 +118,7 @@ class math_BrentMinimum: def __init__(self, TolX: float, NbIterations: Optional[int] = 100, ZEPS: Optional[float] = 1.0e-12) -> None: ... @overload def __init__(self, TolX: float, Fbx: float, NbIterations: Optional[int] = 100, ZEPS: Optional[float] = 1.0e-12) -> None: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def IsSolutionReached(self, theFunction: math_Function) -> bool: ... def Location(self) -> float: ... @@ -142,6 +147,7 @@ class math_ComputeKronrodPointsAndWeights: class math_Crout: def __init__(self, A: math_Matrix, MinPivot: Optional[float] = 1.0e-20) -> None: ... def Determinant(self) -> float: ... + def Dump(self) -> str: ... def Inverse(self) -> math_Matrix: ... def Invert(self, Inv: math_Matrix) -> None: ... def IsDone(self) -> bool: ... @@ -156,6 +162,7 @@ class math_DirectPolynomialRoots: def __init__(self, A: float, B: float, C: float) -> None: ... @overload def __init__(self, A: float, B: float) -> None: ... + def Dump(self) -> str: ... def InfiniteRoots(self) -> bool: ... def IsDone(self) -> bool: ... def NbSolutions(self) -> int: ... @@ -185,6 +192,7 @@ class math_EigenValuesSearcher: class math_FRPR: def __init__(self, theFunction: math_MultipleVarFunctionWithGradient, theTolerance: float, theNbIterations: Optional[int] = 200, theZEPS: Optional[float] = 1.0e-12) -> None: ... + def Dump(self) -> str: ... @overload def Gradient(self) -> math_Vector: ... @overload @@ -205,6 +213,7 @@ class math_Function: class math_FunctionAllRoots: def __init__(self, F: math_FunctionWithDerivative, S: math_FunctionSample, EpsX: float, EpsF: float, EpsNul: float) -> None: ... + def Dump(self) -> str: ... def GetInterval(self, Index: int) -> Tuple[float, float]: ... def GetIntervalState(self, Index: int) -> Tuple[int, int]: ... def GetPoint(self, Index: int) -> float: ... @@ -219,6 +228,7 @@ class math_FunctionRoot: @overload def __init__(self, F: math_FunctionWithDerivative, Guess: float, Tolerance: float, A: float, B: float, NbIterations: Optional[int] = 100) -> None: ... def Derivative(self) -> float: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def NbIterations(self) -> int: ... def Root(self) -> float: ... @@ -226,6 +236,7 @@ class math_FunctionRoot: class math_FunctionRoots: def __init__(self, F: math_FunctionWithDerivative, A: float, B: float, NbSample: int, EpsX: Optional[float] = 0.0, EpsF: Optional[float] = 0.0, EpsNull: Optional[float] = 0.0, K: Optional[float] = 0.0) -> None: ... + def Dump(self) -> str: ... def IsAllNull(self) -> bool: ... def IsDone(self) -> bool: ... def NbSolutions(self) -> int: ... @@ -253,6 +264,7 @@ class math_FunctionSetRoot: def Derivative(self) -> math_Matrix: ... @overload def Derivative(self, Der: math_Matrix) -> None: ... + def Dump(self) -> str: ... @overload def FunctionSetErrors(self) -> math_Vector: ... @overload @@ -274,6 +286,7 @@ class math_FunctionSetRoot: class math_Gauss: def __init__(self, A: math_Matrix, MinPivot: Optional[float] = 1.0e-20, theProgress: Optional[Message_ProgressRange] = Message_ProgressRange()) -> None: ... def Determinant(self) -> float: ... + def Dump(self) -> str: ... def Invert(self, Inv: math_Matrix) -> None: ... def IsDone(self) -> bool: ... @overload @@ -283,16 +296,19 @@ class math_Gauss: class math_GaussLeastSquare: def __init__(self, A: math_Matrix, MinPivot: Optional[float] = 1.0e-20) -> None: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def Solve(self, B: math_Vector, X: math_Vector) -> None: ... class math_GaussMultipleIntegration: def __init__(self, F: math_MultipleVarFunction, Lower: math_Vector, Upper: math_Vector, Order: math_IntegerVector) -> None: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def Value(self) -> float: ... class math_GaussSetIntegration: def __init__(self, F: math_FunctionSet, Lower: math_Vector, Upper: math_Vector, Order: math_IntegerVector) -> None: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def Value(self) -> math_Vector: ... @@ -303,6 +319,7 @@ class math_GaussSingleIntegration: def __init__(self, F: math_Function, Lower: float, Upper: float, Order: int) -> None: ... @overload def __init__(self, F: math_Function, Lower: float, Upper: float, Order: int, Tol: float) -> None: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def Value(self) -> float: ... @@ -332,6 +349,7 @@ class math_Householder: @overload def __init__(self, A: math_Matrix, B: math_Vector, EPS: Optional[float] = 1.0e-20) -> None: ... def AllValues(self) -> math_Matrix: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def Value(self, sol: math_Vector, Index: Optional[int] = 1) -> None: ... @@ -349,6 +367,7 @@ class math_IntegerVector: @overload def Add(self, theLeft: math_IntegerVector, theRight: math_IntegerVector) -> None: ... def Added(self, theRight: math_IntegerVector) -> math_IntegerVector: ... + def Dump(self) -> str: ... def Init(self, theInitialValue: int) -> None: ... def Initialized(self, theOther: math_IntegerVector) -> math_IntegerVector: ... def Inverse(self) -> math_IntegerVector: ... @@ -384,6 +403,7 @@ class math_IntegerVector: class math_Jacobi: def __init__(self, A: math_Matrix) -> None: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def Value(self, Num: int) -> float: ... def Values(self) -> math_Vector: ... @@ -429,6 +449,7 @@ class math_Matrix: def Determinant(self) -> float: ... def Divide(self, Right: float) -> None: ... def Divided(self, Right: float) -> math_Matrix: ... + def Dump(self) -> str: ... def Init(self, InitialValue: float) -> None: ... def Initialized(self, Other: math_Matrix) -> math_Matrix: ... def Inverse(self) -> math_Matrix: ... @@ -488,6 +509,7 @@ class math_NewtonFunctionRoot: @overload def __init__(self, A: float, B: float, EpsX: float, EpsF: float, NbIterations: Optional[int] = 100) -> None: ... def Derivative(self) -> float: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def NbIterations(self) -> int: ... def Perform(self, F: math_FunctionWithDerivative, Guess: float) -> None: ... @@ -503,6 +525,7 @@ class math_NewtonFunctionSetRoot: def Derivative(self) -> math_Matrix: ... @overload def Derivative(self, Der: math_Matrix) -> None: ... + def Dump(self) -> str: ... @overload def FunctionSetErrors(self) -> math_Vector: ... @overload @@ -522,6 +545,7 @@ class math_NewtonFunctionSetRoot: class math_NewtonMinimum: def __init__(self, theFunction: math_MultipleVarFunctionWithHessian, theTolerance: Optional[float] = Precision.Confusion(), theNbIterations: Optional[int] = 40, theConvexity: Optional[float] = 1.0e-6, theWithSingularity: Optional[bool] = True) -> None: ... + def Dump(self) -> str: ... def GetStatus(self) -> math_Status: ... @overload def Gradient(self) -> math_Vector: ... @@ -553,6 +577,7 @@ class math_PSOParticlesPool: class math_Powell: def __init__(self, theFunction: math_MultipleVarFunction, theTolerance: float, theNbIterations: Optional[int] = 200, theZEPS: Optional[float] = 1.0e-12) -> None: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def IsSolutionReached(self, theFunction: math_MultipleVarFunction) -> bool: ... @overload @@ -565,6 +590,7 @@ class math_Powell: class math_SVD: def __init__(self, A: math_Matrix) -> None: ... + def Dump(self) -> str: ... def IsDone(self) -> bool: ... def PseudoInverse(self, Inv: math_Matrix, Eps: Optional[float] = 1.0e-6) -> None: ... def Solve(self, B: math_Vector, X: math_Vector, Eps: Optional[float] = 1.0e-6) -> None: ... @@ -576,6 +602,7 @@ class math_TrigonometricFunctionRoots: def __init__(self, D: float, E: float, InfBound: float, SupBound: float) -> None: ... @overload def __init__(self, C: float, D: float, E: float, InfBound: float, SupBound: float) -> None: ... + def Dump(self) -> str: ... def InfiniteRoots(self) -> bool: ... def IsDone(self) -> bool: ... def NbSolutions(self) -> int: ... @@ -587,6 +614,7 @@ class math_Uzawa: @overload def __init__(self, Cont: math_Matrix, Secont: math_Vector, StartingPoint: math_Vector, Nci: int, Nce: int, EpsLix: Optional[float] = 1.0e-06, EpsLic: Optional[float] = 1.0e-06, NbIterations: Optional[int] = 500) -> None: ... def Duale(self, V: math_Vector) -> None: ... + def Dump(self) -> str: ... def Error(self) -> math_Vector: ... def InitialError(self) -> math_Vector: ... def InverseCont(self) -> math_Matrix: ... @@ -622,6 +650,7 @@ class math_Vector: def Added(self, theRight: math_Vector) -> math_Vector: ... def Divide(self, theRight: float) -> None: ... def Divided(self, theRight: float) -> math_Vector: ... + def Dump(self) -> str: ... def Init(self, theInitialValue: float) -> None: ... def Initialized(self, theOther: math_Vector) -> math_Vector: ... def Inverse(self) -> math_Vector: ... diff --git a/test/core_meshdatasource_unittest.py b/test/core_meshdatasource_unittest.py index 28496cef3..124e0e2ef 100644 --- a/test/core_meshdatasource_unittest.py +++ b/test/core_meshdatasource_unittest.py @@ -126,10 +126,10 @@ def testset_check_normals(self): # get all nodes all_nodes = a_data_source.GetAllNodes() self.assertEqual(all_nodes.NbBuckets(), 101) - all_nodes.StatisticsToString() + all_nodes.Statistics() # get all GetAllElements all_elements = a_data_source.GetAllElements() - all_elements.StatisticsToString() + all_elements.Statistics() self.assertEqual(all_elements.NbBuckets(), 101) def test_create_mesh_datasource_from_numpy_ndarray(self): diff --git a/test/core_ocaf_unittest.py b/test/core_ocaf_unittest.py index 173ecbd9b..9e85a2018 100644 --- a/test/core_ocaf_unittest.py +++ b/test/core_ocaf_unittest.py @@ -119,6 +119,44 @@ def test_read_step_file(self) -> None: a_shape = shape_tool.GetShape(label_shp) self.assertFalse(a_shape.IsNull()) + def test_read_step_file_from_string(self) -> None: + """The same as above, using a string""" + # create an handle to a document + doc = TDocStd_Document("pythonocc-doc") + # Get root assembly + shape_tool = XCAFDoc_DocumentTool.ShapeTool(doc.Main()) + l_colors = XCAFDoc_DocumentTool.ColorTool(doc.Main()) + step_reader = STEPCAFControl_Reader() + step_reader.SetColorMode(True) + step_reader.SetLayerMode(True) + step_reader.SetNameMode(True) + step_reader.SetMatMode(True) + + # load the step file to a string + with open("./test_io/test_ocaf.stp", "r", encoding="utf8") as step_file: + step_file_as_string = step_file.read() + status = step_reader.ReadStream("pythonocc_stream", step_file_as_string) + self.assertEqual(status, IFSelect_RetDone) + step_reader.Transfer(doc) + + labels = TDF_LabelSequence() + color_labels = TDF_LabelSequence() + + shape_tool.GetFreeShapes(labels) + + self.assertEqual(labels.Length(), 1) + sub_shapes_labels = TDF_LabelSequence() + self.assertFalse(shape_tool.IsAssembly(labels.Value(1))) + shape_tool.GetSubShapes(labels.Value(1), sub_shapes_labels) + self.assertEqual(sub_shapes_labels.Length(), 0) + + l_colors.GetColors(color_labels) + self.assertEqual(color_labels.Length(), 1) + + label_shp = labels.Value(1) + a_shape = shape_tool.GetShape(label_shp) + self.assertFalse(a_shape.IsNull()) + def test_read_step_material(self) -> None: # create an handle to a document doc = TDocStd_Document("pythonocc-doc") diff --git a/test/core_wrapper_features_unittest.py b/test/core_wrapper_features_unittest.py index c8053207d..bfd2dae87 100644 --- a/test/core_wrapper_features_unittest.py +++ b/test/core_wrapper_features_unittest.py @@ -64,7 +64,11 @@ ) from OCC.Core.math import math_Matrix, math_Vector from OCC.Core.GC import GC_MakeSegment -from OCC.Core.STEPControl import STEPControl_Writer, STEPControl_AsIs +from OCC.Core.STEPControl import ( + STEPControl_Writer, + STEPControl_AsIs, + STEPControl_Reader, +) from OCC.Core.Interface import Interface_Static from OCC.Core.GCE2d import GCE2d_MakeSegment from OCC.Core.ShapeFix import ShapeFix_Solid, ShapeFix_Wire @@ -735,15 +739,15 @@ def test_shape_conversion_as_py_none(self) -> None: visible_smooth_edges = hlr_shapes.Rg1LineVCompound() self.assertTrue(visible_smooth_edges is None) - def test_DumpToString(self) -> None: + def test_Dump(self) -> None: """some objects can be serialized to a string""" v = math_Vector(0, 2) - serialized_v = v.DumpToString() + serialized_v = v.Dump() # should output expected_output = "math_Vector of Length = 3\nmath_Vector(0) = 0\nmath_Vector(1) = 0\nmath_Vector(2) = 0\n" self.assertEqual(expected_output, serialized_v) - def test_DumpJsonToString(self) -> None: + def test_DumpJson(self) -> None: """Since opencascade 7x, some objects can be serialized to json""" # create a sphere with a radius of 10. sph = BRepPrimAPI_MakeSphere(10.0).Shape() @@ -761,7 +765,7 @@ def test_DumpJsonToString(self) -> None: [-10.0, -10.0, -10.0], ) # check dump json export is working - json_string = bnd_box.DumpJsonToString() + json_string = bnd_box.DumpJson() # try to the output string json_imported_dict = json.loads(json_string) self.assertEqual(json_imported_dict["CornerMin"], [-10, -10, -10]) @@ -772,7 +776,7 @@ def test_ImportFromJson(self) -> None: # create a sphere with a radius of 10. p1 = gp_Pnt(1.0, 3.14, -5) p2 = gp_Pnt() - p2.InitFromJsonString(p1.DumpJsonToString()) + p2.InitFromJson(p1.DumpJson()) self.assertEqual(p2.X(), 1.0) self.assertEqual(p2.Y(), 3.14) self.assertEqual(p2.Z(), -5) @@ -1004,6 +1008,26 @@ def test_wrap_extendedstring_as_pyunicodestring(self): step_file_content = f.read() self.assertTrue(a_unicode_string in step_file_content) + def test_ReadStream(self): + """read a step file from a string""" + with open( + os.path.join(".", "test_io", "io1-ug-214.stp"), "r", encoding="utf8" + ) as step_file: + step_file_content = step_file.read() + step_reader = STEPControl_Reader() + result = step_reader.ReadStream("stream_name", step_file_content) + self.assertEqual(result, IFSelect_RetDone) + step_reader.TransferRoots() + + def test_WriteStream(self): + """write a step file to a string""" + the_shape = BRepPrimAPI_MakeBox(10, 20, 30).Shape() + step_writer = STEPControl_Writer() + step_writer.Transfer(the_shape, STEPControl_AsIs) + result, step_str = step_writer.WriteStream() + self.assertEqual(result, IFSelect_RetDone) + self.assertEqual(len(step_str), 15416) # 15416 characters in the step string + def suite() -> unittest.TestSuite: test_suite = unittest.TestSuite() diff --git a/test/test_io/io1-ug-214.stp b/test/test_io/io1-ug-214.stp new file mode 100644 index 000000000..4ce2e6288 --- /dev/null +++ b/test/test_io/io1-ug-214.stp @@ -0,0 +1,523 @@ +ISO-10303-21; +HEADER; +/* Generated by software containing ST-Developer + * from STEP Tools, Inc. (www.steptools.com) + */ +/* OPTION: using custom schema-name function */ + +FILE_DESCRIPTION( +/* description */ (' '), +/* implementation_level */ '2;1'); + +FILE_NAME( +/* name */ 'io1-ug', +/* time_stamp */ '1999-09-13T09:44:34-05:00', +/* author */ (' '), +/* organization */ (' '), +/* preprocessor_version */ 'ST-DEVELOPER v7', +/* originating_system */ 'UNIGRAPHICS SOLUTIONS - UNIGRAPHICS 16.0', +/* authorisation */ ' '); + +FILE_SCHEMA (('AUTOMOTIVE_DESIGN { 1 2 10303 214 0 1 1 1 }')); +ENDSEC; + +DATA; +#10=SHAPE_REPRESENTATION_RELATIONSHIP('none', +'relationship between io1-ug-none and io1-ug-none',#24,#11); +#11=ADVANCED_BREP_SHAPE_REPRESENTATION('io1-ug-none',(#42),#473); +#12=SHAPE_DEFINITION_REPRESENTATION(#13,#24); +#13=PRODUCT_DEFINITION_SHAPE('','',#14); +#14=PRODUCT_DEFINITION(' ','',#16,#15); +#15=PRODUCT_DEFINITION_CONTEXT('',#23,'part definition'); +#16=PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE(' ',' ',#18,.NOT_KNOWN.); +#17=PRODUCT_RELATED_PRODUCT_CATEGORY('part','',(#18)); +#18=PRODUCT('io1-ug','io1-ug',' ',(#21)); +#19=PRODUCT_CATEGORY('part',' '); +#20=PRODUCT_CATEGORY(' ',''); +#21=PRODUCT_CONTEXT(' ',#23,'mechanical'); +#22=APPLICATION_PROTOCOL_DEFINITION('INTERNATIONAL STANDARD', +'automotive_design',1994,#23); +#23=APPLICATION_CONTEXT(' '); +#24=SHAPE_REPRESENTATION('io1-ug-none',(#285),#473); +#25=OVER_RIDING_STYLED_ITEM('',(#32),#62,#30); +#26=SURFACE_STYLE_FILL_AREA(#27); +#27=FILL_AREA_STYLE('',(#28)); +#28=FILL_AREA_STYLE_COLOUR('',#40); +#29=PRESENTATION_LAYER_ASSIGNMENT('1','Layer 1',(#30)); +#30=STYLED_ITEM('',(#31),#42); +#31=PRESENTATION_STYLE_ASSIGNMENT((#33)); +#32=PRESENTATION_STYLE_ASSIGNMENT((#34)); +#33=SURFACE_STYLE_USAGE(.BOTH.,#35); +#34=SURFACE_STYLE_USAGE(.BOTH.,#36); +#35=SURFACE_SIDE_STYLE('',(#37)); +#36=SURFACE_SIDE_STYLE('',(#26)); +#37=SURFACE_STYLE_BOUNDARY(#38); +#38=CURVE_STYLE('',#41,POSITIVE_LENGTH_MEASURE(0.352777777777778),#39); +#39=DRAUGHTING_PRE_DEFINED_COLOUR('yellow'); +#40=DRAUGHTING_PRE_DEFINED_COLOUR('red'); +#41=DRAUGHTING_PRE_DEFINED_CURVE_FONT('continuous'); +#42=MANIFOLD_SOLID_BREP('',#43); +#43=CLOSED_SHELL('',(#60,#61,#62,#63,#64,#65,#66,#67,#68,#69,#70,#71,#72, +#73,#74,#75,#76)); +#44=CYLINDRICAL_SURFACE('',#292,18.); +#45=CYLINDRICAL_SURFACE('',#302,44.); +#46=CYLINDRICAL_SURFACE('',#312,31.); +#47=CYLINDRICAL_SURFACE('',#316,29.); +#48=CYLINDRICAL_SURFACE('',#319,31.); +#49=CYLINDRICAL_SURFACE('',#320,3.5); +#50=CYLINDRICAL_SURFACE('',#321,3.5); +#51=CYLINDRICAL_SURFACE('',#322,3.5); +#52=CYLINDRICAL_SURFACE('',#323,3.5); +#53=CYLINDRICAL_SURFACE('',#324,3.5); +#54=CYLINDRICAL_SURFACE('',#325,3.5); +#55=PLANE('',#290); +#56=PLANE('',#300); +#57=PLANE('',#310); +#58=PLANE('',#314); +#59=PLANE('',#318); +#60=ADVANCED_FACE('',(#78,#79),#77,.T.); +#61=ADVANCED_FACE('',(#80,#81),#55,.T.); +#62=ADVANCED_FACE('',(#82,#83),#44,.F.); +#63=ADVANCED_FACE('',(#84,#85,#86,#87,#88,#89,#90,#91),#56,.T.); +#64=ADVANCED_FACE('',(#92,#93),#45,.T.); +#65=ADVANCED_FACE('',(#94,#95,#96,#97,#98,#99,#100,#101),#57,.T.); +#66=ADVANCED_FACE('',(#102,#103),#46,.T.); +#67=ADVANCED_FACE('',(#104,#105),#58,.T.); +#68=ADVANCED_FACE('',(#106,#107),#47,.T.); +#69=ADVANCED_FACE('',(#108,#109),#59,.T.); +#70=ADVANCED_FACE('',(#110,#111),#48,.T.); +#71=ADVANCED_FACE('',(#112,#113),#49,.F.); +#72=ADVANCED_FACE('',(#114,#115),#50,.F.); +#73=ADVANCED_FACE('',(#116,#117),#51,.F.); +#74=ADVANCED_FACE('',(#118,#119),#52,.F.); +#75=ADVANCED_FACE('',(#120,#121),#53,.F.); +#76=ADVANCED_FACE('',(#122,#123),#54,.F.); +#77=CONICAL_SURFACE('',#288,31.,45.); +#78=FACE_BOUND('',#124,.T.); +#79=FACE_BOUND('',#125,.T.); +#80=FACE_BOUND('',#126,.T.); +#81=FACE_BOUND('',#127,.T.); +#82=FACE_BOUND('',#128,.T.); +#83=FACE_BOUND('',#129,.T.); +#84=FACE_BOUND('',#130,.T.); +#85=FACE_BOUND('',#131,.T.); +#86=FACE_BOUND('',#132,.T.); +#87=FACE_BOUND('',#133,.T.); +#88=FACE_BOUND('',#134,.T.); +#89=FACE_BOUND('',#135,.T.); +#90=FACE_BOUND('',#136,.T.); +#91=FACE_BOUND('',#137,.T.); +#92=FACE_BOUND('',#138,.T.); +#93=FACE_BOUND('',#139,.T.); +#94=FACE_BOUND('',#140,.T.); +#95=FACE_BOUND('',#141,.T.); +#96=FACE_BOUND('',#142,.T.); +#97=FACE_BOUND('',#143,.T.); +#98=FACE_BOUND('',#144,.T.); +#99=FACE_BOUND('',#145,.T.); +#100=FACE_BOUND('',#146,.T.); +#101=FACE_BOUND('',#147,.T.); +#102=FACE_BOUND('',#148,.T.); +#103=FACE_BOUND('',#149,.T.); +#104=FACE_BOUND('',#150,.T.); +#105=FACE_BOUND('',#151,.T.); +#106=FACE_BOUND('',#152,.T.); +#107=FACE_BOUND('',#153,.T.); +#108=FACE_BOUND('',#154,.T.); +#109=FACE_BOUND('',#155,.T.); +#110=FACE_BOUND('',#156,.T.); +#111=FACE_BOUND('',#157,.T.); +#112=FACE_BOUND('',#158,.T.); +#113=FACE_BOUND('',#159,.T.); +#114=FACE_BOUND('',#160,.T.); +#115=FACE_BOUND('',#161,.T.); +#116=FACE_BOUND('',#162,.T.); +#117=FACE_BOUND('',#163,.T.); +#118=FACE_BOUND('',#164,.T.); +#119=FACE_BOUND('',#165,.T.); +#120=FACE_BOUND('',#166,.T.); +#121=FACE_BOUND('',#167,.T.); +#122=FACE_BOUND('',#168,.T.); +#123=FACE_BOUND('',#169,.T.); +#124=EDGE_LOOP('',(#170)); +#125=EDGE_LOOP('',(#171)); +#126=EDGE_LOOP('',(#172)); +#127=EDGE_LOOP('',(#173)); +#128=EDGE_LOOP('',(#174)); +#129=EDGE_LOOP('',(#175)); +#130=EDGE_LOOP('',(#176)); +#131=EDGE_LOOP('',(#177)); +#132=EDGE_LOOP('',(#178)); +#133=EDGE_LOOP('',(#179)); +#134=EDGE_LOOP('',(#180)); +#135=EDGE_LOOP('',(#181)); +#136=EDGE_LOOP('',(#182)); +#137=EDGE_LOOP('',(#183)); +#138=EDGE_LOOP('',(#184)); +#139=EDGE_LOOP('',(#185)); +#140=EDGE_LOOP('',(#186)); +#141=EDGE_LOOP('',(#187)); +#142=EDGE_LOOP('',(#188)); +#143=EDGE_LOOP('',(#189)); +#144=EDGE_LOOP('',(#190)); +#145=EDGE_LOOP('',(#191)); +#146=EDGE_LOOP('',(#192)); +#147=EDGE_LOOP('',(#193)); +#148=EDGE_LOOP('',(#194)); +#149=EDGE_LOOP('',(#195)); +#150=EDGE_LOOP('',(#196)); +#151=EDGE_LOOP('',(#197)); +#152=EDGE_LOOP('',(#198)); +#153=EDGE_LOOP('',(#199)); +#154=EDGE_LOOP('',(#200)); +#155=EDGE_LOOP('',(#201)); +#156=EDGE_LOOP('',(#202)); +#157=EDGE_LOOP('',(#203)); +#158=EDGE_LOOP('',(#204)); +#159=EDGE_LOOP('',(#205)); +#160=EDGE_LOOP('',(#206)); +#161=EDGE_LOOP('',(#207)); +#162=EDGE_LOOP('',(#208)); +#163=EDGE_LOOP('',(#209)); +#164=EDGE_LOOP('',(#210)); +#165=EDGE_LOOP('',(#211)); +#166=EDGE_LOOP('',(#212)); +#167=EDGE_LOOP('',(#213)); +#168=EDGE_LOOP('',(#214)); +#169=EDGE_LOOP('',(#215)); +#170=ORIENTED_EDGE('',*,*,#239,.T.); +#171=ORIENTED_EDGE('',*,*,#240,.F.); +#172=ORIENTED_EDGE('',*,*,#241,.T.); +#173=ORIENTED_EDGE('',*,*,#239,.F.); +#174=ORIENTED_EDGE('',*,*,#242,.T.); +#175=ORIENTED_EDGE('',*,*,#241,.F.); +#176=ORIENTED_EDGE('',*,*,#243,.T.); +#177=ORIENTED_EDGE('',*,*,#244,.T.); +#178=ORIENTED_EDGE('',*,*,#245,.T.); +#179=ORIENTED_EDGE('',*,*,#246,.T.); +#180=ORIENTED_EDGE('',*,*,#247,.T.); +#181=ORIENTED_EDGE('',*,*,#248,.T.); +#182=ORIENTED_EDGE('',*,*,#249,.T.); +#183=ORIENTED_EDGE('',*,*,#242,.F.); +#184=ORIENTED_EDGE('',*,*,#250,.T.); +#185=ORIENTED_EDGE('',*,*,#249,.F.); +#186=ORIENTED_EDGE('',*,*,#251,.F.); +#187=ORIENTED_EDGE('',*,*,#252,.F.); +#188=ORIENTED_EDGE('',*,*,#253,.F.); +#189=ORIENTED_EDGE('',*,*,#254,.F.); +#190=ORIENTED_EDGE('',*,*,#255,.F.); +#191=ORIENTED_EDGE('',*,*,#256,.F.); +#192=ORIENTED_EDGE('',*,*,#257,.T.); +#193=ORIENTED_EDGE('',*,*,#250,.F.); +#194=ORIENTED_EDGE('',*,*,#258,.T.); +#195=ORIENTED_EDGE('',*,*,#257,.F.); +#196=ORIENTED_EDGE('',*,*,#259,.T.); +#197=ORIENTED_EDGE('',*,*,#258,.F.); +#198=ORIENTED_EDGE('',*,*,#260,.T.); +#199=ORIENTED_EDGE('',*,*,#259,.F.); +#200=ORIENTED_EDGE('',*,*,#261,.T.); +#201=ORIENTED_EDGE('',*,*,#260,.F.); +#202=ORIENTED_EDGE('',*,*,#240,.T.); +#203=ORIENTED_EDGE('',*,*,#261,.F.); +#204=ORIENTED_EDGE('',*,*,#256,.T.); +#205=ORIENTED_EDGE('',*,*,#248,.F.); +#206=ORIENTED_EDGE('',*,*,#255,.T.); +#207=ORIENTED_EDGE('',*,*,#247,.F.); +#208=ORIENTED_EDGE('',*,*,#254,.T.); +#209=ORIENTED_EDGE('',*,*,#246,.F.); +#210=ORIENTED_EDGE('',*,*,#253,.T.); +#211=ORIENTED_EDGE('',*,*,#245,.F.); +#212=ORIENTED_EDGE('',*,*,#252,.T.); +#213=ORIENTED_EDGE('',*,*,#244,.F.); +#214=ORIENTED_EDGE('',*,*,#251,.T.); +#215=ORIENTED_EDGE('',*,*,#243,.F.); +#216=VERTEX_POINT('',#410); +#217=VERTEX_POINT('',#412); +#218=VERTEX_POINT('',#415); +#219=VERTEX_POINT('',#418); +#220=VERTEX_POINT('',#421); +#221=VERTEX_POINT('',#423); +#222=VERTEX_POINT('',#425); +#223=VERTEX_POINT('',#427); +#224=VERTEX_POINT('',#429); +#225=VERTEX_POINT('',#431); +#226=VERTEX_POINT('',#433); +#227=VERTEX_POINT('',#436); +#228=VERTEX_POINT('',#439); +#229=VERTEX_POINT('',#441); +#230=VERTEX_POINT('',#443); +#231=VERTEX_POINT('',#445); +#232=VERTEX_POINT('',#447); +#233=VERTEX_POINT('',#449); +#234=VERTEX_POINT('',#451); +#235=VERTEX_POINT('',#454); +#236=VERTEX_POINT('',#457); +#237=VERTEX_POINT('',#460); +#238=VERTEX_POINT('',#463); +#239=EDGE_CURVE('',#216,#216,#262,.T.); +#240=EDGE_CURVE('',#217,#217,#263,.T.); +#241=EDGE_CURVE('',#218,#218,#264,.T.); +#242=EDGE_CURVE('',#219,#219,#265,.T.); +#243=EDGE_CURVE('',#220,#220,#266,.T.); +#244=EDGE_CURVE('',#221,#221,#267,.T.); +#245=EDGE_CURVE('',#222,#222,#268,.T.); +#246=EDGE_CURVE('',#223,#223,#269,.T.); +#247=EDGE_CURVE('',#224,#224,#270,.T.); +#248=EDGE_CURVE('',#225,#225,#271,.T.); +#249=EDGE_CURVE('',#226,#226,#272,.T.); +#250=EDGE_CURVE('',#227,#227,#273,.T.); +#251=EDGE_CURVE('',#228,#228,#274,.T.); +#252=EDGE_CURVE('',#229,#229,#275,.T.); +#253=EDGE_CURVE('',#230,#230,#276,.T.); +#254=EDGE_CURVE('',#231,#231,#277,.T.); +#255=EDGE_CURVE('',#232,#232,#278,.T.); +#256=EDGE_CURVE('',#233,#233,#279,.T.); +#257=EDGE_CURVE('',#234,#234,#280,.T.); +#258=EDGE_CURVE('',#235,#235,#281,.T.); +#259=EDGE_CURVE('',#236,#236,#282,.T.); +#260=EDGE_CURVE('',#237,#237,#283,.T.); +#261=EDGE_CURVE('',#238,#238,#284,.T.); +#262=CIRCLE('',#286,30.); +#263=CIRCLE('',#287,31.); +#264=CIRCLE('',#289,18.); +#265=CIRCLE('',#291,18.); +#266=CIRCLE('',#293,3.5); +#267=CIRCLE('',#294,3.5); +#268=CIRCLE('',#295,3.5); +#269=CIRCLE('',#296,3.5); +#270=CIRCLE('',#297,3.5); +#271=CIRCLE('',#298,3.5); +#272=CIRCLE('',#299,44.); +#273=CIRCLE('',#301,44.); +#274=CIRCLE('',#303,3.5); +#275=CIRCLE('',#304,3.5); +#276=CIRCLE('',#305,3.5); +#277=CIRCLE('',#306,3.5); +#278=CIRCLE('',#307,3.5); +#279=CIRCLE('',#308,3.5); +#280=CIRCLE('',#309,31.); +#281=CIRCLE('',#311,31.); +#282=CIRCLE('',#313,29.); +#283=CIRCLE('',#315,29.); +#284=CIRCLE('',#317,31.); +#285=AXIS2_PLACEMENT_3D('',#408,#326,#327); +#286=AXIS2_PLACEMENT_3D('',#409,#328,#329); +#287=AXIS2_PLACEMENT_3D('',#411,#330,#331); +#288=AXIS2_PLACEMENT_3D('',#413,#332,#333); +#289=AXIS2_PLACEMENT_3D('',#414,#334,#335); +#290=AXIS2_PLACEMENT_3D('',#416,#336,#337); +#291=AXIS2_PLACEMENT_3D('',#417,#338,#339); +#292=AXIS2_PLACEMENT_3D('',#419,#340,#341); +#293=AXIS2_PLACEMENT_3D('',#420,#342,#343); +#294=AXIS2_PLACEMENT_3D('',#422,#344,#345); +#295=AXIS2_PLACEMENT_3D('',#424,#346,#347); +#296=AXIS2_PLACEMENT_3D('',#426,#348,#349); +#297=AXIS2_PLACEMENT_3D('',#428,#350,#351); +#298=AXIS2_PLACEMENT_3D('',#430,#352,#353); +#299=AXIS2_PLACEMENT_3D('',#432,#354,#355); +#300=AXIS2_PLACEMENT_3D('',#434,#356,#357); +#301=AXIS2_PLACEMENT_3D('',#435,#358,#359); +#302=AXIS2_PLACEMENT_3D('',#437,#360,#361); +#303=AXIS2_PLACEMENT_3D('',#438,#362,#363); +#304=AXIS2_PLACEMENT_3D('',#440,#364,#365); +#305=AXIS2_PLACEMENT_3D('',#442,#366,#367); +#306=AXIS2_PLACEMENT_3D('',#444,#368,#369); +#307=AXIS2_PLACEMENT_3D('',#446,#370,#371); +#308=AXIS2_PLACEMENT_3D('',#448,#372,#373); +#309=AXIS2_PLACEMENT_3D('',#450,#374,#375); +#310=AXIS2_PLACEMENT_3D('',#452,#376,#377); +#311=AXIS2_PLACEMENT_3D('',#453,#378,#379); +#312=AXIS2_PLACEMENT_3D('',#455,#380,#381); +#313=AXIS2_PLACEMENT_3D('',#456,#382,#383); +#314=AXIS2_PLACEMENT_3D('',#458,#384,#385); +#315=AXIS2_PLACEMENT_3D('',#459,#386,#387); +#316=AXIS2_PLACEMENT_3D('',#461,#388,#389); +#317=AXIS2_PLACEMENT_3D('',#462,#390,#391); +#318=AXIS2_PLACEMENT_3D('',#464,#392,#393); +#319=AXIS2_PLACEMENT_3D('',#465,#394,#395); +#320=AXIS2_PLACEMENT_3D('',#466,#396,#397); +#321=AXIS2_PLACEMENT_3D('',#467,#398,#399); +#322=AXIS2_PLACEMENT_3D('',#468,#400,#401); +#323=AXIS2_PLACEMENT_3D('',#469,#402,#403); +#324=AXIS2_PLACEMENT_3D('',#470,#404,#405); +#325=AXIS2_PLACEMENT_3D('',#471,#406,#407); +#326=DIRECTION('',(0.,0.,1.)); +#327=DIRECTION('',(1.,0.,0.)); +#328=DIRECTION('',(0.,1.,0.)); +#329=DIRECTION('',(0.,0.,1.)); +#330=DIRECTION('',(0.,1.,0.)); +#331=DIRECTION('',(0.,0.,1.)); +#332=DIRECTION('',(0.,1.,0.)); +#333=DIRECTION('',(0.,-1.06842813505846E-16,1.)); +#334=DIRECTION('',(0.,1.,0.)); +#335=DIRECTION('',(0.,0.,1.)); +#336=DIRECTION('',(0.,-1.,0.)); +#337=DIRECTION('',(0.,0.,-1.)); +#338=DIRECTION('',(0.,1.,0.)); +#339=DIRECTION('',(0.,0.,1.)); +#340=DIRECTION('',(0.,1.,0.)); +#341=DIRECTION('',(0.,0.,1.)); +#342=DIRECTION('',(0.,-1.,0.)); +#343=DIRECTION('',(0.866025403784439,0.,-0.5)); +#344=DIRECTION('',(0.,-1.,0.)); +#345=DIRECTION('',(0.866025403784438,0.,0.5)); +#346=DIRECTION('',(0.,-1.,0.)); +#347=DIRECTION('',(-3.88578058618805E-16,0.,1.)); +#348=DIRECTION('',(0.,-1.,0.)); +#349=DIRECTION('',(-0.866025403784439,0.,0.5)); +#350=DIRECTION('',(0.,-1.,0.)); +#351=DIRECTION('',(-0.866025403784439,0.,-0.5)); +#352=DIRECTION('',(0.,-1.,0.)); +#353=DIRECTION('',(0.,0.,-1.)); +#354=DIRECTION('',(0.,1.,0.)); +#355=DIRECTION('',(0.,0.,1.)); +#356=DIRECTION('',(0.,1.,0.)); +#357=DIRECTION('',(0.,0.,1.)); +#358=DIRECTION('',(0.,1.,0.)); +#359=DIRECTION('',(0.,0.,1.)); +#360=DIRECTION('',(0.,1.,0.)); +#361=DIRECTION('',(0.,0.,1.)); +#362=DIRECTION('',(0.,-1.,0.)); +#363=DIRECTION('',(0.,0.,-1.)); +#364=DIRECTION('',(0.,-1.,0.)); +#365=DIRECTION('',(0.,0.,-1.)); +#366=DIRECTION('',(0.,-1.,0.)); +#367=DIRECTION('',(0.,0.,-1.)); +#368=DIRECTION('',(0.,-1.,0.)); +#369=DIRECTION('',(0.,0.,-1.)); +#370=DIRECTION('',(0.,-1.,0.)); +#371=DIRECTION('',(0.,0.,-1.)); +#372=DIRECTION('',(0.,-1.,0.)); +#373=DIRECTION('',(0.,0.,-1.)); +#374=DIRECTION('',(0.,1.,0.)); +#375=DIRECTION('',(0.,0.,1.)); +#376=DIRECTION('',(0.,-1.,0.)); +#377=DIRECTION('',(0.,0.,-1.)); +#378=DIRECTION('',(0.,1.,0.)); +#379=DIRECTION('',(0.,0.,1.)); +#380=DIRECTION('',(0.,1.,0.)); +#381=DIRECTION('',(0.,0.,1.)); +#382=DIRECTION('',(0.,1.,0.)); +#383=DIRECTION('',(0.,0.,1.)); +#384=DIRECTION('',(0.,-1.,0.)); +#385=DIRECTION('',(0.,0.,-1.)); +#386=DIRECTION('',(0.,1.,0.)); +#387=DIRECTION('',(0.,0.,1.)); +#388=DIRECTION('',(0.,1.,0.)); +#389=DIRECTION('',(0.,0.,1.)); +#390=DIRECTION('',(0.,1.,0.)); +#391=DIRECTION('',(0.,0.,1.)); +#392=DIRECTION('',(0.,1.,0.)); +#393=DIRECTION('',(0.,0.,1.)); +#394=DIRECTION('',(0.,1.,0.)); +#395=DIRECTION('',(0.,0.,1.)); +#396=DIRECTION('',(0.,-1.,0.)); +#397=DIRECTION('',(0.,0.,-1.)); +#398=DIRECTION('',(0.,-1.,0.)); +#399=DIRECTION('',(-0.866025403784439,0.,-0.5)); +#400=DIRECTION('',(0.,-1.,0.)); +#401=DIRECTION('',(-0.866025403784439,0.,0.5)); +#402=DIRECTION('',(0.,-1.,0.)); +#403=DIRECTION('',(-3.88578058618805E-16,0.,1.)); +#404=DIRECTION('',(0.,-1.,0.)); +#405=DIRECTION('',(0.866025403784438,0.,0.5)); +#406=DIRECTION('',(0.,-1.,0.)); +#407=DIRECTION('',(0.866025403784439,0.,-0.5)); +#408=CARTESIAN_POINT('',(0.,0.,0.)); +#409=CARTESIAN_POINT('',(0.,0.,0.)); +#410=CARTESIAN_POINT('',(0.,0.,30.)); +#411=CARTESIAN_POINT('',(0.,1.,0.)); +#412=CARTESIAN_POINT('',(0.,1.,31.)); +#413=CARTESIAN_POINT('',(0.,1.,0.)); +#414=CARTESIAN_POINT('',(0.,0.,0.)); +#415=CARTESIAN_POINT('',(0.,0.,18.)); +#416=CARTESIAN_POINT('',(0.,-1.1639106044471E-15,30.)); +#417=CARTESIAN_POINT('',(0.,31.,0.)); +#418=CARTESIAN_POINT('',(0.,31.,18.)); +#419=CARTESIAN_POINT('',(0.,16.3033391738174,0.)); +#420=CARTESIAN_POINT('',(-32.4759526419165,31.,18.75)); +#421=CARTESIAN_POINT('',(-29.4448637286709,31.,17.)); +#422=CARTESIAN_POINT('',(-32.4759526419165,31.,-18.75)); +#423=CARTESIAN_POINT('',(-29.4448637286709,31.,-17.)); +#424=CARTESIAN_POINT('',(1.45716771982052E-14,31.,-37.5)); +#425=CARTESIAN_POINT('',(1.32116539930394E-14,31.,-34.)); +#426=CARTESIAN_POINT('',(32.4759526419165,31.,-18.75)); +#427=CARTESIAN_POINT('',(29.4448637286709,31.,-17.)); +#428=CARTESIAN_POINT('',(32.4759526419165,31.,18.75)); +#429=CARTESIAN_POINT('',(29.4448637286709,31.,17.)); +#430=CARTESIAN_POINT('',(0.,31.,37.5)); +#431=CARTESIAN_POINT('',(0.,31.,34.)); +#432=CARTESIAN_POINT('',(0.,31.,0.)); +#433=CARTESIAN_POINT('',(0.,31.,44.)); +#434=CARTESIAN_POINT('',(0.,31.,18.)); +#435=CARTESIAN_POINT('',(0.,25.,0.)); +#436=CARTESIAN_POINT('',(0.,25.,44.)); +#437=CARTESIAN_POINT('',(0.,16.3033391738174,0.)); +#438=CARTESIAN_POINT('',(-32.4759526419165,25.,18.75)); +#439=CARTESIAN_POINT('',(-32.4759526419165,25.,15.25)); +#440=CARTESIAN_POINT('',(-32.4759526419165,25.,-18.75)); +#441=CARTESIAN_POINT('',(-32.4759526419165,25.,-22.25)); +#442=CARTESIAN_POINT('',(1.45716771982052E-14,25.,-37.5)); +#443=CARTESIAN_POINT('',(1.45716771982052E-14,25.,-41.)); +#444=CARTESIAN_POINT('',(32.4759526419165,25.,-18.75)); +#445=CARTESIAN_POINT('',(32.4759526419165,25.,-22.25)); +#446=CARTESIAN_POINT('',(32.4759526419165,25.,18.75)); +#447=CARTESIAN_POINT('',(32.4759526419165,25.,15.25)); +#448=CARTESIAN_POINT('',(0.,25.,37.5)); +#449=CARTESIAN_POINT('',(0.,25.,34.)); +#450=CARTESIAN_POINT('',(0.,25.,0.)); +#451=CARTESIAN_POINT('',(0.,25.,31.)); +#452=CARTESIAN_POINT('',(0.,25.,44.)); +#453=CARTESIAN_POINT('',(0.,10.,0.)); +#454=CARTESIAN_POINT('',(0.,10.,31.)); +#455=CARTESIAN_POINT('',(0.,16.3033391738174,0.)); +#456=CARTESIAN_POINT('',(0.,10.,0.)); +#457=CARTESIAN_POINT('',(0.,10.,29.)); +#458=CARTESIAN_POINT('',(0.,10.,31.)); +#459=CARTESIAN_POINT('',(0.,8.,0.)); +#460=CARTESIAN_POINT('',(0.,8.,29.)); +#461=CARTESIAN_POINT('',(0.,16.3033391738174,0.)); +#462=CARTESIAN_POINT('',(0.,8.,0.)); +#463=CARTESIAN_POINT('',(0.,8.,31.)); +#464=CARTESIAN_POINT('',(0.,8.,29.)); +#465=CARTESIAN_POINT('',(0.,16.3033391738174,0.)); +#466=CARTESIAN_POINT('',(0.,31.,37.5)); +#467=CARTESIAN_POINT('',(32.4759526419165,31.,18.75)); +#468=CARTESIAN_POINT('',(32.4759526419165,31.,-18.75)); +#469=CARTESIAN_POINT('',(1.45716771982052E-14,31.,-37.5)); +#470=CARTESIAN_POINT('',(-32.4759526419165,31.,-18.75)); +#471=CARTESIAN_POINT('',(-32.4759526419165,31.,18.75)); +#472=MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION('',(#30,#25), +#473); +#473=( +GEOMETRIC_REPRESENTATION_CONTEXT(3) +GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#474)) +GLOBAL_UNIT_ASSIGNED_CONTEXT((#480,#476,#475)) +REPRESENTATION_CONTEXT('io1-ug','TOP_LEVEL_ASSEMBLY_PART') +); +#474=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(2.E-05),#480, +'DISTANCE_ACCURACY_VALUE','Maximum Tolerance applied to model'); +#475=( +NAMED_UNIT(*) +SI_UNIT($,.STERADIAN.) +SOLID_ANGLE_UNIT() +); +#476=( +CONVERSION_BASED_UNIT('DEGREE',#478) +NAMED_UNIT(#477) +PLANE_ANGLE_UNIT() +); +#477=DIMENSIONAL_EXPONENTS(0.,0.,0.,0.,0.,0.,0.); +#478=PLANE_ANGLE_MEASURE_WITH_UNIT(PLANE_ANGLE_MEASURE(0.0174532925),#479); +#479=( +NAMED_UNIT(*) +PLANE_ANGLE_UNIT() +SI_UNIT($,.RADIAN.) +); +#480=( +LENGTH_UNIT() +NAMED_UNIT(*) +SI_UNIT(.MILLI.,.METRE.) +); +ENDSEC; +END-ISO-10303-21;