SchemeExt:Component:has-physical-modifications
From DocR21
Contents |
Action
Queries whether there are physical properties (such as suppression) that affect the specified component of an assembly model, its child components, and its parents.
Filename
scm/scmext/kern/asm_scm.cpp
APIs
asmi_component_has_physical_modifications
Syntax
(component:has-physical-modifications comp [opts])
Argument Types
| Argument | Scheme Data Type |
|---|---|
| comp | component |
| opts | acis-options |
Returns
(boolean...)
Description
A physical property is one that changes one or more components of the assembly in such a way that the (un-instanced) B-Rep model equivalent to the assembly would be different.
The result is a three-member list that contains boolean values representing child, self, and parent modifications, in that order.
Arguments
- comp specifies the component queried for physical modifications.
- opts contains journaling and versioning information.
Example
; component:has-physical-modifications ; Create a model in the active part. (define part_model (model:create)) ;; part_model (solid:block 0 0 0 10 10 10) ;; #[entity 1 1] ; Make a new part and set it active. (define subasm_part (part:new)) ;; subasm_part (env:set-active-part subasm_part) ;; () ; Create a model containing an assembly. (define subasm_model (model:create)) ;; subasm_model (model:create-assembly) ;; () ; Create the transform to be used on part_model. (define part_transf (transform:translation (gvector 1 0 0))) ;; part_transf ; Create a model reference for part_model within the assembly. (define part_model_ref (model:add-model-ref part_model part_transf)) ;; part_model_ref ; Make a new part and set it active. (define asm_part (part:new)) ;; asm_part (env:set-active-part asm_part) ;; () ; Create a model containing an assembly. (define asm_model (model:create)) ;; asm_model (model:create-assembly) ;; () ; Create the transform to be used on part_model. (define subasm_transf (transform:translation (gvector 0 0 10))) ;; subasm_transf ; Create a model reference for subasm_model within the assembly. (define subasm_model_ref (model:add-model-ref subasm_model subasm_transf)) ;; subasm_model_ref ; Get the component of asm_model associated with the block. (define comp1 (component (list subasm_model_ref part_model_ref))) ;; comp1 ; Suppress the component. (component:suppress comp1) ;; () ; Get the component of asm_model associated with the subassembly. (define comp2 (component subasm_model_ref)) ;; comp2 ; Ask for its physical modifications. (component:has-physical-modifications comp2) ;; (#t #f #f)
