View workplane_xfrm_inv.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lx | |
import lxu | |
# get the current active scene and a channel read object, | |
scene = lx.object.Scene(lxu.select.SceneSelection().current()) | |
channel_read = lx.object.ChannelRead(scene.Channels(None, 0)) | |
# using the channel read get the workplane position and rotation | |
workplane_position = scene.WorkPlanePosition(channel_read) | |
workplane_rotation = scene.WorkPlaneRotation(channel_read) |
View list_notifiers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lx | |
notify_system = lx.service.NotifySys() | |
for i in range(notify_system.Count()): | |
notifier = notify_system.ByIndex(i) # get the lx.object.Notifier | |
name = notify_system.NameByIndex(i) # get the str name for the Nofifier | |
# attempt getting arguments for the notifier, | |
try: |
View build.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM adds cl.exe to path | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
REM Set current dir to folder of this script | |
pushd %~dp0 | |
REM Then create and cd into build folder | |
mkdir build |
View check_ubx.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lx | |
import lxu | |
import modo | |
from math import isclose | |
mesh, = modo.Scene().selectedByType('mesh') | |
result = set() | |
with mesh.geometry as geo: | |
normals = set() |
View sheet_conflict.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.ElementTree as ET | |
import os | |
platform = lx.service.Platform() | |
configs = set() # all unique paths to config files | |
for i in range(platform.ImportPathCount()): | |
directory = platform.ImportPathByIndex(i) | |
for filename in os.listdir(directory): |
View Hello.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <lx_log.hpp> | |
#include <lxu_log.hpp> | |
#include <lxu_command.hpp> | |
#define SRVNAME_COMMAND "hello.world" | |
class CHelloCommand : public CLxCommand | |
{ | |
public: | |
CLxUser_LogService log_service; |
View pix_rt_dump.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Given a flat list copy pasted as csv from PIX Timing capture, list unique names | |
""" | |
def main(): | |
names = list() | |
with open("renderthread_dump.csv", 'r') as f: |
View line_count.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import re | |
import argparse | |
def main(): | |
parser = argparse.ArgumentParser( | |
description="Tool to get a quick overview of number of files and lines of text" | |
) |
View modo_selection_mode.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python | |
import lx | |
def get_selection_mode(): | |
""" Get the current selection mode | |
:rtype: int |
NewerOlder