Repository: tpaviot/pythonocc-core (language: python)

Issue:
TypeError: in method 'HLRAlgo_EdgeIterator_Visible', argument 3 of type 'Standard_ShortReal &'
hi there,
I got a problem when using HLRAlgo_EdgeIterator, code as below:

tolsta: float = 0
tolend: float = 0
It = HLRAlgo_EdgeIterator()
It.InitVisible(ed.Status())  # ed is HLRBRep_EdgeData
sta, end = It.Visible(tolsta, tolend)   # caught Error here

I tried ctypes interface, not work. I checked swig doc, it helps not much as well. Is there anyway can I pass a primitive value by reference in python?

Or is there alternative interface to get data in HLRAlgo_EdgeStatus?



Discussion / hints:
confirmed, there's an issue with Standard_ShortReal returned by reference in the python wrapper. Can you please provide a short code snippet that I can run on my machine, it will serve as an unit test for the fix

Fix patch:
diff --git a/src/SWIG_files/common/FunctionTransformers.i b/src/SWIG_files/common/FunctionTransformers.i
index 1cd818d83..a16265d47 100644
--- a/src/SWIG_files/common/FunctionTransformers.i
+++ b/src/SWIG_files/common/FunctionTransformers.i
@@ -103,6 +103,33 @@ TCollection_HAsciiString output by ref parameter transformation
     $1 = &temp;
 }
 
+/*
+Standard_ShortReal & function transformation
+*/
+%typemap(argout) Standard_ShortReal &OutValue {
+    PyObject *o, *o2, *o3;
+    o = PyFloat_FromDouble(*$1);
+    if ((!$result) || ($result == Py_None)) {
+        $result = o;
+    } else {
+        if (!PyTuple_Check($result)) {
+            PyObject *o2 = $result;
+            $result = PyTuple_New(1);
+            PyTuple_SetItem($result,0,o2);
+        }
+        o3 = PyTuple_New(1);
+        PyTuple_SetItem(o3,0,o);
+        o2 = $result;
+        $result = PySequence_Concat(o2,o3);
+        Py_DECREF(o2);
+        Py_DECREF(o3);
+    }
+}
+
+%typemap(in,numinputs=0) Standard_ShortReal &OutValue(Standard_ShortReal temp) {
+    $1 = &temp;
+}
+
 /*
 Standard_Real & function transformation
 */
diff --git a/src/SWIG_files/wrapper/AIS.i b/src/SWIG_files/wrapper/AIS.i
index 6b93ec96a..d8550a5ad 100644
--- a/src/SWIG_files/wrapper/AIS.i
+++ b/src/SWIG_files/wrapper/AIS.i
@@ -3972,14 +3972,14 @@ YSize: float
 Parameters
 ----------
 anObj: AIS_InteractiveObject
-aFactor: Standard_ShortReal
-aUnits: Standard_ShortReal
 
 Returns
 -------
 aMode: int
+aFactor: float
+aUnits: float
 ") PolygonOffsets;
-		void PolygonOffsets(const opencascade::handle<AIS_InteractiveObject> & anObj, Standard_Integer &OutValue, Standard_ShortReal & aFactor, Standard_ShortReal & aUnits);
+		void PolygonOffsets(const opencascade::handle<AIS_InteractiveObject> & anObj, Standard_Integer &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** RebuildSelectionStructs ******************/
 		/**** md5 signature: fc018c2ec4a8be467c479b724e4da811 ****/
@@ -4794,8 +4794,8 @@ Parameters
 ----------
 theIObj: AIS_InteractiveObject
 theMode: int
-theFactor: Standard_ShortReal
-theUnits: Standard_ShortReal
+theFactor: float
+theUnits: float
 theToUpdateViewer: bool
 
 Returns
@@ -11275,7 +11275,7 @@ bool
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -11353,7 +11353,7 @@ None
 
 Parameters
 ----------
-theSideLength: Standard_ShortReal
+theSideLength: float
 
 Returns
 -------
@@ -11398,7 +11398,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Size;
 		Standard_ShortReal Size();
 
@@ -16032,7 +16032,7 @@ Quantity_Color
 
 Returns
 -------
-Standard_ShortReal
+float
 ") LaserLength;
 		Standard_ShortReal LaserLength();
 
@@ -16069,7 +16069,7 @@ None
 
 Parameters
 ----------
-theLength: Standard_ShortReal
+theLength: float
 
 Returns
 -------
@@ -16099,7 +16099,7 @@ None
 
 Parameters
 ----------
-theFactor: Standard_ShortReal
+theFactor: float
 
 Returns
 -------
@@ -16114,7 +16114,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") UnitFactor;
 		Standard_ShortReal UnitFactor();
 
diff --git a/src/SWIG_files/wrapper/AIS.pyi b/src/SWIG_files/wrapper/AIS.pyi
index e5eca763d..999ea37ce 100644
--- a/src/SWIG_files/wrapper/AIS.pyi
+++ b/src/SWIG_files/wrapper/AIS.pyi
@@ -675,7 +675,7 @@ class AIS_InteractiveContext(Standard_Transient):
     def PickingStrategy(self) -> SelectMgr_PickingStrategy: ...
     def PixelTolerance(self) -> int: ...
     def PlaneSize(self) -> Tuple[bool, float, float]: ...
-    def PolygonOffsets(self, anObj: AIS_InteractiveObject, aFactor: float, aUnits: float) -> int: ...
+    def PolygonOffsets(self, anObj: AIS_InteractiveObject) -> Tuple[int, float, float]: ...
     def RebuildSelectionStructs(self) -> None: ...
     def RecomputePrsOnly(self, theIObj: AIS_InteractiveObject, theToUpdateViewer: bool, theAllModes: Optional[bool] = False) -> None: ...
     def RecomputeSelectionOnly(self, anIObj: AIS_InteractiveObject) -> None: ...
diff --git a/src/SWIG_files/wrapper/Aspect.i b/src/SWIG_files/wrapper/Aspect.i
index 827b30443..d4504834e 100644
--- a/src/SWIG_files/wrapper/Aspect.i
+++ b/src/SWIG_files/wrapper/Aspect.i
@@ -1950,9 +1950,9 @@ None
 Parameters
 ----------
 theSunDirection: gp_Dir
-theCloudiness: Standard_ShortReal
-theTime: Standard_ShortReal
-theFogginess: Standard_ShortReal
+theCloudiness: float
+theTime: float
+theFogginess: float
 theSize: int
 
 Returns
@@ -1968,7 +1968,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Cloudiness;
 		Standard_ShortReal Cloudiness();
 
@@ -1987,7 +1987,7 @@ Standard_ShortReal
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Fogginess;
 		Standard_ShortReal Fogginess();
 
@@ -1998,7 +1998,7 @@ Standard_ShortReal
 
 Parameters
 ----------
-theCloudiness: Standard_ShortReal
+theCloudiness: float
 
 Returns
 -------
@@ -2013,7 +2013,7 @@ None
 
 Parameters
 ----------
-theFogginess: Standard_ShortReal
+theFogginess: float
 
 Returns
 -------
@@ -2058,7 +2058,7 @@ None
 
 Parameters
 ----------
-theTime: Standard_ShortReal
+theTime: float
 
 Returns
 -------
@@ -2095,7 +2095,7 @@ gp_Dir
 
 Returns
 -------
-Standard_ShortReal
+float
 ") TimeParameter;
 		Standard_ShortReal TimeParameter();
 
@@ -3523,7 +3523,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") DisplayFrequency;
 		Standard_ShortReal DisplayFrequency();
 
diff --git a/src/SWIG_files/wrapper/BinObjMgt.i b/src/SWIG_files/wrapper/BinObjMgt.i
index 93ef7351a..696472d95 100644
--- a/src/SWIG_files/wrapper/BinObjMgt.i
+++ b/src/SWIG_files/wrapper/BinObjMgt.i
@@ -372,13 +372,12 @@ BinObjMgt_Persistent
 
 Parameters
 ----------
-theValue: Standard_ShortReal
 
 Returns
 -------
-BinObjMgt_Persistent
+theValue: float
 ") GetShortReal;
-		const BinObjMgt_Persistent & GetShortReal(Standard_ShortReal & theValue);
+		const BinObjMgt_Persistent & GetShortReal(Standard_ShortReal &OutValue);
 
 		/****************** GetShortRealArray ******************/
 		/**** md5 signature: 241f5c28d908b020dc86c79662d7f205 ****/
@@ -725,7 +724,7 @@ BinObjMgt_Persistent
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
diff --git a/src/SWIG_files/wrapper/BinObjMgt.pyi b/src/SWIG_files/wrapper/BinObjMgt.pyi
index e5a87f63c..d23ab8764 100644
--- a/src/SWIG_files/wrapper/BinObjMgt.pyi
+++ b/src/SWIG_files/wrapper/BinObjMgt.pyi
@@ -37,7 +37,7 @@ class BinObjMgt_Persistent:
     def GetOStream(self) -> Standard_OStream: ...
     def GetReal(self) -> Tuple[BinObjMgt_Persistent, float]: ...
     def GetRealArray(self, theArray: BinObjMgt_PReal, theLength: int) -> BinObjMgt_Persistent: ...
-    def GetShortReal(self, theValue: float) -> BinObjMgt_Persistent: ...
+    def GetShortReal(self) -> Tuple[BinObjMgt_Persistent, float]: ...
     def GetShortRealArray(self, theArray: BinObjMgt_PShortReal, theLength: int) -> BinObjMgt_Persistent: ...
     def Id(self) -> int: ...
     def Init(self) -> None: ...
diff --git a/src/SWIG_files/wrapper/Graphic3d.i b/src/SWIG_files/wrapper/Graphic3d.i
index 57c04c577..a300dfbcd 100644
--- a/src/SWIG_files/wrapper/Graphic3d.i
+++ b/src/SWIG_files/wrapper/Graphic3d.i
@@ -2164,9 +2164,9 @@ int
 
 Parameters
 ----------
-theX: Standard_ShortReal
-theY: Standard_ShortReal
-theZ: Standard_ShortReal
+theX: float
+theY: float
+theZ: float
 
 Returns
 -------
@@ -2265,12 +2265,12 @@ int
 
 Parameters
 ----------
-theX: Standard_ShortReal
-theY: Standard_ShortReal
-theZ: Standard_ShortReal
-theNX: Standard_ShortReal
-theNY: Standard_ShortReal
-theNZ: Standard_ShortReal
+theX: float
+theY: float
+theZ: float
+theNX: float
+theNY: float
+theNZ: float
 
 Returns
 -------
@@ -2354,11 +2354,11 @@ int
 
 Parameters
 ----------
-theX: Standard_ShortReal
-theY: Standard_ShortReal
-theZ: Standard_ShortReal
-theTX: Standard_ShortReal
-theTY: Standard_ShortReal
+theX: float
+theY: float
+theZ: float
+theTX: float
+theTY: float
 
 Returns
 -------
@@ -2412,14 +2412,14 @@ int
 
 Parameters
 ----------
-theX: Standard_ShortReal
-theY: Standard_ShortReal
-theZ: Standard_ShortReal
-theNX: Standard_ShortReal
-theNY: Standard_ShortReal
-theNZ: Standard_ShortReal
-theTX: Standard_ShortReal
-theTY: Standard_ShortReal
+theX: float
+theY: float
+theZ: float
+theNX: float
+theNY: float
+theNZ: float
+theTX: float
+theTY: float
 
 Returns
 -------
@@ -2860,9 +2860,9 @@ None
 Parameters
 ----------
 theIndex: int
-theX: Standard_ShortReal
-theY: Standard_ShortReal
-theZ: Standard_ShortReal
+theX: float
+theY: float
+theZ: float
 
 Returns
 -------
@@ -3117,7 +3117,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") AlphaCutoff;
 		Standard_ShortReal AlphaCutoff();
 
@@ -3331,7 +3331,7 @@ Aspect_TypeOfLine
 
 Returns
 -------
-Standard_ShortReal
+float
 ") EdgeWidth;
 		Standard_ShortReal EdgeWidth();
 
@@ -3478,7 +3478,7 @@ Aspect_TypeOfLine
 
 Returns
 -------
-Standard_ShortReal
+float
 ") LineWidth;
 		Standard_ShortReal LineWidth();
 
@@ -3500,7 +3500,7 @@ opencascade::handle<Graphic3d_MarkerImage>
 
 Returns
 -------
-Standard_ShortReal
+float
 ") MarkerScale;
 		Standard_ShortReal MarkerScale();
 
@@ -3533,14 +3533,14 @@ Graphic3d_PolygonOffset
 
 Parameters
 ----------
-theFactor: Standard_ShortReal
-theUnits: Standard_ShortReal
 
 Returns
 -------
 theMode: int
+theFactor: float
+theUnits: float
 ") PolygonOffsets;
-		void PolygonOffsets(Standard_Integer &OutValue, Standard_ShortReal & theFactor, Standard_ShortReal & theUnits);
+		void PolygonOffsets(Standard_Integer &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** SetAlphaMode ******************/
 		/**** md5 signature: b84cdd4cb6d53fa03454718b7ba18032 ****/
@@ -3550,7 +3550,7 @@ theMode: int
 Parameters
 ----------
 theMode: Graphic3d_AlphaMode
-theAlphaCutoff: Standard_ShortReal,optional
+theAlphaCutoff: float,optional
 	default value is 0.5f
 
 Returns
@@ -3955,7 +3955,7 @@ None
 
 Parameters
 ----------
-theWidth: Standard_ShortReal
+theWidth: float
 
 Returns
 -------
@@ -3985,7 +3985,7 @@ None
 
 Parameters
 ----------
-theScale: Standard_ShortReal
+theScale: float
 
 Returns
 -------
@@ -4031,9 +4031,9 @@ None
 Parameters
 ----------
 theMode: int
-theFactor: Standard_ShortReal,optional
+theFactor: float,optional
 	default value is 1.0f
-theUnits: Standard_ShortReal,optional
+theUnits: float,optional
 	default value is 0.0f
 
 Returns
@@ -4109,7 +4109,7 @@ None
 
 Parameters
 ----------
-theAngle: Standard_ShortReal
+theAngle: float
 
 Returns
 -------
@@ -4299,7 +4299,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") TextAngle;
 		Standard_ShortReal TextAngle();
 
@@ -4536,8 +4536,8 @@ Parameters
 ----------
 theWeight: Graphic3d_Vec3
 theAbsorptionColor: Graphic3d_Vec3
-theAbsorptionCoeff: Standard_ShortReal
-theRefractionIndex: Standard_ShortReal
+theAbsorptionCoeff: float
+theRefractionIndex: float
 
 Returns
 -------
@@ -4554,7 +4554,7 @@ Parameters
 ----------
 theWeight: Graphic3d_Vec3
 theFresnel: Graphic3d_Fresnel
-theRoughness: Standard_ShortReal
+theRoughness: float
 
 Returns
 -------
@@ -4586,7 +4586,7 @@ Parameters
 ----------
 theWeight: Graphic3d_Vec3
 theAbsorptionColor: Graphic3d_Vec3
-theAbsorptionCoeff: Standard_ShortReal
+theAbsorptionCoeff: float
 
 Returns
 -------
@@ -4923,7 +4923,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Angle;
 		Standard_ShortReal Angle();
 
@@ -4960,7 +4960,7 @@ Quantity_Color
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Concentration;
 		Standard_ShortReal Concentration();
 
@@ -4971,7 +4971,7 @@ Standard_ShortReal
 
 Returns
 -------
-Standard_ShortReal
+float
 ") ConstAttenuation;
 		Standard_ShortReal ConstAttenuation();
 
@@ -5076,7 +5076,7 @@ bool
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Intensity;
 		Standard_ShortReal Intensity();
 
@@ -5109,7 +5109,7 @@ bool
 
 Returns
 -------
-Standard_ShortReal
+float
 ") LinearAttenuation;
 		Standard_ShortReal LinearAttenuation();
 
@@ -5202,7 +5202,7 @@ theZ: float
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Range;
 		Standard_ShortReal Range();
 
@@ -5224,7 +5224,7 @@ Standard_Size
 
 Parameters
 ----------
-theAngle: Standard_ShortReal
+theAngle: float
 
 Returns
 -------
@@ -5239,8 +5239,8 @@ None
 
 Parameters
 ----------
-theConstAttenuation: Standard_ShortReal
-theLinearAttenuation: Standard_ShortReal
+theConstAttenuation: float
+theLinearAttenuation: float
 
 Returns
 -------
@@ -5285,7 +5285,7 @@ None
 
 Parameters
 ----------
-theConcentration: Standard_ShortReal
+theConcentration: float
 
 Returns
 -------
@@ -5377,7 +5377,7 @@ None
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -5439,7 +5439,7 @@ None
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -5454,7 +5454,7 @@ None
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -5469,7 +5469,7 @@ None
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -5484,7 +5484,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Smoothness;
 		Standard_ShortReal Smoothness();
 
@@ -8849,8 +8849,8 @@ None
 
 Parameters
 ----------
-theRefractionIndex: Standard_ShortReal
-theAbsorptionIndex: Standard_ShortReal
+theRefractionIndex: float
+theAbsorptionIndex: float
 
 Returns
 -------
@@ -8881,7 +8881,7 @@ Graphic3d_Fresnel
 
 Parameters
 ----------
-theReflection: Standard_ShortReal
+theReflection: float
 
 Returns
 -------
@@ -8896,7 +8896,7 @@ Graphic3d_Fresnel
 
 Parameters
 ----------
-theRefractionIndex: Standard_ShortReal
+theRefractionIndex: float
 
 Returns
 -------
@@ -8997,7 +8997,7 @@ theValuesStyle: Font_FontAspect,optional
 	default value is Font_FA_Regular
 theValuesSize: int,optional
 	default value is 12
-theArrowsLength: Standard_ShortReal,optional
+theArrowsLength: float,optional
 	default value is 30.0f
 theGridColor: Quantity_Color,optional
 	default value is Quantity_NOC_WHITE
@@ -9019,7 +9019,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") ArrowsLength;
 		Standard_ShortReal ArrowsLength();
 
@@ -9152,7 +9152,7 @@ int
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -9439,7 +9439,7 @@ opencascade::handle<Graphic3d_CView>
 
 Returns
 -------
-Standard_ShortReal
+float
 ") DefaultTextHeight;
 		virtual Standard_ShortReal DefaultTextHeight();
 
@@ -9697,16 +9697,15 @@ Parameters
 ----------
 theView: Graphic3d_CView
 theText: str
-theHeight: Standard_ShortReal
-theWidth: Standard_ShortReal
-theAscent: Standard_ShortReal
-theDescent: Standard_ShortReal
+theHeight: float
 
 Returns
 -------
-None
+theWidth: float
+theAscent: float
+theDescent: float
 ") TextSize;
-		virtual void TextSize(const opencascade::handle<Graphic3d_CView> & theView, Standard_CString theText, const Standard_ShortReal theHeight, Standard_ShortReal & theWidth, Standard_ShortReal & theAscent, Standard_ShortReal & theDescent);
+		virtual void TextSize(const opencascade::handle<Graphic3d_CView> & theView, Standard_CString theText, const Standard_ShortReal theHeight, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** ViewExists ******************/
 		/**** md5 signature: af8cd22ce3ec7eb123e125bb1c41a940 ****/
@@ -11162,7 +11161,7 @@ bool
 Parameters
 ----------
 theMarkerType: Aspect_TypeOfMarker
-theScale: Standard_ShortReal
+theScale: float
 theColor: Graphic3d_Vec4
 
 Returns
@@ -11220,7 +11219,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Alpha;
 		Standard_ShortReal Alpha();
 
@@ -11294,7 +11293,7 @@ Quantity_Color
 
 Parameters
 ----------
-theDelta: Standard_ShortReal
+theDelta: float
 
 Returns
 -------
@@ -11484,7 +11483,7 @@ bool
 
 Returns
 -------
-Standard_ShortReal
+float
 ") RefractionIndex;
 		Standard_ShortReal RefractionIndex();
 
@@ -11517,7 +11516,7 @@ None
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -11667,7 +11666,7 @@ None
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -11682,7 +11681,7 @@ None
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -11712,7 +11711,7 @@ None
 
 Parameters
 ----------
-theValue: Standard_ShortReal
+theValue: float
 
 Returns
 -------
@@ -11727,7 +11726,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Shininess;
 		Standard_ShortReal Shininess();
 
@@ -11760,7 +11759,7 @@ TCollection_AsciiString
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Transparency;
 		Standard_ShortReal Transparency();
 
@@ -11839,7 +11838,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Alpha;
 		Standard_ShortReal Alpha();
 
@@ -11897,7 +11896,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") IOR;
 		Standard_ShortReal IOR();
 
@@ -11908,7 +11907,7 @@ Standard_ShortReal
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Metallic;
 		Standard_ShortReal Metallic();
 
@@ -11923,7 +11922,7 @@ theSpecular: Quantity_Color
 
 Returns
 -------
-Standard_ShortReal
+float
 ") MetallicFromSpecular;
 		static Standard_ShortReal MetallicFromSpecular(const Quantity_Color & theSpecular);
 
@@ -11934,7 +11933,7 @@ Standard_ShortReal
 
 Returns
 -------
-Standard_ShortReal
+float
 ") MinRoughness;
 		static Standard_ShortReal MinRoughness();
 
@@ -11945,7 +11944,7 @@ Standard_ShortReal
 
 Returns
 -------
-Standard_ShortReal
+float
 ") NormalizedRoughness;
 		Standard_ShortReal NormalizedRoughness();
 
@@ -11956,11 +11955,11 @@ Standard_ShortReal
 
 Parameters
 ----------
-theNormalizedRoughness: Standard_ShortReal
+theNormalizedRoughness: float
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Roughness;
 		static Standard_ShortReal Roughness(Standard_ShortReal theNormalizedRoughness);
 
@@ -11971,7 +11970,7 @@ Standard_ShortReal
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Roughness;
 		Standard_ShortReal Roughness();
 
@@ -11987,7 +11986,7 @@ theShiness: float
 
 Returns
 -------
-Standard_ShortReal
+float
 ") RoughnessFromSpecular;
 		static Standard_ShortReal RoughnessFromSpecular(const Quantity_Color & theSpecular, const Standard_Real theShiness);
 
@@ -11998,7 +11997,7 @@ Standard_ShortReal
 
 Parameters
 ----------
-theAlpha: Standard_ShortReal
+theAlpha: float
 
 Returns
 -------
@@ -12073,7 +12072,7 @@ None
 
 Parameters
 ----------
-theIOR: Standard_ShortReal
+theIOR: float
 
 Returns
 -------
@@ -12088,7 +12087,7 @@ None
 
 Parameters
 ----------
-theMetallic: Standard_ShortReal
+theMetallic: float
 
 Returns
 -------
@@ -12103,7 +12102,7 @@ None
 
 Parameters
 ----------
-theRoughness: Standard_ShortReal
+theRoughness: float
 
 Returns
 -------
@@ -12118,12 +12117,12 @@ None
 
 Parameters
 ----------
-theProbability: Standard_ShortReal
-theRoughness: Standard_ShortReal
+theProbability: float
+theRoughness: float
 
 Returns
 -------
-Standard_ShortReal
+float
 ") SpecIBLMapSamplesFactor;
 		static Standard_ShortReal SpecIBLMapSamplesFactor(Standard_ShortReal theProbability, Standard_ShortReal theRoughness);
 
@@ -12156,8 +12155,8 @@ Standard_ShortReal
 class Graphic3d_PolygonOffset {
 	public:
 		Aspect_PolygonOffsetMode Mode;
-		Standard_ShortReal Factor;
-		Standard_ShortReal Units;
+		float Factor;
+		float Units;
 		/****************** Graphic3d_PolygonOffset ******************/
 		/**** md5 signature: d32d266ad893dbdf6f93b0afae8a9bb9 ****/
 		%feature("compactdefaultargs") Graphic3d_PolygonOffset;
@@ -12346,7 +12345,7 @@ None
 
 Parameters
 ----------
-theTranspCoef: Standard_ShortReal
+theTranspCoef: float
 
 Returns
 -------
@@ -12376,7 +12375,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Transparency;
 		Standard_ShortReal Transparency();
 
@@ -12513,18 +12512,18 @@ FrustumCulling_NoUpdate = FrustumCulling.FrustumCulling_NoUpdate
 		Graphic3d_RenderTransparentMethod TransparencyMethod;
 		unsigned int Resolution;
 		Font_Hinting FontHinting;
-		Standard_ShortReal LineFeather;
+		float LineFeather;
 		int PbrEnvPow2Size;
 		int PbrEnvSpecMapNbLevels;
 		int PbrEnvBakingDiffNbSamples;
 		int PbrEnvBakingSpecNbSamples;
-		Standard_ShortReal PbrEnvBakingProbability;
-		Standard_ShortReal OitDepthFactor;
+		float PbrEnvBakingProbability;
+		float OitDepthFactor;
 		int NbOitDepthPeelingLayers;
 		int NbMsaaSamples;
-		Standard_ShortReal RenderResolutionScale;
+		float RenderResolutionScale;
 		int ShadowMapResolution;
-		Standard_ShortReal ShadowMapBias;
+		float ShadowMapBias;
 		bool ToEnableDepthPrepass;
 		bool ToEnableAlphaToCoverage;
 		bool IsGlobalIlluminationEnabled;
@@ -12541,18 +12540,18 @@ FrustumCulling_NoUpdate = FrustumCulling.FrustumCulling_NoUpdate
 		bool AdaptiveScreenSamplingAtomic;
 		bool ShowSamplingTiles;
 		bool TwoSidedBsdfModels;
-		Standard_ShortReal RadianceClampingValue;
+		float RadianceClampingValue;
 		bool RebuildRayTracingShaders;
 		int RayTracingTileSize;
 		int NbRayTracingTiles;
-		Standard_ShortReal CameraApertureRadius;
-		Standard_ShortReal CameraFocalPlaneDist;
+		float CameraApertureRadius;
+		float CameraFocalPlaneDist;
 		FrustumCulling FrustumCullingState;
 		Graphic3d_ToneMappingMethod ToneMappingMethod;
-		Standard_ShortReal Exposure;
-		Standard_ShortReal WhitePoint;
+		float Exposure;
+		float WhitePoint;
 		Graphic3d_StereoMode StereoMode;
-		Standard_ShortReal HmdFov2d;
+		float HmdFov2d;
 		Anaglyph AnaglyphFilter;
 		Graphic3d_Mat4 AnaglyphLeft;
 		Graphic3d_Mat4 AnaglyphRight;
@@ -12563,10 +12562,10 @@ FrustumCulling_NoUpdate = FrustumCulling.FrustumCulling_NoUpdate
 		opencascade::handle<Graphic3d_TransformPers > ChartPosition;
 		Graphic3d_Vec2i ChartSize;
 		opencascade::handle<Graphic3d_AspectText3d > StatsTextAspect;
-		Standard_ShortReal StatsUpdateInterval;
+		float StatsUpdateInterval;
 		int StatsTextHeight;
 		int StatsNbFrames;
-		Standard_ShortReal StatsMaxChartTime;
+		float StatsMaxChartTime;
 		PerfCounters CollectedStats;
 		bool ToShowStats;
 		/****************** Graphic3d_RenderingParams ******************/
@@ -12595,7 +12594,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") ResolutionRatio;
 		Standard_ShortReal ResolutionRatio();
 
@@ -15205,7 +15204,7 @@ class Graphic3d_Text : public Standard_Transient {
 
 Parameters
 ----------
-theHeight: Standard_ShortReal
+theHeight: float
 
 Returns
 -------
@@ -15242,7 +15241,7 @@ bool
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Height;
 		Standard_ShortReal Height();
 
@@ -15297,7 +15296,7 @@ None
 
 Parameters
 ----------
-theHeight: Standard_ShortReal
+theHeight: float
 
 Returns
 -------
@@ -15606,7 +15605,7 @@ int
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Rotation;
 		Standard_ShortReal Rotation();
 
@@ -15733,7 +15732,7 @@ None
 
 Parameters
 ----------
-theAngleDegrees: Standard_ShortReal
+theAngleDegrees: float
 
 Returns
 -------
@@ -16495,9 +16494,9 @@ None
 
 Parameters
 ----------
-theX: Standard_ShortReal
-theY: Standard_ShortReal
-theZ: Standard_ShortReal
+theX: float
+theY: float
+theZ: float
 
 Returns
 -------
@@ -16529,15 +16528,14 @@ None
 
 Parameters
 ----------
-theX: Standard_ShortReal
-theY: Standard_ShortReal
-theZ: Standard_ShortReal
 
 Returns
 -------
-None
+theX: float
+theY: float
+theZ: float
 ") Coord;
-		void Coord(Standard_ShortReal & theX, Standard_ShortReal & theY, Standard_ShortReal & theZ);
+		void Coord(Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** Coord ******************/
 		/**** md5 signature: 5ef85c73f9c80cea4d8dc9bec59c3e4d ****/
@@ -16566,7 +16564,7 @@ theOther: Graphic3d_Vertex
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Distance;
 		Standard_ShortReal Distance(const Graphic3d_Vertex & theOther);
 
@@ -16585,9 +16583,9 @@ Standard_ShortReal
 
 Parameters
 ----------
-theX: Standard_ShortReal
-theY: Standard_ShortReal
-theZ: Standard_ShortReal
+theX: float
+theY: float
+theZ: float
 
 Returns
 -------
@@ -16619,7 +16617,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") X;
 		Standard_ShortReal X();
 
@@ -16630,7 +16628,7 @@ Standard_ShortReal
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Y;
 		Standard_ShortReal Y();
 
@@ -16641,7 +16639,7 @@ Standard_ShortReal
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Z;
 		Standard_ShortReal Z();
 
@@ -18028,7 +18026,7 @@ None
 
 Parameters
 ----------
-theWidth: Standard_ShortReal
+theWidth: float
 
 Returns
 -------
@@ -18054,7 +18052,7 @@ Aspect_TypeOfLine
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Width;
 		Standard_ShortReal Width();
 
@@ -18168,7 +18166,7 @@ theHeight: int
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Scale;
 		Standard_ShortReal Scale();
 
@@ -18196,7 +18194,7 @@ None
 
 Parameters
 ----------
-theScale: Standard_ShortReal
+theScale: float
 
 Returns
 -------
@@ -18353,7 +18351,7 @@ TCollection_AsciiString
 
 Returns
 -------
-Standard_ShortReal
+float
 ") GetTextAngle;
 		Standard_ShortReal GetTextAngle();
 
@@ -21743,18 +21741,17 @@ None
 
 Parameters
 ----------
-theX1: Standard_ShortReal
-theY1: Standard_ShortReal
-theZ1: Standard_ShortReal
-theX2: Standard_ShortReal
-theY2: Standard_ShortReal
-theZ2: Standard_ShortReal
 
 Returns
 -------
-None
+theX1: float
+theY1: float
+theZ1: float
+theX2: float
+theY2: float
+theZ2: float
 ") Segment;
-		void Segment(Standard_ShortReal & theX1, Standard_ShortReal & theY1, Standard_ShortReal & theZ1, Standard_ShortReal & theX2, Standard_ShortReal & theY2, Standard_ShortReal & theZ2);
+		void Segment(Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** SetSegment ******************/
 		/**** md5 signature: 9bdaf54faa2c28520a6560abbbfcb0b5 ****/
@@ -21763,12 +21760,12 @@ None
 
 Parameters
 ----------
-theX1: Standard_ShortReal
-theY1: Standard_ShortReal
-theZ1: Standard_ShortReal
-theX2: Standard_ShortReal
-theY2: Standard_ShortReal
-theZ2: Standard_ShortReal
+theX1: float
+theY1: float
+theZ1: float
+theX2: float
+theY2: float
+theZ2: float
 
 Returns
 -------
@@ -21855,16 +21852,15 @@ Graphic3d_NameOfTexturePlane
 
 Parameters
 ----------
-A: Standard_ShortReal
-B: Standard_ShortReal
-C: Standard_ShortReal
-D: Standard_ShortReal
 
 Returns
 -------
-None
+A: float
+B: float
+C: float
+D: float
 ") PlaneS;
-		void PlaneS(Standard_ShortReal & A, Standard_ShortReal & B, Standard_ShortReal & C, Standard_ShortReal & D);
+		void PlaneS(Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** PlaneT ******************/
 		/**** md5 signature: 0f64deb688509a59d7d495773093d9b1 ****/
@@ -21873,16 +21869,15 @@ None
 
 Parameters
 ----------
-A: Standard_ShortReal
-B: Standard_ShortReal
-C: Standard_ShortReal
-D: Standard_ShortReal
 
 Returns
 -------
-None
+A: float
+B: float
+C: float
+D: float
 ") PlaneT;
-		void PlaneT(Standard_ShortReal & A, Standard_ShortReal & B, Standard_ShortReal & C, Standard_ShortReal & D);
+		void PlaneT(Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** Rotation ******************/
 		/**** md5 signature: 340e4ac958aa75f22cf9693956702cf3 ****/
@@ -21891,13 +21886,12 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
 
 Returns
 -------
-None
+theVal: float
 ") Rotation;
-		void Rotation(Standard_ShortReal & theVal);
+		void Rotation(Standard_ShortReal &OutValue);
 
 		/****************** ScaleS ******************/
 		/**** md5 signature: e3176db3295b91f7337ec77e06b297fe ****/
@@ -21906,13 +21900,12 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
 
 Returns
 -------
-None
+theVal: float
 ") ScaleS;
-		void ScaleS(Standard_ShortReal & theVal);
+		void ScaleS(Standard_ShortReal &OutValue);
 
 		/****************** ScaleT ******************/
 		/**** md5 signature: 2181a84eae66e0185f0f40f06a9e33aa ****/
@@ -21921,13 +21914,12 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
 
 Returns
 -------
-None
+theVal: float
 ") ScaleT;
-		void ScaleT(Standard_ShortReal & theVal);
+		void ScaleT(Standard_ShortReal &OutValue);
 
 		/****************** SetPlane ******************/
 		/**** md5 signature: 5813f7058833e3ba0aacb0bc8ba39472 ****/
@@ -21951,10 +21943,10 @@ None
 
 Parameters
 ----------
-A: Standard_ShortReal
-B: Standard_ShortReal
-C: Standard_ShortReal
-D: Standard_ShortReal
+A: float
+B: float
+C: float
+D: float
 
 Returns
 -------
@@ -21969,10 +21961,10 @@ None
 
 Parameters
 ----------
-A: Standard_ShortReal
-B: Standard_ShortReal
-C: Standard_ShortReal
-D: Standard_ShortReal
+A: float
+B: float
+C: float
+D: float
 
 Returns
 -------
@@ -21987,7 +21979,7 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
+theVal: float
 
 Returns
 -------
@@ -22002,7 +21994,7 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
+theVal: float
 
 Returns
 -------
@@ -22017,7 +22009,7 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
+theVal: float
 
 Returns
 -------
@@ -22032,7 +22024,7 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
+theVal: float
 
 Returns
 -------
@@ -22047,7 +22039,7 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
+theVal: float
 
 Returns
 -------
@@ -22062,13 +22054,12 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
 
 Returns
 -------
-None
+theVal: float
 ") TranslateS;
-		void TranslateS(Standard_ShortReal & theVal);
+		void TranslateS(Standard_ShortReal &OutValue);
 
 		/****************** TranslateT ******************/
 		/**** md5 signature: 9fc4f8423a49d11a60255baa317fbaf1 ****/
@@ -22077,13 +22068,12 @@ None
 
 Parameters
 ----------
-theVal: Standard_ShortReal
 
 Returns
 -------
-None
+theVal: float
 ") TranslateT;
-		void TranslateT(Standard_ShortReal & theVal);
+		void TranslateT(Standard_ShortReal &OutValue);
 
 };
 
diff --git a/src/SWIG_files/wrapper/Graphic3d.pyi b/src/SWIG_files/wrapper/Graphic3d.pyi
index 2c58e2b36..a43b8814a 100644
--- a/src/SWIG_files/wrapper/Graphic3d.pyi
+++ b/src/SWIG_files/wrapper/Graphic3d.pyi
@@ -1337,7 +1337,7 @@ class Graphic3d_Aspects(Standard_Transient):
     def MarkerScale(self) -> float: ...
     def MarkerType(self) -> Aspect_TypeOfMarker: ...
     def PolygonOffset(self) -> Graphic3d_PolygonOffset: ...
-    def PolygonOffsets(self, theFactor: float, theUnits: float) -> int: ...
+    def PolygonOffsets(self) -> Tuple[int, float, float]: ...
     def SetAlphaMode(self, theMode: Graphic3d_AlphaMode, theAlphaCutoff: Optional[float] = 0.5) -> None: ...
     @overload
     def SetBackInteriorColor(self, theColor: Quantity_Color) -> None: ...
@@ -1833,7 +1833,7 @@ class Graphic3d_GraphicDriver(Standard_Transient):
     def RemoveZLayer(self, theLayerId: int) -> None: ...
     def SetVerticalSync(self, theToEnable: bool) -> None: ...
     def SetZLayerSettings(self, theLayerId: int, theSettings: Graphic3d_ZLayerSettings) -> None: ...
-    def TextSize(self, theView: Graphic3d_CView, theText: str, theHeight: float, theWidth: float, theAscent: float, theDescent: float) -> None: ...
+    def TextSize(self, theView: Graphic3d_CView, theText: str, theHeight: float) -> Tuple[float, float, float]: ...
     def ViewExists(self, theWindow: Aspect_Window, theView: Graphic3d_CView) -> bool: ...
     def ZLayerSettings(self, theLayerId: int) -> Graphic3d_ZLayerSettings: ...
     def ZLayers(self, theLayerSeq: TColStd_SequenceOfInteger) -> None: ...
@@ -2431,7 +2431,7 @@ class Graphic3d_Vertex:
     @overload
     def __init__(self, theX: float, theY: float, theZ: float) -> None: ...
     @overload
-    def Coord(self, theX: float, theY: float, theZ: float) -> None: ...
+    def Coord(self) -> Tuple[float, float, float]: ...
     @overload
     def Coord(self) -> Tuple[float, float, float]: ...
     def Distance(self, theOther: Graphic3d_Vertex) -> float: ...
@@ -2911,7 +2911,7 @@ class Graphic3d_Texture1Dsegment(Graphic3d_Texture1D):
     def __init__(self, theNOT: Graphic3d_NameOfTexture1D) -> None: ...
     @overload
     def __init__(self, thePixMap: Image_PixMap) -> None: ...
-    def Segment(self, theX1: float, theY1: float, theZ1: float, theX2: float, theY2: float, theZ2: float) -> None: ...
+    def Segment(self) -> Tuple[float, float, float, float, float, float]: ...
     def SetSegment(self, theX1: float, theY1: float, theZ1: float, theX2: float, theY2: float, theZ2: float) -> None: ...
 
 class Graphic3d_Texture2Dplane(Graphic3d_Texture2D):
@@ -2922,11 +2922,11 @@ class Graphic3d_Texture2Dplane(Graphic3d_Texture2D):
     @overload
     def __init__(self, thePixMap: Image_PixMap) -> None: ...
     def Plane(self) -> Graphic3d_NameOfTexturePlane: ...
-    def PlaneS(self, A: float, B: float, C: float, D: float) -> None: ...
-    def PlaneT(self, A: float, B: float, C: float, D: float) -> None: ...
-    def Rotation(self, theVal: float) -> None: ...
-    def ScaleS(self, theVal: float) -> None: ...
-    def ScaleT(self, theVal: float) -> None: ...
+    def PlaneS(self) -> Tuple[float, float, float, float]: ...
+    def PlaneT(self) -> Tuple[float, float, float, float]: ...
+    def Rotation(self) -> float: ...
+    def ScaleS(self) -> float: ...
+    def ScaleT(self) -> float: ...
     def SetPlane(self, thePlane: Graphic3d_NameOfTexturePlane) -> None: ...
     def SetPlaneS(self, A: float, B: float, C: float, D: float) -> None: ...
     def SetPlaneT(self, A: float, B: float, C: float, D: float) -> None: ...
@@ -2935,8 +2935,8 @@ class Graphic3d_Texture2Dplane(Graphic3d_Texture2D):
     def SetScaleT(self, theVal: float) -> None: ...
     def SetTranslateS(self, theVal: float) -> None: ...
     def SetTranslateT(self, theVal: float) -> None: ...
-    def TranslateS(self, theVal: float) -> None: ...
-    def TranslateT(self, theVal: float) -> None: ...
+    def TranslateS(self) -> float: ...
+    def TranslateT(self) -> float: ...
 
 #classnotwrapped
 class Graphic3d_UniformValue: ...
diff --git a/src/SWIG_files/wrapper/HLRAlgo.i b/src/SWIG_files/wrapper/HLRAlgo.i
index 00269add6..5e7f66507 100644
--- a/src/SWIG_files/wrapper/HLRAlgo.i
+++ b/src/SWIG_files/wrapper/HLRAlgo.i
@@ -888,15 +888,15 @@ None
 
 Parameters
 ----------
-TolStart: Standard_ShortReal
-TolEnd: Standard_ShortReal
 
 Returns
 -------
 Start: float
+TolStart: float
 End: float
+TolEnd: float
 ") Hidden;
-		void Hidden(Standard_Real &OutValue, Standard_ShortReal & TolStart, Standard_Real &OutValue, Standard_ShortReal & TolEnd);
+		void Hidden(Standard_Real &OutValue, Standard_ShortReal &OutValue, Standard_Real &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** InitHidden ******************/
 		/**** md5 signature: 94f1415b23db23cda63dd5f0d3b0a1c8 ****/
@@ -979,15 +979,15 @@ None
 
 Parameters
 ----------
-TolStart: Standard_ShortReal
-TolEnd: Standard_ShortReal
 
 Returns
 -------
 Start: float
+TolStart: float
 End: float
+TolEnd: float
 ") Visible;
-		void Visible(Standard_Real &OutValue, Standard_ShortReal & TolStart, Standard_Real &OutValue, Standard_ShortReal & TolEnd);
+		void Visible(Standard_Real &OutValue, Standard_ShortReal &OutValue, Standard_Real &OutValue, Standard_ShortReal &OutValue);
 
 };
 
@@ -1022,9 +1022,9 @@ None
 Parameters
 ----------
 Start: float
-TolStart: Standard_ShortReal
+TolStart: float
 End: float
-TolEnd: Standard_ShortReal
+TolEnd: float
 
 Returns
 -------
@@ -1091,15 +1091,15 @@ None
 
 Parameters
 ----------
-theTolStart: Standard_ShortReal
-theTolEnd: Standard_ShortReal
 
 Returns
 -------
 theStart: float
+theTolStart: float
 theEnd: float
+theTolEnd: float
 ") Bounds;
-		void Bounds(Standard_Real &OutValue, Standard_ShortReal & theTolStart, Standard_Real &OutValue, Standard_ShortReal & theTolEnd);
+		void Bounds(Standard_Real &OutValue, Standard_ShortReal &OutValue, Standard_Real &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** Hide ******************/
 		/**** md5 signature: ce985d27b09ccae676c4faed96ec3d3d ****/
@@ -1109,9 +1109,9 @@ theEnd: float
 Parameters
 ----------
 Start: float
-TolStart: Standard_ShortReal
+TolStart: float
 End: float
-TolEnd: Standard_ShortReal
+TolEnd: float
 OnFace: bool
 OnBoundary: bool
 
@@ -1140,9 +1140,9 @@ None
 Parameters
 ----------
 Start: float
-TolStart: Standard_ShortReal
+TolStart: float
 End: float
-TolEnd: Standard_ShortReal
+TolEnd: float
 
 Returns
 -------
@@ -1180,15 +1180,15 @@ None
 Parameters
 ----------
 Index: int
-TolStart: Standard_ShortReal
-TolEnd: Standard_ShortReal
 
 Returns
 -------
 Start: float
+TolStart: float
 End: float
+TolEnd: float
 ") VisiblePart;
-		void VisiblePart(const Standard_Integer Index, Standard_Real &OutValue, Standard_ShortReal & TolStart, Standard_Real &OutValue, Standard_ShortReal & TolEnd);
+		void VisiblePart(const Standard_Integer Index, Standard_Real &OutValue, Standard_ShortReal &OutValue, Standard_Real &OutValue, Standard_ShortReal &OutValue);
 
 };
 
@@ -1667,7 +1667,7 @@ Lev: int
 SegInd: int
 Ind: int
 P: float
-Tol: Standard_ShortReal
+Tol: float
 S: TopAbs_State
 
 Returns
@@ -1839,7 +1839,7 @@ TopAbs_State
 
 Parameters
 ----------
-T: Standard_ShortReal
+T: float
 
 Returns
 -------
@@ -1854,7 +1854,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Tolerance;
 		Standard_ShortReal Tolerance();
 
diff --git a/src/SWIG_files/wrapper/HLRAlgo.pyi b/src/SWIG_files/wrapper/HLRAlgo.pyi
index 0ec9bda12..515aa67b4 100644
--- a/src/SWIG_files/wrapper/HLRAlgo.pyi
+++ b/src/SWIG_files/wrapper/HLRAlgo.pyi
@@ -190,14 +190,14 @@ class HLRAlgo_Coincidence:
 
 class HLRAlgo_EdgeIterator:
     def __init__(self) -> None: ...
-    def Hidden(self, TolStart: float, TolEnd: float) -> Tuple[float, float]: ...
+    def Hidden(self) -> Tuple[float, float, float, float]: ...
     def InitHidden(self, status: HLRAlgo_EdgeStatus) -> None: ...
     def InitVisible(self, status: HLRAlgo_EdgeStatus) -> None: ...
     def MoreHidden(self) -> bool: ...
     def MoreVisible(self) -> bool: ...
     def NextHidden(self) -> None: ...
     def NextVisible(self) -> None: ...
-    def Visible(self, TolStart: float, TolEnd: float) -> Tuple[float, float]: ...
+    def Visible(self) -> Tuple[float, float, float, float]: ...
 
 class HLRAlgo_EdgeStatus:
     @overload
@@ -212,13 +212,13 @@ class HLRAlgo_EdgeStatus:
     def AllVisible(self) -> bool: ...
     @overload
     def AllVisible(self, B: bool) -> None: ...
-    def Bounds(self, theTolStart: float, theTolEnd: float) -> Tuple[float, float]: ...
+    def Bounds(self) -> Tuple[float, float, float, float]: ...
     def Hide(self, Start: float, TolStart: float, End: float, TolEnd: float, OnFace: bool, OnBoundary: bool) -> None: ...
     def HideAll(self) -> None: ...
     def Initialize(self, Start: float, TolStart: float, End: float, TolEnd: float) -> None: ...
     def NbVisiblePart(self) -> int: ...
     def ShowAll(self) -> None: ...
-    def VisiblePart(self, Index: int, TolStart: float, TolEnd: float) -> Tuple[float, float]: ...
+    def VisiblePart(self, Index: int) -> Tuple[float, float, float, float]: ...
 
 class HLRAlgo_EdgesBlock(Standard_Transient):
     def __init__(self, NbEdges: int) -> None: ...
diff --git a/src/SWIG_files/wrapper/HLRBRep.i b/src/SWIG_files/wrapper/HLRBRep.i
index f16299ba7..e53119a92 100644
--- a/src/SWIG_files/wrapper/HLRBRep.i
+++ b/src/SWIG_files/wrapper/HLRBRep.i
@@ -3645,7 +3645,7 @@ bool
 
 Parameters
 ----------
-tol: Standard_ShortReal
+tol: float
 
 Returns
 -------
@@ -3660,7 +3660,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Tolerance;
 		Standard_ShortReal Tolerance();
 
@@ -4250,9 +4250,9 @@ Out2: bool
 Cut1: bool
 Cut2: bool
 Start: float
-TolStart: Standard_ShortReal
+TolStart: float
 End: float
-TolEnd: Standard_ShortReal
+TolEnd: float
 
 Returns
 -------
@@ -4304,7 +4304,7 @@ HLRAlgo_EdgeStatus
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Tolerance;
 		Standard_ShortReal Tolerance();
 
@@ -5317,7 +5317,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Tolerance;
 		Standard_ShortReal Tolerance();
 
diff --git a/src/SWIG_files/wrapper/Intrv.i b/src/SWIG_files/wrapper/Intrv.i
index 59b519d73..136cbec27 100644
--- a/src/SWIG_files/wrapper/Intrv.i
+++ b/src/SWIG_files/wrapper/Intrv.i
@@ -165,9 +165,9 @@ None
 Parameters
 ----------
 Start: float
-TolStart: Standard_ShortReal
+TolStart: float
 End: float
-TolEnd: Standard_ShortReal
+TolEnd: float
 
 Returns
 -------
@@ -182,15 +182,15 @@ None
 
 Parameters
 ----------
-TolStart: Standard_ShortReal
-TolEnd: Standard_ShortReal
 
 Returns
 -------
 Start: float
+TolStart: float
 End: float
+TolEnd: float
 ") Bounds;
-		void Bounds(Standard_Real &OutValue, Standard_ShortReal & TolStart, Standard_Real &OutValue, Standard_ShortReal & TolEnd);
+		void Bounds(Standard_Real &OutValue, Standard_ShortReal &OutValue, Standard_Real &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** CutAtEnd ******************/
 		/**** md5 signature: 016f363129bd1797c683a8d0f6c91793 ****/
@@ -200,7 +200,7 @@ End: float
 Parameters
 ----------
 End: float
-TolEnd: Standard_ShortReal
+TolEnd: float
 
 Returns
 -------
@@ -216,7 +216,7 @@ None
 Parameters
 ----------
 Start: float
-TolStart: Standard_ShortReal
+TolStart: float
 
 Returns
 -------
@@ -243,7 +243,7 @@ float
 Parameters
 ----------
 End: float
-TolEnd: Standard_ShortReal
+TolEnd: float
 
 Returns
 -------
@@ -259,7 +259,7 @@ None
 Parameters
 ----------
 Start: float
-TolStart: Standard_ShortReal
+TolStart: float
 
 Returns
 -------
@@ -496,7 +496,7 @@ Intrv_Position
 Parameters
 ----------
 End: float
-TolEnd: Standard_ShortReal
+TolEnd: float
 
 Returns
 -------
@@ -512,7 +512,7 @@ None
 Parameters
 ----------
 Start: float
-TolStart: Standard_ShortReal
+TolStart: float
 
 Returns
 -------
@@ -538,7 +538,7 @@ float
 
 Returns
 -------
-Standard_ShortReal
+float
 ") TolEnd;
 		Standard_ShortReal TolEnd();
 
@@ -549,7 +549,7 @@ Standard_ShortReal
 
 Returns
 -------
-Standard_ShortReal
+float
 ") TolStart;
 		Standard_ShortReal TolStart();
 
diff --git a/src/SWIG_files/wrapper/Intrv.pyi b/src/SWIG_files/wrapper/Intrv.pyi
index a82e3ad23..4b6e657b3 100644
--- a/src/SWIG_files/wrapper/Intrv.pyi
+++ b/src/SWIG_files/wrapper/Intrv.pyi
@@ -56,7 +56,7 @@ class Intrv_Interval:
     def __init__(self, Start: float, End: float) -> None: ...
     @overload
     def __init__(self, Start: float, TolStart: float, End: float, TolEnd: float) -> None: ...
-    def Bounds(self, TolStart: float, TolEnd: float) -> Tuple[float, float]: ...
+    def Bounds(self) -> Tuple[float, float, float, float]: ...
     def CutAtEnd(self, End: float, TolEnd: float) -> None: ...
     def CutAtStart(self, Start: float, TolStart: float) -> None: ...
     def End(self) -> float: ...
diff --git a/src/SWIG_files/wrapper/PrsMgr.i b/src/SWIG_files/wrapper/PrsMgr.i
index d16f59a59..0571c7737 100644
--- a/src/SWIG_files/wrapper/PrsMgr.i
+++ b/src/SWIG_files/wrapper/PrsMgr.i
@@ -595,14 +595,14 @@ PrsMgr_PresentableObject *
 
 Parameters
 ----------
-aFactor: Standard_ShortReal
-aUnits: Standard_ShortReal
 
 Returns
 -------
 aMode: int
+aFactor: float
+aUnits: float
 ") PolygonOffsets;
-		virtual void PolygonOffsets(Standard_Integer &OutValue, Standard_ShortReal & aFactor, Standard_ShortReal & aUnits);
+		virtual void PolygonOffsets(Standard_Integer &OutValue, Standard_ShortReal &OutValue, Standard_ShortReal &OutValue);
 
 		/****************** Presentations ******************/
 		/**** md5 signature: 20fe67fbbae7e29f768f3449d76ed496 ****/
@@ -891,9 +891,9 @@ None
 Parameters
 ----------
 aMode: int
-aFactor: Standard_ShortReal,optional
+aFactor: float,optional
 	default value is 1.0
-aUnits: Standard_ShortReal,optional
+aUnits: float,optional
 	default value is 0.0
 
 Returns
diff --git a/src/SWIG_files/wrapper/PrsMgr.pyi b/src/SWIG_files/wrapper/PrsMgr.pyi
index 8cdd1e7b4..d74ce2410 100644
--- a/src/SWIG_files/wrapper/PrsMgr.pyi
+++ b/src/SWIG_files/wrapper/PrsMgr.pyi
@@ -118,7 +118,7 @@ class PrsMgr_PresentableObject(Standard_Transient):
     def LocalTransformationGeom(self) -> TopLoc_Datum3D: ...
     def Material(self) -> Graphic3d_NameOfMaterial: ...
     def Parent(self) -> PrsMgr_PresentableObject: ...
-    def PolygonOffsets(self, aFactor: float, aUnits: float) -> int: ...
+    def PolygonOffsets(self) -> Tuple[int, float, float]: ...
     def Presentations(self) -> PrsMgr_Presentations: ...
     def RemoveChild(self, theObject: PrsMgr_PresentableObject) -> None: ...
     def RemoveChildWithRestoreTransformation(self, theObject: PrsMgr_PresentableObject) -> None: ...
diff --git a/src/SWIG_files/wrapper/Quantity.i b/src/SWIG_files/wrapper/Quantity.i
index 04776eb22..d5d841d89 100644
--- a/src/SWIG_files/wrapper/Quantity.i
+++ b/src/SWIG_files/wrapper/Quantity.i
@@ -2646,7 +2646,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") Alpha;
 		Standard_ShortReal Alpha();
 
@@ -2813,7 +2813,7 @@ bool
 
 Parameters
 ----------
-theAlpha: Standard_ShortReal
+theAlpha: float
 
 Returns
 -------
diff --git a/src/SWIG_files/wrapper/RWGltf.i b/src/SWIG_files/wrapper/RWGltf.i
index c3042b837..4884f95c7 100644
--- a/src/SWIG_files/wrapper/RWGltf.i
+++ b/src/SWIG_files/wrapper/RWGltf.i
@@ -1776,8 +1776,8 @@ class RWGltf_MaterialCommon : public Standard_Transient {
 		Quantity_Color DiffuseColor;
 		Quantity_Color SpecularColor;
 		Quantity_Color EmissiveColor;
-		Standard_ShortReal Shininess;
-		Standard_ShortReal Transparency;
+		float Shininess;
+		float Transparency;
 		/****************** RWGltf_MaterialCommon ******************/
 		/**** md5 signature: 5f7db091e0ba1d4aaa046ad813cbb86f ****/
 		%feature("compactdefaultargs") RWGltf_MaterialCommon;
@@ -1814,9 +1814,9 @@ class RWGltf_MaterialMetallicRoughness : public Standard_Transient {
 		TCollection_AsciiString Name;
 		Quantity_ColorRGBA BaseColor;
 		Graphic3d_Vec3 EmissiveFactor;
-		Standard_ShortReal Metallic;
-		Standard_ShortReal Roughness;
-		Standard_ShortReal AlphaCutOff;
+		float Metallic;
+		float Roughness;
+		float AlphaCutOff;
 		RWGltf_GltfAlphaMode AlphaMode;
 		bool IsDoubleSided;
 		/****************** RWGltf_MaterialMetallicRoughness ******************/
diff --git a/src/SWIG_files/wrapper/RWObj.i b/src/SWIG_files/wrapper/RWObj.i
index 33276eae6..01e26de95 100644
--- a/src/SWIG_files/wrapper/RWObj.i
+++ b/src/SWIG_files/wrapper/RWObj.i
@@ -505,8 +505,8 @@ class RWObj_Material {
 		Quantity_Color AmbientColor;
 		Quantity_Color DiffuseColor;
 		Quantity_Color SpecularColor;
-		Standard_ShortReal Shininess;
-		Standard_ShortReal Transparency;
+		float Shininess;
+		float Transparency;
 		/****************** RWObj_Material ******************/
 		/**** md5 signature: e824e5ca5d324e17a53317770dbbc543 ****/
 		%feature("compactdefaultargs") RWObj_Material;
diff --git a/src/SWIG_files/wrapper/Select3D.i b/src/SWIG_files/wrapper/Select3D.i
index 85d61f466..b50355991 100644
--- a/src/SWIG_files/wrapper/Select3D.i
+++ b/src/SWIG_files/wrapper/Select3D.i
@@ -284,9 +284,9 @@ None
 *********************/
 class Select3D_Pnt {
 	public:
-		Standard_ShortReal x;
-		Standard_ShortReal y;
-		Standard_ShortReal z;
+		float x;
+		float y;
+		float z;
 };
 
 
diff --git a/src/SWIG_files/wrapper/XCAFDoc.i b/src/SWIG_files/wrapper/XCAFDoc.i
index 89993a5e6..81726bc79 100644
--- a/src/SWIG_files/wrapper/XCAFDoc.i
+++ b/src/SWIG_files/wrapper/XCAFDoc.i
@@ -1920,7 +1920,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") GetAlpha;
 		Standard_ShortReal GetAlpha();
 
@@ -9308,7 +9308,7 @@ None
 
 Returns
 -------
-Standard_ShortReal
+float
 ") AlphaCutOff;
 		Standard_ShortReal AlphaCutOff();
 
@@ -9569,7 +9569,7 @@ None
 Parameters
 ----------
 theMode: Graphic3d_AlphaMode
-theCutOff: Standard_ShortReal,optional
+theCutOff: float,optional
 	default value is 0.5f
 
 Returns
@@ -9696,8 +9696,8 @@ class XCAFDoc_VisMaterialCommon {
 		Quantity_Color DiffuseColor;
 		Quantity_Color SpecularColor;
 		Quantity_Color EmissiveColor;
-		Standard_ShortReal Shininess;
-		Standard_ShortReal Transparency;
+		float Shininess;
+		float Transparency;
 		bool IsDefined;
 		/****************** XCAFDoc_VisMaterialCommon ******************/
 		/**** md5 signature: 902673da58471421f95b5ccf0bdee6a3 ****/
@@ -9754,9 +9754,9 @@ class XCAFDoc_VisMaterialPBR {
 		opencascade::handle<Image_Texture > NormalTexture;
 		Quantity_ColorRGBA BaseColor;
 		Graphic3d_Vec3 EmissiveFactor;
-		Standard_ShortReal Metallic;
-		Standard_ShortReal Roughness;
-		Standard_ShortReal RefractionIndex;
+		float Metallic;
+		float Roughness;
+		float RefractionIndex;
 		bool IsDefined;
 		/****************** XCAFDoc_VisMaterialPBR ******************/
 		/**** md5 signature: 11ea295424c444b06892c19d880417c9 ****/
diff --git a/src/SWIG_files/wrapper/generator.log b/src/SWIG_files/wrapper/generator.log
index ee85a98c0..c0ebbb183 100644
--- a/src/SWIG_files/wrapper/generator.log
+++ b/src/SWIG_files/wrapper/generator.log
@@ -2,13 +2,13 @@
 ############################
 Running pythonocc-generator.
 ############################
-git revision : c94e218
+git revision : 2528466
 
 operating system : Linux 64bit 5.4.0-146-generic
 
 occt version targeted : 7.7.1
 
-date : 2023-04-04 03:54:59.316465
+date : 2023-04-14 11:35:58.746193
 ############################
 
 [INFO ]  Processing toolkit TKBO ===
@@ -9059,7 +9059,7 @@ date : 2023-04-04 03:54:59.316465
 [INFO ]  Class: UnitsMethods
 [INFO ]  
 #################################################
-SWIG interface file generation completed in 36.91s
+SWIG interface file generation completed in 33.79s
 #################################################
 
 [INFO ]  Number of classes: 4747


Test patch:
diff --git a/test/core_wrapper_features_unittest.py b/test/core_wrapper_features_unittest.py
index 41ea65f08..076a83094 100644
--- a/test/core_wrapper_features_unittest.py
+++ b/test/core_wrapper_features_unittest.py
@@ -37,7 +37,11 @@
 from OCC.Core.BRepOffsetAPI import BRepOffsetAPI_Sewing
 from OCC.Core.BRepBndLib import brepbndlib_Add
 from OCC.Core.BRepMesh import BRepMesh_IncrementalMesh
-from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeBox, BRepPrimAPI_MakeSphere
+from OCC.Core.BRepPrimAPI import (
+    BRepPrimAPI_MakeBox,
+    BRepPrimAPI_MakeCylinder,
+    BRepPrimAPI_MakeSphere,
+)
 from OCC.Core.BRepBuilderAPI import (
     BRepBuilderAPI_MakeVertex,
     BRepBuilderAPI_MakeEdge,
@@ -68,12 +72,11 @@
     TopoDS_Vertex,
     TopoDS_Shape,
 )
-from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeCylinder
 from OCC.Core.TColStd import TColStd_Array1OfReal, TColStd_Array1OfInteger
 from OCC.Core.TColgp import TColgp_Array1OfPnt
 from OCC.Core.TDF import TDF_LabelSequence
 from OCC.Core.TopExp import TopExp_Explorer
-from OCC.Core.TopAbs import TopAbs_FACE
+from OCC.Core.TopAbs import TopAbs_FACE, TopAbs_Orientation
 from OCC.Core.GProp import GProp_GProps
 from OCC.Core.BRepGProp import brepgprop_LinearProperties
 from OCC.Core.BRepClass import BRepClass_FaceClassifier
@@ -90,7 +93,7 @@
 from OCC.Core.Geom import Geom_Curve, Geom_Line, Geom_BSplineCurve
 from OCC.Core.BRep import BRep_Tool_Curve
 from OCC.Core.HLRBRep import HLRBRep_Algo, HLRBRep_HLRToShape
-from OCC.Core.HLRAlgo import HLRAlgo_Projector
+from OCC.Core.HLRAlgo import HLRAlgo_EdgeIterator, HLRAlgo_EdgeStatus, HLRAlgo_Projector
 from OCC.Core.TopTools import (
     TopTools_HArray1OfShape,
     TopTools_HArray2OfShape,
@@ -105,8 +108,6 @@
     MethodNotWrappedError,
     ClassNotWrappedError,
 )
-from OCC.Core.TopAbs import TopAbs_Orientation
-from OCC.Core.BRepPrimAPI import BRepPrimAPI_MakeBox
 
 from OCC.Extend.TopologyUtils import TopologyExplorer
 
@@ -911,26 +912,33 @@ def test_topabs_orientation_byref(self):
         edge_4 = BRepClass_Edge()
 
         facetopo.InitEdges()
-        topabs_ori_1 = facetopo.CurrentEdge(
-            edge_1
-        )
+        topabs_ori_1 = facetopo.CurrentEdge(edge_1)
         facetopo.NextEdge()
-        topabs_ori_2 = facetopo.CurrentEdge(
-            edge_2
-        )
+        topabs_ori_2 = facetopo.CurrentEdge(edge_2)
         facetopo.NextEdge()
-        topabs_ori_3 = facetopo.CurrentEdge(
-            edge_3
-        )
+        topabs_ori_3 = facetopo.CurrentEdge(edge_3)
         facetopo.NextEdge()
-        topabs_ori_4 = facetopo.CurrentEdge(
-            edge_4
-        )
+        topabs_ori_4 = facetopo.CurrentEdge(edge_4)
         self.assertEqual(topabs_ori_1, TopAbs_Orientation.TopAbs_REVERSED)
         self.assertEqual(topabs_ori_2, TopAbs_Orientation.TopAbs_REVERSED)
         self.assertEqual(topabs_ori_3, TopAbs_Orientation.TopAbs_FORWARD)
         self.assertEqual(topabs_ori_4, TopAbs_Orientation.TopAbs_FORWARD)
 
+    def test_Standard_ShortReal_and_Standard_Real_returned_by_reference(self):
+        """the HLRAlgo_EdgeIterator.Visible returns both Standar_Real and Standard_ShortReal
+        by references"""
+        start = 1.0  # Standard_Real
+        tol_start = 2  # Standard_ShortReal
+        end = 3.0  # Standard_Real
+        tol_end = 4.0  # Standard_ShortReal
+
+        hlralgo_edge_status = HLRAlgo_EdgeStatus(start, tol_start, end, tol_end)
+        hlr_edg_it = HLRAlgo_EdgeIterator()
+        hlr_edg_it.InitVisible(hlralgo_edge_status)
+
+        # visible should return both 4 floats and doubles
+        self.assertEqual(hlr_edg_it.Visible(), (start, tol_start, end, tol_end))
+
 
 def suite() -> unittest.TestSuite:
     test_suite = unittest.TestSuite()