|
Action:
|
Converts a curve load into a curve constraint and returns the curve constraint's tag.
|
|
|
Filename:
|
adm/ds_scm/dsscm.cxx
|
|
|
APIs:
|
api_dm_get_attrib_dm2acis
|
|
|
Syntax:
|
(ds:crv-cstrn-from-load owner tag memory="remember")
|
|
|
Arg Types:
|
owner
|
entity
|
|
tag
|
integer
|
|
memory
|
string
|
|
|
Returns:
|
integer
|
|
|
Description:
|
Converts a curve load into a curve constraint.
tag defines the tag ID for the cstrn to be converted.
memory can be "r" for "remember" or "f" for forget. Returns the tag identifier of the converted object.
|
|
|
The curve load is converted into a curve constraint, keeping the same tag ID and behaviors. When
memory is "remember", the constraint has the same target as the load. When
memory is "forget", the constraint's target curve is generated by projecting the parameter space curve into image space through the surface function. In this case, the surface is constrained to maintain its current position all along the parameter space curve.
|
|
|
owner ACIS face or edge on which the deformable model lives.
|
|
|
tag defines the tag ID for the cstrn to be converted.
|
|
|
memory is "r" for "remember" or "f" for forget.
|
|
|
Example:
|
; ds:crv-cstrn-from-load
|
|
; Add a crv-load which forces a line in a surface to
|
|
; lie near a 3-space line then convert it to a
|
|
; constraint.
|
|
; 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 spline to a 3-space line crv-load
|
|
(define cc1 (ds:add-spring-curve dsmodel1 1
|
|
|
(par-pos 0 0.5) (par-pos 0.5 0)
|
|
|
(position 0 18 10) (position 18 0 20) 1000))
|
|
;; cc1
|
|
; toggle off the default crv-cstrns
|
|
(ds:toggle-cstrn dsmodel1 1)
|
|
;; 0
|
|
(ds:toggle-cstrn dsmodel1 2)
|
|
;; 0
|
|
(ds:toggle-cstrn dsmodel1 3)
|
|
;; 6
|
|
(ds:toggle-cstrn dsmodel1 4)
|
|
;; 6
|
|
; Add some corner point constraints
|
|
(define cc2 (ds:add-pt-cstrn dsmodel1 1
|
|
|
"position" (par-pos 0 0)))
|
|
;; cc2
|
|
(ds:add-pt-cstrn dsmodel1 1
|
|
|
"position" (par-pos 0 1))
|
|
;; 9
|
|
(ds:add-pt-cstrn dsmodel1 1
|
|
|
"position" (par-pos 1 1))
|
|
;; 10
|
|
(ds:add-pt-cstrn dsmodel1 1
|
|
|
"position" (par-pos 1 0))
|
|
;; 11
|
|
; Compute a new deformable model position
|
|
(ds:solve dsmodel1 1 1)
|
|
;; ()
|
|
; OUTPUT Original
|
|
|
; Convert the load to a constraint
|
|
(ds:crv-cstrn-from-load dsmodel1 cc1 "forget")
|
|
;; 7
|
|
; OUTPUT Result
|
|
|
|
|
|
Figure 4-16. ds:crv-cstrn-from-load
|