Split rectangle in triangles

605
2
06-11-2014 11:02 PM
NicolajMikkelsen
New Contributor
Hi.

Is it possible to split a rectangle in to two triangles - Splitting on the along the diagonal?
Tags (2)
0 Kudos
2 Replies
MatthiasBuehler1
Frequent Contributor
hi,


you need to insert an asset with the two tringles to do this ..

matt
0 Kudos
desert
by
New Contributor III

I'm a beginner in CGA, taking it step by step by looking through old QnAs.
I haven't explored all of the CGA features yet, so there might be simpler and better codes, but assuming a rectangle, you can use the following code to bisect it diagonally.

seongwonkang_0-1693538086466.png

diagonalAngle = atan(scope.sx/scope.sz)

Lot -->
	rotateScope(0, diagonalAngle, 0) //You should rotateScope before split().
	split(x){'.5:A.}

 

 

 

 

0 Kudos