Skip to content

Instantly share code, notes, and snippets.

@petrasvestartas
petrasvestartas / TestCGAL.cpp
Last active January 18, 2021 13:30
CGAL Poisson Reconstruction CPP file
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef boost::graph_traits<Polyhedron>::vertex_descriptor vertex_descriptor;
typedef Polyhedron::HalfedgeDS HalfedgeDS;
// Normal Estimation Types
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel2;
@petrasvestartas
petrasvestartas / TestCGAL.h
Created January 18, 2021 12:55
TestCGAL header
#include <CGAL/Polyhedron_items_with_id_3.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/IO/Polyhedron_iostream.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Polyhedron_incremental_builder_3.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/boost/graph/split_graph_into_polylines.h>
@petrasvestartas
petrasvestartas / PointCloudGH.cs
Created January 18, 2021 16:05
PointCloudGH.cs
using Grasshopper.Kernel;
using Grasshopper.Kernel.Types;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rhino.Geometry;
using Rhino;
using Rhino.DocObjects;
using Grasshopper.Kernel.Data;
@petrasvestartas
petrasvestartas / PointCloudGHParam.cs
Created January 18, 2021 16:05
PointCloudGHParam.cs
using Grasshopper.Kernel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rhino.Geometry;
using Rhino;
using Rhino.DocObjects;
using Rhino.Input.Custom;
public class Attributes_Custom : Grasshopper.Kernel.Attributes.GH_ComponentAttributes {
//public bool userClick0 =false;
public Attributes_Custom(GH_Component owner) : base(owner) { }
protected override void Layout() {
base.Layout();
System.Drawing.Rectangle rec0 = GH_Convert.ToRectangle(Bounds);
rec0.Height += 22;
std::vector< Mesh > meshList;
std::vector<Mesh::Property_map<Mesh::Face_index, int>> meshList_id;
Mesh out;
Mesh::Property_map<Mesh::Face_index, int> out_id = out.add_property_map<Mesh::Face_index, int> ("f:id", -1).first;
int numOfValidMeshes = 0;
for ( size_t i = 0; i < n_mesh; i++ ) {
#include "baseCGAL.h"
PINVOKE void ReleaseInt (int* arr, bool isArray) {
deletePtr (arr, isArray);
}
PINVOKE void ReleaseDouble (double* arr, bool isArray) {
deletePtr (arr, isArray);
}
#pragma once
//PlanePlanePlane
//PlanePlane
//LinePlane
namespace CGAL_IntersectionUtil {
@petrasvestartas
petrasvestartas / readme.md
Created March 19, 2024 12:10 — forked from aaronsb/readme.md
Rhino3D 7 on Linux

Install Rhino 7 on Ubuntu based OS (KDE on Jammy in this case)

This assumes a non existant wine prefix or even a wine installation. If you have an existing wine prefix there may be things that interfere with this guide.

  • Start by installing wine and some required adjacent libraries.

sudo apt install wine wine32 winetricks mono-complete winbind

  • Initialize your default Wine environment (which will be located under ~/.wine