Action:
|
Sets the domain space direction within a surface for a point constraint's tangent or curvature behavior.
|
|
Filename:
|
adm/ds_scm/dsscm.cxx
|
|
APIs:
|
api_dm_get_attrib_dm2acis
|
|
Syntax:
|
(ds:set-cstrn-domain-dir owner tag uv-dir point-index)
|
|
Arg Types:
|
owner
|
entity
|
|
tag
|
integer
|
|
uv-direction
|
par-pos
|
|
point-index
|
integer
|
|
Returns:
|
boolean
|
|
Description:
|
Changes the domain direction for a point constraint's tangent and curvature behaviors. This direction is only used for point constraints applied to a surface.
|
|
|
The tangent and curvature constraint behaviors for a point constraint applied to a surface constrain the surface geometric properties in a direction at a point on the surface. A surface can have two independent tangent and/or curvature constraints as long as the domain direction for each constraint is different. To completely specify a tangent or curvature point constraint behavior on a surface the end-user must supply the following set of information:
|
|
|
1.
|
location on the surface, given by a parametric position
|
|
2.
|
a direction on the surface, given by a parametric vector
|
|
3.
|
a value for the geometric property being constrained,
|
|
3a.
|
for tangent constraints; an image space vector used to specify the image space direction of the tangent.
|
|
3b.
|
for curvature constraints; the curvature value, an image space vector used to specify the direction of the surface normal, and a 2nd image space vector used to specify the surface tangent at that point.
|
|
|
This function sets the domain direction for the tangent and curvature behaviors of a point constraint on a surface. The input arguments owner and tag specify which point constraint to modify within a deformable modeling hierarchy. The input argument point-index specifies which domain direction to modify; its values must be 1 or 2 for directions 1 and 2. And the input argument domain-dir specifies the new domain direction; it does not have to be a unit-vector on input. The two domain directions for a single point constraint must be different. The default values for a point constraint's domain directions are the u and v vectors,
|
|
|
domain1-dir default = [1, 0] ('u' vector direction)
|
|
domain2-dir default = [0, 1] ('v' vector direction)
|
|
|
owner ACIS face or edge on which the deformable model lives.
|
|
|
tag specify which point constraint to modify within a deformable modeling hierarchy.
|
|
|
uv-direction specifies the new domain direction.
|
|
|
point-index specifies which domain direction to modify
|
|
Example:
|
; ds:set-cstrn-domain-dir
|
|
; Add to a square test face a parabolic crv-load
|
|
; and use it.
|
|
; Build a test square spline face.
|
|
; (6x6 control points, x and y side length = 36)
|
|
(define dsmodel1 (ds:test-face 6 6 36 36 0))
|
|
;; dsmodel1
|
|
; Don't display entity / ds test face exists.
|
|
(define erase (entity:erase dsmodel1))
|
|
;; erase
|
|
; Render the loads and constraints.
|
|
(ds:set-draw-state dsmodel1 1
|
|
|
(+ ds-draw-cstrns ds-draw-loads))
|
|
;; ()
|
|
; Add a pt-cstrn at the center of the parent and
|
|
; track it.
|
|
(define cc1 (ds:add-pt-cstrn dsmodel1
|
|
|
1 "position" (par-pos 0.5 0.5)))
|
|
;; cc1
|
|
(ds:set-pt-xyz dsmodel1 cc1 0
|
|
|
(position 16 16 10))
|
|
;; 8
|
|
; Compute a new deformable model position.
|
|
(ds:solve dsmodel1 1 1)
|
|
;; ()
|
|
; OUTPUT Original
|
|
|
; Set the domain-dir for direction 1.
|
|
(ds:set-cstrn-domain-dir dsmodel1 cc1
|
|
|
(par-pos .5 .5) 1)
|
|
;; #t
|
|
; Change an edge constraint's behavior.
|
|
(ds:set-cstrn-behavior dsmodel1 cc1 "pos_tan")
|
|
;; #t
|
|
; Tract the point constraint.
|
|
(ds:set-pt-xyz dsmodel1 cc1 0
|
|
|
(position 16 16 0))
|
|
;; 8
|
|
(ds:solve dsmodel1 1 1)
|
|
;; ()
|
|
; OUTPUT Result
|
|
|
|
|
Figure 6-5. ds:set-cstrn-domain-dir
|