Hi,
Can I make a new object from Addition or Union, Subtraction and intersection between tow objects in GLScene with new name or one of previous objects name at runtime ? such as 3d studio max or Autocad softwares.
1-How can I do this?
2-My objects are of the Basic Geometry, such as a Shpere ,cylinder, cube, and ... . Should objects be of a special type to do this?
3-Is there any example for this ?
thank you
Last edit: Mostafa 2018-08-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Jerome,
Thank you. I know that you do not have more time for this post and you are busy, but I have a problem and I did not find the answer to what I was looking for. Is the CSG_operation function conditional? I received the following incorrect answers with two spheres and a sphere and one cylinder and a sphere with a cube according to the following codes in feedback example (for change into freeform and then apply CSG_operation). Did I make a mistake? What is the solution to that?
If you have free time, please answer this question. thanks again
Hi, I'm trying to substract an object to another one. I followed the example Samples/Demos/Meshes/CSG. I tried to load my objects in this sample. When I try to substract the objects "stack overflow" error appears . If I try to autocenter in X and Y the 2 objects, this error doesn't appear. Can anyone tell me why?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Paola KS can you attach the 2 meshes for try, i'll make some test next month, after my formation.
"Stack overflow" suggest the generated mesh with your models have too many faces or vertices. I think is due in the csg operation itself something should be wrong in a loop and produce too many results in faces or vertices
PS What are you using Delphi or Lazarus ?
Cheers
Last edit: Jerome.D (BeanzMaster) 2020-11-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm using Delphi.
In attach there is a copy of your sample (Samples/Demos/Meshes/CSG) that loads my obj (A.obj and B.obj). I need to perform the operation A-B.
When you click on the button A-B (and also to other kind of operations) you will see the error "stack overflow".
The error doesn't appear if I try to autocenter in X and Y (not in Z) the GLFreeForm1 and GlFreeForm2 or if I try to scale GLFreeForm1 and GlFreeForm2 of 0,1 in X and Y (not in Z). But I need to perform this operation in the position specified in the obj and with real dimensions.
Thanks
Paola
I send you in attach the mainformunit.pas and dfm. But, if the problem is due to the number of verticles and faces, I think it should not work also if I try to center the 2 models in x and y, or not? because the number of verticles and faces don't change.
Hi,
Can I make a new object from Addition or Union, Subtraction and intersection between tow objects in GLScene with new name or one of previous objects name at runtime ? such as 3d studio max or Autocad softwares.
1-How can I do this?
2-My objects are of the Basic Geometry, such as a Shpere ,cylinder, cube, and ... . Should objects be of a special type to do this?
3-Is there any example for this ?
thank you
Last edit: Mostafa 2018-08-07
Hi Mostafa,
Take a look into Samples/Demos/Meshes/CSG
For CSG operation object must be TGLFreeForm
Last edit: Jerome.D (BeanzMaster) 2018-08-07
Last edit: Mostafa 2018-08-07
Thank you jerome
Hi Jerome,
Thank you. I know that you do not have more time for this post and you are busy, but I have a problem and I did not find the answer to what I was looking for. Is the CSG_operation function conditional? I received the following incorrect answers with two spheres and a sphere and one cylinder and a sphere with a cube according to the following codes in feedback example (for change into freeform and then apply CSG_operation). Did I make a mistake? What is the solution to that?
If you have free time, please answer this question. thanks again
A-B Operation:
Results for A-B :

Intersection Operation :
Results for Intersection :

Last edit: Mostafa 2018-08-18
Hi, I'm trying to substract an object to another one. I followed the example Samples/Demos/Meshes/CSG. I tried to load my objects in this sample. When I try to substract the objects "stack overflow" error appears . If I try to autocenter in X and Y the 2 objects, this error doesn't appear. Can anyone tell me why?
Hi Paola KS can you attach the 2 meshes for try, i'll make some test next month, after my formation.
"Stack overflow" suggest the generated mesh with your models have too many faces or vertices. I think is due in the csg operation itself something should be wrong in a loop and produce too many results in faces or vertices
PS What are you using Delphi or Lazarus ?
Cheers
Last edit: Jerome.D (BeanzMaster) 2020-11-06
Hi,
I'm using Delphi.
In attach there is a copy of your sample (Samples/Demos/Meshes/CSG) that loads my obj (A.obj and B.obj). I need to perform the operation A-B.
When you click on the button A-B (and also to other kind of operations) you will see the error "stack overflow".
The error doesn't appear if I try to autocenter in X and Y (not in Z) the GLFreeForm1 and GlFreeForm2 or if I try to scale GLFreeForm1 and GlFreeForm2 of 0,1 in X and Y (not in Z). But I need to perform this operation in the position specified in the obj and with real dimensions.
Thanks
Paola
Can you give me the mainformunit.pas and dfm or tell me the parameters of FreeForm1 and 2 and Camera (Position and Scale values)
Last edit: Jerome.D (BeanzMaster) 2020-11-06
I took a look to your objects i think you must subdivide the objects for having more vertices and faces for computing correctly the CSG operations.
I send you in attach the mainformunit.pas and dfm. But, if the problem is due to the number of verticles and faces, I think it should not work also if I try to center the 2 models in x and y, or not? because the number of verticles and faces don't change.
Thanks
Paola