-3
$\begingroup$

ave gratis plenum

i need to scale top faces ( or edges ) of railroad track cutter

start mesh is .obj file exported from steam's rolling line game - railroad track mesh

track / terrain cutter is using geometry nodes

  • it cuts railroad track into terrain ( mesh )
  • using existing / imported track mesh - bottom ballast part ( mesh - track object in attached .blend file )
  • in 3d viewport edit mode track bottom ( ballast part ) is manually selected , duplicated [ shift-d ] & separated [ p ] into track cutter base ( mesh )
  • geo nodes ( gn cutter ) are attached to this track cutter base
  • gn cutter does :
  • remove top faces from track cutter base mesh - bottom faces remain
  • bottom faces represent track line , which i want to use for terrain cutting
  • from bottom faces , outer edges are selected & extruded upwards ( cutter height gn settings ) , making side faces
  • next side faces are extruded ( cutter width gn settings ) - cutter is widened , to get track width
  • next i select top faces / edges -> i want those faces / edges to scale outward along track line

i want to get V shape cut into terrain mesh , along track line = sloped sides , flat bottom , like shown on image below

tried many answers from many a sites , plus few days of trial & error :

  • used top socket from extrude mesh connected to scale elements node selection socket
  • tried various position & edge vertices & math & vector math node combinations , connected to scale elements node selection socket
  • also tried connecting various node combinations into scale elements node , center socket - i think this is where i should try to tell geo nodes to scale from individual faces / edges along track line

managed to scale it half-correct - it scales the top faces / edges on either side of track line , from the top faces center , but i need to scale on both sides along track line - outwards

q : with top faces of cutter gn selected , how do i manage scale elements node center socket to scale selected top faces ( or edges ) , along track line ( as center line ) , on each side outwards ?

<- track ( middle ) line ->

like zis : real-world example of v-sloped track sides

EDIT : track needs to be widened - if long train wagons or locomotive is running on curve , it will ' cut the corner ' ( image below )

long wagon cutting the corner

additional info is in attached .blend file

.blend file : gn.terrain.b41-alpha.scale.top.question.blend

file is made in b4.1-alpha , can be opened no problem in b4.0.2

thank you for your help

$\endgroup$
8
  • 1
    $\begingroup$ Hi, this is not a commissions forum, please explain your issue within the question body - you almost managed, but it's not clear what geometry you start with. If it's a curve, all you need is to bevel it with a trapezoid profile. $\endgroup$ Jan 30 at 0:13
  • $\begingroup$ Hi and welcome. Sorry, but it's hard to discern what you're asking here. Could you clarify what you're trying to achieve, what you've tried and where exactly you're having issues? $\endgroup$
    – Onyx
    Jan 30 at 12:11
  • $\begingroup$ i added additional explanation as requested in above comments ; thank you for clarifying $\endgroup$
    – aum hren
    Jan 31 at 10:49
  • $\begingroup$ Can you add a question sentence with a question mark to the post please? $\endgroup$
    – Leander
    Jan 31 at 10:50
  • $\begingroup$ i clarified the issue - added question sentence , as requested ; thank you for clarifying $\endgroup$
    – aum hren
    Jan 31 at 11:43

2 Answers 2

3
$\begingroup$

This is your starting geometry:

Manually ⎇ Alt$\color{green}{█}\color{#888}{0█}$ click the edges on blue/red boundary to select the holes, and press F to fill them (on both sides!) so that you have a manifold hull:

Now you can take the advantage of the slopes on sides to have the growing profile, by simply extruding using the normals and selecting the faces pointing up:

You could alter this side slope by moving the (top) vertices up:

After adjusting the εpsilon for the 3rd time and using "Math: Divide" to easily adjust very small $z$ offsets, you can fine-tune the angle like this:

The end result with Merge by Distance added to deal with internal faces of the cutter, and of course the boolean at the end:

Of course if you wanted to specify an exact angle of the slope, you could - you would just pass that to the "Extrude" direction, calculate the angle of the normal from the vertical, and if it's not 0 (not the top face), then multiply the xy component of the normal by the ratio of wanted angle divided by current angle…

$\endgroup$
2
  • $\begingroup$ you are a gem . love the answer . however , i would still need this step : next side faces are extruded ( cutter width gn settings ) - cutter is widened , to get track width ; so i extruded side faces again , and got good results ; but the extruded sides will ' stick ' below the track level , which might be desirable ; i additionally tried to select outer edges of gn cutter (v2) with intention to raise those edge up on z axis ,which would flatten the bottom of cut-out track $\endgroup$
    – aum hren
    Feb 1 at 17:21
  • $\begingroup$ i added an image of long wagon ' cutting the corner ' - this is why i need to widen the base of track $\endgroup$
    – aum hren
    Feb 1 at 17:32
1
$\begingroup$

big thanks to Markus von Broady

using his marvelous answer , i add 2 more nodes :

  • extrude mesh to widen the track
  • set position to move sides up / down

final solution : markus solution with 2 additional nodes

it works like a charm , with additional cutting possibilities ...

widen track & adjust sides

have fun

EDIT : have no idea why .gif files are messy

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .