Notifications
Clear all

[Closed] How to pick a group object?

Is this correct?

(
	obj = $Box001

	while obj.parent != undefined and (isGroupHead obj.parent) do obj = obj.parent

	print obj	
)
4 Replies
(@gazybara)
Joined: 11 months ago

Posts: 0

no need for print but that’s it. One line code

fn getRootGroupHead obj = (while obj.parent != undefined and (isGroupHead obj.parent) do obj = obj.parent)

Now we need one line for getGeometryGroupMembers function

(@denist)
Joined: 11 months ago

Posts: 0

nope… one most important condition is missed

(@denist)
Joined: 11 months ago

Posts: 0

no… i give a clue… condition looks like


node != undefined and (not isgrouphed node or ...)

(@gazybara)
Joined: 11 months ago

Posts: 0

Second 1st condition “not isgrouphed node“is killing me. Are we talk about rootGroup or not?

trust me… the function looks as:


fn getRootGroupHead node = if ... node do
(
	while node != undefined and (not isgrouphead node and ... node) do node = ...
	node
)

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

First try

fn getRootGroupHead node = if isgroupMember node do
(
	while node != undefined and (not isgrouphead node and not isKindOf node Dummy) do node = node.parent
	node
)

Returns first parent group. Second[2nd] condition is wrong or whole code

LOL… you are killing me… what are two BASE group related functions?

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

Me? You are melting my brain with your tricky fn’s.
isGroupHead and isGroupMember.
Or I wrong again.

yes, yes, yes!!! it’s hot… only these two!

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

My mxs editor is hot. Even worse I freeze max 50 times. Only Task Manager helps me now

Kostadin where are you now? Help me bud, this is not easy

My son have 39.5 deg body temperature. I don’t have much time, but
Denis, can you tell me(us) when this will not works?

while obj.parent != undefined and (isGroupHead obj.parent) do obj = obj.parent
1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

Sorry bud I did not know? I saw that you active on these threat.
If you ask that kind of questions this “5 pages torture” will never end.
Denis, I tried for second condition:
#1 (not isgrouphead node and isGroupMember node.parent)
#2 (not isgrouphead node and not isGroupMember node.parent)
#3 (not isgrouphead node and isGroupMember node)
#4 (not isgrouphead node and not isGroupMember node)
But without luck. I not see your kindness today. Can this torture to be completed

He got this temperature 1,5 h ago.

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

You need to take care for your son, go, I will stay to see Denis mystery fn. But maybe

do you wanna the answer? easy… i can show. and i’m absolutely sure you will say after that: “FUKC… how simple is it!”

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

Maybe after we finish getGeometryGroupMembers function:) I’m kidding.
You start the challenge. Me and Kostadin are tried tho solve the riddle and we did in some way.
But you have another probably better solution that works in any cases. So its up to you to decide is it time to show your result and continue challenge

Last attempt and I will leave you:

fn getRootGroupHead node = if isValidNode node do
 	(
 		while node.parent != undefined and (isgrouphead node.parent and isGroupMember node) do node = node.parent
 		node
 	)
 	getRootGroupHead $Box001

returns the correct result, but i removed

not isgroupHead node
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

bingo! it’s so close!

the lite porno lucky (69) is famous now. his really primitive question made a discussion.

1 Reply
(@gazybara)
Joined: 11 months ago

Posts: 0

He asked here first and on scriptspot he have different “area” number.
this is the good weekend discussion

Page 4 / 6