Skip to content

Commit bca0acc

Browse files
authored
Merge branch 'main' into doc/examples
2 parents 0f5e712 + dfb4f9a commit bca0acc

File tree

14 files changed

+3971
-3973
lines changed

14 files changed

+3971
-3973
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ doc = [
4747
"sphinx-design==0.5.0",
4848
"sphinx-jinja==2.0.2",
4949
"sphinx-copybutton==0.5.2",
50-
"jupyterlab==4.1.0",
50+
"jupyterlab==4.1.1",
5151
]
5252
visualization = [
5353
"numpy==1.26.2",
@@ -87,7 +87,6 @@ ignore = [
8787
"D210", # No whitespaces allowed surrounding docstring text
8888
"D212", # Multi-line docstring summary should start at the first line
8989
"D300", # Use triple double quotes `"""`
90-
"D401", # First line of docstring should be in imperative mood
9190
"D403", # First word of the first line should be properly capitalized
9291
"D404", # First word of the docstring should not be "This"
9392
"D417", # Missing argument description in the docstring

src/ansys/stk/core/graphics.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,7 +1993,7 @@ def count(self) -> int:
19931993
"arg_types" : (agcom.LONG, POINTER(agcom.Variant),),
19941994
"marshallers" : (agmarshall.LongArg, agmarshall.VariantArg,) }
19951995
def item(self, index:int) -> typing.Any:
1996-
"""An item in the collection at the specified index."""
1996+
"""Return an item in the collection at the specified index."""
19971997
return self._intf.invoke(IObjectCollection._metadata, IObjectCollection._item_metadata, index, OutArg())
19981998

19991999
_get__NewEnum_metadata = { "name" : "_NewEnum",
@@ -2058,7 +2058,7 @@ def count(self) -> int:
20582058
"arg_types" : (agcom.LONG, POINTER(agcom.PVOID),),
20592059
"marshallers" : (agmarshall.LongArg, agmarshall.InterfaceOutArg,) }
20602060
def item(self, index:int) -> "Scene":
2061-
"""A scene in the collection at a specified index."""
2061+
"""Return a scene in the collection at a specified index."""
20622062
return self._intf.invoke(ISceneCollection._metadata, ISceneCollection._item_metadata, index, OutArg())
20632063

20642064
_get__NewEnum_metadata = { "name" : "_NewEnum",
@@ -3884,7 +3884,7 @@ def is_recording(self) -> bool:
38843884
"arg_types" : (agcom.BSTR, agcom.INT, agcom.INT,),
38853885
"marshallers" : (agmarshall.BStrArg, agmarshall.IntArg, agmarshall.IntArg,) }
38863886
def start_recording(self, wmvFilename:str, videoBitRate:int, videoFrameRate:int) -> None:
3887-
"""This method is deprecated. Use StartRecordingVideo instead. Starts recording a file in the WMV format at the specified bit and frame rate."""
3887+
"""Do not use this method, as it is deprecated. Use StartRecordingVideo instead. Starts recording a file in the WMV format at the specified bit and frame rate."""
38883888
return self._intf.invoke(ICameraVideoRecording._metadata, ICameraVideoRecording._start_recording_metadata, wmvFilename, videoBitRate, videoFrameRate)
38893889

38903890
_start_recording_frame_stack_metadata = { "name" : "start_recording_frame_stack",
@@ -4040,14 +4040,14 @@ def projection(self) -> "MAP_PROJECTION":
40404040
"arg_types" : (agcom.PVOID,),
40414041
"marshallers" : (agmarshall.InterfaceInArg("IScene"),) }
40424042
def start_up(self, scene:"IScene") -> None:
4043-
"""Called automatically when imagery is being added to the globe."""
4043+
"""Initiate start-up when imagery is being added to the globe."""
40444044
return self._intf.invoke(ICustomImageGlobeOverlay._metadata, ICustomImageGlobeOverlay._start_up_metadata, scene)
40454045

40464046
_shut_down_metadata = { "name" : "shut_down",
40474047
"arg_types" : (agcom.PVOID,),
40484048
"marshallers" : (agmarshall.InterfaceInArg("IScene"),) }
40494049
def shut_down(self, scene:"IScene") -> None:
4050-
"""Called automatically when imagery is being removed from the globe."""
4050+
"""Initiate shutdown when imagery is being removed from the globe."""
40514051
return self._intf.invoke(ICustomImageGlobeOverlay._metadata, ICustomImageGlobeOverlay._shut_down_metadata, scene)
40524052

40534053
_clear_cache_metadata = { "name" : "clear_cache",
@@ -7247,7 +7247,7 @@ def maximum_number_of_frames(self, maximumNumberOfFrames:int) -> None:
72477247
"arg_types" : (),
72487248
"marshallers" : () }
72497249
def reset(self) -> None:
7250-
"""This resets the frame rate counter back to zero. The frame rate computation begins anew."""
7250+
"""Reset the frame rate counter back to zero. The frame rate computation begins anew."""
72517251
return self._intf.invoke(IFrameRate._metadata, IFrameRate._reset_metadata, )
72527252

72537253

@@ -9840,7 +9840,7 @@ def refresh(self) -> None:
98409840
agcls.AgTypeNameMap["IKmlNetworkLink"] = IKmlNetworkLink
98419841

98429842
class IMarkerBatchPrimitive(object):
9843-
""" Renders one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards..."""
9843+
"""Render one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards..."""
98449844

98459845
_num_methods = 54
98469846
_vtable_offset = IUnknown._vtable_offset + IUnknown._num_methods
@@ -11967,7 +11967,7 @@ def maximum_pixel_size(self, maximumPixelSize:int) -> None:
1196711967
agcls.AgTypeNameMap["IPixelSizeDisplayCondition"] = IPixelSizeDisplayCondition
1196811968

1196911969
class IPointBatchPrimitive(object):
11970-
""" Renders one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each..."""
11970+
"""Render one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each..."""
1197111971

1197211972
_num_methods = 34
1197311973
_vtable_offset = IUnknown._vtable_offset + IUnknown._num_methods
@@ -12972,7 +12972,7 @@ def count(self) -> int:
1297212972
"marshallers" : (agmarshall.IntArg,) }
1297312973
@property
1297412974
def precision_exponent(self) -> int:
12975-
"""This property is deprecated. This property is no longer in use Gets or sets the exponent used to compute the maximum precision for primitive rendering. For example, a value of -3 indicates the maximum precision of 2^-3, 0.125 m along the x, y, or z axis..."""
12975+
"""Do not use this property, as it is deprecated. This property is no longer in use Gets or sets the exponent used to compute the maximum precision for primitive rendering. For example, a value of -3 indicates the maximum precision of 2^-3, 0.125 m along the x, y, or z axis..."""
1297612976
return self._intf.get_property(IPrimitiveManager._metadata, IPrimitiveManager._get_precision_exponent_metadata)
1297712977

1297812978
_set_precision_exponent_metadata = { "name" : "precision_exponent",
@@ -14600,7 +14600,7 @@ def supported(self) -> bool:
1460014600
agcls.AgTypeNameMap["ITerrainOverlay"] = ITerrainOverlay
1460114601

1460214602
class ITextBatchPrimitive(object):
14603-
""" Renders one or more strings in the 3D scene. For best performance, avoid creating lots of batches with only a few strings each. See the Batching Performance Overview."""
14603+
"""Render one or more strings in the 3D scene. For best performance, avoid creating lots of batches with only a few strings each. See the Batching Performance Overview."""
1460414604

1460514605
_num_methods = 32
1460614606
_vtable_offset = IUnknown._vtable_offset + IUnknown._num_methods
@@ -18271,7 +18271,7 @@ def initialize_audio_video_with_string_uri(self, uri:str, audioUri:str) -> "Vide
1827118271
agcls.AgTypeNameMap["IVideoStreamFactory"] = IVideoStreamFactory
1827218272

1827318273
class IMarkerBatchPrimitiveFactory(object):
18274-
""" Renders one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards..."""
18274+
"""Render one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards..."""
1827518275

1827618276
_num_methods = 7
1827718277
_vtable_offset = IUnknown._vtable_offset + IUnknown._num_methods
@@ -18575,7 +18575,7 @@ def initialize_with_pixel_sizes(self, minimumPixelSize:int, maximumPixelSize:int
1857518575
agcls.AgTypeNameMap["IPixelSizeDisplayConditionFactory"] = IPixelSizeDisplayConditionFactory
1857618576

1857718577
class IPointBatchPrimitiveFactory(object):
18578-
""" Renders one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each..."""
18578+
"""Render one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each..."""
1857918579

1858018580
_num_methods = 4
1858118581
_vtable_offset = IUnknown._vtable_offset + IUnknown._num_methods
@@ -19208,7 +19208,7 @@ def supported(self) -> bool:
1920819208
agcls.AgTypeNameMap["ITerrainOverlayInitializer"] = ITerrainOverlayInitializer
1920919209

1921019210
class ITextBatchPrimitiveFactory(object):
19211-
""" Renders one or more strings in the 3D scene. For best performance, avoid creating lots of batches with only a few strings each. See the Batching Performance Overview."""
19211+
"""Render one or more strings in the 3D scene. For best performance, avoid creating lots of batches with only a few strings each. See the Batching Performance Overview."""
1921219212

1921319213
_num_methods = 3
1921419214
_vtable_offset = IUnknown._vtable_offset + IUnknown._num_methods
@@ -21457,7 +21457,7 @@ def __setattr__(self, attrname, value):
2145721457
agcls.AgTypeNameMap["KmlNetworkLink"] = KmlNetworkLink
2145821458

2145921459
class MarkerBatchPrimitive(IMarkerBatchPrimitive, IPrimitive):
21460-
""" Renders one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards..."""
21460+
"""Render one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards..."""
2146121461

2146221462
def __init__(self, sourceObject=None):
2146321463
IMarkerBatchPrimitive.__init__(self, sourceObject)
@@ -21656,7 +21656,7 @@ def __setattr__(self, attrname, value):
2165621656
agcls.AgTypeNameMap["PixelSizeDisplayCondition"] = PixelSizeDisplayCondition
2165721657

2165821658
class PointBatchPrimitive(IPointBatchPrimitive, IPrimitive):
21659-
""" Renders one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each..."""
21659+
"""Render one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each..."""
2166021660

2166121661
def __init__(self, sourceObject=None):
2166221662
IPointBatchPrimitive.__init__(self, sourceObject)
@@ -22041,7 +22041,7 @@ def __setattr__(self, attrname, value):
2204122041
agcls.AgTypeNameMap["TerrainOverlay"] = TerrainOverlay
2204222042

2204322043
class TextBatchPrimitive(ITextBatchPrimitive, IPrimitive):
22044-
""" Renders one or more strings in the 3D scene. For best performance, avoid creating lots of batches with only a few strings each. See the Batching Performance Overview."""
22044+
"""Render one or more strings in the 3D scene. For best performance, avoid creating lots of batches with only a few strings each. See the Batching Performance Overview."""
2204522045

2204622046
def __init__(self, sourceObject=None):
2204722047
ITextBatchPrimitive.__init__(self, sourceObject)
@@ -23115,7 +23115,7 @@ def __setattr__(self, attrname, value):
2311523115
agcls.AgTypeNameMap["VideoStreamFactory"] = VideoStreamFactory
2311623116

2311723117
class MarkerBatchPrimitiveFactory(IMarkerBatchPrimitiveFactory):
23118-
""" Renders one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards..."""
23118+
"""Render one or more markers in the 3D scene. Markers are 2D images that always face the viewer which can be sized in pixels or meters. Markers are also referred to as sprites or billboards..."""
2311923119

2312023120
def __init__(self, sourceObject=None):
2312123121
IMarkerBatchPrimitiveFactory.__init__(self, sourceObject)
@@ -23217,7 +23217,7 @@ def __setattr__(self, attrname, value):
2321723217
agcls.AgTypeNameMap["PixelSizeDisplayConditionFactory"] = PixelSizeDisplayConditionFactory
2321823218

2321923219
class PointBatchPrimitiveFactory(IPointBatchPrimitiveFactory):
23220-
""" Renders one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each..."""
23220+
"""Render one or more points in the 3D scene. Each point in the batch has a unique position and an optional color. All points in the batch share the same pixel size. For best performance, avoid creating lots of batches with only a few points each..."""
2322123221

2322223222
def __init__(self, sourceObject=None):
2322323223
IPointBatchPrimitiveFactory.__init__(self, sourceObject)
@@ -23421,7 +23421,7 @@ def __setattr__(self, attrname, value):
2342123421
agcls.AgTypeNameMap["TerrainOverlayInitializer"] = TerrainOverlayInitializer
2342223422

2342323423
class TextBatchPrimitiveFactory(ITextBatchPrimitiveFactory):
23424-
""" Renders one or more strings in the 3D scene. For best performance, avoid creating lots of batches with only a few strings each. See the Batching Performance Overview."""
23424+
"""Render one or more strings in the 3D scene. For best performance, avoid creating lots of batches with only a few strings each. See the Batching Performance Overview."""
2342523425

2342623426
def __init__(self, sourceObject=None):
2342723427
ITextBatchPrimitiveFactory.__init__(self, sourceObject)

src/ansys/stk/core/internal/apiutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def __eq__(self, other):
1414
return False
1515

1616
def __hash__(self):
17-
"""Used primarily for reference count management."""
17+
"""Manage reference count."""
1818
return 0
1919

2020
def __bool__(self):

src/ansys/stk/core/internal/coclassutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def get_concrete_class(punk:IUnknown) -> typing.Any:
217217
return coclass
218218

219219
def compare_com_objects(first, second) -> bool:
220-
"""Used to compare whether the given interfaces point to the same COM object."""
220+
"""Compare whether the given interfaces point to the same COM object."""
221221
if first is None and second is None:
222222
return True
223223
elif first is None or second is None:

src/ansys/stk/core/internal/comutil.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def _add_ref_impl(pUnk:"IUnknown"):
423423

424424
def create_ownership(self, pUnk:"IUnknown"):
425425
"""
426-
Adds pUnk to the reference manager and calls AddRef in STK.
426+
Add pUnk to the reference manager and call AddRef in STK.
427427
428428
Use if pUnk has a ref-count of 0.
429429
"""
@@ -434,7 +434,7 @@ def create_ownership(self, pUnk:"IUnknown"):
434434

435435
def take_ownership(self, pUnk:"IUnknown", isApplication=False):
436436
"""
437-
Adds pUnk to the reference manager; does not call AddRef in STK.
437+
Add pUnk to the reference manager; does not call AddRef in STK.
438438
439439
Use if pUnk has a ref-count of 1.
440440
"""
@@ -509,7 +509,7 @@ def uninitialize(self):
509509
CoInitializeManager = _CreateCoInitializeManager()
510510

511511
def _initialize_embedded():
512-
"""Called by STK during plugin initialization."""
512+
"""Initialize OLE libraries for STK plugin initialization."""
513513
OLE32Lib._initialize()
514514
OLEAut32Lib._initialize()
515515

src/ansys/stk/core/internal/stkxrfb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __setattr__(self, attrname, value):
4545
"arg_types" : (),
4646
"marshallers" : () }
4747
def refresh(self) -> None:
48-
"""A new frame is ready to be displayed."""
48+
"""Request a new frame to be displayed."""
4949
return self._intf.invoke(IRemoteFrameBufferHost._metadata, IRemoteFrameBufferHost._refresh_metadata, )
5050

5151

@@ -92,7 +92,7 @@ def __setattr__(self, attrname, value):
9292
"arg_types" : (agcom.PVOID,),
9393
"marshallers" : (agmarshall.PVoidArg,) }
9494
def snap_to_rbg_raster(self, rbgRasterPtr:agcom.PVOID) -> None:
95-
"""Captures the current scene to a raster."""
95+
"""Capture the current scene to a raster."""
9696
return self._intf.invoke(IRemoteFrameBuffer._metadata, IRemoteFrameBuffer._snap_to_rbg_raster_metadata, rbgRasterPtr)
9797

9898
_set_to_off_screen_rendering_metadata = { "name" : "set_to_off_screen_rendering",
@@ -155,14 +155,14 @@ def notify_m_button_down(self, x:int, y:int, keyState:int) -> None:
155155
"arg_types" : (agcom.INT, agcom.INT, agcom.INT, agcom.INT,),
156156
"marshallers" : (agmarshall.IntArg, agmarshall.IntArg, agmarshall.IntArg, agmarshall.IntArg,) }
157157
def notify_mouse_move(self, x:int, y:int, buttons:int, keyState:int) -> None:
158-
"""Called by the client on a mouse move event."""
158+
"""Notifies that a mouse move event occurred."""
159159
return self._intf.invoke(IRemoteFrameBuffer._metadata, IRemoteFrameBuffer._notify_mouse_move_metadata, x, y, buttons, keyState)
160160

161161
_notify_mouse_wheel_metadata = { "name" : "notify_mouse_wheel",
162162
"arg_types" : (agcom.INT, agcom.INT, agcom.INT, agcom.INT,),
163163
"marshallers" : (agmarshall.IntArg, agmarshall.IntArg, agmarshall.IntArg, agmarshall.IntArg,) }
164164
def notify_mouse_wheel(self, x:int, y:int, steps:int, keyState:int) -> None:
165-
"""Called by the client on a mouse wheel event."""
165+
"""Notifies that a mouse wheel event occurred."""
166166
return self._intf.invoke(IRemoteFrameBuffer._metadata, IRemoteFrameBuffer._notify_mouse_wheel_metadata, x, y, steps, keyState)
167167

168168
_set_host_metadata = { "name" : "set_host",

0 commit comments

Comments
 (0)