GithubHelp home page GithubHelp logo

vic4key / surfacecutter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jspanchu/surfacecutter

0.0 0.0 0.0 192 KB

Project polygons upon a surface and remove cut out portions of surface inside (or) outside the projected polygon.

License: MIT License

CMake 10.12% C++ 89.88%

surfacecutter's Introduction

SurfaceCutter

Cut triangulated surfaces with 2D loop polygons.

Build

mkdir build
cd build
cmake .. -GNinja -DTSC_BUILD_PARAVIEW_PLUGIN=ON -DTSC_WRAP_PYTHON=ON
ninja install

Usage

ParaView

C++

#include <tscTriSurfaceCutter.h>

vtkNew<tscTriSurfaceCutter> cutter;

// xxx: filter that outputs a vtkPolyData
cutter->SetInputConnection(0, xxx->GetOutputPort());
// yyy: filter that outputs a vtkPolyData
cutter->SetInputConnection(1, yyy->GetOutputPort());

cutter->Update();
cutMesh = cutter->GetOutput(0); 

Python

import tsc
...
cutter = tsc.tscTriSurfaceCutter()
cutter.SetInputConnection(triangulation.GetOutputPort())
cutter.SetLoopsConnection(1, loops.GetOutputPort())
...

InsideOut = true

InsideOut = false

Embed: On | Remove: Off | Invert: NA

Embed: On | Remove: On | Invert: On

Embed: On | Remove: On | Invert: Off

Embed: Off | Remove: On | Invert: On

Embed: Off | Remove: On | Invert: Off

Real-time

Benchmark

./benchmark <option(s)>Options:
        -h,--help       Show this help message
        -m,--mesh       Specify mesh file (*.vtp, *.vtu)
        -l,--loops      Specify loops file (*.vtp)
        -i,--invert     Invert 2d boolean. Portions inside loops will be removed.
        -t,--translationspeed   Speed multiplier for mesh translations along x, y, z
        -r,--rotationspeed      Speed multiplier for mesh rotation along z
           --movable    Make the mesh movable.
           --vtkcookiecutter    Use vtkCookieCutter instead
           --vtkclipdataset     Use vtkClipDataset with vtkImplicitSelectionLoop instead


Controls:
W:    Z+ | S:     Z-
Up:   Y+ | Down:  Y-
Left: X+ | Right: X-
Z:   CCW | C:     CW (Looking down Z-)

surfacecutter's People

Contributors

jspanchu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.