Skip to content

Instantly share code, notes, and snippets.

# This script creates a simple Qt Widget, renders it to a Coin3D texture (SoTexture2), and creates a cube (SoCube) with that texture.
# It also simulates (def simulate_picking(self)) a 3D ray that intersects with Coin3D render of the QWidget. If the point of intersection is on the "Hello World" button widget, then QMouseEvent (pressed and relesed) is triggered and button activation is animated.
from OpenGL import GL
from PySide6.QtOpenGLWidgets import QOpenGLWidget
from PySide6.QtWidgets import QApplication
from PySide6.QtCore import Qt, QTimer, Signal, Slot
from PySide6.QtGui import QOpenGLContext
from PySide6.QtGui import qGray, qRed, qGreen, qBlue, qAlpha
# This script creates ABENICS (half of) cross gear in FreeCAD
import FreeCAD as App
import Part
import InvoluteGearFeature
doc = App.ActiveDocument
mod = 2.0 # gear tooth module
monopole_teeth = 12 # number of teeth
cross_teeth = monopole_teeth * 2
height = 20 # height of the monopole gear
@kwahoo2
kwahoo2 / attachment-animation-with-pauses.py
Created February 4, 2023 12:54
This script animates "Box" attached to an curve with MapPathParameter # It can be used for animation of indexing conveyor (start/stop)
# This script animates "Box" attached to an curve with MapPathParameter
# It can be used for animation of indexing conveyor (start/stop)
import FreeCAD as App, FreeCADGui as Gui, Part, time
from PySide2 import QtGui,QtCore
class Animation(object):
def __init__(self):
App.Console.PrintMessage('Animation has started\n')
App.ActiveDocument.recompute()
@kwahoo2
kwahoo2 / FreeCAD attachment animation
Created February 4, 2023 12:06
# This script aniamtes "Box" attached to an curve with MapPathParameter
# This script aniamtes "Box" attached to an curve with MapPathParameter
import FreeCAD as App, FreeCADGui as Gui, Part, time
from PySide2 import QtGui,QtCore
class Animation(object):
def __init__(self):
App.Console.PrintMessage('Animation has started\n')
App.ActiveDocument.recompute()
self.timer = QtCore.QTimer()
Informacje o komputerze:
Producent: Unknown
Model: Unknown
Rodzaj: Komputer stacjonarny
Nie wykryto panelu dotykowego
Informacje o procesorze:
Dostawca CPU: AuthenticAMD
Marka procesora: AMD Ryzen 7 1700 Eight-Core Processor
Rodzina CPU: 0x17
GameAction [AppID 220, ActionID 1] : LaunchApp changed task to ProcessingInstallScript with ""
GameAction [AppID 220, ActionID 1] : LaunchApp changed task to SynchronizingCloud with ""
GameAction [AppID 220, ActionID 1] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
GameAction [AppID 220, ActionID 1] : LaunchApp changed task to CreatingProcess with ""
GameAction [AppID 220, ActionID 1] : LaunchApp waiting for user response to CreatingProcess ""
GameAction [AppID 220, ActionID 1] : LaunchApp continues with user response "CreatingProcess"
/bin/sh\0-c\0/home/adi/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=220 -- '/mnt/ssd/SteamLibrary/steamapps/common/Half-Life 2/hl2.sh' -game hl2 -steam -vulkan\0
Game process added : AppID 220 "/home/adi/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=220 -- '/mnt/ssd/SteamLibrary/steamapps/common/Half-Life 2/hl2.sh' -game hl2 -steam -vulkan", ProcID 17050, IP 0.0.0.0:0
ERROR: ld.so: object '/home/adi/.local/share/Steam/ubuntu12_32/gameoverlayre
--- Serious Engine Startup ---
SeriousEngine Build: 10000.10
Executable: D:\ssrt\Bin\SeriousSamTFE.exe
Assumed engine directory: `\„ä
Examining underlying OS...
Type: WinNT
Version: 6.2, build 9200
We couldn’t find that file to show.
======================
Proton: 1565123138 proton-4.11-2
SteamGameId: 201480
Command: ['/mnt/hdd/SteamLibrary/steamapps/common/Serious Sam The Random Encounter/sstre.exe']
Options: set()
======================
ERROR: ld.so: object '/home/adi/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/adi/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
4097.651:002e:002f:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\KERNEL32.dll" at 0x7b430000: builtin
4097.655:002e:002f:trace:loaddll:load_so_dll Loaded L"C:\\windows\\system32\\winepath.exe" at 0x7eb30000: builtin
======================
Proton: 1565123138 proton-4.11-2
SteamGameId: 465240
Command: ['/mnt/hdd/SteamLibrary/steamapps/common/Serious Sam VR The Last Hope/Bin/x64/SamTLH.exe', '+gfx_strAPI', 'VLK']
Options: set()
======================
ERROR: ld.so: object '/home/adi/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/adi/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/adi/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
fsync: up and running.