Lock inference to X, Y or Z_
-
facepalm!
Yea - use the
.pick
method! I just got so fixed on looking for a .new method that took a Point3d argument. -
Wait... when you use screen coords like that - don't you risk picking a point that isn't exactly on the axis you want to pick from?
If the is geometry near by from your first pick point that you offset - won't it pick from the surface of that geometry instead? -
It looks like it. although I can't see any way to get an input point from 3d coordinates, so I don't really think it can be avoided.
-
Back to square one then...
..or....
line = [ip1.position, ip1.position.offset(Z_AXIS)] ip2.project_to_line(line)
-
could you not draw a hidden reference axis for yourself when your tool is invocked then use this as a reference to X,Y,Z?
-
well, another thing you could do is to add an edge going along the axis you want, lock the inference from that IP, and delete the edge again.
You might have the same problems with geometry getting your way, though.
-
@cjthompson said:
well, another thing you could do is to add an edge going along the axis you want, lock the inference from that IP, and delete the edge again.
how would one get an IP from that?
My idea in the previous post isn't working as I want it. I get extra inferring...
-
Just in case someone comes across this topic again: it is possible to create input points with arbitrary 3d points: http://forums.sketchucation.com/viewtopic.php?f=180&t=14608
ip=Sketchup::InputPoint.new( [1,2,3] )
or
ip=Sketchup::InputPoint.new( Geom::Point3d.new(1,2,3) )
-
Is that the same idea as it is shown in the View.inputpoint class?
http://code.google.com/apis/sketchup/docs/ourdoc/view.html#inputpoint
It states you can supply it with a point and/or another inputpoint.
-
@chris fullmer said:
a point and/or another inputpoint.
I only see it referring to InputPoints...
And I think the ip it takes as argument are meant for inferring...
...the docs are a wee bit unclear here...
Advertisement