Spyke

Posts

blender·BlenderbyStatick

Blender: Offset Sharp Edges

Disclaimer, I am a novice/hobbyist. Only use blender for 3D printing purposes.

TLDR; Add-ons Mesh Tools -> Offset Edges and Curve Tools -> Recursive Offset can achieve offsetting similar to a CAD program like Fusion 360. Watch this video (not mine) for a more comprehensive guide on Curve Tools https://youtu.be/HSUpmhGdgGQ?t=191

Full Explanation

I ran into an issue recently where I needed to offset an edge, similar to what a program like Fusion 360 can do with a sketch. After some searching, I found that there is an add-on built in that can be enabled called "Mesh Tools" that can do this pretty easily.

Mesh Tools approach (Didn't work for my specific issue)

On Blender 5.0...

  • Edit -> Preferences -> Get Extensions
  • Search "Mesh Tools"
  • Click "Install"

Then, in edit mode:

  • Select edge you want to offset
  • Right-click -> Mesh Tools -> Offset Edge

There are a few different options and this works fairly well. I used the Extrude option

My issue was I had a sharp edge and it was causing intersecting edges/faces

I made a post on Reddit asking what the best way to solve it was and never got a reply, and then I realized I never checked if there was a Blender community on lemmy.

Curve Tools approach

Anyway, I found a solution to my specific problem, "Curve Tools" in this video: https://youtu.be/HSUpmhGdgGQ?t=191

Caveats before starting:

  • The object/edge needs to be planar and on the XY plane.
  • This will ruin the topology and I'm not the guy to tell you how to fix it.

On Blender 5.0...

  • Edit -> Preferences -> Get Extensions
  • Search "Curve Tools"
  • Click "Install"

Then, in edit mode:

  • Select the edge you want to offset
  • E to Extrude
  • Esc to leave it in place
  • P to separate by selected
  • Go back to object mode, and select the object you just separated
  • Object -> Convert -> Curve
  • Go back into edit mode, select everything
  • Make the curve 2D and set Fill Mode to Both. (Under the Data tab in the Properties section)

  • Press N to show the context menu if it's not already displayed on the right side.
  • Edit -> Recursive Offset
  • Set the offset to the desired amount

After this you can convert that object back into a Mesh object and use it how you want.

I have no idea if this is the best solution, maybe there is a plugin that does this without converting to a Curve, but I wanted to share what I found here.

View original on programming.dev
11
selfhosted·SelfhostedbyStatick

[Question] Does this iptables rule cause unnecessary routing?

I'm routing game traffic on my VPS via wireguard to a home server that has games hosted via docker.

Setup is...

VPS/Wireguard -> Internet -> Wireguard/Dockerized Games Server

Now, my current config WORKS... however I'm curious if there is some unnecessary routing going on.

VPS iptable rules (omitted PostDown)

PostUp = iptables -t nat -A PREROUTING -i eth0 -p tcp --match multiport --dports 61000:61100 -j DNAT --to-destination 10.0.0.3
PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Game Server (omitted PostDown)

Here are the iptable rules on the game server and the --to-destination part is what I'm curious about...

PostUp = iptables -t nat -A PREROUTING -p tcp --dport 61000:61100 -d 10.0.0.3 -j DNAT --to-destination 192.168.1.14
PostUp = iptables -t nat -A POSTROUTING -j MASQUERADE

10.0.0.3 is the same machine as 192.168.1.14

The reason I'm setting the --to-destination ip to that is because the docker rules that are created in the Chain DOCKER section of the iptable rules are looking for the destination nam-games.localdomain which is my dns entry for the game server. I unfortunately don't think I can change these because I'm using a game server management panel called Pterodactyl that adds these. I also don't want to have to manually add rules to this every time I create a server.

Chain DOCKER (2 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere
DNAT       tcp  --  anywhere             nam-games.localdomain  tcp dpt:61000 to:172.18.0.2:61000
DNAT       udp  --  anywhere             nam-games.localdomain  udp dpt:61000 to:172.18.0.2:61000
DNAT       tcp  --  anywhere             nam-games.localdomain  tcp dpt:61001 to:172.18.0.3:61001
DNAT       udp  --  anywhere             nam-games.localdomain  udp dpt:61001 to:172.18.0.3:61001

Concerns

The setup I described above is the only config I have gotten to work, but I'm curious if it's hitting the server, then going the router, only to be routed back to the same machine again. If it is, is there a better way to set this up?

View original on programming.dev
19

You reached the end