Functional Variations of Skinning

From DocR21

Jump to: navigation, search


Contents

Basic Skinning

Scheme Extensions: sheet:skin-wires

C++ APIs: api_skin_wires

Skinning Options: arc_length, no twist, simplify, closed, solid, periodic

Basic skinning fits a surface through a series of curves. For this functional variation the skinning algorithm computes the take-off vector field going into and out of the wire bodies. If only two wires are given, the resulting surface is ruled.

;Basic skinning 
(define wire_0 (wire-body (list (edge:spline (list (position 0 0 0) (position 20 10 0) (position 40 0 0))))))
(define wire_1 (wire-body (list (edge:spline (list (position -20 10 30) (position 0 20 30) (position 20 10 30))))))
(define wire_2 (wire-body (list (edge:spline (list (position 0 0 60) (position 20 10 60) (position 40 0 60))))))
(define skin (sheet:skin-wires  (list wire_0 wire_1 wire_2) "solid" #f))
Skinning Input
Skin BODY


Skinning with a Path

Scheme Extensions: sheet:skin-wires

C++ APIs: api_skin_wires

Skinning Options: arc_length, no twist, simplify, closed, solid, periodic, virtualGuides

Skinning with guide curves is a method of locally controlling the shape of the v parameter direction of the skin surface in between the input wires. In a typical skinning operation, the user creates two or more wire bodies and a surface is fitted between them. When skinning with a guide curve, one or more 3-space curves can be specified between the skinning profiles, and the surface will follow the guide curves. The surface will be C1 continuous at every point, even across the guide itself.

;sheet:skin-wires. With and without path.
(part:clear)
(define e0 (edge:circular (position 0 0 0) 5 0 360))
(define v1 (wire-body:points (list (position 10 0 10) (position 5 8.65 10) (position -5 8.65 10) (position -10 0 10 )
                                   (position -5 -8.65 10) (position 5 -8.65 10) (position 10 0 10)
                                   )))
(define v2 (wire-body:points (list (position 10 0 20) (position 5 8.65 20) (position -5 8.65 20) (position -10 0 20 )
                                   (position -5 -8.65 20) (position 5 -8.65 20) (position 10 0 20)
                                   )))
(define e3 (edge:circular (position 0 0 30) 5 0 360))
(define v0 (wire-body e0))
(define v3 (wire-body e3))
(define path_points (list (position 0 0 -1) (position 0 0 31 )))
(define path (wire-body (edge:spline path_points (gvector 0 0 1) (gvector 0 0 1))))
; Skinning operation with path:
(define skin_w_path (sheet:skin-wires (list v0 v1 v2 v3)  path #f #t #t #f))
(entity:delete skin_w_path)
 
; Skinning operation without path:
(entity:delete path)
(define skin (sheet:skin-wires (list v0 v1 v2 v3)  #f #t #t #f))
Skinning Input
Skinning with path
Skinning without path


Skinning with a Draft Angle

Scheme Extensions: sheet:skin-wires-draft

C++ APIs: api_skin_wires

Skinning Options: arc_length, no twist, closed, solid

Skinning with draft angles provides the ability to control the take-off vectors of the two outer skinning profiles. The draft angle is defined as an angle off the plane of the wire at every point along the skinning profile. In addition to the user supplying the angle itself, one may also supply a magnitude for the take-off vector.

The draft angle and magnitude is constant for the entire profile. However, one may apply different draft angles to the two outer profiles. In addition skinning with draft angles supports open and closed profiles and skinning to a point. When skinning to a point, the algorithm constructs its own normal vector. The outer profiles must be planar when not degenerate.

; Skinning with draft 
(part:clear)
(define wire_0 (wire-body (list (edge:linear
    (position 0 0 0) (position 50 0 0))
    (edge:linear (position 50 0 0)
    (position 50 50 0)) (edge:linear
    (position 50 50 0) (position 0 50 0))
    (edge:linear (position 0 50 0)
    (position 0 0 0)))))
;; wire_0
(define wire_1 (wire-body (list (edge:linear
    (position 0 0 100) (position 50 0 100))
    (edge:linear (position 50 0 100)
    (position 50 50 100)) (edge:linear
    (position 50 50 100) (position 0 50 100))
    (edge:linear (position 0 50 100)
    (position 0 0 100)))))
;; wire_1
; Create the sheet body and interpolate wires at
; specified angle.
(define body (sheet:skin-wires-draft
    (list wire_0 wire_1) 45 45 100 100))
Skinning Input
Skin BODY


Skinning to the Planar Normal

Scheme Extensions: sheet:skin-wires-normal

C++ APIs: api_skin_wires

Skinning Options: arc_length, no twist, closed, solid, periodic

Skinning to the planar normal provides the ability to constrain the take-off vectors on each profile to the profile's normal. All profiles must be planar and non-degenerate.

As input, api_skin_wires takes the enumerated type skinning_normals containing the following constants:

LAST_NORMAL constrain only the last profile
FIRST_NORMAL constrain only the first profile
ENDS_NORMAL constrain the first and last profile
ALL_NORMAL constrain all the profiles

Skinning to the planar normal does not allow control of the magnitude of the take-off vectors; rather, it determines the magnitudes that yield surfaces with the maximum minimum radius of curvature.

;Skinning to the planar normal 
(part:clear)
(define wire1 (wire-body (list (edge:circular (position 0 0 0) 10 180 270)
                               (edge:linear (position 0 -10 0) (position 100 -10 0))
                               (edge:circular (position 100 0 0) 10 270 360)
                               (edge:linear (position 110 0 0) (position 110 25 0))
                               (edge:circular (position 100 25 0) 10 0 90)
                               (edge:linear (position 100 35 0) (position 0 35 0))
                               (edge:circular (position 0 25 0) 10 90 180)
                               (edge:linear (position -10 25 0 ) (position -10 0 0)))))
(define wire2 (wire-body (list (edge:circular (position 40 5 30) 10 180 270)
                               (edge:linear (position 40 -5 30) (position 60 -5 30))
                               (edge:circular (position 60 5 30) 10 270 360)
                               (edge:linear (position 70 5 30) (position 70 20 30))
                               (edge:circular (position 60 20 30) 10 0 90)
                               (edge:linear (position 60 30 30) (position 40 30 30))
                               (edge:circular (position 40 20 30) 10 90 180)
                               (edge:linear (position 30 20 30 ) (position 30 5 30)))))
(define my_wcs1 (wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 0 1)))
(wcs:set-active my_wcs1)
(define wire3 (wire-body (list (edge:circular (position 50 70 60)  20 0 360))))
(wcs:set-active #f)
(define opts (skin:options "merge_wirecoedges" #f))
(define body1 (sheet:skin-wires-normal (list wire1 wire2 wire3) "ENDS_NORMAL" opts))
;result from ENDS_NORMAL constrain
 
(entity:delete body1)
(define body1 (sheet:skin-wires-normal (list wire1 wire2 wire3) "ALL_NORMAL" opts))
;result from ALL_NORMAL constrain
Skinning Input
Skinning with ENDS_NORMAL constrain
Skinning with ALL_NORMAL constrain


Skinning with Guide Curves

Scheme Extensions: sheet:skin-wires-guides

C++ APIs: api_skin_wires

Skinning Options: arc_length, no twist, simplify, closed, solid, periodic, virtualGuides

Skinning with guide curves is a method of locally controlling the shape of the v parameter direction of the skin surface in between the input wires. In a typical skinning operation, the user creates two or more wire bodies and a surface is fitted between them. When skinning with a guide curve, one or more 3-space curves can be specified between the skinning profiles, and the surface will follow the guide curves. The surface will be C1 continuous at every point, even across the guide itself.

If the guide curve passes through the vertices, the surfaces on the two adjoining faces follow the curve profile. In this case, the boundary of the surface extends along the guide and we do not maintain C1 continuity.

Considerations on input of guide curves:

  • The guide curves must contact (within SPAresabs) each profile in the skinning list.
  • The guide curves must start and end on the first and last guide curves respectively.
  • Any number of guide curves can be specified.
  • The guide curves need not be consistent in the v direction.
  • The guide curves must be non-looping and well behaved.

In addition to surface control, guide curves also implicitly control the breakup of the coedges. If the guide curves intersect vertices on the wire it is guaranteed that those vertices will align. If a guide curve intersects coedges at positions other than vertices, then the adjacent vertices will be aligned

;Skinning with guide curves 
(part:clear)
(wcs (position 0 0 0) (gvector 1 0 0) (gvector 0 1 0))
(define wire_0 (wire-body (list (edge:linear (position 0 0 0) (position 100 0 0)))))
(define wire_1 (wire-body (list (edge:linear (position 0 100 0) (position 100 100 0)))))
 
; --- Creates Two guides
(define guide1 (edge:spline (list (position 50 0 0) (position 50 40 -10) (position 50 60 20) (position  50 80 0) (position 50 100 0))))
(define guide2 (edge:spline (list (position 70 0 0) (position 70 40 10) (position 70 60 -20) (position  70 80 0) (position 70 100 0))))
 
(define skin (sheet:skin-wires-guides (list wire_0 wire_1) (list guide1 guide2) "virtualGuides" #f "solid" #f))
Skinning Input
Skin BODY


Skinning with Virtual Guide Curves

Scheme Extensions: sheet:skin-wires-guides

C++ APIs: api_skin_wires

Skinning Options: arc_length, no twist, simplify, closed, solid, periodic, virtualGuides

Virtual guide curves provide the ability to make one guide curve globally affect the skinned surfaces. If one guide curve is added to a list of profiles, ACIS takes that guide curve and propagates it across the profiles to each edge vertex. This effectively changes guide curves from local surface control to global surface control. The virtualGuides option is FALSE by default, but can be set to TRUE in the call to the function api_skin_wires.

One or more guide curves can be placed on the wire profiles. In this case, the guide curve closest to the edge is propagated to each edge vertex.

If a wire vertex has two neighboring user-defined guide curves, the two curves are blended together at the vertex.

;Skinning with Virtual Guide Curves  
(part:clear)
;creates three wires
(define wire_0 (wire-body (list (edge:linear (position -60 0 0) (position 60 0 0))
                                (edge:linear (position 60 0 0) (position 60 50 0))
                                (edge:linear (position 60 50 0) (position -60 50 0))
                                (edge:linear (position -60 50 0) (position -60 0 0)))))
(define wire_1 (wire-body (list (edge:linear (position -30 0 100) (position 30 0 100))
                                (edge:linear (position 30 0 100) (position 30 40 100))
                                (edge:linear (position 30 40 100) (position -30 40 100))
                                (edge:linear (position -30 40 100) (position -30 0 100)))))
(define wire_2 (wire-body (list (edge:circular (position 0 -85 150)  25 0 360))))
 
;creates a guide curves
(define guide1 (edge:spline (list (position 0 0 0) (position 0 20 50) (position 0 0 100) (position 0 -20 160) (position 0 -50 160) (position 0 -60 150))))
 
 
(define body (sheet:skin-wires-guides (list wire_0 wire_1 wire_2)  (list guide1) "virtualGuides" #t "solid" #f))
(entity:delete guide1)
Skinning Input
Skin BODY


Skinning with Ruled Surfaces

Scheme Extensions: sheet:skin-wires-ruled

C++ APIs: api_skin_wires

Skinning Options: arc_length, no twist, simplify, closed, solid

Ruled skinning provides the ability to skin a series of three or more profiles by placing ruled surfaces in between each section of profiles. If only two profiles are provided, this command defaults to basic skinning and generates a ruled surface in between the two profiles.

Ruled skinning works with both closed and open profiles, degenerate end points, and the solid and closed options. However, it is possible in many closed situations to have surfaces that intersect each other. No check is made for that case.

;Skinning with Ruled Surfaces   
(part:clear)
;creates four wires
(define wire1 (wire-body (list (edge:circular (position 0 0 0) 30))))
(define wire2 (wire-body (list (edge:circular (position 0 0 50) 30))))
(define wire3 (wire-body (list (edge:circular (position 0 0 75) 50))))
(define wire4 (wire-body (list (edge:circular (position 0 0 100) 50))))
 
;generates the ruled body
(define body (sheet:skin-wires-ruled (list wire1 wire2 wire3 wire4) "solid" #f))
Skinning Input
Skin BODY


Multi-stem Skinning

Scheme Extensions: sheet:skin-wires-branch

C++ APIs: api_skin_wires

Skinning Options: arc_length, align, no twist, solid

Multi-stem skinning, also called branched skinning, provides the ability to skin multiple profile paths. The user first specifies a profile path for the trunk of the skin, consisting of one or more wires.They can then specify two or more branches (each of one or more wires) which the skin body will follow.

Unlike regular skinning, the order of the wires in the profile list(s) is important. The last profile in the trunk will be the end to which the branches attach. The first profile of each of the branches will be the end which they attach to the trunk.

In addition to the standard options, the user may also specify "normal" conditions similar to those described in Skinning to the Planar Normal. However, in all cases the normal condition will always be imposed on the last wire of the trunk. This guarantees a C1 continuity between the trunk and the branches.

The wire profiles may be open or closed and must be planar.

;sheet:skin-wires-branch
(define wire1 (wire-body (list (edge:circular (position 0 0 70) 30 0 360))))
(define wire2 (wire-body (list (edge:circular (position 0 0 0) 30 0 360))))
(define wire3 (wire-body (list (edge:circular (position -50 0 -100) 30 0 360))))
(define wire4 (wire-body (list (edge:circular (position 50 0 -100) 30 0 360))))
(define body (sheet:skin-wires-branch (list wire1 wire2) (list wire3) (list wire4)))
Skinning Input
Skin BODY
Personal tools
Live