[Request] Force new face Front or Back ?
-
Is there or could there be a script to force all new faces to be either Front or Back?
I am tracing some old CAD imports and it would be convenient if the faces generated would always face one way. Hopefully, it would work with Makefaces.rb too.
Thinking the script could ask user which face-direction they'd prefer for their default.
-
here's another thing you could do; when your done tracing all your faces, right click a face, and click "orient faces". I don't know if anyone here could make a script like you're talking about, and I don't know if it could be possible.
-
In your case the manual method is probably the quickest and best.
There is my scripted additional method for 'face' - called 'orient_faces'. orient_faces.rb This tries to orient any faces connected to the given face... It can give unpredictable results if an edge is shared by several faces in 3D - just as the manual version - although strangely the weirdness is not always the same in the two versions - but then there's no 'right' orientation answer when several faces share an edge...
If you put 'orient_faces.rb' into your plugins folder, then instead of manually orienting faces you can incorporate its methods into a wider ranging script, or just select a face and type something into the Ruby Console like
face=Sketchup.active_model.selection[0];face.orient_faces
All connected faces should flip to match the selected one... You can copy and paste the text command into the console to do multiple sets of faces if required...
-
TIg:
Sorry for not responding sooner. Been swamped.
Thanks for looking into this for me. Perhaps in the SU8 they'll have better code related to face normal control.
John
-
John, what is still missing? Seems like what you wanted is do-able through either the ruby, or the built in tools. Maybe I missed what is going wrong?
Chris
-
Hi Chris:
Just the predicability issue mentioned above. I know there have been other postings which mentioned faces being flipped while executing a script and I believe it can happen at times when pasting in place too.
I'm guessing there is a reason for this behavior in the core program (to facilitate the creation of faces during a push-pull?). But in situations like tracing cadd files it seems there should be a way to force face orientation to avoid unecessary reversing and/or orienting faces.
-
I see, do you always trace files that are flat, plan view? Or are you tracing 3d files or anything? TIG's method should work to correct the problem after its happened, but I guess you just want it to not happen at all.
-
Yup, I admit I am lazy, just don't want it to happen at all.
I do a lot plan and section tracing. They represent various interconnected concrete channels, tanks, flumes, wells, and the like. Not like a building where you have fixed floor heights, but a lot of intermediate elevations, with "zig-zagging", sloping channels. Tracing is far better faster than redrawing from a dimensioned plan or section (if you don't have to do a lot of cleanup) and is less prone to operator (me) error. :0
Advertisement