Boolean Object
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/03/2005 at 01:52, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9
Platform: Windows ;
Language(s) : C++ ;---------
Hello ...Now I'm facing a problem which is somewhat strange.
I put a boolean first.
Then I put a cube. Let's say Vector(10,10,1).
Then another cube. Let's say Vector(2,2,2);So I will get a hole in the first cube, if I put them in the right coordinates.
Yes I get it.
The problem is when I use a loop to make so many holes in the first cube. I've got no holes , but omly the names in object hierarchy.So I use some exits to be sure that the cube(main) and the driller cube is really in the right place.
They are really at their right place and I can see a hole till I call the MCOMMAND_CURRENTSTATETOOBJECT. After the call, the main cube has got no hole at all.Please do a favor for me ... guys!
Waiting ...
Zaw Min Tun -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/03/2005 at 09:40, xxxxxxxx wrote:
Did you group your 'driller' cubes into a Null object so that they can all influence the Boolean together? An example of your hierarchy may help solve this.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/03/2005 at 19:46, xxxxxxxx wrote:
Hello ... Robert
I think I see what you mean ...
I'm not making the holes simultaneously ...Firstly ...
I put a hole on the MainCube using DrillerCube.
So the object hierarchy is
// => Means Parent-Child Relation (like GetUp() ... GetDown() of C4DAtom Class)
// -> Means (GetNext() ... GetPred())
Boole=>MainCube->DrillerCubeThen I call the function MCOMMAND_CURRENTSTATETOOBJECT
Then the object hierarchy changed to ...
NullObject=>MainCube(with a hole) -> DrillerCube ( just a thin line along the hole)So I got 2 objects.
If I want to make another hole I take the MainCube again (already got a hole) , then I make the things as I'd shown above again. Then I got a next hole again. I put a button in my dialog and let the user to click that button to get a hole. It's OK and working well. But sometimes I need to do the holes without the user button_click. So I call the function ( I created a function for drilling ) in a looping , but the procees is not drilling many holes simultaneously. Am I understood? Like this ...
DrillingFunction
******************************************************************************
1. Put a boolean object
2. Place the MainCube under the boolean
3. Put a DrillerCube under the boolean so that Boolean=>MainCube->DrillerCube
4. Call MCOMMAND_CURRENTSTATETOOBJECT using Boolean object
5. Then the object hierarchy will be
Boolean=>MainCube->DrillerCube
Null =>MainCube(with a hole) -> DrillerCube (along the hole line)
6. The upper hierarchy is deleted
7. Drag out the MainCube and DrillerCube
******************************************************************************I call that function form main() using a loop. The DrillerCube is surely thick enoug to make a drill and the place all I want to make the drills are also true. But no hole. I also used this same function in the button_click function. It is working properly. Even the loop count is one it is not working properly. So I think the Driller may be wrong in size or place. So I exit the drilling function befor calling MCOMMAND_CURRENTSTATETOOBJECT (step 4). I see the MainCube and DrillerCube are at their right place and I can also see a hole because of Boole , but after calling MCOMMAND_... , no hole.
So I think it's strange ...
When I do one by one , I got the hole.
But I do it using the loop, I got no hole (although I use the same function)I also use MCOMMAND_MAKEEDITABLE as an alternative. It is also on the same way.
So I'm facing an unexpectable stop in my development.Really thank you ... Robert.
If you got any idea ... please ...let me know.Zaw Min Tun
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/03/2005 at 21:10, xxxxxxxx wrote:
Hmmm, once you've called CurrentStateToObject, you get two objects in a Null object. The next step after 6. should be to "Connect" the result into one polygonal object. I think that this is MCOMMAND_JOIN with SendModelingCommand(). Use the result as MainCube for the next DrillingFunction.
DrillingFunction
******************************************************************************
1. Put a boolean object
2. Place the MainCube under the boolean
3. Put a DrillerCube under the boolean so that Boolean=>MainCube->DrillerCube
4. Call MCOMMAND_CURRENTSTATETOOBJECT using Boolean object
5. Then the object hierarchy will be
Boolean=>MainCube->DrillerCube
Null =>MainCube(with a hole) -> DrillerCube (along the hole line)
6. The upper hierarchy is deleted
7. Select children of Null
8. Call MCOMMAND_JOIN on Null
NewMainCube
Null=>MainCube(with hole)->DrillerCube(along hole line)
9. Delete the Null
****************************************************************************** -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/03/2005 at 00:29, xxxxxxxx wrote:
Thanks , Robert ...
But if I call MCOMMAND_JOIN , the two objects will turn into a single one. That's not what I want. I want them seperately. A cube with a hole and another one which looks like a thin box frame.
The question in my brain is ...
why it was working properly when it was done one by one by using the user input ( button_click)
and why it is behaving abnormally when the same code is called from main using a loop.Most of my suspicion is on messaging. Do I need to send a certain message? I already try MSG_CHANGE and MSG_UPDATE ,but still minus.
Thank you so much ... Robert
Zaw Min Tun -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/03/2005 at 00:34, xxxxxxxx wrote:
Hello Robert
I find that if I select only the parent object and call MCOMMAND_JOIN then the next output is not a single one. But the output of the step 4 (CurrentStateToObject) is already a wrong one.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/03/2005 at 01:45, xxxxxxxx wrote:
Should be. If you use the Null object resulting from the CURRENTSTATETOOBJECT call as the object in MCOMMAND_JOIN, it should create a single polygonal object.
The problem with keeping all of your boolean->currentstatetoobject results as separate objects is the difficulty in that the boolean acts on two objects only. They can be grouped to 'simulate' two objects, but only two objects can be used at a time (A&B;, A-B, A|B). As with any boolean algebra, to do operations between multiple sets requires they be grouped ((A1,A2,A3,A4)&(B1,B2,B3)).
If you want to take the CSTO result and do another boolean operation with it, you will need to move the entire Null group under the Boolean then add your next DrillerCube under it in the Boolean object. Then perform the next CSTO and move the resulting Null object group under another Boolean with DrillerCube to continue the process:
DrillingFunction
******************************************************************************
1. Put a boolean object
2. Place the MainCube under the boolean
3. Put a DrillerCube under the boolean so that Boolean=>MainCube->DrillerCube
4. Call MCOMMAND_CURRENTSTATETOOBJECT using Boolean object
5. Then the object hierarchy will be
Boolean=>MainCube->DrillerCube
Null =>MainCube(with a hole) -> DrillerCube (along the hole line)
6. The upper hierarchy is deleted
7. Use Null group as "MainCube" in 2.
******************************************************************************I hope that makes sense.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/03/2005 at 23:09, xxxxxxxx wrote:
Thank you so much Robert ...
With all my respects ...
Zaw Min Tun