algorithmic modeling for Rhino
Hello,
I am trying to move a brep face within a c# component and so far the code is working but I haven't be able to output the new brep with the translated face. I was wondering if anyone had any suggestions? I'm still trying some things but so far it looks like this:
(Brep x, int y, Plane z, double u, ref object A, ref object B)
{
var faces = x.Faces;
List<Brep> finalb = new List<Brep>();
x.Faces[y].Translate(z.ZAxis * u);
finalb.Add(x);
var surf = faces[y];
A = surf;
B = finalb;
}
Thanks,
John
Tags:
This is a big help, Thanks. I couldn't quite figure out how to move the faces and rebuild each new brep so I was using a scale 1d transform as a substitute but it wasn't working all that well.
Thanks again,
John
Well ...
... given the opportunity and in case that you want to find the Truth out There ... here's something dealing with brep "analysis" but most importantly with connectivity matters/trees: what the hell are these mysterious things ?? not to mention these ominous indices (you tell me).
Additionally a mini challenge for you: make some proper functions and reform the main "by the book"
May the Force (the dark option) be with you.
Oops > the known Forum issue again > no attachment is possible > I'll try later on
Hopping that the attachment issue is fixed:
So, as I understand it, there is no easy way to move a brep face and still keeping it consistent with the other brep faces, right?
Well ... not exactly ... but ... Rhino is a surface modeller thus stuff that in solid modeling apps are a piece of cake ... in Rhino ... hmm ... are an "adventure". That said I never work with Rhino for doing anything (at all).
On the other hand ... see attached (there's another "analytical" way to attempt to "move" a particular BrepFace, but the 1M question is: why bother?).
Of course you can modify the 1st C# (that works on a rather naive "box basis") and replace it with something that picks a given BrepFace > then defines the vectors > the rest are history. But all these are a "bit" boring if you ask me.
Get the move V2 thingy as well (delete ASAP the stupid part for novices) and dig into the mysterious connectivity trees and other ominous things (also a "bit" boring).
best, Lord of Darkness
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by