Git Product home page Git Product logo

cut_mesh's People

Contributors

kant avatar oomicahoo avatar patmo141 avatar vxlcoder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cut_mesh's Issues

Multiple cuts per Face

Currently, cutting engine will only cut a single edge into a face (eg...will not create new NGons). Need to improve cutting code to accommodate this scenario

View port occasional black screen when rotating.

Sometimes while rotating/zooming during first phase of polytrim i got this error message in console.

Traceback (most recent call last): File "/home/bartus/.config/blender/2.78/scripts/addons/cut_mesh/modaloperator.py", line 114, in draw_callback_postpixel self.draw_postpixel(context) File "/home/bartus/.config/blender/2.78/scripts/addons/cut_mesh/op_polytrim/polytrim_ui_draw.py", line 17, in draw_postpixel self.draw_2d(context) File "/home/bartus/.config/blender/2.78/scripts/addons/cut_mesh/op_polytrim/polytrim_ui_draw.py", line 24, in draw_2d self.knife.draw(context) File "/home/bartus/.config/blender/2.78/scripts/addons/cut_mesh/op_polytrim/polytrim_datastructure.py", line 1726, in draw common_drawing.draw_3d_points(context,self.pts, 4, color = (1,1,1,1)) File "/home/bartus/.config/blender/2.78/scripts/addons/cut_mesh/common_drawing.py", line 121, in draw_3d_points bgl.glVertex2f(*vector2d) TypeError: glVertex2f() argument after * must be an iterable, not NoneType

When the issue occurs viewport goes black, beside the blue knife line. Even the white way-point on the knife path gets hidden, and to bring everything back I have to zoom-out/rotate-back the view.

Rotation, location and scale break polytrim

Somewhere, there is a failure in cutting that does not take into account rotation and location.
However it is odd that some segments succeed while others fail. The cutting alogorithm will actually try multiple methods, so perhaps there is transformation error in one but not the other.

image

Before applying transform (left) After applying transform (right)

Combine pts, normals, and face_map into a single data structure

The three lists in PolyLineKnife: pts, normals, and face_map all have data about the input points in the same order and position. Therefore combining them into one data structure would be helpful in condensing and organizing the code.

The data structure I have in mind is a list of dictionaries, each dictionary having three keys: "point", "normal", and "face_index". So if you wanted to access the seventh point's normal you would do point_data[6]["normal"] (first point is at index 0)

It would look something like this:
[ { "point" : (point vector goes here), "normal" : (normal vector goes here), "face_index ": 452},
{ "point" : (point vector goes here), "normal" : (normal vector goes here), "face_index ": 3},
{ "point" : (point vector goes here), "normal" : (normal vector goes here), "face_index ": 98} ]

Polytrim is not working

Hi,

The tool looks great. I am currently doing exactly what's in your youtube video and the last step "press E" to do the final cut is not working. It does not create a separate mesh with the cut portion inside.

I added the blend file.

What do you think ? Thank you.
Alexandre

polytrim_test.stl.zip

The example in the youtube video

Hey Patmo,

The example you showed in the youtube video https://www.youtube.com/watch?v=nrGNMm3I2Eg is not working. Sorry to be so bland and I understand the frustration when users just complain about not working. :-)

I am using Blender 2.76b. Since there is no mention of the blender version to be used I assumed it to be 2.76 as bvhtree is now a package of blender 2.76b.

Providing certain details like Blender and other supporting module versions might really help. Also for the example of geodesic_walk I see that you are using a different method signature in the video from the original code. Any clues? Have you updated it?

Finally, is there a way I can be of some help?

Regards,

0K

replace versioned code with fn call!

replace stuff like below with a standard function call

if bversion() < '002.077.000':
    loc, no, face_ind = self.cut_ob.ray_cast(imx * ray_origin, imx * ray_target)
else:
    res, loc, no, face_ind = self.cut_ob.ray_cast(imx * ray_origin, imx * ray_target - imx * ray_origin)

Error while running "triangle fill Hole"

Hi,

I encountered this error while running the "triangle fill hole" function on a mesh which contains the following hole:

Resolution: 0.03
Smooth iteration: 20
Max iteration: 10000

capture d ecran 2016-08-15 a 17 30 27

capture d ecran 2016-08-15 a 17 28 39

What do you think ? Thank you.

Alexandre

Better Navigation

Currently only Scroll Wheel and Middle Mouse events are handled allowing the user to navigation while placing the cut line.

Problems with drawing bad segments on non-manifold cut

When previewing the cut for a non-manifold cut, this happened. The longer bad segment should not be there since the two points on either end of the bad segment are not connected to each other. I don't know why it shows up.

bad-segment-issue

Do not runs even in Linux and Windows

Dear Patmo141,

I'm trying do to Cut-Mesh works on Blender more than a year but I was not able. I test in Ubuntu and Windows, in a lot of versions, but simply doesnt run.

A think that I saw is that in your examples appear a green line when you click on C. In my case appear only some green points... without the cut line.

The message is always the same:

sketch confirmed
sketch too short, cant confirm

BEGIN CUT ON POLYLINE
first face group index
(5287, [0])
final group not added to dictionary yet
(5302, [13])
FACE GROUPS
{5216: [6], 5347: [8], 5287: [0], 5213: [7], 5297: [12], 5275: [11], 5182: [3], 5302: [13], 5273: [10], 5210: [5], 4859: [1], 4860: [2], 5181: [4], 5278: [9]}
m, IND
(0, 0)
m, IND
(1, 1)
prev face prevented walking in the Verts0 direction
m, IND
(2, 2)
m, IND
(3, 3)
m, IND
(4, 4)
m, IND
(5, 5)
prev face prevented walking in the Verts1 direction
m, IND
(6, 6)
m, IND
(7, 7)
m, IND
(8, 8)
m, IND
(9, 9)
m, IND
(10, 10)
m, IND
(11, 11)
m, IND
(12, 12)
m, IND
(13, 13)
prev face prevented walking in the Verts0 direction
This is the loop closing segment. 2
left click modal inner
face selected!!
seed set

Can you tell something about this? I guess I'm doing something wrong, but I'm following the video and text you share on Youtube and GutHub.

Thank you for the attention!

Bezier Interpolation

Use bezier interpolation to make a smooth cutting curve that can be evaluated at a user specified point density for ultra smooth cutting

Polytrim doens't works

Dear patmo141,

First of all, congratz for your tools. These are great!

Second, I'm with a problem about Polytrim. I follow the videos and the tutorial on GitHub, but the addon simply doesnt works.

I have this output on terminal:

sketch confirmed
sketch too short, cant confirm
left click modal inner
face selected!!
seed set

But nothing happens at mesh.

May I did somthing wrong?

Thank you and a big hug!

Cut line detail slows down cutting

image

the entire cut is calculated and committed to the bmesh in about .7sec in this example, and then bisecting the edges which correspond to the user points took an additional 4 seconds!

2d Section Preview

As a pre-requisite to feature snapping, a 2d cross section preview showing creases and features when translating cut points should be displayed

curved-cut along a tube with open-ends

Hi,

I'm super excited to see all this work you have been doing for cutting meshes! I'm working on a project using the blender api to automatically perform a series of splits to a mesh. For the most part I can use bmesh.ops.bisect_plane, but I need to do a curved cut as well.

Here is an image describing the operation:
thumb - 1 1

The current strategy uses the blender boolean modifier to make the cut (really two operations to isolate the front and back). A 'cutting-mesh' is created that bridges the two cut-polylines. Unfortunately the boolean sometimes fails, and I'm not sure why! :(

It seems a custom operator that works with blender bmeshes directly is needed. Do you have any pointers for creating such an operation?

'D' step causes seed to change

'D' actually changes the bmesh, which causes the seed face index to sometimes become different. Acutually referencing the BMFace instead of the index remedies this.

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.