File size: 1,480 Bytes
985c397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# SPDX-License-Identifier: LGPL-2.1-or-later

from __future__ import annotations

from Base.Metadata import export
from App.DocumentObjectExtension import DocumentObjectExtension
from typing import Any, Final

@export(
    Twin="AttachExtension",
    TwinPointer="AttachExtension",
    Include="Mod/Part/App/AttachExtension.h",
    FatherInclude="App/DocumentObjectExtensionPy.h",
)
class AttachExtension(DocumentObjectExtension):
    """
    This object represents an attachable object with OCC shape.

    Author: DeepSOIC (vv.titov@gmail.com)
    Licence: LGPL
    """

    Attacher: Final[Any] = ...
    """AttachEngine object driving this AttachableObject. Returns a copy."""

    def positionBySupport(self) -> bool:
        """
        positionBySupport() -> bool

        Reposition object based on AttachmentSupport, MapMode and MapPathParameter properties.
        Returns True if attachment calculation was successful, false if object is not attached and Placement wasn't updated,
        and raises an exception if attachment calculation fails.
        """
        ...

    def changeAttacherType(self, typename: str, /) -> None:
        """
        changeAttacherType(typename) -> None

        Changes Attacher class of this object.
        typename: string. The following are accepted so far:
        'Attacher::AttachEngine3D'
        'Attacher::AttachEnginePlane'
        'Attacher::AttachEngineLine'
        'Attacher::AttachEnginePoint'
        """
        ...