Users:Geometry Generation/NURBS

From Carat++ Public Wiki
(Difference between revisions)
Jump to: navigation, search
Line 36: Line 36:
 
   UKNOT =  0.0, 0.0, 0.0, 10.0, 10.0, 10.0  !knot vector in u-directin (starts and ends with a multiplicity of p+1)
 
   UKNOT =  0.0, 0.0, 0.0, 10.0, 10.0, 10.0  !knot vector in u-directin (starts and ends with a multiplicity of p+1)
 
   VKNOT =  0,0,1,1                          !knot vector in v-directin (starts and ends with a multiplicity of q+1)
 
   VKNOT =  0,0,1,1                          !knot vector in v-directin (starts and ends with a multiplicity of q+1)
   TRIMMING = B_REP 1                        !includes a B-Rep description for the surface (Trimmed surface)  
+
   TRIMMING = B_REP 1                        !(optional) includes a B-Rep description for the surface (Trimmed surface)  
 
!===================================================================
 
!===================================================================
 
CTRL_PTS_DEF  2  !number of control points                                       
 
CTRL_PTS_DEF  2  !number of control points                                       
Line 56: Line 56:
 
!####                  NURBS-BLOCK-PARAMETER                    ####
 
!####                  NURBS-BLOCK-PARAMETER                    ####
 
!###################################################################
 
!###################################################################
NURBS_PATCH_PAR  1 : NURBS_1D
+
NURBS_PATCH_PAR  1 : NURBS_1D                                               !trimming curve within parameter space
 
   CTRL_PTS = CTRL_PTS_PAR  1
 
   CTRL_PTS = CTRL_PTS_PAR  1
 
   NCTRL =  1
 
   NCTRL =  1
 
   PDEG  =  1
 
   PDEG  =  1
 
   UKNOT =  0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+01, 1.0000000000e+01
 
   UKNOT =  0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+01, 1.0000000000e+01
 +
  TRIMMING = [0.000000e+000 1.000000e+000]                                  !(optional) defines active range of the trimming curve   
 
!===================================================================
 
!===================================================================
 
CTRL_PTS_PAR  1
 
CTRL_PTS_PAR  1

Revision as of 15:34, 8 December 2016

Contents

Curves

Input Example

Example of a complete input block:

!###################################################################
!####                        NURBS-BLOCK                        ####
!###################################################################
NURBS_PATCH  1 : NURBS_1D
  CTRL_PTS = CTRL_PTS_DEF  1
  NCTRL =  2
  PDEG  =  2
  UKNOT =  0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 3.1415926535897931e+01, 3.1415926535897931e+01, 3.1415926535897931e+01
!===================================================================
CTRL_PTS_DEF  1
  CTRLPT  1  0.0000000000000000e+00  1.0000000000000000e+01  0.0000000000000000e+00  1.0000000000000000e+00
  CTRLPT  2  1.0000000000000000e+01  1.0000000000000000e+01  0.0000000000000000e+00  7.0710678118654757e-01
  CTRLPT  3  1.0000000000000000e+01  0.0000000000000000e+00  0.0000000000000000e+00  1.0000000000000000e+00
!===================================================================

Surfaces

Input Example

Example of a complete input block:

!###################################################################
!####                        NURBS-BLOCK                        ####
!###################################################################
NURBS_PATCH  2 : NURBS_2D
  CTRL_PTS = CTRL_PTS_DEF  2
  NCTRL =  2                                 !number of control points starting from 0 in u-direction
  MCTRL =  1                                 !number of control points starting from 0 in v-direction
  PDEG  =  2                                 !polynomial degree in u-direction
  QDEG  =  1                                 !polynomial degree in v-direction
  UKNOT =  0.0, 0.0, 0.0, 10.0, 10.0, 10.0   !knot vector in u-directin (starts and ends with a multiplicity of p+1)
  VKNOT =  0,0,1,1                           !knot vector in v-directin (starts and ends with a multiplicity of q+1)
  TRIMMING = B_REP 1                         !(optional) includes a B-Rep description for the surface (Trimmed surface) 
!===================================================================
CTRL_PTS_DEF  2  !number of control points                                       
  CTRLPT  1  0.0000000000000000e+00  1.0000000000000000e+01  0.0000000000000000e+00  1.0000000000000000e+00  ! ||==>u 
  CTRLPT  2  1.0000000000000000e+01  1.0000000000000000e+01  0.0000000000000000e+00  7.0710678118654757e-01  ! ||     1 2 3 
  CTRLPT  3  1.0000000000000000e+01  0.0000000000000000e+00  0.0000000000000000e+00  1.0000000000000000e+00  !\  /    4 5 6
  CTRLPT  4  0.0000000000000000e+00  1.0000000000000000e+01  1.0000000000000000e+00  1.0000000000000000e+00  ! \/v
  CTRLPT  5  1.0000000000000000e+01  1.0000000000000000e+01  1.0000000000000000e+00  7.0710678118654757e-01  ! 
  CTRLPT  6  1.0000000000000000e+01  0.0000000000000000e+00  1.0000000000000000e+00  1.0000000000000000e+00  !
!===================================================================
!###################################################################
!####                        TRIMMING                           ####
!###################################################################
!             id   inner/outer    trimming curve id    Direction (FALSE means curve direction needs to be reversed for having correct orientation)
B_REP 1
 B_REP_LOOP   1         0              1               TRUE       2   TRUE   3   TRUE   4   TRUE   !outer loop (counter clockwise oriented trimming curves)
 !B_REP_LOOP   2         1             5               FALSE      6   TRUE   7   TRUE   8   TRUE   !inner loop (clockwise oriented trimming curves)
!###################################################################
!####                  NURBS-BLOCK-PARAMETER                    ####
!###################################################################
NURBS_PATCH_PAR  1 : NURBS_1D                                               !trimming curve within parameter space
  CTRL_PTS = CTRL_PTS_PAR  1
  NCTRL =  1
  PDEG  =  1
  UKNOT =  0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+01, 1.0000000000e+01
  TRIMMING = [0.000000e+000 1.000000e+000]                                  !(optional) defines active range of the trimming curve     
!===================================================================
CTRL_PTS_PAR  1
  CTRLPT_PAR_ID  1   
  CTRLPT_PAR_ID  2 
!===================================================================
!###################################################################
!####                  NURBS-BLOCK-PARAMETER                    ####
!###################################################################
NURBS_PATCH_PAR  2 : NURBS_1D
  CTRL_PTS = CTRL_PTS_PAR  2
  NCTRL =  1
  PDEG  =  1
  UKNOT =  0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+01, 1.0000000000e+01
!===================================================================
CTRL_PTS_PAR  2
  CTRLPT_PAR_ID  3  
  CTRLPT_PAR_ID  4  
!===================================================================
!###################################################################
!####                  NURBS-BLOCK-PARAMETER                    ####
!###################################################################
NURBS_PATCH_PAR  3 : NURBS_1D
  CTRL_PTS = CTRL_PTS_PAR  3
  NCTRL =  1
  PDEG  =  1
  UKNOT =  0.0000000000e+00, 0.0000000000e+00, 10, 10
!===================================================================
CTRL_PTS_PAR  3
  CTRLPT_PAR_ID  5  
  CTRLPT_PAR_ID  6  
!===================================================================
!###################################################################
!####                  NURBS-BLOCK-PARAMETER                    ####
!###################################################################
NURBS_PATCH_PAR  4 : NURBS_1D
  CTRL_PTS = CTRL_PTS_PAR  4
  NCTRL =  1
  PDEG  =  1
  UKNOT =  0.0000000000e+00, 0.0000000000e+00, 1.0000000000e+01, 1.0000000000e+01
!===================================================================
CTRL_PTS_PAR  4
  CTRLPT_PAR_ID  7  
  CTRLPT_PAR_ID  8  
!===================================================================
!###################################################################
!####                  NURBS-BLOCK-PARAMETER                    ####
!###################################################################
NURBS_PATCH_PAR  5 : NURBS_1D
  CTRL_PTS = CTRL_PTS_PAR  5
  NCTRL =  1
  PDEG  =  1
  UKNOT =  0.0000000000e+00, 0.0000000000e+00, 10, 10
!===================================================================
CTRL_PTS_PAR  5
  CTRLPT_PAR_ID  9  
  CTRLPT_PAR_ID  10  
!===================================================================
!===================================================================
CTRL_PTS_PAR_DEF
  CTRLPT_PAR  1    0.0000000000e+00    0.0000000000e+00
  CTRLPT_PAR  2    1.0000000000e+01    0.0000000000e+00
  CTRLPT_PAR  3    1.0000000000e+01    0.0000000000e+00
  CTRLPT_PAR  4    1.0000000000e+01    1.0000000000e+01
  CTRLPT_PAR  5    1.0000000000e+01    1.0000000000e+01
  CTRLPT_PAR  6    0.0000000000e+00    1.0000000000e+01
  CTRLPT_PAR  7    0.0000000000e+00    1.0000000000e+01
  CTRLPT_PAR  8    0.0000000000e+00    0.0000000000e+00

Volumes

Input Example

Example of a complete input block:

!###################################################################
!####                        NURBS-BLOCK                        ####
!###################################################################
NURBS_PATCH  3 : NURBS_3D
  CTRL_PTS = CTRL_PTS_DEF  3
  NCTRL =  2
  MCTRL =  1
  LCTRL =  1
  PDEG  =  2
  QDEG  =  1
  RDEG  =  1
  UKNOT =  0, 0, 0, 10, 10, 10
  VKNOT =  0,0,1,1
  WKNOT =  0,0,1,1
!===================================================================
CTRL_PTS_DEF  3
  CTRLPT  1  0.0000000000000000e+00  1.0000000000000000e+01  0.0000000000000000e+00  1.0000000000000000e+00
  CTRLPT  2  1.0000000000000000e+01  1.0000000000000000e+01  0.0000000000000000e+00  7.0710678118654757e-01
  CTRLPT  3  1.0000000000000000e+01  0.0000000000000000e+00  0.0000000000000000e+00  1.0000000000000000e+00
  CTRLPT  4  0.0000000000000000e+00  1.0000000000000000e+01  1.0000000000000000e+00  1.0000000000000000e+00
  CTRLPT  5  1.0000000000000000e+01  1.0000000000000000e+01  1.0000000000000000e+00  7.0710678118654757e-01
  CTRLPT  6  1.0000000000000000e+01  0.0000000000000000e+00  1.0000000000000000e+00  1.0000000000000000e+00
  CTRLPT  7  0.0000000000000000e+00  2.0000000000000000e+01  0.0000000000000000e+00  1.0000000000000000e+00
  CTRLPT  8  2.0000000000000000e+01  2.0000000000000000e+01  0.0000000000000000e+00  7.0710678118654757e-01
  CTRLPT  9  2.0000000000000000e+01  0.0000000000000000e+00  0.0000000000000000e+00  1.0000000000000000e+00
  CTRLPT  10 0.0000000000000000e+00  2.0000000000000000e+01  1.0000000000000000e+00  1.0000000000000000e+00
  CTRLPT  11 2.0000000000000000e+01  2.0000000000000000e+01  1.0000000000000000e+00  7.0710678118654757e-01
  CTRLPT  12 2.0000000000000000e+01  0.0000000000000000e+00  1.0000000000000000e+00  1.0000000000000000e+00
!===================================================================




Whos here now:   Members 0   Guests 0   Bots & Crawlers 1
 
Personal tools
Content for Developers