Skip to content

Instantly share code, notes, and snippets.

View CEXT-Dan's full-sized avatar
😀

Dan CEXT-Dan

😀
View GitHub Profile
@CEXT-Dan
CEXT-Dan / yummy.py
Last active December 29, 2025 07:27
Bricscad, sample data extraction with python
import traceback
import pandas as pd
from collections import defaultdict
from pyrx import Ap, Db, Brx
def getBlockParameterValue(id: Db.ObjectId, name: str):
val = Db.AcValue(Brx.Core.getBlockParameterValue(id, name))
val.setFormat("%lu4%pr4%zs5") #djust this
return val.format()
@CEXT-Dan
CEXT-Dan / tree3d.py
Last active December 11, 2025 07:38
TREE3D
import math
import random
import traceback
from pyrx import Ap, Db, Ge
# ---------------- CONFIG ----------------
TOTAL_HEIGHT = 200.0
BASE_RADIUS = 60.0
TIERS = 4
@CEXT-Dan
CEXT-Dan / justdoit.cpp
Created November 21, 2025 13:18
Parse PNEZD file
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files
#include <windows.h>
#include "tchar.h"
#include <iostream>
#include <string>
#include <string_view>
#include <chrono>
#include <cassert>
#include <array>
@CEXT-Dan
CEXT-Dan / multiburst.py
Created November 5, 2025 22:47
multiburst
# see https://github.com/CEXT-Dan/PyRx
import traceback
from pyrx import Db, Ed, Ge, Ap, Rx, Gs
import os
# add mod to path
def make_mod_path(filepath, suffix="_mod_"):
base, extension = os.path.splitext(filepath)
new_filepath = f"{base}{suffix}{extension}"
@CEXT-Dan
CEXT-Dan / multiexplode.py
Created November 5, 2025 01:11
explode blocks in multiple drawings with Python for AutoCAD
# see https://github.com/CEXT-Dan/PyRx
import traceback
from pyrx import Db, Ed, Ge, Ap, Rx, Gs
import os
# add mod to path
def make_mod_path(filepath, suffix="_mod_"):
base, extension = os.path.splitext(filepath)
@CEXT-Dan
CEXT-Dan / acrxEntryPoint.cpp
Created November 4, 2025 06:26
acrxEntryPoint for doc
//-----------------------------------------------------------------------------
//----- ObjectARX EntryPoint
class wxArx : public AcRxArxApp
{
public:
wxArx() : AcRxArxApp()
{
}
virtual AcRx::AppRetCode On_kInitAppMsg(void* pkt)
@CEXT-Dan
CEXT-Dan / OBRC.CPP
Last active October 21, 2025 05:26
The One Billion Row Challenge
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files
#include <windows.h>
#include "tchar.h"
#include <iostream>
#include <string>
#include <format>
#include <mutex>
#include <unordered_map>
#include <execution>