Skip to content

Instantly share code, notes, and snippets.

View kintel's full-sized avatar

Marius Kintel kintel

View GitHub Profile
@kintel
kintel / fastcsg issue
Last active January 14, 2023 20:36
OpenSCAD fastcsg issue
// openscad file.scad -o out.png --enable=fast-csg --enable=fast-csg-remesh --enable=fast-csg-trust-corefinement --render
// This will _sometimes_ hang OpenSCAD and sometimes give the following error:
//
// CGAL error: precondition violation!
// Expression : is_polygon_soup_a_polygon_mesh(polygons)
// File : /Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h
// Line : 282
// Explanation: Input soup needs to define a valid polygon mesh! See is_polygon_soup_a_polygon_mesh() for further information.
// Refer to the bug-reporting instructions at https://www.cgal.org/bug_report.html
// WARNING: [fast-csg] Corefinement corefinement mesh union #2 failed with an error: CGAL ERROR: precondition violation!
# iree/tools/iree-tblgen-2.params
# clang @iree/tools/iree-tblgen-2.params
-Wl,-S
-fuse-ld=/usr/bin/ld.gold
-Wl,-no-as-needed
-Wl,-z,relro,-z,now
-B/usr/bin
-lstdc++
-lm
-Wl,--gc-sections
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
Terraform will perform the following actions:
# module.my_vm.google_compute_instance.dev_vm must be replaced
-/+ resource "google_compute_instance" "dev_vm" {
allow_stopping_for_update = true
can_ip_forward = false
// Box should have 50 mm sides
// Holes should be 5 mm in diameter
//
color("Blue") translate([0,0,12.5]) linear_extrude(height=5) import("box-w-holes-graffle.svg", center=true);
translate([15,15, 10]) cylinder(h=20, r=4.5, center=true, $fn=32);
translate([15,-15, 10]) cylinder(h=20, r=4.5, center=true, $fn=32);
translate([-15,15, 10]) cylinder(h=20, r=4.5, center=true, $fn=32);
translate([-15,-15, 10]) cylinder(h=20, r=4.5, center=true, $fn=32);
translate([0,0,2]) cube([50, 50, 20], center=true);
hull() {
translate([0,0,10]) cylinder(h=2, r1=10, r2=8);
cylinder(h=2, r1=8, r2=10);
}
translate([25,0,0]) minkowski() {
cylinder(r=8, h=10);
sphere(2);
}
@kintel
kintel / Preferences.ui
Created December 28, 2014 22:51
Preferences.ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Preferences</class>
<widget class="QMainWindow" name="Preferences">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>657</width>
<height>695</height>
@kintel
kintel / issue1100B.scad
Created December 27, 2014 04:59
Issue #1100 B
handle_length = 70;
Handle_Depth = 5;
union()
{
difference()
{
union()
{
rotate_extrude(convexity = 10, $fn = 28)
@kintel
kintel / frame.scad
Last active August 29, 2015 14:10
frame
difference() {
linear_extrude(10)
hull()
for (t=[[0,0], [60,0], [60,40], [0,40]])
translate(t) circle(4);
translate([0,0,2]) linear_extrude(10)
hull()
for (t=[[5,5], [55,5], [55,35], [5,35]])
translate(t) circle(4);
#ifdef ENABLE_CGAL
#include "cgalutils.h"
#include "polyset.h"
#include "cgal.h"
namespace CGALUtils {
/*
Create a PolySet from a Nef Polyhedron 3. return false on success,