Back face/material reverse
-
1)
**Sketchup.set_status_text()**
does not work well outside a custom
Tool
instance, because there must be another tool active (either someone else's customTool
, or one of the OEM tools.)
As soon as you move the mouse 1 pixel, or Sketchup decides (per some other criteria,) to redraw the UI, ... your message will be overwritten. (It can happen so fast, that the user never has time to read your message.)2) You are not scanning the view. (Yes you are, I see now the unless loop.)
..removed...
3) And perhaps (because
UI::InputPoint
uses inferencing,)you might wish to use
Sketchup::PickHelper
instead.
EDITED AGAIN: removed confusing subject matter.
-
Yup.. sorry I got confused. Removed bogus suggestions.
and you do have MR1 of ver 8 -
@alienizer said:
def onMouseMove(flags, x, y, view) > Sketchup.set_status_text(x.to_s+" ; "+y.to_s) > end
or ...
def onMouseMove(flags, x, y, view) Sketchup.set_status_text("x; #{x} , y; #{y}") end
BTW.. on Window... you can use a Coordinate Tool that displays in model units:
Sketchup.send_action( 21324 )
thetool_name
is"CoordinateTool"
but there doesn't seem to be a send_action string for it. -
@dan rathbun said:
or ...
def onMouseMove(flags, x, y, view) > Sketchup.set_status_text("x; #{x} , y; #{y}") > end
or...
def onMouseMove(flags, x, y, view) Sketchup.set_status_text("x=%d, y=%d"%[x,y]) end
@unknownuser said:
BTW.. on Window... you can use a Coordinate Tool that displays in model units:
Sketchup.send_action( 21324 )
thetool_name
is"CoordinateTool"
but there doesn't seem to be a send_action string for it.How did you come up with 21324?
-
@alienizer said:
@unknownuser said:
BTW.. on Window... you can use a Coordinate Tool that displays in model units:
Sketchup.send_action( 21324 )
thetool_name
is"CoordinateTool"
but there doesn't seem to be a send_action string for it.How did you come up with 21324?
I cheat!
Really I make a copy of all the SU binary executables, and put them in a
%(#804000)[Dev/_EXE]
folder, renaming them thus:
SketchUp.exe
toSketchUp.8.0.4811.exe
so they have ver and build in the name.
Then I open these copies in MS Visual Studio, to check resources (like String Tables, Menu Definitions, etc.)Many of the ids are already listed in the API doc:
Sketchup.send_action()
-
-
Problem solved.
After doing more testing, displaying the dot(face.normal, ray) returned <0 and when viewed cam rotated 45deg it was >0
So after applying a transformation_at the dot() returned the correct cosine. So now my code works perfectly
-
pls help me, back color face issue,
if we make a simple rectangle or a plane, i think the default is that the "face" facing you turns into a front color automatically, right!?
But now im having a problem with that, when i try to make a plane , the face that's facing me always turns into a back color,
I don't know if there's something i clicked or changed somewhere in settings but i dont know what that is
i got so irritated on right clicking the face and selecting "reverse face", it takes me a lot of time,
HOW DO I GET THAT DEFAULT SETTINGS BACK?
A big thanks f u could help me..
-
@jan_pamplona said:
if we make a simple rectangle or a plane, i think the default is that the "face" facing you turns into a front color automatically, right!?
NO... it does not have anything to do with "facing YOU".
When you draw a face, it's normal (The direction the front surface is facing,) is always toward the negative axis.
But the PushPull tool will reverse the face if it needs to do so.
-
Dan beat me (with some slightly different explanation but similar results):
The normal behaviour of SU is that if you draw a 2D shape on the red/green plane ("ground plane"), it will always show a back face top. The reason is that SU supposes that it will be the bottom of a 3D shape and in that case, the front face should be directed "outside", at the bottom of that 3D shape.
Even the PushPull tool is programmed to take this into consideration and when you start to PP such a face, it will reverse it (and when starting to PP, for a moment, you can even see the Z-fighting between the original face and a newly created, reversed face).
-
@dan rathbun said:
@jan_pamplona said:
if we make a simple rectangle or a plane, i think the default is that the "face" facing you turns into a front color automatically, right!?
NO... it does not have anything to do with "facing YOU".
When you draw a face, it's normal (The direction the front surface is facing,) is always toward the negative axis.
But the PushPull tool will reverse the face if it needs to do so.
Thank you very much sir,,
yeah, i remember now, im so dumb :,) it's just that i forgot those things because im drawing 2D plans and not noticing about the Push/Pull,thanks
Advertisement