snapping support?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/07/2011 at 02:30, xxxxxxxx wrote:
kind of a n00b question, but ...
are there a python bindings for lib_snapping?
I could find almost everything else from the c++ api, just not this
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/07/2011 at 04:46, xxxxxxxx wrote:
What is this 'lib_snapping' ?
Never heard of it.Cheers,
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/07/2011 at 05:03, xxxxxxxx wrote:
it's part of the c++ api. Search for DetectSnapping.
This is a class that does snapping for you. You give it some point and it returns the location at which the point snaps. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/07/2011 at 06:57, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Bool SnapTo(const Vector& t_p, Vector* delta)_<_h4_>_
Calculates snapping for a point. The delta between the snapped point and the original is returned in delta. _h5_<_h5_>_rn
> Bool
>
>> TRUE if a snap delta was found, otherwise FALSE.
>
> _uote>
>
> ##### _ <_h5_>_eters
>
>> constVector& t_p
>>
>>> The point to snap.
>>
>> Vector* delta
>>
>>> Assigned the found snap delta. The caller owns the pointed object.>>>
>>> Shouldn't this return a vector ?
>>>
>>> Anyway, that's not hard to calculate, is it ?
>>>
>>>
> Cheers,
> -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/07/2011 at 07:44, xxxxxxxx wrote:
Hy Nux,
actually it is returning a Vector. "delta" is a pointer to a Vector. So I guess you supply an empty Vector which gets set to the newly found values (if found).
What is that method supposed to do exactly? Can someone give me an example usage?
Cheers,
maxx -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/07/2011 at 08:05, xxxxxxxx wrote:
It's used to find the nearest snapping point for an arbitrary point. It's used in plugin tools for instance to support snapping.
The sum of the passed point and the returned delta is the snapping point.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/07/2011 at 09:55, xxxxxxxx wrote:
Yes. Does this class exist in python, too?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/07/2011 at 00:30, xxxxxxxx wrote:
Doesn't seem to.
So this is used when I'm holding shift and moving an object ?
If yes, try this:def snap(origin, point, grid) : def singlesnap( (o, p, d) ) : p = p - o p_d = p % d if p_d < d / 2.: return p - p_d + o else: return p - p_d + o + d return map(singlesnap, zip(origin, point, grid))
Cheers,
Niklas -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/07/2011 at 01:33, xxxxxxxx wrote:
Originally posted by xxxxxxxx
So this is used when I'm holding shift and moving an object ?
No, it's used to snap points to the world grid for instance, or basically to what you set in Cinema's snapping options.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/07/2011 at 03:48, xxxxxxxx wrote:
| o | | | ------- snaps to ? ----- o | | | |
Right ? This is what the function above does. (see here)
Cheers, -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/07/2011 at 05:18, xxxxxxxx wrote:
Originally posted by xxxxxxxx
| o | | | ------- snaps to ? ----- o | | | |
Right ? This is what the function above does. (see here)
Cheers,Not quite, the function uses Cinema's snapping system. So it knows which snapping point is closest to the point you want snapping applied to. Have you worked with snapping in Cinema itself?
I'm talking about this stuff:
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/07/2011 at 23:40, xxxxxxxx wrote:
I take it as a "no it's not in there" :[
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/07/2011 at 02:03, xxxxxxxx wrote:
Sorry for the delay. Unfortunatly the snapping library is currently not avaible in Python.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/07/2011 at 02:16, xxxxxxxx wrote:
Will the library be implemented in the future?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/07/2011 at 02:41, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Will the library be implemented in the future?
I am sorry but I can't make any statements about future development of CINEMA 4D.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/07/2011 at 02:46, xxxxxxxx wrote:
Thank you.
You can't or your mustn't?