Create Circle with Inner RadiusFill space between inner meshHow to add edge loops to a circle (triangle fan)Creating a mesh cone with exponential radiusRemove inner wall on thin shell model with complex geometryCleaning inner self-intersectionsHow do I create a star extrusion to circle?Issue with 2D Shrinkwrap (Circle onto Cross)How to set icosphere's radiusCreate a railing around a circle?How to make Holes in Walls, connect Joints and make it symmetric / equal sides?
What would be the effects of (relatively) widespread precognition on the stock market?
What kind of curve (or model) should I fit to my percentage data?
Recursive search on Node Tree with Linq and Queue
Can the caster of Time Stop still use their bonus action or reaction?
Why do we need an estimator to be consistent?
Is it better to merge "often" or only after completion do a big merge of feature branches?
Can I make Ubuntu 18.04 switch between multiple windows of the program by just clicking the icon?
Is there any direct train from LHR Airport to Newcastle Gateshead?
Would using carbon dioxide as fuel work to reduce the greenhouse effect?
Can "Taking algebraic closure" be made into a functor?
Does switching on an old games console without a cartridge damage it?
On a Gameboy, what happens when attempting to read/write external RAM while RAM is disabled?
Is there a guide to help me transition from PSTricks to TikZ?
1025th term of the given sequence.
Why did modems have speakers?
How to handle not being able to attend as often as I'd like
Book in which the "mountain" in the distance was a hole in the flat world
Stellen - Putting, or putting away?
Counterexample finite intersection property
Adding gears to my grandson's 12" bike
What is the standard representation of a stop which could be either ejective or aspirated?
Killing a star safely
Can a warlock shoot multiple beams from the Eldritch Blast cantrip with only a single free hand?
Impact of throwing away fruit waste on a peak > 3200 m above a glacier
Create Circle with Inner Radius
Fill space between inner meshHow to add edge loops to a circle (triangle fan)Creating a mesh cone with exponential radiusRemove inner wall on thin shell model with complex geometryCleaning inner self-intersectionsHow do I create a star extrusion to circle?Issue with 2D Shrinkwrap (Circle onto Cross)How to set icosphere's radiusCreate a railing around a circle?How to make Holes in Walls, connect Joints and make it symmetric / equal sides?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
Is there a simple way to create a circle which contains a hole / inner radius. Ideally where I can dynamically set the inner radius when adding (in the same way I can set outer radius when adding a circle mesh).
I can manually create it by adding a circle with no fill, cloning, scaling down, then creating the faces (see attached), but that is tedious and error prone. I could also do it by creating a circle with triangle fan, clone the out edge down, and the delete middle, but again, that is a bit tedious and makes it difficult to get an exact inner radius.
Is there a way to do this natively in Blender, or via an addon?
mesh
$endgroup$
add a comment |
$begingroup$
Is there a simple way to create a circle which contains a hole / inner radius. Ideally where I can dynamically set the inner radius when adding (in the same way I can set outer radius when adding a circle mesh).
I can manually create it by adding a circle with no fill, cloning, scaling down, then creating the faces (see attached), but that is tedious and error prone. I could also do it by creating a circle with triangle fan, clone the out edge down, and the delete middle, but again, that is a bit tedious and makes it difficult to get an exact inner radius.
Is there a way to do this natively in Blender, or via an addon?
mesh
$endgroup$
1
$begingroup$
From a circle, in edit mode select the vertices, then E+S (to extrude and scale).
$endgroup$
– lemon
8 hours ago
$begingroup$
Good answers below, but for the one-off .. Triangle-filled created to radius, all selected, I Inset region with a numerical entry for thickness. X delete center faces?
$endgroup$
– Robin Betts
8 hours ago
add a comment |
$begingroup$
Is there a simple way to create a circle which contains a hole / inner radius. Ideally where I can dynamically set the inner radius when adding (in the same way I can set outer radius when adding a circle mesh).
I can manually create it by adding a circle with no fill, cloning, scaling down, then creating the faces (see attached), but that is tedious and error prone. I could also do it by creating a circle with triangle fan, clone the out edge down, and the delete middle, but again, that is a bit tedious and makes it difficult to get an exact inner radius.
Is there a way to do this natively in Blender, or via an addon?
mesh
$endgroup$
Is there a simple way to create a circle which contains a hole / inner radius. Ideally where I can dynamically set the inner radius when adding (in the same way I can set outer radius when adding a circle mesh).
I can manually create it by adding a circle with no fill, cloning, scaling down, then creating the faces (see attached), but that is tedious and error prone. I could also do it by creating a circle with triangle fan, clone the out edge down, and the delete middle, but again, that is a bit tedious and makes it difficult to get an exact inner radius.
Is there a way to do this natively in Blender, or via an addon?
mesh
mesh
asked 9 hours ago
mikechambersmikechambers
1061 bronze badge
1061 bronze badge
1
$begingroup$
From a circle, in edit mode select the vertices, then E+S (to extrude and scale).
$endgroup$
– lemon
8 hours ago
$begingroup$
Good answers below, but for the one-off .. Triangle-filled created to radius, all selected, I Inset region with a numerical entry for thickness. X delete center faces?
$endgroup$
– Robin Betts
8 hours ago
add a comment |
1
$begingroup$
From a circle, in edit mode select the vertices, then E+S (to extrude and scale).
$endgroup$
– lemon
8 hours ago
$begingroup$
Good answers below, but for the one-off .. Triangle-filled created to radius, all selected, I Inset region with a numerical entry for thickness. X delete center faces?
$endgroup$
– Robin Betts
8 hours ago
1
1
$begingroup$
From a circle, in edit mode select the vertices, then E+S (to extrude and scale).
$endgroup$
– lemon
8 hours ago
$begingroup$
From a circle, in edit mode select the vertices, then E+S (to extrude and scale).
$endgroup$
– lemon
8 hours ago
$begingroup$
Good answers below, but for the one-off .. Triangle-filled created to radius, all selected, I Inset region with a numerical entry for thickness. X delete center faces?
$endgroup$
– Robin Betts
8 hours ago
$begingroup$
Good answers below, but for the one-off .. Triangle-filled created to radius, all selected, I Inset region with a numerical entry for thickness. X delete center faces?
$endgroup$
– Robin Betts
8 hours ago
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Maybe its a good subject for the new 2.8 gyzmos!
Create an edge with two vertices corresponding to the inner and outer part of your disk.
Choose the spin tool.
Rotate as you want.
Tune the result with the operator panel.
$endgroup$
add a comment |
$begingroup$
One way to work around it natively is to create a mesh with only two vertex and an edge connecting them.
Place them strategically like along the X axis so you can control vertex position from the properties panel. Their X coordinate will directly control absolute radius for inner and outer circles quite easily.
Then just add a screw modifier to the mesh. You can control curve resolution and spin angle non-destructively from there.
You can copy this object around instead of adding new ones, for easy duplication
$endgroup$
add a comment |
$begingroup$
Add new object mesh addon template
Quick little addon slapped together using text editor > templates > python > Addon Add Object
template.
- Adds two circles, bridges the edge loops.
- If ngon fill is chosen, splits one fill edge, dissolves the rest.
Test addon.
bl_info =
"name": "New 2D Ring",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "View3D > Add > Mesh > New 2D Ring",
"description": "Adds a 2D ring (circle with hole)",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
import bpy
import bmesh
from mathutils import Matrix
from math import asin
from bpy_extras.object_utils import AddObjectHelper
from bpy.props import (
IntProperty,
BoolProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
)
class MESH_OT_primitive_ring_add(AddObjectHelper, bpy.types.Operator):
"""Add a 2D filled ring mesh"""
bl_idname = "mesh.primitive_ring_add"
bl_label = "Add 2D Filled Ring"
bl_options = 'REGISTER', 'UNDO'
inner_radius: FloatProperty(
name="Inner Radius",
description="Inner Radius",
min=0,
default=1.0,
)
outer_radius: FloatProperty(
name="Outer Radius",
description="Outer Radius",
min=0,
default=2.0,
)
segments: IntProperty(
name="Segments",
description="Number of Segments",
min=3,
default=8,
)
ngon_fill: BoolProperty(
name="Ngon Fill",
description="Fill with ngon",
)
def execute(self, context):
me = bpy.data.meshes.new("CircleHole")
bm = bmesh.new()
bmesh.ops.create_circle(bm, radius=self.inner_radius, segments=self.segments)
bmesh.ops.create_circle(bm, radius=self.outer_radius, segments=self.segments)
ret = bmesh.ops.bridge_loops(bm, edges=bm.edges)
print(ret)
if self.ngon_fill:
edges = ret['edges']
e = edges.pop()
bmesh.ops.split_edges(bm, edges=[e])
bmesh.ops.dissolve_edges(bm,
edges=edges)
bm.to_mesh(me)
me.update()
from bpy_extras import object_utils
object_utils.object_data_add(context, me, operator=self)
return 'FINISHED'
def menu_func(self, context):
self.layout.operator(MESH_OT_primitive_ring_add.bl_idname, icon='MESH_CUBE')
def register():
bpy.utils.register_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.append(menu_func)
def unregister():
bpy.utils.unregister_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.remove(menu_func)
if __name__ == "__main__":
register()
# test call
bpy.ops.mesh.primitive_ring_add()
Add Cone Primitive
Though I would add that the functionality is very similar to add cone primitive, with no fill and no height (can scale totally to zero in z and apply)
$endgroup$
$begingroup$
This is awesome. I was actually starting to build my own but you beat me to it. Do you plan to release it outside of stackoverflow? Seems like it would be super useful.
$endgroup$
– mikechambers
3 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "502"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f146083%2fcreate-circle-with-inner-radius%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Maybe its a good subject for the new 2.8 gyzmos!
Create an edge with two vertices corresponding to the inner and outer part of your disk.
Choose the spin tool.
Rotate as you want.
Tune the result with the operator panel.
$endgroup$
add a comment |
$begingroup$
Maybe its a good subject for the new 2.8 gyzmos!
Create an edge with two vertices corresponding to the inner and outer part of your disk.
Choose the spin tool.
Rotate as you want.
Tune the result with the operator panel.
$endgroup$
add a comment |
$begingroup$
Maybe its a good subject for the new 2.8 gyzmos!
Create an edge with two vertices corresponding to the inner and outer part of your disk.
Choose the spin tool.
Rotate as you want.
Tune the result with the operator panel.
$endgroup$
Maybe its a good subject for the new 2.8 gyzmos!
Create an edge with two vertices corresponding to the inner and outer part of your disk.
Choose the spin tool.
Rotate as you want.
Tune the result with the operator panel.
answered 8 hours ago
lemonlemon
18.2k1 gold badge19 silver badges55 bronze badges
18.2k1 gold badge19 silver badges55 bronze badges
add a comment |
add a comment |
$begingroup$
One way to work around it natively is to create a mesh with only two vertex and an edge connecting them.
Place them strategically like along the X axis so you can control vertex position from the properties panel. Their X coordinate will directly control absolute radius for inner and outer circles quite easily.
Then just add a screw modifier to the mesh. You can control curve resolution and spin angle non-destructively from there.
You can copy this object around instead of adding new ones, for easy duplication
$endgroup$
add a comment |
$begingroup$
One way to work around it natively is to create a mesh with only two vertex and an edge connecting them.
Place them strategically like along the X axis so you can control vertex position from the properties panel. Their X coordinate will directly control absolute radius for inner and outer circles quite easily.
Then just add a screw modifier to the mesh. You can control curve resolution and spin angle non-destructively from there.
You can copy this object around instead of adding new ones, for easy duplication
$endgroup$
add a comment |
$begingroup$
One way to work around it natively is to create a mesh with only two vertex and an edge connecting them.
Place them strategically like along the X axis so you can control vertex position from the properties panel. Their X coordinate will directly control absolute radius for inner and outer circles quite easily.
Then just add a screw modifier to the mesh. You can control curve resolution and spin angle non-destructively from there.
You can copy this object around instead of adding new ones, for easy duplication
$endgroup$
One way to work around it natively is to create a mesh with only two vertex and an edge connecting them.
Place them strategically like along the X axis so you can control vertex position from the properties panel. Their X coordinate will directly control absolute radius for inner and outer circles quite easily.
Then just add a screw modifier to the mesh. You can control curve resolution and spin angle non-destructively from there.
You can copy this object around instead of adding new ones, for easy duplication
answered 8 hours ago
Duarte Farrajota Ramos♦Duarte Farrajota Ramos
36.9k6 gold badges48 silver badges93 bronze badges
36.9k6 gold badges48 silver badges93 bronze badges
add a comment |
add a comment |
$begingroup$
Add new object mesh addon template
Quick little addon slapped together using text editor > templates > python > Addon Add Object
template.
- Adds two circles, bridges the edge loops.
- If ngon fill is chosen, splits one fill edge, dissolves the rest.
Test addon.
bl_info =
"name": "New 2D Ring",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "View3D > Add > Mesh > New 2D Ring",
"description": "Adds a 2D ring (circle with hole)",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
import bpy
import bmesh
from mathutils import Matrix
from math import asin
from bpy_extras.object_utils import AddObjectHelper
from bpy.props import (
IntProperty,
BoolProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
)
class MESH_OT_primitive_ring_add(AddObjectHelper, bpy.types.Operator):
"""Add a 2D filled ring mesh"""
bl_idname = "mesh.primitive_ring_add"
bl_label = "Add 2D Filled Ring"
bl_options = 'REGISTER', 'UNDO'
inner_radius: FloatProperty(
name="Inner Radius",
description="Inner Radius",
min=0,
default=1.0,
)
outer_radius: FloatProperty(
name="Outer Radius",
description="Outer Radius",
min=0,
default=2.0,
)
segments: IntProperty(
name="Segments",
description="Number of Segments",
min=3,
default=8,
)
ngon_fill: BoolProperty(
name="Ngon Fill",
description="Fill with ngon",
)
def execute(self, context):
me = bpy.data.meshes.new("CircleHole")
bm = bmesh.new()
bmesh.ops.create_circle(bm, radius=self.inner_radius, segments=self.segments)
bmesh.ops.create_circle(bm, radius=self.outer_radius, segments=self.segments)
ret = bmesh.ops.bridge_loops(bm, edges=bm.edges)
print(ret)
if self.ngon_fill:
edges = ret['edges']
e = edges.pop()
bmesh.ops.split_edges(bm, edges=[e])
bmesh.ops.dissolve_edges(bm,
edges=edges)
bm.to_mesh(me)
me.update()
from bpy_extras import object_utils
object_utils.object_data_add(context, me, operator=self)
return 'FINISHED'
def menu_func(self, context):
self.layout.operator(MESH_OT_primitive_ring_add.bl_idname, icon='MESH_CUBE')
def register():
bpy.utils.register_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.append(menu_func)
def unregister():
bpy.utils.unregister_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.remove(menu_func)
if __name__ == "__main__":
register()
# test call
bpy.ops.mesh.primitive_ring_add()
Add Cone Primitive
Though I would add that the functionality is very similar to add cone primitive, with no fill and no height (can scale totally to zero in z and apply)
$endgroup$
$begingroup$
This is awesome. I was actually starting to build my own but you beat me to it. Do you plan to release it outside of stackoverflow? Seems like it would be super useful.
$endgroup$
– mikechambers
3 hours ago
add a comment |
$begingroup$
Add new object mesh addon template
Quick little addon slapped together using text editor > templates > python > Addon Add Object
template.
- Adds two circles, bridges the edge loops.
- If ngon fill is chosen, splits one fill edge, dissolves the rest.
Test addon.
bl_info =
"name": "New 2D Ring",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "View3D > Add > Mesh > New 2D Ring",
"description": "Adds a 2D ring (circle with hole)",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
import bpy
import bmesh
from mathutils import Matrix
from math import asin
from bpy_extras.object_utils import AddObjectHelper
from bpy.props import (
IntProperty,
BoolProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
)
class MESH_OT_primitive_ring_add(AddObjectHelper, bpy.types.Operator):
"""Add a 2D filled ring mesh"""
bl_idname = "mesh.primitive_ring_add"
bl_label = "Add 2D Filled Ring"
bl_options = 'REGISTER', 'UNDO'
inner_radius: FloatProperty(
name="Inner Radius",
description="Inner Radius",
min=0,
default=1.0,
)
outer_radius: FloatProperty(
name="Outer Radius",
description="Outer Radius",
min=0,
default=2.0,
)
segments: IntProperty(
name="Segments",
description="Number of Segments",
min=3,
default=8,
)
ngon_fill: BoolProperty(
name="Ngon Fill",
description="Fill with ngon",
)
def execute(self, context):
me = bpy.data.meshes.new("CircleHole")
bm = bmesh.new()
bmesh.ops.create_circle(bm, radius=self.inner_radius, segments=self.segments)
bmesh.ops.create_circle(bm, radius=self.outer_radius, segments=self.segments)
ret = bmesh.ops.bridge_loops(bm, edges=bm.edges)
print(ret)
if self.ngon_fill:
edges = ret['edges']
e = edges.pop()
bmesh.ops.split_edges(bm, edges=[e])
bmesh.ops.dissolve_edges(bm,
edges=edges)
bm.to_mesh(me)
me.update()
from bpy_extras import object_utils
object_utils.object_data_add(context, me, operator=self)
return 'FINISHED'
def menu_func(self, context):
self.layout.operator(MESH_OT_primitive_ring_add.bl_idname, icon='MESH_CUBE')
def register():
bpy.utils.register_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.append(menu_func)
def unregister():
bpy.utils.unregister_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.remove(menu_func)
if __name__ == "__main__":
register()
# test call
bpy.ops.mesh.primitive_ring_add()
Add Cone Primitive
Though I would add that the functionality is very similar to add cone primitive, with no fill and no height (can scale totally to zero in z and apply)
$endgroup$
$begingroup$
This is awesome. I was actually starting to build my own but you beat me to it. Do you plan to release it outside of stackoverflow? Seems like it would be super useful.
$endgroup$
– mikechambers
3 hours ago
add a comment |
$begingroup$
Add new object mesh addon template
Quick little addon slapped together using text editor > templates > python > Addon Add Object
template.
- Adds two circles, bridges the edge loops.
- If ngon fill is chosen, splits one fill edge, dissolves the rest.
Test addon.
bl_info =
"name": "New 2D Ring",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "View3D > Add > Mesh > New 2D Ring",
"description": "Adds a 2D ring (circle with hole)",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
import bpy
import bmesh
from mathutils import Matrix
from math import asin
from bpy_extras.object_utils import AddObjectHelper
from bpy.props import (
IntProperty,
BoolProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
)
class MESH_OT_primitive_ring_add(AddObjectHelper, bpy.types.Operator):
"""Add a 2D filled ring mesh"""
bl_idname = "mesh.primitive_ring_add"
bl_label = "Add 2D Filled Ring"
bl_options = 'REGISTER', 'UNDO'
inner_radius: FloatProperty(
name="Inner Radius",
description="Inner Radius",
min=0,
default=1.0,
)
outer_radius: FloatProperty(
name="Outer Radius",
description="Outer Radius",
min=0,
default=2.0,
)
segments: IntProperty(
name="Segments",
description="Number of Segments",
min=3,
default=8,
)
ngon_fill: BoolProperty(
name="Ngon Fill",
description="Fill with ngon",
)
def execute(self, context):
me = bpy.data.meshes.new("CircleHole")
bm = bmesh.new()
bmesh.ops.create_circle(bm, radius=self.inner_radius, segments=self.segments)
bmesh.ops.create_circle(bm, radius=self.outer_radius, segments=self.segments)
ret = bmesh.ops.bridge_loops(bm, edges=bm.edges)
print(ret)
if self.ngon_fill:
edges = ret['edges']
e = edges.pop()
bmesh.ops.split_edges(bm, edges=[e])
bmesh.ops.dissolve_edges(bm,
edges=edges)
bm.to_mesh(me)
me.update()
from bpy_extras import object_utils
object_utils.object_data_add(context, me, operator=self)
return 'FINISHED'
def menu_func(self, context):
self.layout.operator(MESH_OT_primitive_ring_add.bl_idname, icon='MESH_CUBE')
def register():
bpy.utils.register_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.append(menu_func)
def unregister():
bpy.utils.unregister_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.remove(menu_func)
if __name__ == "__main__":
register()
# test call
bpy.ops.mesh.primitive_ring_add()
Add Cone Primitive
Though I would add that the functionality is very similar to add cone primitive, with no fill and no height (can scale totally to zero in z and apply)
$endgroup$
Add new object mesh addon template
Quick little addon slapped together using text editor > templates > python > Addon Add Object
template.
- Adds two circles, bridges the edge loops.
- If ngon fill is chosen, splits one fill edge, dissolves the rest.
Test addon.
bl_info =
"name": "New 2D Ring",
"author": "batFINGER",
"version": (1, 0),
"blender": (2, 80, 0),
"location": "View3D > Add > Mesh > New 2D Ring",
"description": "Adds a 2D ring (circle with hole)",
"warning": "",
"wiki_url": "",
"category": "Add Mesh",
import bpy
import bmesh
from mathutils import Matrix
from math import asin
from bpy_extras.object_utils import AddObjectHelper
from bpy.props import (
IntProperty,
BoolProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
)
class MESH_OT_primitive_ring_add(AddObjectHelper, bpy.types.Operator):
"""Add a 2D filled ring mesh"""
bl_idname = "mesh.primitive_ring_add"
bl_label = "Add 2D Filled Ring"
bl_options = 'REGISTER', 'UNDO'
inner_radius: FloatProperty(
name="Inner Radius",
description="Inner Radius",
min=0,
default=1.0,
)
outer_radius: FloatProperty(
name="Outer Radius",
description="Outer Radius",
min=0,
default=2.0,
)
segments: IntProperty(
name="Segments",
description="Number of Segments",
min=3,
default=8,
)
ngon_fill: BoolProperty(
name="Ngon Fill",
description="Fill with ngon",
)
def execute(self, context):
me = bpy.data.meshes.new("CircleHole")
bm = bmesh.new()
bmesh.ops.create_circle(bm, radius=self.inner_radius, segments=self.segments)
bmesh.ops.create_circle(bm, radius=self.outer_radius, segments=self.segments)
ret = bmesh.ops.bridge_loops(bm, edges=bm.edges)
print(ret)
if self.ngon_fill:
edges = ret['edges']
e = edges.pop()
bmesh.ops.split_edges(bm, edges=[e])
bmesh.ops.dissolve_edges(bm,
edges=edges)
bm.to_mesh(me)
me.update()
from bpy_extras import object_utils
object_utils.object_data_add(context, me, operator=self)
return 'FINISHED'
def menu_func(self, context):
self.layout.operator(MESH_OT_primitive_ring_add.bl_idname, icon='MESH_CUBE')
def register():
bpy.utils.register_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.append(menu_func)
def unregister():
bpy.utils.unregister_class(MESH_OT_primitive_ring_add)
bpy.types.VIEW3D_MT_mesh_add.remove(menu_func)
if __name__ == "__main__":
register()
# test call
bpy.ops.mesh.primitive_ring_add()
Add Cone Primitive
Though I would add that the functionality is very similar to add cone primitive, with no fill and no height (can scale totally to zero in z and apply)
edited 4 hours ago
answered 5 hours ago
batFINGERbatFINGER
29.2k5 gold badges31 silver badges80 bronze badges
29.2k5 gold badges31 silver badges80 bronze badges
$begingroup$
This is awesome. I was actually starting to build my own but you beat me to it. Do you plan to release it outside of stackoverflow? Seems like it would be super useful.
$endgroup$
– mikechambers
3 hours ago
add a comment |
$begingroup$
This is awesome. I was actually starting to build my own but you beat me to it. Do you plan to release it outside of stackoverflow? Seems like it would be super useful.
$endgroup$
– mikechambers
3 hours ago
$begingroup$
This is awesome. I was actually starting to build my own but you beat me to it. Do you plan to release it outside of stackoverflow? Seems like it would be super useful.
$endgroup$
– mikechambers
3 hours ago
$begingroup$
This is awesome. I was actually starting to build my own but you beat me to it. Do you plan to release it outside of stackoverflow? Seems like it would be super useful.
$endgroup$
– mikechambers
3 hours ago
add a comment |
Thanks for contributing an answer to Blender Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fblender.stackexchange.com%2fquestions%2f146083%2fcreate-circle-with-inner-radius%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
From a circle, in edit mode select the vertices, then E+S (to extrude and scale).
$endgroup$
– lemon
8 hours ago
$begingroup$
Good answers below, but for the one-off .. Triangle-filled created to radius, all selected, I Inset region with a numerical entry for thickness. X delete center faces?
$endgroup$
– Robin Betts
8 hours ago