nearest_point_3d Program

Uses

  • program~~nearest_point_3d~~UsesGraph program~nearest_point_3d nearest_point_3d module~forcad forcad program~nearest_point_3d->module~forcad module~forcad_kinds forcad_kinds module~forcad->module~forcad_kinds module~forcad_nurbs_curve forcad_nurbs_curve module~forcad->module~forcad_nurbs_curve module~forcad_nurbs_surface forcad_nurbs_surface module~forcad->module~forcad_nurbs_surface module~forcad_nurbs_volume forcad_nurbs_volume module~forcad->module~forcad_nurbs_volume module~forcad_nurbs_curve->module~forcad_kinds fordebug fordebug module~forcad_nurbs_curve->fordebug module~forcad_utils forcad_utils module~forcad_nurbs_curve->module~forcad_utils module~forcad_nurbs_surface->module~forcad_kinds module~forcad_nurbs_surface->fordebug module~forcad_nurbs_surface->module~forcad_utils module~forcad_nurbs_volume->module~forcad_kinds module~forcad_nurbs_volume->fordebug module~forcad_nurbs_volume->module~forcad_utils module~forcad_utils->module~forcad_kinds

The weights of the control points (Wc) are optional.

Generate the NURBS volume with resolutions of 20, 20, 20

Find the nearest point on the volume to a given point Find the nearest point on the volume to a given point The optimization method is used to find the nearest point The optimization method is based on the Newton-Raphson method Finalize the NURBS volume object


Calls

program~~nearest_point_3d~~CallsGraph program~nearest_point_3d nearest_point_3d none~set~2 nurbs_volume%set program~nearest_point_3d->none~set~2 proc~create~2 nurbs_volume%create program~nearest_point_3d->proc~create~2 proc~finalize~2 nurbs_volume%finalize program~nearest_point_3d->proc~finalize~2 proc~nearest_point2~2 nurbs_volume%nearest_point2 program~nearest_point_3d->proc~nearest_point2~2 proc~nearest_point~2 nurbs_volume%nearest_point program~nearest_point_3d->proc~nearest_point~2 proc~set1~2 nurbs_volume%set1 none~set~2->proc~set1~2 proc~set2~2 nurbs_volume%set2 none~set~2->proc~set2~2 proc~set3~2 nurbs_volume%set3 none~set~2->proc~set3~2 proc~set4~2 nurbs_volume%set4 none~set~2->proc~set4~2 interface~compute_xg~2 compute_Xg proc~create~2->interface~compute_xg~2 interface~ndgrid ndgrid proc~create~2->interface~ndgrid proc~is_rational~2 nurbs_volume%is_rational proc~create~2->proc~is_rational~2 set set proc~create~2->set proc~nearest_point2~2->proc~create~2 proc~nearest_point2~2->proc~finalize~2 proc~nearest_point2~2->proc~nearest_point~2 none~derivative2~2 nurbs_volume%derivative2 proc~nearest_point2~2->none~derivative2~2 proc~cmp_xg~2 nurbs_volume%cmp_Xg proc~nearest_point2~2->proc~cmp_xg~2 proc~inv inv proc~nearest_point2~2->proc~inv proc~compute_xg_bspline_3d compute_Xg_bspline_3d interface~compute_xg~2->proc~compute_xg_bspline_3d proc~compute_xg_bspline_3d_1point compute_Xg_bspline_3d_1point interface~compute_xg~2->proc~compute_xg_bspline_3d_1point proc~compute_xg_nurbs_3d compute_Xg_nurbs_3d interface~compute_xg~2->proc~compute_xg_nurbs_3d proc~compute_xg_nurbs_3d_1point compute_Xg_nurbs_3d_1point interface~compute_xg~2->proc~compute_xg_nurbs_3d_1point proc~ndgrid2 ndgrid2 interface~ndgrid->proc~ndgrid2 proc~ndgrid3 ndgrid3 interface~ndgrid->proc~ndgrid3 proc~derivative2_scalar~2 nurbs_volume%derivative2_scalar none~derivative2~2->proc~derivative2_scalar~2 proc~derivative2_vector~2 nurbs_volume%derivative2_vector none~derivative2~2->proc~derivative2_vector~2 proc~cmp_xg~2->interface~compute_xg~2 proc~cmp_xg~2->proc~is_rational~2 proc~inv->proc~inv proc~det det proc~inv->proc~det proc~eye eye proc~inv->proc~eye proc~solve solve proc~inv->proc~solve proc~set1~2->set proc~cmp_degree~2 nurbs_volume%cmp_degree proc~set1~2->proc~cmp_degree~2 proc~cmp_nc~2 nurbs_volume%cmp_nc proc~set1~2->proc~cmp_nc~2 proc~set2~2->set proc~set2~2->proc~cmp_nc~2 proc~compute_knot_vector compute_knot_vector proc~set2~2->proc~compute_knot_vector proc~set3~2->set proc~set3~2->proc~cmp_degree~2 proc~set4~2->set proc~cmp_degree~2->set proc~get_multiplicity~2 nurbs_volume%get_multiplicity proc~cmp_degree~2->proc~get_multiplicity~2 proc~cmp_nc~2->set interface~compute_multiplicity compute_multiplicity proc~cmp_nc~2->interface~compute_multiplicity proc~repelem repelem proc~compute_knot_vector->proc~repelem interface~kron kron proc~compute_xg_bspline_3d->interface~kron proc~basis_bspline basis_bspline proc~compute_xg_bspline_3d->proc~basis_bspline proc~compute_xg_bspline_3d_1point->interface~kron proc~compute_xg_bspline_3d_1point->proc~basis_bspline proc~cmp_tgc_3d cmp_Tgc_3d proc~compute_xg_nurbs_3d->proc~cmp_tgc_3d proc~compute_xg_nurbs_3d_1point->interface~kron proc~compute_xg_nurbs_3d_1point->proc~basis_bspline proc~derivative2_scalar~2->proc~is_rational~2 interface~compute_d2tgc~2 compute_d2Tgc proc~derivative2_scalar~2->interface~compute_d2tgc~2 proc~derivative2_vector~2->interface~ndgrid proc~derivative2_vector~2->proc~is_rational~2 proc~derivative2_vector~2->interface~compute_d2tgc~2 proc~compute_d2tgc_bspline_3d_scalar compute_d2Tgc_bspline_3d_scalar interface~compute_d2tgc~2->proc~compute_d2tgc_bspline_3d_scalar proc~compute_d2tgc_bspline_3d_vector compute_d2Tgc_bspline_3d_vector interface~compute_d2tgc~2->proc~compute_d2tgc_bspline_3d_vector proc~compute_d2tgc_nurbs_3d_scalar compute_d2Tgc_nurbs_3d_scalar interface~compute_d2tgc~2->proc~compute_d2tgc_nurbs_3d_scalar proc~compute_d2tgc_nurbs_3d_vector compute_d2Tgc_nurbs_3d_vector interface~compute_d2tgc~2->proc~compute_d2tgc_nurbs_3d_vector proc~compute_multiplicity1 compute_multiplicity1 interface~compute_multiplicity->proc~compute_multiplicity1 proc~compute_multiplicity2 compute_multiplicity2 interface~compute_multiplicity->proc~compute_multiplicity2 proc~kron3 kron3 interface~kron->proc~kron3 proc~kron_t1_t1 kron_t1_t1 interface~kron->proc~kron_t1_t1 proc~kron_t1_t2 kron_t1_t2 interface~kron->proc~kron_t1_t2 proc~cmp_tgc_3d->interface~kron proc~cmp_tgc_3d->proc~basis_bspline proc~get_multiplicity~2->interface~compute_multiplicity proc~compute_d2tgc_bspline_3d_scalar->interface~kron interface~basis_bspline_2der basis_bspline_2der proc~compute_d2tgc_bspline_3d_scalar->interface~basis_bspline_2der proc~compute_d2tgc_bspline_3d_vector->interface~kron proc~compute_d2tgc_bspline_3d_vector->interface~basis_bspline_2der proc~compute_d2tgc_nurbs_3d_scalar->interface~kron proc~compute_d2tgc_nurbs_3d_scalar->interface~basis_bspline_2der proc~compute_d2tgc_nurbs_3d_vector->interface~kron proc~compute_d2tgc_nurbs_3d_vector->interface~basis_bspline_2der proc~basis_bspline_2der_a basis_bspline_2der_A interface~basis_bspline_2der->proc~basis_bspline_2der_a proc~basis_bspline_2der_b basis_bspline_2der_B interface~basis_bspline_2der->proc~basis_bspline_2der_b proc~basis_bspline_2der_c basis_bspline_2der_C interface~basis_bspline_2der->proc~basis_bspline_2der_c

Variables

Type Attributes Name Initial
real(kind=rk) :: Wc(8)

Weights of the control points

real(kind=rk) :: Xc(8,3)

Control points

integer :: id

id of the nearest point

real(kind=rk) :: nearest_Xg(3)

Coordinates of the nearest point on the volume

real(kind=rk) :: nearest_Xt(3)

Corresponding parametric coordinates of the nearest point

type(nurbs_volume) :: shape

Declare a NURBS volume object