Status code: sharp to smooth

Home Forums Problems and solutions in GDL 3D modelling Status code: sharp to smooth

This topic contains 2 replies, has 2 voices, and was last updated by  Bruce Walker 13 hours, 53 minutes ago.

  • Author
    Posts
  • #4665

    Bruce Walker
    Participant

    What’s the trick to transitioning from a sharp edge to a smoothed edge? I want sharp edges at the curve ends, but smoothed edges within the curve itself (see attached images).

    Code

    	PRISM_ 7, 1,
    		0, 0, 15,
    		0, 1, 15,
    		0.25, 1, 15,
    		0.5, 1, 900,
    		0, 180, 4015,
    		1, 1, 15,
    		1, 0, 15

    www.brucepwalker.com
    https://www.mindmeister.com/65450406

    AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
    NVIDIA GeForce GTX 1060 8Mb

  • #4668

    Péter Baksa
    Participant

    Hi,

    the trick is CPRISM_{3} with mask 8.

    CPRISM_{3} 0, 0, 0,
    		8, 7, 1,
    		0,	0,	0, 15,		0,
    		0,	1,	0, 15,		0,
    		0.25,	1,	0, 15,		0,
    		0.5,	1,	0, 900,		0,
    		0,	180,	0, 4015,	0,
    		1,	1,	0, 15,		0,
    		1,	0,	0, 15,		0

    Péter Baksa
    Software Engineer, Library Team
    GRAPHISOFT SE

  • #4671

    Bruce Walker
    Participant

    Thanks Peter – this is it.

    Is there a way to set the material for the whole CPRISM without having to set it for each line (I don’t think so)? With the code you’ve supplied (thank you), a preceding MATERIAL command will only set the top and bottom materials.

    Also, the ‘side_material’ listing at the command level seems redundant, as this has to be set for each coordinate line. Am I reading this right?

    www.brucepwalker.com
    https://www.mindmeister.com/65450406

    AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
    NVIDIA GeForce GTX 1060 8Mb

You must be logged in to reply to this topic.