|
Action:
|
Gets an entity's faceting refinement.
|
|
|
Filename:
|
fct/fct_scm/fct_scm.cxx
|
|
|
APIs:
|
api_get_entity_refinement
|
|
|
Syntax:
|
(entity:refinement entity [acis-opts])
|
|
|
Arg Types:
|
entity
|
entity
|
|
acis-opts
|
acis-options
|
|
|
Returns:
|
refinement | boolean
|
|
|
Description:
|
This extension returns the entity's refinement. If no refinement is assigned, this extension returns
#f.
|
|
|
The types of valid refinements to control the faceting are (refer to class
REFINEMENT for default values):
|
|
|
"surface tolerance"
|
is the maximum distance between facet and true surface.
|
|
"last used surface tolerance"
|
specifies the previously set surface tolerance.
|
|
"normal tolerance"
|
is the maximum difference between any two normals of facet.
|
|
"aspect ratio"
|
is the approximate aspect ratio of each cell in grid.
|
|
"max edge length"
|
is the maximum size of an edge of a facet.
|
|
"min v grid lines"
|
is the minimum number v grid lines used to display a face.
|
|
"min u grid lines"
|
is the minimum number u grid lines used to display a face.
|
|
"max grid lines"
|
limits the grid lines of a parametric grid for the surface of a face.
|
|
"grading"
|
adjusts facets to get better parametric aspect ratio of a grid cell.
|
|
"grid mode"
|
specifies whether a grid is used and whether the points where the grid cuts the edge is inserted to the edge.
|
|
"triang mode"
|
specifies how much triangulation to do.
|
|
"adjust mode"
|
specifies type of triangle smoothing to do. Determines if facet nodes should be adjusted for smoothing. Also determines if the grid points should be adjusted or not.
|
|
"surf mode"
|
specifies the type of surface.
|
|
|
Available surface types are:
|
|
|
AF_SURF_ALL
|
all surface type
|
|
AF_SURF_REGULAR
|
a surface with planar cells
|
|
AF_SURF_IRREGULAR
|
a surface with possibly nonplanar cells
|
|
AF_SURF_PLANE
|
a planar surface
|
|
AF_SURF_CONE
|
a cylindrical or conical surface
|
|
AF_SURF_SPHERE
|
a spherical surface
|
|
AF_SURF_TORUS
|
toroidal surface
|
|
AF_SURF_SPLINE
|
a spline surface
|
|
|
The optional argument
acis-opts can be used to enable journaling and versioning options.
|
|
|
Example:
|
; entity:refinement
|
|
; Create a solid cylinder.
|
|
(define cyl1
|
|
|
(solid:cylinder (position 0 0 0)
|
|
|
(position 30 30 0) 20))
|
|
;; cyl1
|
|
; Create a refinement.
|
|
(define refine1 (refinement))
|
|
;; refine1
|
|
; Get the default refinement values.
|
|
(refinement:props refine1)
|
|
;; (("surface tolerance" . -1)
|
|
;; ("normal tolerance" . 15)
|
|
;; ("aspect ratio" . 0)
|
|
;; ("max edge length" . 0)
|
|
;; ("min v_grid lines" . 0)
|
|
;; ("min u_grid lines" . 0)
|
|
;; ("max grid lines" . 3000)
|
|
;; ("grading" . #f)
|
|
;; ("grid mode" . "AF_GRID_INTERIOR")
|
|
;; ("triang mode" . "AF_TRIANG_FRINGE_2")
|
|
;; ("adjust mode" . "AF_ADJUST_NONE")
|
|
;; ("surf mode" . "AF_SURF_ALL"))
|
|
; Set the properties of the refinement.
|
|
(refinement:set-prop refine1 "surface tolerance" 0.5)
|
|
;; ()
|
|
; Attach the refinement to the cylinder.
|
|
(define refine (entity:set-refinement cyl1 refine1))
|
|
;; refine
|
|
; Get the cylinder's refinement.
|
|
(define get-refine (entity:refinement cyl1))
|
|
;; get-refine
|