Fri, 12/08/2017 - 15:30
Hi all,
I wanted to know if OpenCascade supports saving a compsolid object to a file. I made a compsolid from two solids which are the result of slicing a tetrahedron with a plane using BOPAlgo_MakerVolume (I understand that the result is a compound, but I extracted the solids from it), and tried to save this compsolid with both the Step and IGES processors. Loading these files in the CAD Assistant, I always got 1 compound, and 0 compsolid. The Step file is better here because some wires and faces are shared by the two solids, but still the stored object is a compound.
Many thanks,
Dan
Fri, 12/08/2017 - 15:43
Not sure about compsolid (there is probably no such type in STEP, at least, I have never heard of such), but you may want to try activating read.step.nonmanifold and write.step.nonmanifold parameters of OpenCascade to switch STEP translator to a non-manifold mode. Internally, it will use non_manifold_surface_shape_representation entity (NMSSR, http://www.wikistep.org/im/jsdai/SAic_non_manifold_surface/Non_manifold_...) which is a dedicated type for such geometric structures.
Fri, 12/08/2017 - 16:06
Many thanks Qr Qr.
I added the following line in the beginning of the code:
and the result is actually one compound containing another compound, which in turn contains all the underlying, non-shared (i.e. duplicated) shapes. Not sure if I am doing this correctly, so I would appreciate any suggestion on this.
Thanks again,
Dan
Fri, 12/08/2017 - 16:35
Can you share your CAD part as *.brep file?
Fri, 12/08/2017 - 18:44
Sure, here they are:
Just realised I made a wrong statement in my earlier post. Even in the first file actually the sub-shapes (vertices, edges, etc) are not shared between the solids.
Many thanks,
Dan
Fri, 12/08/2017 - 18:59
Sorry I just realised that you asked for a BRep file. I'll be right back with the file.
Fri, 12/08/2017 - 19:10
Here is the BRep file.
Many thanks,
Dan
Sat, 12/09/2017 - 11:36
I have tried to save and open your brep using non-manifold writer and reader. Sharing of edges is preserved. Compsolid entity is indeed lost, but sharing is not. There are three shared edges and one shared face (8 faces in total). I am not sure I understand your problem.
Wed, 12/13/2017 - 02:49
Hi Qr Qr,
Really sorry for this terribly delayed response, preoccupied by other tasks in the last few days.
Many thanks for pointing out the BRep format, I just checked it and indeed it stores the model as a compsolid, inclusive of the shared subshapes. I think that's what we need.
Basically I would like to pass a file containing our model as a compsolid to a colleague for further analysis. Initally we were considering the STEP format, but we learnt that it didn't have a compsolid capability. Seems like the BRep format is the way to go.
Dan