Glueto none?
-
http://code.google.com/apis/sketchup/docs/ourdoc/behavior.html#snapto
@unknownuser said:
Returns a constant indicating the snapping behavior of the component described by behavior. Snapping behavior is how the x-y plane of a component instance will be snapped against a face. Possible values are:
SnapTo_Arbitrary
=> Snap to any aribrary face,SnapTo_Horizontal
=> Snap to horizontal face like floors,SnapTo_Vertical
=> Snap to vertical face like walls,SnapTo_Sloped
=> Snap to sloped face like sloping roofs.But how do one get or set if the component is set to glue to none?
-
When I make two components, one which is set to None and one set to Any - then both return 0 for snapto.
So is there some other flag?
-
is2d?
-
No, because you can glue 3d components.
-
But a component that does not have
is2D
set will not glue ? You must set bothsnapto
andis2D
to match...
component.behavior.is2d=true component.behavior.snapto=0
it snaps to any surface
but set
component.behavior.is2d=false
will stop it snapping to anything at all - even if snapto is set !
-
Aah!
I read only the description for
Behavior.is2d?
@unknownuser said:
The is2d? method is used to get a component's 2D behavior.
Since
Behavior.is2d=
is above I didn't see it's description:@unknownuser said:
The is2d= method is used to set the 2D behavior for a component: whether it can be glued or aligned to a face.
So is2d hasn't got anything to do with 2d / 3d size of the component - but is in fact snap and align. x_X
Thanks TIG.
Advertisement