ds:get-tight-state
List of: Scheme Extensions
Subjects: Deformable Surfaces
Contents: ACIS Deformable Modeling

Action: Gets the tight state of a load/constraint on a deformable model.

Filename: adm/ds_scm/dsscm.cxx

APIs: api_dm_get_attrib_dm2acis

Syntax: (ds:get-tight-state owner tag)

Arg Types: owner entity

tag integer

Returns: integer

Description: When the tight state is 1, the load/constraint is tightened, overriding a default shape of 1. There is no effect when the default shape is 0.


The input argument owner is the face or edge being sculpted. tag is the identifier for the load/constraint to modify. When the tag identifier identifies a load/constraint, the deformable model in the patch hierarchy, which contains the load/constraint, becomes the active deformable model.


This extension returns a 1 or 0, corresponding to the tight state of the tag's tight state.


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


tag identifier recognizes a constraint.

Example: ; ds:get-tight-state

; 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

; Clear the face.

(define erase (entity:erase dsmodel1))

;; erase

(define refresh (view:refresh))

;; refresh

; Render the loads and constraints.

(ds:set-draw-state dsmodel1 1


(+ ds-draw-cstrns ds-draw-loads))

;; ()

; Make a curve constraint.

(define crv-cstrn (ds:add-str-cstrn dsmodel1 2 'p


(par-pos .2 .2) (par-pos .8 .8)))

;; crv-cstrn

; Turn off tightening.

(ds:set-tight-state dsmodel1 crv-cstrn 0)

;; #t

; Check the tight state - it should be 0.

(ds:get-tight-state dsmodel1 crv-cstrn)

;; 0

; Some operations automatically reset the tight state

; to 1 - curve tracking, for example.

(ds:make-tracking-curve dsmodel1 crv-cstrn)

;; 8

; We now have a tight state of 1.

(ds:get-tight-state dsmodel1 crv-cstrn)

;; 1
PDF/ADM/05SCD.PDF
HTM/DATA/ADM/ADM/05SCD/0044.HTM