Skip to content

Instantly share code, notes, and snippets.

View jirihnidek's full-sized avatar

Jiri Hnidek jirihnidek

View GitHub Profile
@jirihnidek
jirihnidek / CMakeLists.txt
Created July 26, 2016 11:21
OpenCascade Simple Face
# This example shows how to use find_package(OCE) by specifying
# a list of toolkits.
# If a toolkit is missing or if OCE is not found, a fatal error
# is thrown, we do not try to find an Opencascade installation.
cmake_minimum_required(VERSION 2.6)
find_package(OCE REQUIRED)
# Include files reside in ${OCE_INCLUDE_DIRS};
#!/usr/bin/env python
"""
Simple example of bspline surface created directly (not using Bezier surface)
"""
from OCC.gp import *
from OCC.Geom import *
from OCC.TColGeom import *
from OCC.TColgp import *
@jirihnidek
jirihnidek / CMakeLists.txt
Last active November 2, 2021 17:15
C++ OpenCL Example
# Minimal version of CMake
cmake_minimum_required (VERSION 2.6)
# Build type
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif ()
@jirihnidek
jirihnidek / CMakeLists.txt
Last active November 24, 2019 23:35
Example of IPv6 TCP client-server application(s) using select() and blocking sockets
# Main CMakeFile.txt
# Minimal version of CMake
cmake_minimum_required (VERSION 2.6)
# Build type
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
@jirihnidek
jirihnidek / CMakeLists.txt
Last active March 26, 2024 02:53
Example of IPv6 TCP client-server application(s) using blocking sockets
# Main CMakeFile.txt
# Minimal version of CMake
cmake_minimum_required (VERSION 2.6)
# Build type
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
@jirihnidek
jirihnidek / CMakeLists.txt
Last active August 29, 2015 14:22
Example of IPv4 TCP client-server application(s) using blocking sockets
# Main CMakeFile.txt
# Minimal version of CMake
cmake_minimum_required (VERSION 2.6)
# Build type
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
@jirihnidek
jirihnidek / .gitignore
Last active October 16, 2023 09:33
Example of (Linux) client-server aplication using ECN bit in UDP packets.
.cproject
.project
build
@jirihnidek
jirihnidek / pythonocc_bspline_surface.py
Created April 9, 2015 17:01
PythonOCC example of bspline surface
"""
Simple example of bspline surface
"""
from OCC.gp import *
from OCC.Geom import *
from OCC.TColGeom import *
from OCC.TColgp import *
from OCC.GeomConvert import *
from OCC.BRepBuilderAPI import *
@jirihnidek
jirihnidek / b3d_prop_callbacks.py
Created March 19, 2015 11:27
Blender property and callbacks
"""
Example of callbacks used for Blender integer property
"""
import bpy
# Some global values
values = {}
default_value = -1
@jirihnidek
jirihnidek / object_template.c
Last active August 29, 2015 14:16
Template of Verse command used in https://github.com/verse/verse
/*
*
* ***** BEGIN BSD LICENSE BLOCK *****
*
* Copyright (c) 2009-2015, Jiri Hnidek
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: