Scheme Extensions Aa thru Mz |
|
|
Technical Article |
curve | elliptical-curve | elliptical-edge |
center | position |
; arc:set-center ; Create a circular edge. (define arc (edge:circular (position 15 25 0) 25 0 185)) ;; arc ; OUTPUT Original ; Set the center position of the edge. (define set (arc:set-center arc (position -10 -10 -10))) ;; set ; OUTPUT Result Figure. arc:set-center |
[Top]
curve | elliptical-curve | elliptical-edge |
vector | gvector |
Description
This extension realigns the curve's major axis to the given input vector
gvector. If the vector gvector is normal to the input curve curve, the minor
axis remains unchanged. Otherwise, the minor axis is realigned based on the
cross product of the curve normal with the specified vector gvector.
; arc:set-direction ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; OUTPUT Original ; Set the direction of the edge. (define set (arc:set-direction arc1 (gvector 0 1 0))) ;; set ; OUTPUT Result Figure. arc:set-direction |
[Top]
curve | elliptical-curve | elliptical-edge |
angle | real |
Description
This extension extends or shortens the input curve curve to the given angle
angle along the curve. The end position is determined using the right hand rule
with respect to the curve's normal, the start position, and the desired angle.
Circular curves and edges are subsets of elliptical curves and edges.
; arc:set-end ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; OUTPUT Original ; Set the end angle of the edge. (define set (arc:set-end arc1 45)) ;; set ; OUTPUT Result Figure. arc:set-end |
[Top]
curve | elliptical-curve | elliptical-edge |
vector | gvector |
Description
Circular curves and edges are subsets of elliptical curves and edges. This
extension realigns the input curve so that its normal vector is the given input
vector vector. If the vector gvector is parallel to the input curve curve's
normal vector, the minor axis remains unchanged. Otherwise, the minor axis is
realigned based on the cross product the specified vector gvector with the
curve's major axis. After the minor axis is aligned with respect to the vector
normal vector, the major axis is realigned as the cross product between the new
minor axis and the vector normal.
; arc:set-normal ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; OUTPUT Original ; Set the normal of the edge. (define set (arc:set-normal arc1 (gvector 1 0 0))) ;; set ; OUTPUT Result (curve:normal arc1) ;; #[gvector 1 0 0] Figure. arc:set-normal |
[Top]
curve | elliptical-curve | elliptical-edge |
radius | real |
Description
Circular curves and edges are subsets of elliptical curves and edges. This
extension scales the curve about its center such that the distance from the
center to the starting position is equal to the input radius.
; arc:set-radius ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; OUTPUT Original ; Set the radius of the edge. (define set (arc:set-radius arc1 12.3)) ;; set (arc:radius arc1) ;; 12.3 ; OUTPUT Result Figure. arc:set-radius |
[Top]
curve | elliptical-curve | elliptical-edge |
ratio | real |
Description
Circular curves and edges are subsets of elliptical curves and edges. The input curve
is changed such that the minor axis is ratio times as long as the major axis.
The curve's center, major axis, start angle, end angle, and normal remain
unchanged.
; arc:set-radius-ratio ; Create an elliptical circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; OUTPUT Original ; Set the elliptical radius ratio of the edge. (define set (arc:set-radius-ratio arc1 0.3)) ;; set ; OUTPUT Result Figure. arc:set-radius-ratio |
[Top]
curve | elliptical-curve | elliptical-edge |
angle | real |
Description
Circular curves and edges are subsets of elliptical curves and edges. This
extension extends or shortens the input curve curve to the given angle
angle along the curve. The start position is determined using the right hand
rule with respect to the curve's normal, the end position, and the desired
angle.
; arc:set-start ; Create a circular edge. (define arc1 (edge:circular (position 15 25 0) 25 0 185)) ;; arc1 ; OUTPUT Original ; Set the start angle of the edge. (define set (arc:set-start arc1 45)) ;; set ; OUTPUT Result Figure. arc:set-start |
[Top]
body | body |
direction | gvector |
; body:find-face ; Create topology to illustrate command. (define block (solid:block (position 0 0 0) (position 10 10 10))) ;; block ; Find face of block. (body:find-face block (gvector 0 0 1)) ;; #[entity 3 1] |
[Top]
body | body |
ao | acis-options |
Description
This extension reverses the sense of each of its faces, as well as the sense of
all of face and wire coedges. This is accomplished by switching FORWARD and
REVERSED sense.
The sense of a face indicates which side is considered "outside" and which is "inside". In the typical situation from solid modeling, the "inside" is adjacent to solid material while the "outside" is void. The sense of face is determined by the normal of the underlying surface. A FORWARD sense means the normal points from the face to the "outside".
; body:reverse ; Create a planar disk. (define block (solid:block (position -25 -25 -25) (position 25 25 25))) ;; block ; Retrieve list of faces. (face:types) ; entity:(entity 1 1) ; entity (entity 2 1) ; face:(entity 3 1) face_type:Plane ; face:(entity 4 1) face_type:Plane ; face:(entity 5 1) face_type:Plane ; face:(entity 6 1) face_type:Plane ; face:(entity 7 1) face_type:Plane ; face:(entity 8 1) face_type:Plane ;; #t ; determine if sense is forward. (entity:sense (entity 3 1)) ;; #t (entity:sense (entity 4 1)) ;; #f ; Reverse the coedge, face, and loop orientations. (define reverse (body:reverse block)) ;; reverse ; Verify sense has been reversed. (entity:sense (entity 3 1)) ;; #f (entity:sense (entity 4 1)) ;; #t |
[Top]
coedge | entity |
Description
Calls api_convert_to_spline to add a pcurve to the defined coedge.
; coedge:add-pcurve ; create a solid sphere. (define sphere (solid:sphere (position 0 0 0) 20)) ;; sphere ; create a solid block. (define block (solid:block (position -30 -30 15) (position 30 30 30))) ;; block ; Subtract the block from the sphere. (define subtract (bool:subtract sphere block)) ;; subtract (define face1 (cdr (entity:faces sphere))) ;; face1 (define coedge1 (car (entity:coedges face1))) ;; coedge1 ; Add a pcurve to the coedge. (coedge:add-pcurve coedge1) ;; #t |
[Top]
center | position |
radius | real |
normal | gvector |
Description
This extension creates a Scheme object containing an ACIS geometry curve class.
Geometry classes must be attached to derived
ENTITY class items (for example, an edge) to be displayed and
saved. Use the edge:from-curve extension to do
this. By themselves, curve Scheme objects are useful for evaluating positional,
directional, or curvature information without creating a (topology) entity.
; curve:circular ; Create a circular curve. ; The resultant curve is not an entity. (define curve1 (curve:circular (position 0 0 0) 25 (gvector 1 -2 1))) ;; curve1 ; To view this curve, attach it to an entity. (define edge1 (edge:from-curve curve1)) ;; edge1 |
[Top]
center | position |
major-axis | gvector |
normal | gvector |
ratio | real |
Description
This extension creates a Scheme object containing an ACIS geometry curve class.
Geometry classes must be attached to derived
ENTITY class items (for example, an edge) to be displayed and
saved. Use the edge:from-curve extension to do
this. By themselves, curve Scheme objects are useful for evaluating positional,
directional, or curvature information without creating a (topology) entity.
; curve:elliptical ; Create an elliptical circular curve ; with the major axis 2x the minor axis. ; The resultant curve is not an entity. (define curve1 (curve:elliptical (position 0 0 0) (gvector 10 0 0) (gvector 0 1 0) 0.5)) ;; curve1 ; To view this curve, attach it to an entity. (define edge1 (edge:from-curve curve1)) ;; edge1 |
[Top]
pos-start | position |
pos-gvec | position | gvector |
Description
This extension creates a Scheme object containing an ACIS geometry curve class.
Geometry classes must be attached to derived
ENTITY class items (for example, an edge) to be displayed and
saved. To accomplish this, use the edge:from-curve
extension. By themselves, curve Scheme objects are useful for evaluating
positional, directional, or curvature information without creating a
(topological) entity.
; curve:linear ; Create a linear curve from two positions. (define curve1 (curve:linear (position 0 0 0) (position 30 30 30))) ;; curve1 ; Create a linear curve from a ; position and a gvector. (define curve2 (curve:linear (position 0 0 0) (gvector 0 10 0))) ;; curve2 ; Temporary curves must be attached to an entity to ; be viewed. (define from1 (edge:from-curve curve1)) ;; from1 (define from2 (edge:from-curve curve2)) ;; from2 |
[Top]
edge | entity |
Description
Arc length parameterization means that length for each set of coedges is
normalized and parameterized. This technique is often used when skinning or
lofting between coedge lists with unequal numbers of coedges.
; edge:arclength-metric ; Create an edge given a law with domain dimension 1 ; and range dimension 3. (define edge1 (edge:law "vec(cos(x),sin(x),x/5)" 0 (law:eval "20*pi"))) ;; edge1 ; The edge is a helix that turns around ten times. (edge:arclength-metric edge1) ;; 0 |
[Top]
edge | entity |
approx-ok | boolean |
ao | acis-options |
Description
Arc length parameterization is the normalizing and parameterizing of the length
for each set of coedges.
; edge:arclength-param ; Create an edge given a law with domain dimension 1 ; and range dimension 3. The edge is a helix that ; turns around ten times. (define edge1 (edge:law "vec(cos(x),sin(x),x/5)" 0 (law:eval "20*pi"))) ;; edge1 (define arc-edge1 (edge:arclength-param edge1)) ;; arc-edge1 |
[Top]
point1 | position |
point2 | position |
point3 | position |
point4 | position |
ao | acis-options |
Description
The edge:bezier extension creates an edge defined by four specified
control point positions (point1, point2, point3, and point4)
that creates a spline. The bezier is created inside the edge using those
control point positions as an outside boundary for the Bezier curve.
; edge:bezier ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 -100 0) (position 0 0 0) (gvector 0 0 1))) ;; viewset ; Define a WCS. (define wcs1 (wcs (position 0 0 0) (position 5 0 0) (position 0 5 0))) ;; wcs1 ; Create bezier edge 1. (define edge1 (edge:bezier (position 10 0 0) (position 10 0 30) (position 30 0 30) (position 30 0 0))) ;; edge1 (define color1 (entity:set-color edge1 6)) ;; color1 ; Create bezier edge 2. (define edge2 (edge:bezier (position 5 0 0) (position 15 0 20) (position 25 0 20) (position 35 0 0))) ;; edge2 (define color2 (entity:set-color edge2 3)) ;; color2 ; Create bezier edge 3. (define edge3 (edge:bezier (position -5 0 0) (position 0 0 25) (position -20 0 20) (position -20 0 0))) ;; edge3 (define color (entity:set-color edge3 4)) ;; color ; OUTPUT Example Figure. edge:bezier |
[Top]
list-points | position |
Description
The edge:bezier-ndeg extension creates a bezier curved edge defined by
a list of control point positions (point1, point2, point3,
and point4) that creates a spline. The bezier is created inside the edge
using those control point positions as an outside boundary for the Bezier
curve.
; edge:bezier-ndeg ; edge1: 1st Degree Bezier Curve from a list of 2 ; control points (define edge1 (edge:bezier-ndeg (list (position 5 5 0) (position 15 50 0)))) ;; edge1 (entity:set-color edge1 1) ;; () ; edge2: 2nd Degree Bezier Curve from a list of ; three control points (define edge2 (edge:bezier-ndeg (list (position 5 5 0) (position 15 50 0) (position 55 40 0)))) ;; edge2 (entity:set-color edge2 1) ;; () ; edge3: 3rd Degree Bezier Curve from a list of 4 ; control points (define edge3 (edge:bezier-ndeg (list (position 5 5 0) (position 15 50 0) (position 55 40 0 ) (position 85 5 0)))) ;; edge3 (entity:set-color edge3 3) ;; () ; edge4: 4th Degree Bezier Curve from a list of 5 ; control points (define edge4 (edge:bezier-ndeg (list (position 5 5 0) (position 15 50 0) (position 55 40 0) (position 85 5 0) (position 45 -15 0)))) ;; edge4 (entity:set-color edge4 4) ;; () ; edge5: 5th Degree Bezier Curve from a list of 6 ; control points (define edge5 ( edge:bezier-ndeg (list (position 5 5 0) (position 15 50 0) (position 55 40 0) (position 85 5 0) (position 45 -15 0) (position 60 0 36)))) ;; edge5 (entity:set-color edge5 5) ;; () ; edge6: 6th Degree Bezier Curve from a list of 7 ; control points (define edge6 ( edge:bezier-ndeg (list (position 5 5 30) (position 15 -50 0) (position 55 40 -10 ) (position 85 5 0) (position 45 -15 0) (position 60 5 16) (position -10 -20 -45)))) ;; edge6 (entity:set-color edge6 6) ;; () |
[Top]
center-position | position |
radius | real |
start-angle | real |
end-angle | real |
ao | acis-options |
; edge:circular ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 0 -100) (position 0 0 0) (gvector 1 0 0))) ;; viewset ; Create circular edge 1. (define edge1 (edge:circular (position 0 0 0) 30 0 90)) ;; edge1 ; Create circular edge 2. (define edge2 (edge:circular (position 25 25 0) 20)) ;; edge2 ; Create circular edge 3. (define edge3 (edge:circular (position -25 -25 0) 10 180 270)) ;; edge3 ; Create circular edge 4. (define edge4 (edge:circular (position -10 -10 0) 15 90 270)) ;; edge4 (define zoom (zoom-all)) ;; zoom ; OUTPUT Example Figure. edge:circular |
[Top]
entray1 | entray |
entray2 | entray |
entray3 | entray |
full | boolean |
ao | acis-options |
Description
At least three entrays (entities with a ray) for the tangent arc must be
created prior to using this extension. Create the arcs within range of each
other so the tangent circle finds and touches each entity when it is created.
All created entities must lie in the same plane.
; edge:circular-3curve ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 0 -100) (position 0 0 0) (gvector 1 0 0))) ;; viewset ; Create circular edge 1. (define circedge1 (edge:circular (position 0 10 10) 10)) ;; circedge1 ; Create circular edge 2. (define circedge2 (edge:circular (position 20 10 10) 5)) ;; circedge2 ; Create spline edge 3. (define splineedge (edge:spline (list (position 10 0 10) (position 20 10 10) (position 30 10 10) (position 40 10 10) (position 42 10 10)))) ;; splineedge ; OUTPUT Original ; Create a circular edge tangent to the three curves. (define 3curve (edge:circular-3curve (entray circedge1 (pick:ray (event 362 242 1 (env:active-view)))) (entray circedge2 (pick:ray (event 362 209 1 (env:active-view)))) (entray splineedge (pick:ray (event 302 241 1 (env:active-view)))) #t)) ;; 3curve ; OUTPUT Result Figure. edge:circular-3curve |
[Top]
edge-pos1 | position |
edge-pos2 | position |
edge-pos3 | position |
full | boolean |
ao | acis-options |
; edge:circular-3pt ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 0 -100) (position 0 0 0) (gvector 1 0 0))) ;; viewset ; Create circular edge 1 passing through 3 points. (define edge1 (edge:circular-3pt (position 5 0 0) (position 0 5 0) (position -5 0 0))) ;; edge1 ; Create circular edge 2 passing through 3 points. (define edge2 (edge:circular-3pt (position 15 0 0) (position 0 10 0) (position 0 -11 0) #t)) ;; edge2 ; Create circular edge 3 passing through 3 points. (define edge3 (edge:circular-3pt (position 20 0 0) (position 0 -20 0) (position -15 -15 0) #f)) ;; edge3 ; OUTPUT Example Figure. edge:circular-3pt |
[Top]
center-pos | position |
edge-pos1 | position |
edge-pos2 | position |
ao | acis-options |
; edge:circular-center-rim ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 0 -100) (position 0 0 0) (gvector 1 0 0))) ;; viewset ; Create circular edge 1 using the arc center position ; and one edge position. (define edge1 (edge:circular-center-rim (position 20 20 0) (position 30 20 0))) ;; edge1 ; Create circular edge 2 using the center position ; and two edge positions. (define edge2 (edge:circular-center-rim (position 0 0 0) (position 10 0 0) (position 0 -10 0))) ;; edge2 ; Create circular edge 3 using the center position ; and one edge position. (define edge3 (edge:circular-center-rim (position 0 0 0) (position 28 28 0))) ;; edge3 ; Create circular edge 4 using the enter position ; and two edge positions. (define edge4 (edge:circular-center-rim (position 0 0 0) (position 15 15 0) (position 0 -8 -8))) ;; edge4 ; OUTPUT Example Figure. edge:circular-center-rim |
[Top]
edge-pos1 | position |
edge-pos2 | position |
full | boolean |
ao | acis-options |
; edge:circular-diameter ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 0 -100) (position 0 0 0) (gvector 1 0 0))) ;; viewset ; Create circular edge 1 based on two positions. (define edge1 (edge:circular-diameter (position 0 0 0) (position 20 0 0))) ;; edge1 ; Create circular edge 2 based on two positions. (define edge2 (edge:circular-diameter (position 5 5 0) (position 25 15 0) #t)) ;; edge2 ; Create circular edge 3 based on two positions. (define edge3 (edge:circular-diameter (position -5 -5 3) (position 5 4 12))) ;; edge3 ; OUTPUT Example Figure. edge:circular-diameter |
[Top]
point1 | position |
point2 | position |
point3 | position |
rho | real |
Description
The direction of the conic curve is from the start point to the end point.
Note: The value of rho must be 0 < rho < 1; an edge is not constructed for any other value of rho.
; edge:conic ; Create a rho conic parabola. (define edge1 (edge:conic (position -50 0 0) (position 50 0 0) (position 0 50 0) 0.5)) ;; edge1 ; Create a hyperbola. (define edge2 (edge:conic (position -50 0 0) (position 50 0 0) (position 0 50 0) 0.9)) ;; edge2 ; Create a conic ellipse. (define edge3 (edge:conic (position -50 0 0) (position 50 0 0) (position 0 50 0) 0.2)) ;; edge3 ; OUTPUT Example Figure. edge:conic |
[Top]
edge_in | edge |
acis_options | acis_options |
Description
This extension creates a new EDGE pointing to a new start VERTEX, a new end
VERTEX, a new CURVE, and a copy of the geometry of the input edge. If the
original EDGE is part of a BODY with a TRANSFORM, the elements of the new EDGE
are transformed.
;edge:copy (part:clear) (view:gl 0 0 512 512) ;;#[view 2950294] (view:edges ON) ;;#[view 2950294] (view:polygonoffset ON) ;;#[view 2950294] ;create a wiggle box (define wig1 (solid:wiggle 50 50 50 1 2 1 2)) ;;wig1 ;pick an edge of the wiggle (define e1 (pick:edge (ray (position 0 -25 0) (gvector 0 0 1)))) ;;e1 ;set color of the above edge to RED (entity:set-color e1 RED) ;;() ;make copy of the selected edge (define e2 (edge:copy e1)) ;;e2 ;set color of the copied edge to CYAN (entity:set-color e2 CYAN) ;;() (iso) ;;#[view 2950294] (zoom-all) ;;#[view 2950294] ; OUTPUT Example |
[Top]
position-list | position | ( position...) |
start-direction | gvector |
end-direction | gvector |
fit_tol | real |
acis_opts | acis_options |
This extension creates and returns an EDGE with an INTCURVE as the geometry supporting the edge. The edge is given start and end directions.
The default fit tolerance is 0. The curve interpolates the sequence of points and has tangents at the start and end points in the direction of the unit vectors. If the fit tolerance is greater than 0, the curve is a fit to the sequence of points. If the start and end tangent directions are identical and the start and end points are identical, the curve is marked as a periodic intcurve. If the start and end tangents are not specified, default tangent directions are calculated using up to three points at the ends of the point array.
No check is made to determine if the edge is self-intersecting.
; edge:cubic (part:clear) ; Create 3 edges. (define spline1 (edge:cubic (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)))) ;; spline1 ; spline 1 is shown in green. (entity:set-color spline1 GREEN) ;;() (define spline2 (edge:spline (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) (gvector 1 0 0) (gvector 1 0 0))) ;; spline2 ; spline 2 is shown in blue. (entity:set-color spline2 BLUE) ;;() (define spline3 (edge:spline (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) (gvector 1 0 0) (gvector 1 0 0) 0.5)) ;; spline3 ; spline 3 is shown in magenta. (entity:set-color spline3 MAGENTA) ;;() ; OUTPUT Example |
[Top]
center | position |
normal | gvector |
major-axis | gvector |
radius-ratio | real |
start-angle | real |
end-angle | real |
ao | acis-options |
Description
If start-angle and end-angle are not given then a fill ellipse is
created. If the ratio is not given it is assumed to be 1. The start and end
angles are given in degrees.
; edge:ellipse ; Create an elliptic edge that is the unit circle. (define edge1 (edge:ellipse (position 0 0 0) (gvector 0 0 10) (gvector 10 0 0))) ;; edge1 ; Create elliptic edge that is not the unit circle. (define edge2 (edge:ellipse (position 0 0 0) (gvector 0 0 10) (gvector 10 0 0) 0.5)) ;; edge2 ; Create part of an elliptic edge that is not ; the unit circle. (define edge3 (edge:ellipse (position 0 0 0) (gvector 0 10 10) (gvector 10 0 0) 0.5 0 90)) ;; edge3 ; OUTPUT Example Figure. edge:ellipse |
[Top]
center-pos | position |
start-pos | position |
ratio | real |
start-angle | real |
end-angle | real |
Description
This scheme extension is obsolete and should not be used. Instead, customers
should use the scheme extension "edge:ellipse".
In order to reproduce the behavior of edge:elliptical, customers
should ensure that the major axis (start-pos - center-pos) lies
in the X-Y plane of the WCS, and then use the z-axis (gvector 0 0 1) as the
normal parameter.
; edge:elliptical ; Create elliptical edge by specifying ; the center position, start position, and ratio. (define center1 (position 0 0 0)) ;; center1 (define start (position 16.9705627484771 -8.48528137423857 -8.48528137423857)) ;; start (define edge1 (edge:elliptical center1 start 0.25)) ;; edge1 ; Create elliptical edge 2 by specifying the center ; and start positions, the ratio, and ; the start and end angles. (define center2 (position 15 15 0)) ;; center2 (define start (position 15 -5 0)) ;; start (define edge2 (edge:elliptical center2 start 0.5 0 270)) ;; edge2 ; OUTPUT Example Figure. edge:elliptical |
[Top]
edge | entity |
Description
Returns the ending position of the edge. The ending position of the edge for
this activity is not the position defined when creating the circle. The ending
position of the edge (in this instance) is the end of the edge.
; edge:end ; Create a circle. (define circle(edge:ellipse (position 0 0 0) (gvector 0 0 1) (gvector 10 0 0) 1 0 360)) ;; circle ;Define the start point. (define start-point(edge:end circle)) ;; start-point ; Returns the ending position of the edge. (edge:end circle) ;; #[position 10 0 0] |
[Top]
edge | entity |
; edge:end-dir ; Create elliptical edge by specifying the center ; and start positions, the ratio, and the start and ; end angles. (define center (position 15 15 0)) ;; center (define start (position 15 -5 0)) ;; start (define hello-edge (edge:elliptical center start 0.5 0 270)) ;; hello-edge ; Get end direction of the curve. (edge:end-dir hello-edge) ;; #[gvector 1.83690953072103e-15 -20 0] |
[Top]
in-entity | edge |
in-start | real |
in-end | real |
; edge:extend ; Extend an edge from an existing edge. (define center (position 15 15 0)) ;; center (define start (position 15 -5 0)) ;; start (define edge1 (edge:elliptical center start 0.5 0 270)) ;; edge1 (define extend (edge:extend edge1 25 10)) ;; extend |
[Top]
entray1 | entray |
entray2 | entray |
radius | real |
trim1 | boolean |
trim2 | boolean |
ao | acis-options |
Description
The entities picked to be filleted must be edge entities. Edges on the face of
a solid cannot be filleted with this command. However, edges on the face of a
solid can be blended and chamfered.
; edge:fillet ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 -100 0) (position 0 0 0) (gvector 0 0 1))) ;; viewset ; Create linear edge 1. (define edge1 (edge:linear (position 0 0 0) (position 40 0 0))) ;; edge1 ; Create linear edge 2. (define edge2 (edge:linear (position 35 0 -5) (position 35 0 25))) ;; edge2 ; Create linear edge 3. (define edge3 (edge:linear (position 40 0 20) (position 20 0 20))) ;; edge3 ; Create linear edge 4. (define edge4 (edge:linear (position 25 0 25) (position 25 0 10))) ;; edge4 ; OUTPUT Original ; Fillet the corner where edge 1 and 2 intersect ; and trim the edges. (define fillet1 (edge:fillet (entray edge1 (ray (position 5 0 0) (gvector 0 1 0))) (entray edge2 (ray (position 35 0 20) (gvector 1 0 0))) 3)) ;; fillet1 ; Fillet the corner where edge 2 and 3 intersect ; but do not trim the fillets. (define fillet2 (edge:fillet (entray edge2 (ray (position 35 0 20) (gvector 1 0 0))) (entray edge3 (ray (position 25 0 20) (gvector 0 1 0))) 3 #f #f)) ;; fillet2 ; Fillet the corner where edge 3 and 4 intersect, ; and partially trim the fillets. (define fillet3 (edge:fillet (entray edge3 (ray (position 35 0 20) (gvector 1 0 0))) (entray edge4 (ray (position 25 0 15) (gvector 0 1 0))) 3 #f)) ;; fillet3 ; OUTPUT Result Figure. edge:fillet |
[Top]
curve | curve |
start | real |
end | real |
ao | acis-options |
Description
Creates an edge from a bounded curve or a
CURVE entity. The optional start and end parameters are
ignored when using a bounded curve.
; edge:from-curve ; Create a circular curve data structure, and ; convert it to an edge entity. (define edge (edge:from-curve (curve:circular (position 0 0 0) 25))) ;; edge |
[Top]
edge | edge |
force-update | boolean |
Description
This extension gets the tolerance of a
TEDGE. If the logical force-update is present and TRUE, the
tolerance is recomputed.
; edge:get-tolerance ; Create something with tolerant topology. (define block (solid:block (position -25 -25 -25) (position 25 25 25))) ;; block ; Make a tolerant edge with non-zero tolerance. (define edge (pick:edge (ray (position 0 0 0) (gvector 1 0 1)))) ;; edge ; make the edge a different color (entity:set-color edge 4) ;; () (define tol-edge (edge:tolerant edge)) ;; tol-edge (define move (tolerant:move tol-edge (gvector 5 0 5))) ;; move ; Get tolerance of edge. (edge:get-tolerance tol-edge) ;; 5 |
[Top]
law | law |
start | real |
end | real |
perp-law | law |
ao | acis-options |
; edge:law ; Create an edge given a law with domain dimension 1 ; and range dimension 3. (define law (edge:law "vec (cos (x),sin (x),x/5)" 0 (law:eval "20*pi"))) ;; law ; The edge is a helix that turns around ten times. |
[Top]
edge | entity |
Description
Returns the length of the edge.
; edge:length ; Create a circle. (define circle(edge:ellipse (position 0 0 0) (gvector 0 0 1) (gvector 10 0 0) 1 0 360)) ;; circle ; Calculate the length of the edge. (edge:length circle) ;; 62.8318530717959 |
[Top]
position | position |
point | point |
ao | acis-options |
Description
Specifies locations as positions or points.
; edge:line ; Create two linear edges given two positions. (define edge1 (edge:line (position 0 0 0) (position 30 30 0))) |
[Top]
position | position |
point | point |
entray | entray |
ao | acis-options |
Description
Specify locations as positions, points, or entrays.
; edge:linear ; Create two linear edges given two positions. (define edge1 (edge:linear (position 0 0 0) (position 30 30 0))) ;; edge1 (define edge2 (edge:linear (position 30 30 0) (position 0 30 0))) ;; edge2 ; Define point 1. (define pt1 (point (position 30 0 0))) ;; pt1 ; Define point 2. (define pt2 (point (position 0 30 0))) ;; pt2 ; Create linear edge 3 from the two points. (define edge3 (edge:linear pt1 pt2)) ;; edge3 |
[Top]
edge | entity |
approximation | boolean |
Description
Approximation set to FALSE returns the exact geometrical midpoint of the edge,
while TRUE returns the midpoint in parameter space. Default is TRUE.
; edge:mid-point ; Create elliptical edge by specifying the center ; and start positions, the ratio, and the start and ; end angles. (define center (position 15 15 0)) ;; center (define start (position 15 -5 0)) ;; start (define hello-edge (edge:elliptical center start 0.5 0 270)) ;; hello-edge ; Get the midpoint of the edge. (edge:mid-point hello-edge) ;; #[position 7.92893218813452 29.142135623731 0] |
[Top]
edge | entity |
approximation | boolean |
Description
Approximation set to TRUE returns the direction at the exact geometrical
midpoint of the edge, while FALSE returns the midpoint in parameter space.
Default is TRUE.
; edge:mid-point-dir ; Create elliptical edge by specifying the center ; and start positions, the ratio, and the start and ; end angles. (define center (position 15 15 0)) ;; center (define start (position 15 -5 0)) ;; start (define hello-edge (edge:elliptical center start 0.5 0 270)) ;; hello-edge ; Get the midpoint direction of the edge. (edge:mid-point-dir hello-edge) ;; #[gvector 7.07106781186547 14.142135623731 0] |
[Top]
surface | face |
law | law |
start | real |
end | real |
ao | acis-options |
Description
Creates an edge from a law that defines a parameter space curve on a surface.
The parameter space law is limited within a given domain, a subset of the real
numbers and range, a subset of 3D space.
; edge:plaw ; Create a block to get a planar face (define block1 (solid:block (position -60 -60 -10) (position 30 30 40))) ;; block1 (define face1 (car (entity:faces block1))) ;; face1 ; Define a circle in parameter space (define law1 (law "vec (10*cos(x), 10*sin (x))")) ;; law1 ; create a 3d curve (define edge1 (edge:plaw face1 law1 0 (* 2 PI))) ;; edge1 |
[Top]
edge | edge |
; edge:reverse ; Create an edge and reverse its sense. (define block1 (solid:block (position 0 0 0) (position 10 10 10))) ;; block1 ; Get a list of the block's edges. (define edges1 (entity:edges block1)) ;; edges1 ; Get a list of the block's faces. (define faces1 (entity:faces block1)) ;; faces1 (define one-edge (car edges1)) ;; one-edge (define one-face (car faces1)) ;; one-face ; Determine if an edge is reverse ; with respect to a face. (edge:reversed? one-edge one-face) ;; #f ; Reverse the sense of the edge. (define reverse (edge:reverse one-edge)) ;; reverse ; Determine if the edge has been reversed. (edge:reversed? one-edge one-face) ;; #t |
[Top]
center | position |
normal | gvector |
start-position | position |
start-direction | gvector |
width | real |
angle | real |
handedness | boolean |
start-radius | real |
ao | acis-options |
Description
This command creates an Archimedian spiral edge. This implies that the radius
expands at a constant rate. The resulting edge is perpendicular to the normal
axis specified by the center and normal arguments.
The edge returned has information associated with it that indicates where the axis of the spiral is located. If the edge is then swept, a rail law is created that orients the profile relative to the center axis, rather than using a minimum rotation rail. This improves the speed of sweeping, and results in the intuitive sweeping of a spiral.
The command is overloaded to accept the start of the spiral as either a start position or a start direction. The start-position is the position where the spiral starts. The start-direction is a vector specifying an offset from the center. It should be noted that the resulting edge is perpendicular to the axis, but is not necessarily in the plane of the center position, depending on the starting position or direction specified.
The rate at which the spiral expands is specified with the width argument. The width is the perpendicular distance between consecutive loops of the spiral. The angle argument specifies how many revolutions the spiral should make, in degrees.
The optional argument handedness determines whether the direction of movement is right handed or left handed with respect to the normal vector. The default of TRUE is right handed.
The optional argument start-radius allows a specification of the start point at a desired distance in the start direction. One use for this argument is to specify a zero start radius so the spiral begins at the center.
; edge:spiral ; Make a spiral edge with a center start (define handedness #t) ;; handedness (define width 2) ;; width (define rot-angle 1800) ;; rot-angle (define start-radius 0) ;; start-radius (define center (position 0 0 0)) ;; center (define normal (gvector 0 0 10)) ;; normal (define start (gvector 5 0 5)) ;; start ; Define the spiral (define spiral (edge:spiral center normal start width rot-angle handedness start-radius)) ;; spiral ; View the spiral edge (define dl (view:dl)) ;; dl (define color (view:set-bg-color 7)) ;; color (define viewset (view:set (position 1 0.75 2) (position 0 0 0) (gvector 0 0 1))) ;; viewset (define zoom (zoom-all)) ;; zoom (render:rebuild) ;; () ; OUTPUT Example Figure. edge:spiral |
[Top]
position-list | position | (position ...) |
start-angle | real |
start-direction | gvector |
spline-condition | boolean |
end-angle | real |
end-direction | gvector |
"periodic" | string |
"exact" | string |
ao | acis-options |
; edge:spline ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 0 100) (position 0 0 0) (gvector 0 1 0))) ;; viewset ; Define a new WCS. (define wcs (wcs (position 0 0 0) (position 5 0 0) (position 0 5 0))) ;; wcs ; Create 3 spline edges. (define spline1 (edge:spline (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)))) ;; spline1 ; spline 1 is shown in green. (define spline2 (edge:spline (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) 0 45)) ;; spline2 ; spline 2 is shown in blue. (define spline3 (edge:spline (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) (gvector 0 1 0) (gvector 0 1 0))) ;; spline3 ; spline 3 is shown in magenta. ; OUTPUT Example Figure. edge:spline |
[Top]
ctrl_pt_pos | position |
knot_v | (real...) |
degree | integer |
rational | boolean |
closed | boolean |
periodic | boolean |
weights | (real...) |
tolerance | real |
ao | acis-options |
; Define the control points (part:clear) (define ctrlpts_pos (list (position 0 0 0) (position 1 1 0) (position 2 1 0) (position 3 0 0) ) ) ; Create the knot SPAvector (define knot_v (list 0 0 0 0 3 3 3 3) ) ; Create the new spline (define spline (edge:spline-from-ctrlpts ctrlpts_pos knot_v) ) |
[Top]
position-list | position | (position ... ) |
param-list | real | (real ... ) |
start-direction | gvector |
spline-condition | boolean |
end-direction | gvector |
ao | acis-options |
Description
The argument position-list is a list of locations through which the
spline should pass. The argument param-list is the parameter value at
which the spline should pass the corresponding position. The number of
positions in the position-list must be at least two and must be equal to
the number of reals in the param-list. The optional argument start-direction
is the gvector of the tangent to the spline at the start position. The optional
argument end-direction is the gvector of the tangent to the spline at
the end position. If either start-direction or end-direction is
not specified, a free end condition is used at that end. A "free" or "natural"
spline condition means that the second derivative at that end is 0.
To force a "free" end condition, either assign #f to the argument spline-condition, or do not specify an argument for the end condition. Specifying #f results in a "free" end condition at the start, so the tangent direction needs to be specified at the end.
Specifying an end-direction vector indicates the end direction of the curve tangent at the end.
; edge:spline2 ; Set the view (view:gl) ;; #[view 3607154] ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 0 100) (position 0 0 0) (gvector 0 1 0))) ;; viewset ; Create 3 spline edges. (define spline1 (edge:spline2 (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) (list 0 1 2 3 4 5 6))) ;; spline1 ;; set up so we can see edges (view:edges ON) ;; #[view 3607154] (zoom-all) ;; #[view 3607154] (render:rebuild) ;; #[view 3607154] (entity:set-color spline1 GREEN) ; spline 1 is shown in green. (define spline2 (edge:spline2 (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) (list 0 .1666 .3333 .5 .6666 .8333 1) (gvector 0 30 0) (gvector 0 -30 0))) ;; spline2 (entity:set-color spline2 BLUE) ; spline 2 is shown in blue. (define spline3 (edge:spline2 (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) (list 0 .1666 .3333 .5 .6666 .8333 1) (gvector 30 0 0) (gvector 30 0 0))) ;; spline3 (entity:set-color spline3 MAGENTA) ; spline 3 is shown in magenta. (define spline4 (edge:spline2 (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) (list 0 .1666 .3333 .5 .6666 .8333 1) (gvector 30 0 0))) ;; spline4 (entity:set-color spline4 RED) ; spline4 is shown in RED (may be hidden by spline3) (define spline5 (edge:spline2 (list (position 0 0 0) (position 5 5 0) (position 10 15 0) (position 15 20 0) (position 20 15 0) (position 25 5 0) (position 30 0 0)) (list 0 .1666 .3333 .5 .6666 .8333 1) #f (gvector 30 0 0))) ;; spline5 (entity:set-color spline5 YELLOW) ; spline 5 is shown in YELLOW (may be hidden by spline3) ; OUTPUT Example |
[Top]
edge1 | edge |
position | position |
edge2 | edge |
ao | acis-options |
Description
The argument edge1 specifies the edge to split. The argument position
specifies the location to split the edge. The argument edge2 specifies
the edge with which to split. For closed curves, the current entity is trimmed
to the position and at 0 degrees, and a new edge is created from the position
to 360 degrees.
; edge:split ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 -100 0) (position 0 0 0) (gvector 0 0 1))) ;; viewset ; Create a circular edge. (define edge1 (edge:circular-3pt (position 10 0 0) (position 0 0 10) (position -10 0 0))) ;; edge1 ; Create a linear edge. (define edge2 (edge:linear (position 0 0 0) (position 20 0 20))) ;; edge2 ; OUTPUT Original ; Split the first edge into two edges. (edge:split edge1 (position 0 0 10)) ;; (#[entity 2 1] #[entity 4 1]) ; Split the second edge into two edges. (edge:split edge2 edge1) ;; (#[entity 3 1] #[entity 5 1]) ; OUTPUT Result Figure. edge:split |
[Top]
edge | edge |
disc-order | integer |
acis-opts | acis-options |
Description
The input edge is split up to the G1 or G2 (disc-order = 1 or 2) by
accessing the
discontinuity_info stored in the curve. The result is a list
of edges that are split, including the original.
; edge:split-at-disc ; We create a discontinuous curve by creating a ; spline edge using duplicate knots at internal ; points. (part:clear) (define ctrlpts_pos (list (position -2 0 0) (position -1.5 0 0) (position 0 0 0) (position .75 0.5 0) (position 1 0.5 0) (position 1.1 1 0) (position 1.2 1 0) (position 1.5 1 0) (position 1.9 .75 0) (position 2 0.5 0) (position 2.1 .25 0) (position 2.5 0 0) (position 3 0 0) (position 4 0 0))) (define knot_v (list 0 0 0 1 2 3 4 4 4 5 6 7 7 7 8 9 9 9)) (define spline (edge:spline-from-ctrlpts ctrlpts_pos knot_v) ) (entity:check spline) ;; (#[entity 1 1]) (define se (edge:split-at-disc spline)) (part:entities) ;; (#[entity 1 1] #[entity 2 1] #[entity 3 1]) |
[Top]
axis-point | position |
axis-vector | gvector |
start-position | position |
handedness | boolean |
thread-distance | real |
rotation-degrees | real |
trans-height | real |
trans-degrees | real |
ao | acis-options |
Description
This extension links together several helix pieces and transition regions to
make one edge. The transition regions between the helix pieces ensure G2
continuity. The final edge consists of a helix followed by zero or more
transition/helix pairs.
The edge returned has information associated with it that indicates where the axis of the helix is located. If the edge is then swept, a rail law is created that orients the profile relative to the center axis, rather than using a minimum rotation rail. This improves the speed of sweeping, and results in the intuitive sweeping of a spring.
All helix and subsequent transition/helix pairs are explicitly listed as parameters. As a minimum, one helix (thread distance and angle) must be specified. After that, any number of transition pieces (height and angle) and helix pieces may be specified, as long as they are specified in transition/helix pairs.
The axis-point, axis-vector, and start-position arguments determine the location of the multi-helix. The radius of the helix is calculated as the distance from the start position to the axis.
The handedness argument determines the spring direction with respect to the axis vector. TRUE is right handed, and FALSE is left handed.
The rotation-degrees argument determines how far the given spring section rotates about the axis, and can be greater than one revolution (360 degrees). The thread-distance argument determines the distance between adjacent loops, assuming that the rotation is greater than one revolution.
The trans-height argument determines the distance for a transition piece, while trans-degrees dictates the rotation (in degrees) that occurs over the transition piece. Following the transition piece, another rotation section can be specified using thread-distance and rot-degrees parameters.
The specification of a transition region and second spring area is optional. When specified, all four parameters trans-height, trans-degrees, a second thread-distance, and a second rot-degrees are required. Any number of additional transition regions and additional helical sections can be specified as long as the set of all four parameters is given for each section.
; edge:spring ; Create axis points. ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position -50 -50 -100) (position 0 0 0) (gvector 0 0 1))) ;; viewset (define axis-point (position 0 0 0)) ;; axis-point (define axis-vector(gvector 0 1 0)) ;; axis-vector (define start-position (position 1 0 0)) ;; start-position (define spring (edge:spring axis-point axis-vector start-position #t 0 270 10 360 1 (law:eval "3*360+90") )) ;; spring (define zoom (zoom-all)) ;; zoom ; OUTPUT Example ; Additional Example (part:clear) ;; #t ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position -50 -50 -100) (position 0 0 0) (gvector 0 0 1))) ;; viewset (define spring (edge:spring axis-point axis-vector start-position #t 0 270 20 (law:eval "2*360") 1 (law:eval "5*360") 10 360 1 (law:eval "3*360+90") )) ;; spring (define zoom (zoom-all)) ;; zoom ; OUTPUT Example ; Additional Example (part:clear) ;; #t ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position -50 -50 -100) (position 0 0 0) (gvector 0 0 1))) ;; viewset (define spring (edge:spring axis-point axis-vector start-position #t 0 270 20 (law:eval "2*360") 1 (law:eval "3*360") 20 (law:eval "2*360") 1 (law:eval "3*360") 20 (law:eval "2*360") 1 (law:eval "5*360+90") 20 (law:eval "2*360") 1 (law:eval "3*360") 20 (law:eval "2*360") 1 (law:eval "3*360") )) ;; spring (define zoom (zoom-all)) ;; zoom ; OUTPUT Example Figure. edge:spring |
[Top]
axis-point | position |
axis-vector | gvector |
start-position | position |
radius-law | law |
handedness | boolean |
thread-distance | real |
rotation-degrees | real |
trans-height | real |
trans-degrees | real |
ao | acis-options |
Description
This extension links together several helix pieces and transition regions to
make one edge. This extension differs from edge:spring
in that a law can be used to specify the radius of the helix. For example, a
spring that expands and contracts can be created. Like edge:spring,
the final edge consists of a helix followed by zero or more transition/helix
pairs.
The edge returned has information associated with it that indicates where the axis of the helix is located. If the edge is then swept, a rail law is created that orients the profile relative to the center axis, rather than using a minimum rotation rail. This improves the speed of sweeping, and results in the intuitive sweeping of a spring.
All helix and subsequent transition/helix pairs are explicitly listed as parameters. As a minimum, one helix (thread distance and angle) must be specified. After that, any number of transition pieces (height and angle) and helix pieces may be specified, as long as they are specified in transition/helix pairs.
The axis-point, axis-vector, and start-position arguments determine the location of the multi-helix. The radius of the helix is calculated as the distance from the start position to the axis.
The radius-law argument allows specification of the radius as a function of the height of the spring. While this extension accepts a start position, the actual spring may start in a different position, depending on the starting value of the law function.
The handedness argument determines the spring direction with respect to the axis vector. TRUE is right handed, and FALSE is left handed.
The rotation-degrees argument determines how far the given spring section rotates about the axis, and can be greater than one revolution (360 degrees). The thread-distance argument determines the distance between adjacent loops, assuming that the rotation is greater than one revolution.
The trans-height argument determines the distance for a transition piece, while trans-degrees dictates the rotation (in degrees) that occurs over the transition piece. Following the transition piece, another rotation section can be specified using thread-distance and rot-degrees parameters.
The specification of a transition region and second spring area is optional. When specified, all four parameters trans-height, trans-degrees, a second thread-distance, and a second rot-degrees are required. Any number of additional transition regions and additional helical sections can be specified as long as the set of all four parameters is given for each section.
; edge:spring-law ; Define a variable radius spring (define axis-start (position 0 0 0)) ;; axis-start (define axis-dir (gvector 0 0 10)) ;; axis-dir (define start (position 0 10 0)) ;; start (define radius-law (law "5+(4/(1+((x/4)-5)^2))")) ;; radius-law (define spring1 (edge:spring-law axis-start axis-dir start radius-law #t 4 3600)) ;; spring1 ; OUTPUT Result Figure. edge:spring-law |
[Top]
axis-point | position |
axis-vector | gvector |
start-position | position |
taper-angle | real |
handedness | boolean |
thread-distance | real |
rotation-degrees | real |
trans-height | real |
trans-degrees | real |
ao | acis-options |
Description
This extension links together several helix pieces and transition regions to
make one edge. This extension differs from edge:spring
in that an angle can be used to specify the taper of the helix. For example, a
conical spring can be created. Like edge:spring, the final edge
consists of a helix followed by zero or more transition/helix pairs.
The edge returned has information associated with it that indicates where the axis of the helix is located. If the edge is then swept, a rail law is created that orients the profile relative to the center axis, rather than using a minimum rotation rail. This improves the speed of sweeping, and results in the intuitive sweeping of a spring.
All helix and subsequent transition/helix pairs are explicitly listed as parameters. As a minimum, one helix (thread distance and angle) must be specified. After that, any number of transition pieces (height and angle) and helix pieces may be specified, as long as they are specified in transition/helix pairs.
; edge:spring-taper ; Construct a tapered spring edge (define axis-start (position 0 0 0)) ;; axis-start (define axis-dir (gvector 0 0 10)) ;; axis-dir (define start (position 0 10 0)) ;; start (define spring1 (edge:spring-taper axis-start axis-dir start 45 #t 5 1020 5 90 2 720)) ;; spring1 ; OUTPUT Result Figure. edge:spring-taper |
[Top]
edge | entity |
; edge:start ; create a circle. (define circle (edge:ellipse (position 0 0 0) (gvector 0 0 1) (gvector 10 0 0) 1 0 360)) ;; circle ; define the starting point. (define start-point (edge:start circle)) ;; start-point ; Create/define a line. (define line (edge:linear start-point (position 0 0 10))) ;; line ;Get the start point of the line. (edge:start line) ;; #[position 10 0 0] |
[Top]
edge | entity |
; edge:start-dir ; Create elliptical edge by specifying the center ; and start positions, the ratio, and the start and ; end angles. (define center (position 15 15 0)) ;; center (define start (position 15 -5 0)) ;; start (define hello-edge (edge:elliptical center start 0.5 0 270)) ;; hello-edge ; Get the start direction of the edge. (edge:start-dir hello-edge) ;; #[gvector -10 0 0] |
[Top]
edge | edge |
ao | acis-options |
; edge:tolerant ; Define a block. (define block1 (solid:block (position 0 0 0) (position 50 50 50))) ;; block1 (define tol-edge (car (entity:edges block1))) ;; tol-edge ; tol-edge => #[entity 2 1] ; Define a tolerant edge (define edge1 (edge:tolerant tol-edge)) ;; edge1 |
[Top]
in_edge | edge |
transform | transform |
acis-opts | acis-options |
;create a linear edge
(part:clear) (define e1 (edge:linear (position 0 0 0) (position 0 0 10))) ;;e1 ;define a translation transform (define trn (transform:translation (gvector 0 20 0))) ;;trn ;create a copy of the edge with the translation transform applied (define e2 (edge:trans-copy e1 trn)) ;;e2 ;set the color of new edge to RED (entity:set-color e2 RED) ;; () ;define a rotation transform (define rot (transform:rotation (position 0 0 0) (gvector 1 0 0) 45)) ;;rot ;create a copy of the edge with the rotation transform applied (define e3 (edge:trans-copy e1 rot)) ;;e3 ;set the color of new edge to BLUE (entity:set-color e3 BLUE) ;; () ; OUTPUT Examples |
[Top]
entray | entray |
position | position |
ao | acis-options |
Description
The argument entray specifies the entity and a ray. The rays associated
with the entities determine which intersection to choose for entities with
multiple intersections. The ray associated with the edge to be trimmed also
determines the portion of the edge to be kept.
; edge:trim ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 -100 0) (position 0 0 0) (gvector 0 0 1))) ;; viewset ; Create linear edge 1. (define edge1 (edge:linear (position -10 5 0) (position 30 5 0))) ;; edge1 ; Create linear edge 2. (define edge2 (edge:linear (position 10 0 20) (position 10 0 -20))) ;; edge2 ; Create linear edge 3. (define edge3 (edge:linear (position 20 0 10) (position -10 0 10))) ;; edge3 ; OUTPUT Original ; Trim edge 1 to a particular position. (define trim1 (edge:trim (entray edge1 (ray (position -10 0 0) (gvector 0 1 0))) (position 5 5 0))) ;; trim1 ; Trim edge 2 to edge 3. (define trim2 (edge:trim (entray edge2 (ray (position -10 0 0) (gvector 1 0 0))) (entray edge3 (ray (position 18 10 0) (gvector 1 0 0))))) ;; trim2 ; OUTPUT Result Figure. edge:trim |
[Top]
entray-list | (entray ...) |
close | boolean |
ao | acis-options |
Description
The argument entray-list specifies a list of edge entities and pick
rays. The number of entrays in the list must be greater than two. Non-edge
selection entities for inclusion in the trim are not trimmed, and their
adjacent entities are not trimmed to them. Also, the first and last edge in the
list are trimmed to each other. The argument close determines whether to
extend the lines to form the intersection of two edges.
Note: If a spline or splines are used in the edge:trim-chain extension as part of the list, the splines must intersect the other edges; splines are not automatically extended.
; edge:trim-chain ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 -100 0) (position 0 0 0) (gvector 0 0 1))) ;; viewset ; Create linear edge 1. (define edge1 (edge:linear (position 5 0 5) (position 20 0 5))) ;; edge1 ; Create linear edge 2. (define edge2 (edge:linear (position 18 0 0) (position 18 0 20))) ;; edge2 ; Create linear edge 3. (define edge3 (edge:linear (position 6 0 0) (position 15 0 15))) ;; edge3 ; OUTPUT Original ; Trim the three edges to form a continuous chain. (define trim (edge:trim-chain (list (entray edge1 (ray (position 17 0 5) (gvector 0 -1 0))) (entray edge2 (ray (position 18 0 15) (gvector 0 -1 0))) (entray edge3 (ray (position 15 0 15) (gvector 0 -1 0)))) #t)) ;; trim ; OUTPUT Result Figure. edge:trim-chain |
[Top]
entray | entray |
ao | acis-options |
Description
Trims both edges to the intersection of the edges. The arguments entray specify
the edge entities and their corresponding rays. In the trimming process, the
ends of the edges nearest the ray are kept.
; edge:trim-intersect ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 -100 0) (position 0 0 0) (gvector 0 0 1))) ;; viewset ; Create linear edge 1. (define edge1 (edge:linear (position -10 0 0) (position 30 0 0))) ;; edge1 ; Create linear edge 2. (define edge2 (edge:linear (position 0 0 -10) (position -8 0 30))) ;; edge2 ; OUTPUT Original ; Trim the edges to their intersection point. (define trim (edge:trim-intersect (entray edge1 (ray (position -10 0 0) (gvector 0 -1 0))) (entray edge2 (ray (position 0 0 -10) (gvector 0 -1 0))))) ;; trim ; OUTPUT Result Figure. edge:trim-intersect |
[Top]
entray | entray |
position | position |
ao | acis-options |
Description
Each entray specifies an edge entity and a ray. The first position argument
specifies the start location of the edge to be trimmed. The second position
argument specifies the end location of the edge to be trimmed.
; edge:trim-middle ; Set the view's eye position, target position, ; and up vector. (define viewset (view:set (position 0 -100 0) (position 0 0 0) (gvector 0 0 1))) ;; viewset ; Create a linear edge. (define edge1 (edge:linear (position -10 0 5) (position 30 0 5))) ;; edge1 ; OUTPUT Original ; Trim a segment out of the middle of the edge. (define trim (edge:trim-middle (entray edge1 (ray (position 6 0 5) (gvector 0 -1 0))) (position 6 0 5) (position 15 0 5))) ;; trim ; OUTPUT Result Figure. edge:trim-middle |
[Top]
ell | edge |
center | position |
normal | gvector |
major_axis | gvector |
radius_ratio | real |
start_angle | real |
end_angle | real |
acis-opts | acis-options |
;define parameters for an elliptical edge (part:clear) ;define center of the ellipst (define cen (position 0 0 0)) ;;cen ;define normal axis (define norm (gvector 0 0 1)) ;;norm ;define major axis (define maj_axis (gvector 30 0 0)) ;;maj_axis ;define radius ratio (define rad_rat 0.8) ;;rad_rat ;define start angle of the ellipse (define start_ang 0) ;;start_ang ;define end angle of the ellipse (define end_ang 360) ;;end_ang ;create an elliptical edge (define e1 (edge:ellipse cen norm maj_axis rad_rat start_ang end_ang)) ;;e1 ;define new parameters of the ellpise (define new_cen (position 0 0 -5)) ;;new_cen (define new_rad_rat 0.5) ;;new_rad_rat (define new_maj_axis (gvector 50 0 0)) ;;new_maj_axis ;modify the existing elliptical edge with new parameters (ellipse:modify e1 new_cen norm maj_axis new_rad_rat start_ang end_ang) ;;#[entity 1 1] ; OUTPUT Examples |
[Top]
entity | entity | face |
fit | real |
Description
This command recomputes the bs3 approximation of all spline surfaces on the
input entity. If the fit is nonpositive or unspecified, resfit is used.
; entity:accurate-approx ; Create an entity (define block1 (solid:block (position 10 20 30) (position 0 0 -30))) ;; block1 (define pos1 (position 5 10 20)) ;; pos1 (define pos2 (position 5 10 -20)) ;; pos2 (define theta2 (law:eval "2*360")) ;; theta2 (define twist1 (entity:twist block1 pos1 pos2 0 theta2 2)) ;; twist1 (define approx (entity:accurate-approx twist1)) ;; approx |
[Top]
entity-list | entity | (entity ...) |
create-box | boolean |
tight-box | boolean |
Description
This extension obtains the minimum and maximum values corresponding to a
diagonal across the body's bounding box relative to the active working
coordinate system. The argument entity-list comprises any entity or list
of entities. Each entity or list of entities may be a body, wire, face, or
edge. This extension returns a pair consisting of (min-pt . max-pt). If create-box
is given, a solid box will be returned. If tight-box is given, a more
accurate box is computed.
; entity:box ; Create solid block 1. (define block1 (solid:block (position 0 0 0) (position 10 10 10))) ;; block1 ; Determine the bounding box of solid block 1. (entity:box block1) ;; (#[position 0 0 0] . #[position 10 10 10]) ; Create solid block 2. (define block2 (solid:block (position 5 5 5) (position 25 25 25))) ;; block2 ; Determine the bounding box of solid block 2. (entity:box block2) ;; (#[position 5 5 5] . #[position 25 25 25]) ; Determine the bounding box of solid blocks 1 and 2. (entity:box (list block1 block2)) ;; (#[position 0 0 0] . #[position 25 25 25]) |
[Top]
entity-list | entity | (entity ...) |
create-box | boolean |
box-mode | integer | string |
Description
This extension obtains the minimum and maximum values corresponding to a
diagonal across the body's bounding box relative to the active working
coordinate system. The argument entity-list comprises any entity or list
of entities. Each entity or list of entities may be a body, wire, face, or
edge. This extension returns a pair consisting of (min-pt . max-pt). If create-box
is given, a solid box will be returned. If box-mode is given,
the computed box is as described below.
integer | string | Description |
---|---|---|
0 | tight | Computes a reproducible tight box (spline, sphere surfaces). No caching. |
1 | loose | Computes a reproducible loose box (spline, sphere surfaces). No caching. |
2 | quick | Computes a non-reproducible quick box (returns any box available). No caching. |
3 | default | Computes and caches a non-reproducible box (tight for torus, sphere by default). |
4 | default_pre_r12 | Computes a box as it used to in ACIS prior to release 12. No caching. |
5 | exact | Computes a reproducible exact box. In other words, this box type shrink-wraps the body. No caching. |
; entity:box-new ; Create solid block 1. (define block1 (solid:block (position 0 0 0) (position 10 10 10))) ;; block1 ; Determine the bounding box of solid block 1. (entity:box-new block1 #f 'default) ;; (#[position 0 0 0] . #[position 10 10 10]) ; Create solid block 2. (define block2 (solid:block (position 5 5 5) (position 25 25 25))) ;; block2 ; Determine the bounding box of solid block 2. (entity:box-new block2) ;; (#[position 5 5 5] . #[position 25 25 25]) ; Determine the bounding box of solid blocks 1 and 2. (entity:box-new (list block1 block2)) ;; (#[position 0 0 0] . #[position 25 25 25]) |
[Top]
entity | entity |
Description
If the tolerance is omitted, resabs is used. Reports how many edges and
vertices are checked and highlights anything 'tolerized'.
; entity:tolerize ; Create topology to demonstrate command. (define block (solid:block (position -10 -10 -10) (position 10 10 10))) ;; block (define edge (pick:edge (ray (position 0 0 0) (gvector 1 1 0)))) ;; edge (define tedge (edge:tolerant edge)) ;; tedge ; Move one edge away from block. (define move (tolerant:move tedge (gvector 1 1 0))) ;; move ; note, this corrupts the block. (define tolerant (tolerant:none tedge)) ;; tolerant ; now fix the block (define tolerize (entity:tolerize block)) ;; tolerize ; check block information (define check (entity:check block)) ;; check (define report (tolerant:report block)) ;; report |
[Top]
face | face |
Description
This extension calculates the area of a given face. The accuracy of the
calculation is fixed at 0.001 for an area of geometry that cannot be determined
analytically.
; face:area ; Create face 1. (define face1 (face:plane (position 0 0 0) 30 30)) ;; face1 ; Determine the area of face1. (face:area face1) ;; 900 ; Create face 2. (define face2 (face:cylinder (position 0 0 0) (position 0 30 0) 10 0 180)) ;; face2 ; Determine the area of face2. (face:area face2) ;; 942.477796076938 |
[Top]
position1 | position |
position2 | position |
radius1 | real |
radius2 | real |
start-angle | real |
end-angle | real |
ratio | real |
position3 | position |
ao | acis-options |
Description
This extension creates a conical face relative to the active WCS.
; face:cone ; Create conical face 1. (define face1 (face:cone (position 0 0 0) (position 0 50 0) 30 10)) ;; face1 ; Create conical face 2. (define face2 (face:cone (position 0 0 0) (position 0 40 0) 40 20 0 135)) ;; face2 ; OUTPUT Example Figure. face:cone |
[Top]
radius | real |
conic-constant | real |
extent | real |
length | real |
ao | acis-options |
Description
This creates a parabolic dish using law surfaces. It automatically creates the
required helper laws. This makes ray firing for such a surface significantly
faster.
; face:conic ; This makes a half sphere of radius 10 (define face1 (face:conic 10 0 9)) ;; face1 |
[Top]
position1 | position |
position2 | position |
radius | real |
start-angle | real |
end-angle | real |
ratio | real |
position3 | position |
ao | acis-options |
Description
This extension creates a cylindrical face relative to the active WCS.
; face:cylinder ; Create cylindrical face 1. (define face1 (face:cylinder (position 0 0 0) (position 0 50 0) 10)) ;; face1 ; Create cylindrical face 2. (define face2 (face:cylinder (position 0 0 0) (position 0 40 0) 15 45 135)) ;; face2 ; OUTPUT Example Figure. face:cylinder |
[Top]
entity | face |
start-u | real |
end-u | real |
start-v | real |
end-v | real |
Description
This extends the bounding parameters of the underlying surface of the given
face entity, entity, based on the supplied new starting and ending parameters
for u and v. It returns an entity which is a new face.
To do this, face:extend creates a law from the surface and constant laws for the parameter values. The constant laws are turned into vectors which are then combined with the surface law. They create curve laws as the bounding edges of a new surface, and are then used to create a new face.
; face:extend ; Extend an existing face. (define face1 (face:plane (position 0 0 0) 30 30)) ;; face1 (define extend (face:extend face1 0 40 -10 25)) ;; extend |
[Top]
law | law |
start-u | real |
end-u | real |
start-v | real |
end-v | real |
ao | acis-options |
Description
This extension creates a law face with the given uv bounds from a law
that takes two values and returns three.
; face:law ; Create a face from a law with a domain of dimension (define face-law1 (face:law "vec(cos(x),sin(x),x/5)" -10 10 -10 10)) ;; face-law1 |
[Top]
center | position |
normal | gvector |
major_axis | gvector |
ratio | real |
sin_angle | real |
cos_angle | real |
start_angle | real |
end_angle | real |
height | real |
start_pos | position |
end_pos | position |
ao | acis-options |
Description
Creates a face that is a portion of a cone. The cone is defined by a base
ellipse, sine, and cosine of the coning angle. Specify the base ellipse by a
center point, a unit vector normal to the plane of the ellipse, the major axis
vector, and ratio of the minor to major axis length. The sine and cosine of the
coning angle specify whether the result is a cylinder or a TRUE cone. If it is
a cone, they specify the direction of the apex.
The boundaries of the conical face are specified by start_angle, end_angle, and height. The angles are in the range [0,2pi]. The end of the major axis is 0 and it increases in compliance to the right hand rule using the ellipse normal. The height can be positive or negative, with the plane of the ellipse being 0, and positive numbers in the direction of the ellipse normal. The cone starts at the plane of the ellipse. It has the specified height, but never extends past the apex of the cone. Default values will create a unit cylinder, center in the origin.
If start_pos and end_pos are specified, then the major_axis, start_angle and end_angle will be ignored. The major axis will be calculated as the distance from the projection of the start position on the plane defined by the center and normal, to the center position. The end position will be projected into this plane as well and will provide the end angle.
; face:make-cone ; Make a partial conical face using start and end positions (define c1 (face:make-cone 'center (position 5 -25 5.566243270259 ) 'normal (gvector 0 1 0) 'start_pos (position -25 -25 10.566243270259) 'end_pos (position -25 25 10.566243270259) 'height 50)) ;; c1 ; OUTPUT Cone ; Make a complete conical face specifying the sine angle (define c2 (face:make-cone 'center (position 0 25 10.566243270259) 'normal (gvector 0 -1 0) 'major_axis (gvector 33.816349035 0 0) 'ratio .1 'height 50 'sin_angle -0.5 'start_angle 45 'end_angle 120)) ;; c2 ; OUTPUT Cone Figure. face:make-cone |
[Top]
center | position |
left | position |
right | position |
ao | acis-options |
Description
Creates a face that is a parallelogram specified by three points: center,
left, and right. These three points must not be colinear. The
normal to the plane is defined by the cross product of the vectors (right -
center) and (left - center).
The boundary consists of four linear edges starting at the center and towards the right to define a parallelogram ending at the center.
The center is the root point of the plane and the normal is in the direction of (right - center) * (left - center). left and right are points to the left and to the right of the center.
; Make a 1 x 1 squared face (part:clear) (face:make-parallelogram (position 0 0 0) (position 1 0 0) (position 0 1 0)) |
[Top]
tol | real |
num_ctrlpts_u | integer |
num_ctrlpts_v | integer |
ctrlpts | (list (position1) (position2)... (position nu x nv)) |
du_s | (list (gvector1)(gvector2)...(gvectornv)) |
du_e | (list (gvector1)(gvector2)...(gvectornv)) |
ao | acis-options |
Description
Creates a face containing a spline surface fitted to an [num_ctrlpts_u ] x
[num_ctrlpts_v] array of positions. The v index varies first.
That is, a row of v control points for the first u value is
found, then the row of v control points for the next u value
is found. Optional arrays of unit tangent vectors can be specified for the
boundary conditions for u at the start (du_s) and at the end (du_e)
of the surface. NULL pointers can be used for the start and end boundary
conditions.
[Top]
num_ctrlpts_u | integer |
num_ctrlpts_v | integer |
ctrlpts | (list (position1) (position2)... (position vu x nu)) |
du_s | (list (gvector1)(gvector2)...(gvectornv)) |
du_e | (list (gvector1)(gvector2)...(gvectornv)) |
dv_s | (list (gvector1)(gvector2)...(gvectornv)) |
dv_e | (list (gvector1)(gvector2)...(gvectornv)) |
ao | acis-options |
Description
Creates a spline surface that interpolates a set of points. The interpolation
scheme is cubic in both the u and v directions. The points
are contained in the array points.
The u index varies first. That is, a row of u control points for the first v value is found, then the row of u control points for the next v value is found.
Optional arrays of unit tangent vectors can be specified for the boundary conditions for u at the start (du_s) and at the end (du_e) of the surface. Similarly, dv_s and dv_e specify the unit tangent conditions for v at the start and end.
[Top]
face | face |
Description
This extension calculates the u and v parameter ranges of a given face.
; face:par-box ; Create face 1. (define face1 (face:plane (position 0 0 0) 30 30)) ;; face1 ; Determine the parameters of face1. (face:par-box face1) ;; (#[par-pos 0 30] . #[par-pos 0 30]) ; Clear for 2nd example. (part:clear) ;; #t ; Create face 2. (define face2 (face:cylinder (position 0 0 0) (position 0 30 0) 10 0 180)) ;; face2 ; Determine the parameters of face2. (face:par-box face2) ;; (#[par-pos 0 3] . #[par-pos 0 3.14159265358979]) |
[Top]
center | position |
normal | gvector |
radius | real |
ao | acis-options |
Description
This extension creates a planar disk of a given center, normal and
radius.
; face:planar-disk ; Create a planar disk (define pdisk (face:planar-disk (position 0 0 0) (gvector 0 0 10)10)) ;; pdisk |
[Top]
position | position |
width | real |
height | real |
normal | gvector |
Description
This extension creates a planar face of the given width and height, relative to
the active WCS, with its lower left-hand corner at the given position.
normal becomes the z-axis of an alternate coordinate system, (xyz). If the z-axis and the active x-axis are parallel, the new y-axis is the active y-axis. If they are not parallel, the y-axis is the normal to the plane defined by the z-axis and the x-axis. The x-axis is then determined as the normal to the plane defined y-axis and the z-axis.
If the normal is in the direction of the z-axis, then the width and height are in the direction of the WCS x-axis and y-axis respectively. Orientation of width and height in any other case is not guaranteed.
; face:plane ; Create planar face 1. (define face1 (face:plane (position 0 0 0) 30 30)) ;; face1 ; Create planar face 2. (define face2 (face:plane (position 0 0 30) 30 30)) ;; face2 ; Create planar face 3. (define face3 (face:plane (position 0 0 30) 30 30 (gvector 1 0 0))) ;; face3 ; Create planar face 4. (define face4 (face:plane (position 30 0 30) 30 30 (gvector 1 0 0))) ;; face4 ; OUTPUT Example Figure. face:plane |
[Top]
face | face |
tolerance | real |
Description
For a planar face this extension calculates the center of area, principal
moments, and principal axes. For all types of faces it also returns the area
and sidedness of a face. The results are in a global coordinate space of an
owning body. Use tolerance to specify an accuracy other than the default
accuracy of 0.01. The accuracy achieved will be returned.
; face:prop ; Create planar face 1. (define face1 (face:plane (position 0 0 0) 40 40 (gvector 1 -1 -1))) ;; face1 ; Calculate the properties of a planar face. (face:prop face1) ; Face is SINGLE_SIDED and FORWARD. ; PLANAR face properties: ;; (("area" . 1600.0) ("accuracy achieved" . 0) ;; ("center of face" . #[position 16.3299316185545 ;; -5.97716981445369 22.3071014330082]) ("principal ;; moment x" . 213333.333333334) ("principal axis x" ;; . #[gvector -0.707106781186548 0 ;; -0.707106781186548]) ("principal moment y" . ;; 213333.333333333) ("principal axis y" . #[gvector ;; 0.408248290463863 0.816496580927726 ;; -0.408248290463863])) ; Create planar face 2. (define face2 (face:sphere (position 10 10 10) 20)) ;; face2 ; Calculate the properties of a non-planar face. (face:prop face2) ; Face is SINGLE_SIDED and FORWARD. ; NON-PLANAR face properties: ;; (("area" . 5026.54824574367) ("accuracy achieved" ;; . 0) ("center of face" . #f) ("principal moment x" ;; . #f) ("principal axis x" . #f) ("principal moment ;; y" . #f) ("principal axis y" . #f)) |
[Top]
face | face |
ao | acis-options |
Description
This extension reverses the sense of the given face. The sense is used in
conjunction with the surface normal to determine which side of the face is
solid material, and is applicable only to single-sided faces of solids. This
extension affects the sense of the face's coedges.
; face:reverse ; Create a plane (define face1 (face:plane (position 0 0 0) 10 10)) ;; face1 (face:plane-normal face1) ;; #[gvector 0 0 1] (define reverse (face:reverse face1)) ;; reverse (face:plane-normal face1) ;; #[gvector 0 0 -1] ; Example 2 ; Create a solid cylinder. (define cyl1 (solid:cylinder (position 0 0 0) (position 0 8 0) 10)) ;; cyl1 ; Get a list of the faces for the cylinder. (define faces1 (entity:faces cyl1)) ;; faces1 ; (#[entity 4 1] #[entity 5 1] #[entity 6 1]) ; Reverse the sense of the face. (define reverse (face:reverse (list-ref faces1 0))) ;; reverse |
[Top]
position | position |
radius | real |
latitude-start | real |
latitude-end | real |
longitude-start | real |
longitude-end | real |
poledir | vector |
ao | acis-options |
Description
This extension creates a spherical face relative to the active WCS. The center
is the center of a sphere with the given radius.
angle1 and angle2 make up the latitude and angle3 and angle4 make up the longitude. Latitude moves from the equator 90 degrees to the North Pole or from the equator -90 degrees to the South Pole. Longitude moves from the zero meridian to the east 360 degrees (one complete revolution of the sphere). The default angles are latitude, -90 to 90, and longitude, 0 to 360. A partial sphere may be created, for example, by setting the latitude angles to 0 and 90, which results in the Northern hemisphere.
The north pole points in the direction of the active y-axis; the equator lies in the xz plane; and the zero meridian lies in the xy plane. The zero meridian begins at a positive radius length on the x-axis. Setting the poledir vector creates an alternate z-axis as described in face:plane.
; face:sphere ; Create spherical face 1. (define face1 (face:sphere (position 0 0 0) 30)) ;; face1 ; OUTPUT Spherical Face 1 ; Clear the first face (part:clear) ;; #t ; Create spherical face 2. (define face2 (face:sphere (position 0 0 0) 40 -45 45 0 360)) ;; face2 ; OUTPUT Spherical Face 2 ; Render to show the face. (render) ;; () ; OUTPUT Rendered Face Figure. face:sphere |
[Top]
center | position |
radius | real |
lat | gvector |
lon | gvector |
slat | real |
elat | real |
slon | vector |
elon | vector |
acis_options | acis-options |
; face:sphere-portion ; Create spherical face 1. (define face1 (face:sphere-portion (position 0 0 0) 10 (gvector 0 0 1) (gvector 0 1 0) -90 90 -45 45)) ;; face1 ; OUTPUT Spherical Face 1 ; Create spherical face 2. (define face2 (face:sphere-portion (position 0 30 0) 10 (gvector 0 0 1) (gvector 0 1 0) -45 45 -45 45)) ;; face2 ; OUTPUT Spherical Face 2 ; Render to show the face. (render) ;; () ; OUTPUT Rendered Face |
[Top]
spline | spline-face |
; face:spline ; Define a spline edge 1. (define e1 (edge:spline (list (position 0 0 0) (position 20 -20 0) (position 20 0 0)))) ;; e1 ; Define linear edge 2. (define e2 (edge:linear (position 20 0 0) (position 20 20 0))) ;; e2 ; Define linear edge 3. (define e3 (edge:linear (position 20 20 0) (position 0 20 0))) ;; e3 ; Define linear edge 4. (define e4 (edge:linear (position 0 20 0) (position 0 0 0))) ;; e4 ; Define a wire body from ; the spline and linear edges. (define w (wire-body (list e1 e2 e3 e4))) ;; w ; Create a solid by sweeping ; a planar wire along a vector. (define ws (solid:sweep-wire w (gvector 0 0 20))) ;; ws ; Get the faces of the solid. (define faces (entity:faces ws)) ;; faces ; Try to create spline body for the face that is not a spline face (define body1 (face:spline (car (cdr faces)))) ;;*** Error face:spline: wrong argument type entity (expected spline face) ; Try to create spline body for a spline face (define body1 (face:spline (car (cdr (cdr (cdr faces)))))) ;; body1 |
[Top]
surface-data | splsurf |
Description
This extension creates a spline surface face with the given surface control
points, weights, knot data, and parametric values.
; face:spline-ctrlpts ; Create a spline surface data type. (define surf1 (splsurf)) ;; surf1 ; Set the control points. (define ctrlpoints1 (list (position -10 -10 20) (position -5 0 10) (position -20 20 30) (position -20 -15 10) (position -30 -10 0) (position -30 25 -30) (position 0 -10 -20) (position 5 -12 -30) (position 0 15 15) (position 30 -6 -5) (position 25 -10 0) (position 30 25 -30) (position 10 -10 10) (position 25 -10 20) (position 20 20 30))) ;; ctrlpoints1 (splsurf:set-ctrlpt-list surf1 ctrlpoints1 5 3) ;; #[splsurf bc4700] ; Set the u and v parameter values. (splsurf:set-u-param surf1 3 0 0 0) ;; #[splsurf bc4700] (splsurf:set-v-param surf1 2 0 0 0) ;; #[splsurf bc4700] ; set the u and v knot values. (define uknots (list 0 0 0 0 0.5 1 1 1 1)) ;; uknots (splsurf:set-u-knot-list surf1 uknots 9) ;; #[splsurf bc4700] (define vknots (list 0 0 0 1 1 1)) ;; vknots (splsurf:set-v-knot-list surf1 vknots 6) ;; #[splsurf bc4700] ; Create the spline face. (define spline (face:spline-ctrlpts surf1)) ;; spline ; OUTPUT Example Figure. face:spline-ctrlpts |
[Top]
grid-data | splgrid |
interpolate | boolean |
ao | acis-options |
Description
This extension creates a spline surface face by interpolating (#t) or
approximating (#f) the b-spline surface given a grid of points (grid-data)
on the surface.
; face:spline-grid ; Create a spline grid data type. (define grid (splgrid)) ;; grid (define points1 (list (position -50 -50 0) (position 0 -50 50) (position 50 -50 0) (position -50 0 50) (position 0 0 100) (position 50 0 50) (position -50 50 0) (position 0 50 50) (position 50 50 0))) ;; points1 (splgrid:set-point-list grid points1 3 3) ;; #[splgrid bc1510] ; Set the start and end tangent vector lists for u. (define vectors1 (list (gvector 1 0 1) (gvector 1 0 1) (gvector 1 0 1))) ;; vectors1 (splgrid:set-u-tanvec-list grid vectors1 #t) ;; #[splgrid bc1510] (set! vectors1 (list (gvector 1 0 -1) (gvector 1 0 -1) (gvector 1 0 -1))) ;; (#[gvector 1 0 1] #[gvector 1 0 1] ;; #[gvector 1 0 1]) (splgrid:set-u-tanvec-list grid vectors1 #f) ;; #[splgrid bc1510] ; Set the start and end tangent vector lists for v. (define vectors2 (list (gvector 0 1 1) (gvector 0 1 1) (gvector 0 1 1))) ;; vectors2 (splgrid:set-v-tanvec-list grid vectors2 #t) ;; #[splgrid bc1510] (set! vectors2 (list (gvector 0 1 -1) (gvector 0 1 -1) (gvector 0 1 -1))) ;; (#[gvector 0 1 1] #[gvector 0 1 1] ;; #[gvector 0 1 1]) (splgrid:set-v-tanvec-list grid vectors2 #f) ;; #[splgrid bc1510] ; Interpolate the B-spline surface. (define grid1 (face:spline-grid grid #t)) ;; grid1 (zoom-all)) ;; () ; Approximate the B-spline surface. (splgrid:set-tolerance grid 0.01) ;; #[splgrid bc1510] (define grid2 (face:spline-grid grid #f)) ;; grid2 ; OUTPUT Example Figure. face:spline-grid |
[Top]
position | position |
spine-radius | real |
tube-radius | real |
tube-start | real |
tube-end | real |
spine-start | real |
spine-end | real |
vector | vector |
Description
Creates a toroidal face relative to the active WCS. The torus axis is in the
direction of the active y-axis.
; face:torus ; Create toroidal face 1. (define face1 (face:torus (position 0 0 0) 30 10)) ;; face1 ; Create toroidal face 2. (define face2 (face:torus (position -10 -10 -10) 10 20 -90 90 0 180)) ;; face2 ; OUTPUT Example Figure. face:torus |
[Top]
center | position |
normal | gvector |
major | real |
minor | real |
pnt | position |
uf | real |
ut | real |
vf | real |
vt | real |
acis-options | acis-options |
; face:torus-portion ; Create toroidal face 1. (define face1 (face:torus-portion (position 0 0 0) (gvector 0 0 1) 30 10 (position 30 0 0) 0 360 0 180 )) ;; face1 ; Create toroidal face 2. (define face2 (face:torus-portion (position 0 40 0) (gvector 0 0 1) 30 10 (position 0 40 0) -45 45 180 270 )) ;; face2 ; OUTPUT Example |
[Top]
line | edge |
st_pt | position |
end_pt | position |
acis-opts | acis-options |
;create a linear edge
(part:clear) (define e1 (edge:linear (position 0 0 0) (position 0 0 10))) ;;e1 ;define new start point for the edge (define st_pt (position -10 0 -10)) ;;st_pt ;define new end point for the edge (define end_pt (position 10 10 20)) ;;end_pt ;modify the linear edge (line:modify e1 st_pt end_pt) ;;#[entity 1 1] ; OUTPUT Examples |
[Top]
curve | linear-curve | linear-edge |
direction | gvector |
; line:set-direction ; Create a linear curve. (define curve1 (curve:linear (position 0 0 0) (position 40 40 40))) ;; curve1 ; Set the direction of a linear curve. (line:set-direction curve1 (gvector 0 1 0)) ;; #[curve 401b75a8] ; Perform same example with an edge (define edge1 (edge:linear (position 10 0 0) (position 40 40 40))) ;; edge1 ; Set the direction of a linear edge. (define direction (line:set-direction edge1 (gvector 0 1 0))) ;; direction |
[Top]
curve | linear-curve | linear-edge |
position | position |
; line:set-end ; Create a linear curve. (define curve1 (curve:linear (position 0 0 0) (position 40 40 40))) ;; curve1 ; Set the end position of a linear curve. (line:set-end curve1 (position 35 35 35)) ;; #[curve 401b75a8] ; Perform same example with an edge (define edge1 (edge:linear (position 10 0 0) (position 40 40 40))) ;; edge1 ; Set the end position of a linear edge. (define setend (line:set-end edge1 (position 35 35 35))) ;; setend |
[Top]
curve | linear-curve | linear-edge |
position | position |
; line:set-start ; Create a linear curve. (define curve1 (curve:linear (position 0 0 0) (position 40 40 40))) ;; curve1 ; Set the start position of a linear curve. (line:set-start curve1 (position 20 20 20)) ;; #[curve 401b75a8] ; Perform same example with an edge (define edge1 (edge:linear (position 10 0 0) (position 40 40 40))) ;; edge1 ; Set the start position of a linear edge. (define setstart (line:set-start edge1 (position 20 20 20))) ;; setstart |
[Top]
loop | loop |
; loop:external? ; make a block with a hole in it (define body (solid:block (position 0 0 0) (position 20 5 20))) ;; body (define tool (solid:cylinder 10 0 10 10 5 10 2)) ;; tool (define new_body (solid:subtract body tool)) ;; new_body ; identify the top face and its list of two loops (define top_face (list-ref (entity:faces body) 5)) ;; top_face (define top_loops (entity:loops top_face)) ;; top_loops ; one of the loops is internal, one is external (loop:external? (list-ref top_loops 0)) ;; #f (loop:external? (list-ref top_loops 1)) ;; #t |
[Top]
None |
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.