Show overlapping prisms / blocks as solid

Home Forums Problems and solutions in GDL Object design Show overlapping prisms / blocks as solid

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #18218
      James Goode
      Participant

      Hello,

      I have created some hatching in 3D for one of our objects. This has been done by using a for I=1 to … function and then cut around the shape with cutpolya.

      Because my lines overlap diagonally due to it being a crosshatch, when I use project2 3, 270, 2 in 2D, it shows the lines crossing over. Is there any way that I can get rid of the overlapping lines so that it looks like one continuous block rather than separate elements?

      	cutpolya     12, 1, 0,
      				-50,            -50,      15, 
      				50,            -50,      15, 
      				50,          50,      15, 
      				-50,          50,      15, 
      				-50,            -50,     -1, 
      				line_width-ll,          line_width-bl,      1, 
      				line_width-ll,          B-line_width+tl,      1, 
      				margin-line_width/2,         b-line_width+tl,      1, 
      				margin-line_width/2,         margin-line_width/2,      1, 
      				A-line_width/2,          margin-line_width/2,     1,
      				A-line_width/2, line_width-bl, 1,
      				line_width-ll, line_width-bl, -1
      			
      	addy -4
      	rotz 45
      						
      	for i=1 to 40
      	cprism_{4} mat_hatching, mat_hatching, mat_hatching, 7,
      			5,          line_height,
      				0,            0,            0,     15, mat_hatching,
      				10,            0,            0,     15, mat_hatching,
      				10,          hatching_width,            0,     15, mat_hatching,
      				0,          hatching_width,            0,     15, mat_hatching,
      				0,            0,            0,     -1, mat_hatching
      
      	addy hatching_space
      	next i
      						
      	DEL 40
      	DEL 2
      
      	addy 10
      	rotz -45
      
      	for i=1 to 40
      	cprism_{4} mat_hatching, mat_hatching, mat_hatching, 7,
      			5,          line_height,
      				0,            0,            0,     15, mat_hatching,
      				10,            0,            0,     15, mat_hatching,
      				10,          hatching_width,            0,     15, mat_hatching,
      				0,          hatching_width,            0,     15, mat_hatching,
      				0,            0,            0,     -1, mat_hatching
      	addy -hatching_space
      	next i
      						
      	DEL 40
      	DEL 2
      	CUTEND

      Thanks

    • #18222
      Péter Baksa
      Keymaster

      Hi,

      the line elimination in mask of CPRISM_{3} only works when the edges are in the same place, it doesn’t calculate intersections.

      Other ways to do it:
      – model CPRISMs that only touch eachother
      – write a loop that PUTs the hole coordinates in a large CPRISM
      – use ADDGROUP, it removes lines at intersections

      Péter Baksa
      Library Platform, Software Engineer
      GRAPHISOFT SE

Viewing 1 reply thread
  • The forum ‘Object design’ is closed to new topics and replies.