Questions tagged [bmesh]

Blender's new mesh system that was added in 2.63, with full support for N-sided polygons instead of only triangles and quads.

Filter by
Sorted by
Tagged with
0
votes
1answer
235 views

Union partially overlapping cubes without boolean modifier

My goal is to generate a model composed of many partially overlapping cubes. But I need to get rid of the parts where they overlap, so I have a single mesh without any intersections. One of the ...
3
votes
1answer
287 views

Using custom vertex data in render

Can float vertex layer data added with bmesh, be used in rendering? Let us say we added some data to all verteces: bm.verts.layers.float.new('G') Can this "G" ...
0
votes
1answer
62 views

fac value in bmesh.utils.edge_split

Not massively familiar with blender and looking at: https://docs.blender.org/api/blender_python_api_current/bmesh.utils.html?highlight=edge_split#bmesh.utils.edge_split It's not clear what the value ...
1
vote
1answer
149 views

Add Bmesh to another Bmesh

I'm using a scrip Subprogram of Animation nodes to merge that will merge a list of objects using Bmesh (Because it holds the UVs) But now i'm stuck at merging two Bmesh as the picture below explains....
3
votes
1answer
339 views

How to subdivide concave face into quads

I'm aware of bpy.ops.mesh.vert_connect_concave() and the result is similar to what I'm looking to implement. However, with ...
2
votes
1answer
71 views

Bmesh: Immediately encounter strange error after adding new layer and running bmesh op

The script is simple: ...
1
vote
1answer
260 views

Bmesh: running bmesh ops after deleting geometry often results in an error

I've uploaded a blend file that demonstrates the problem, please have a look and test it for yourself: https://drive.google.com/open?id=0B9DFPZBPKp6AdERZTmJWeGE0RFE If you delete geometry from a ...
3
votes
2answers
174 views

Problem with BMesh Vertex Location Precision

I'm writing an add-on that imports vertex locations and builds a BMesh by placing vertices at those locations. I'm running into precision issues, since the imported data can be large floating point ...
2
votes
2answers
465 views

Python BMESH: For loop breaking trying to split mesh via UV Islands

Perhaps I am not using bmesh properly. I'm trying to create a script that splits a mesh by it's UV islands. The script attempts to iterate through each face of mesh and... select a face. select ...
0
votes
1answer
47 views

Trying to swap vertex with uv by script

Basically, I want to create a tool that can swap between one vertex coordinate with specialized UV data named 'SwappedUV' for whole vertex in active object (if not exist, it'll create new UV layer ...
1
vote
1answer
129 views

Issues with manual culling, using BMesh

I have a camera and a monkey (suzanne) in the scene. I'm attempting to manually cull the back faces from the monkey. The problem is that certain faces get culled, despite its normal seen from the ...
0
votes
1answer
643 views

vertices jump about when dragging

I am retopologising a mesh using shrink wrap modifier, but some of the vertices jump about when being dragged for alignment: For example if I press G and drag the vertex below to the right a bit it, ...
0
votes
2answers
682 views

Create a boundary mesh around complex mesh

I have a mesh which has many faces and I want to create a simple mesh around it's shape to kinda form a bounding box around it's parts so that I have less faces and have simple bounds around the ...
2
votes
2answers
478 views

selection history from “shortest path”?

is it possible to retrieve the selection history(the specific sequence) of vertices selected using "shortest path"? Using bmesh, I can get the selection history by doing: ...
0
votes
2answers
756 views

Rotate bmesh around Vector with Python

I try to rotate a bmesh around a vector as axis. ...
6
votes
2answers
2k views

how to create and extrude a bmesh face

I would like to programmatically create and extrude polygons. I've found several examples of code (e.g. here), but none of them are currently working for me. As a simple example, I am trying to get ...
3
votes
1answer
158 views

OSM skillion roof with bmesh… need an alternative to ray_cast

OSM buildings with the skillion roof shape, are often tagged with only direction and levels. ...
0
votes
0answers
109 views

Is there a library/addon for scripters that supports geometry related selection operations?

I find myself writing various operations that one would expect to be available in blender (somewhere). These operations largely stem around things like selecting subsets of a geometry, finding various ...
1
vote
1answer
455 views

BMesh and Bevel

I'm trying to perform a bevel operation using the bmesh API. My script either crashes blender, with the error message EXCEPTION_ACCESS_VIOLATION, or it doesn't do ...
2
votes
0answers
408 views

Unwrap mesh with spherical projection in python

I would like to have the same result with python as in the UI when I do unwrap > sphere projection on a mesh. I know it's possible to use the operator ...
25
votes
1answer
1k views

Closing “Fibonacci's Hole”

Creating a sphere using the points defined by Spherical Fibonacci Mapping. For the most part it is easy to "skin" by using two consecutive fibonacci numbers as steps to loop on the index. And get ...
6
votes
1answer
1k views

Applying per-vertex colors to new Bmesh

I'm having trouble applying vertex colors through Python to a mesh. The mesh is imported from a file which has vertex info, face info (vertex indices), and a list of colors that corresponds to each ...
1
vote
0answers
60 views

Merging 2 BMVert's with Python

Is it possible with bmesh to specify merge together 2 BMVerts easily? Or must I do it the manual way and delete faces, remove vertices, and recreate faces at the ...
1
vote
1answer
502 views

Python: Edit panel to edit custom bmesh face layers?

With the bmesh module, I added a custom data layer to a mesh, holding information for each face. ...
2
votes
1answer
3k views

When to use bmesh.update_edit_mesh and when Mesh.update?

When is it appropriate to use one over the other? In example, I have the following: ...
0
votes
2answers
2k views

BMesh: How to map vertex-based UV-coordinates to loops?

I have a game model format which stores the UV coordinates for each vertex. To implement seams in the UV mapping, a vertex just appears twice, each having a different UV coordinate (it solves the ...
0
votes
0answers
424 views

get the rotation of a face

I'm trying to get the rotation of bmeshs face. Unfortunately following function doesn't work: ...
2
votes
0answers
190 views

Shrinkwrap with ray_cast isn't accurate

I'm trying to create my own similar Shrinkwrap-Modifier with raycast. Unfortunately the result isn't accurate and I don't know why. It work's with Spheres, all other primitives are inaccurate. ...
2
votes
1answer
1k views

combine objects by name in scene into one object

In my scene, I have multiple objects with the following names: Verts Verts.001 Verts.002 Verts.003 Verts.004 I want to combine all of these objects into one mesh ...
3
votes
1answer
664 views

creating n random points on face of mesh

I'm trying to select 400 or so random points on the face of a mesh using a script (just on the face, not inside the volume) but I'm not sure how to do that. I've tried looking into the following ...
2
votes
0answers
614 views

BMesh Grid Fill doesn't work on closed edge loop

I've been trying to automate the task of deleting the ngon cap on the end of a cylinder and replacing it with quads using the Grid Fill tool. Something similar to this: I'm using this script: <...
10
votes
4answers
1k views

Scripting: low level join meshes / elements (hopefully with bmesh)?

Currently I only know of one way to join meshes - using the join operator: bpy.ops.object.join() This has an annoying overhead of additional operations required ...
2
votes
1answer
971 views

Finding top surface area of a mesh by python

I need to find the top surface area (in one plane) and total surface area (by summing all the faces) of a complicated mesh. For that I need to know how to fit a plane to the top of a mesh to find the ...
1
vote
1answer
1k views

Select vertices by their indices (by vertex id) [duplicate]

I want to select vertices by their indices (by vertex id) Like a python script,so that i can write the vertex id into it, and run the script,and it would automatically select those vertices there is ...
3
votes
2answers
821 views

bmesh - extrude face and end up with closed mesh

When you extrude the only face of a plane via the GUI you get a (closed) cube. If you do the same thing using bmesh you get a cube that is open on the bottom side. ...
2
votes
2answers
1k views

Bmesh: how can I import custom vertex normals

I have a question concerning BMesh and custom vertex normals editing. At the moment I am writing a little blender importer for a custom data format and I am stuck with importing/manipulating custom ...
2
votes
2answers
322 views

How to get the angle between three faces on a non regular non flat surface

I've got a non flat and non regular surface with three selected faces. Is there a way to get the smallest angle between these with python?
1
vote
1answer
305 views

Detect holes on a not flat surface at a set circumference

I've got a not flat surface with not regular faces. Is there a way to recognize if there is a hole at a set circumference?
1
vote
1answer
325 views

How to create a flat mesh and give it a thickness by bmesh?

I'd like to create a flat mesh and give it a thickness by bmesh. Putting together some answers seen on this forum, I thought that a script like the one below should have done the work, but it doesn't. ...
3
votes
1answer
4k views

How do I prevent particle objects from intersecting each other and going though the floor?

The first step is to "throw" a group of steel tubes at a floor. They should bounce, and roll a bit. When they come to rest the next animated step begins: They will use shape keys to morph into an ...
2
votes
0answers
252 views

Mark Seams on Edges of Camera View

I am trying to write a script to mark a seam on an object around the vertices of the object that are in the field of view of the camera. Unfortunately, some of my ...
0
votes
0answers
58 views

Deleting a face, if there are two ore more holes in a circumference with a defined radius at a defined angle

This is a very specific question: I created a plane. On it there are some faces deleted. I want blender to check every other, not deleted face, if there is in a specific circumference (red) at a ...
0
votes
1answer
40 views

Recognize bridging faces of splits at a plane

I've got a plane with multiple splits. Unfortunately there are undeleted vertices bridging these splits. Is there a way to automatically recognizing these bridges and selecting the faces of them?
0
votes
3answers
3k views

UV unwrap each face of an object via python script

I have an object with several faces, and I want to loop over the faces, adjust the view for each differently and then UV unwrap the face from the chosen view. I managed to do it using Blender GUI but ...
5
votes
1answer
390 views

Boolean Operations

I'm trying to manipulate a number of BMesh items in code with the hope of stitching them together, via boolean operators, to produce more complex geometries/meshes. Do BMesh instances support boolean ...
0
votes
0answers
74 views

Weird bmesh performance when creating new vertices

I have 2 different meshes with roughtly the same amount of faces/verts. In the first case I only have 1 object in blend file, in second case around 80. This is the only difference I can think of, in ...
3
votes
1answer
830 views

How to discretize a 3D mesh to generate a 3D binary matrix

I apply the algorithm proposed by TLousky discretize a mesh to discretize the entire mesh. I get this result ...
3
votes
2answers
796 views

Removing doubles on imported 3DXML ngon mesh

Pertaining to building objects created from the script shown in the answer here https://blender.stackexchange.com/a/42590/15543 The import data has seperate vert data for each surface, so each face ...
4
votes
2answers
3k views

Is there a way to select edges marked as sharp via python?

There is an operator to select sharp edges, and an operator to select edges marked as sharp if you have already an edge marked as sharp selected, but is there a way to select edges marked as sharp ...
3
votes
1answer
321 views

making angle label - spin vertices with python script

I would like to make an simple angle label such as this: using the python script to construct it. The problem is trying to spin a MeshVertex, as the code looks for a Mesh object instead when using ...