ds:make-tracking-curve
List of: Scheme Extensions
Subjects: Deformable Surfaces
Contents: ACIS Deformable Modeling

Action: Creates a deformable curve model, suitable for tracking curve constraints. from a crv_cstrn or link_cstrn.

Filename: adm/ds_scm/dsscm.cxx

APIs: api_dm_get_attrib_dm2acis

Syntax: (ds:make-tracking-curve owner tag target=1)

Arg Types: owner entity

tag integer

target integer

Returns: integer

Description: Returns the tag identifier of a newly constructed deformable curve model which is linked to the shape of the input crv_cstrn or link_cstrn. Sculpting the shape of the returned deformable model changes the shape of the constraint, which in turn changes the shape of the constrained surface.


The basics of curve tracking include:


1 Select a crv_cstrn or a link_cstrn from an existing deformable model.

2 Promote the constraint to a tracking curve constraint, (ds:make-tracking-curve)

3 Sculpt the tracking curve deformable model by adding and modifying loads and constraints and then calling ds:solve.

4 Change the shape of the constrained surface via ds:solve and the constrained-surface-tag.

The input tag is expected to identify an existing curve or link constraint within the deformable modeling hierarchy associated with the input entity object.


When the input tag value identifies a link_cstrn, the target value is used to select which side of the link is to be made into a tracking curve. A 1 uses the side associated with the link's first deformable model, and 2 defines the side associated with the link's second deformable model.


owner ACIS face or edge on which the deformable model lives.


tag is to identify an existing curve or link constraint within the deformable modeling hierarchy associated with the input entity object.


target value is used to select which side of the link is to be made into a tracking curve.

Limitations: Creates from crv_cstrn or link_cstrn only.

Example: ; ds:make-tracking-curve

; Track a straight crv-cstrn on a square test face

; 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))

;; ()

; Promote an edge crv-cstrn into a tracking curve

; constraint.

(define dsmodel2 (ds:make-tracking-curve dsmodel1 3))

;; dsmodel2

; Show value of dsmodel2.

dsmodel2

;; 7

; Make the model remember it's current shape.

(ds:set-default-shape dsmodel1 dsmodel2 1)

; Toggle the edges to disable constraint.

;; ()

(ds:toggle-cstrn dsmodel1 4)

;; 6

; Toggle the edge to disable constraint.

(ds:toggle-cstrn dsmodel1 6)

;; 6

; Add a pt-cstrn at the center and track it.

(define cc1


(ds:add-pt-cstrn dsmodel1 dsmodel2 "p"


(par-pos 0.5 0.5)))

;; cc1

; Show value of cc1

cc1

;; 8

(ds:set-pt-xyz dsmodel1 cc1 0 (position 18 18 20))

;; 8

; Compute a new tracking curve shape.

(ds:solve dsmodel1 dsmodel2 1)

;; ()

; Compute a new deformable model position.

(ds:solve dsmodel1 2 1)

;; ()

; The dsmodel1 deforms to interpolate all the point

; and curve constraints.
PDF/ADM/06SCJ.PDF
HTM/DATA/ADM/ADM/06SCJ/0004.HTM