Hello,
I have these two geometries:
grey a complete torous, and red a small section of it.
I want to cut out the red into the grey, but the issue is that when doing so, the resulting geometry is several faces:
this is due to the seam of the full torous face.
I tried to make a shell and use remove extra edges, so I can get a complete single face, without luck.
I need to project vertexes over this face but the project tool it accepts at maximum a face object. how can I get around this? @cbourcier any idea?
what I would like to obtain is this (for info this is what I get if I do the boolean operation on another CAD software and instead simply import the result of the boolean):
also for info: if i explode the result into faces, it shows exactly the same values in KindOfShape and here are the step files of each of the two initial geometries (torous, and red face) Surface 72.step (3,7 KB) Surface 61.step (3,0 KB)
even creating it from scratch in salome I dont know how to do it (as when we create a torous it always puts the seam on the outside…)
thanks in advance
Hello fred,
sorry i did not mentioned, I am looking to do in GEOM, not in SHAPER.
in geom i succesfully recreated by:
extracting the ‘circular’ cross section edges
making a wire of them
removing middle vertex
revolve it
but would like to know if this is faisable with repiring tools instead. and in theory (or at least for whatever other kind of faces i have encountered until now) one can:
create a shell of the two faces
use remove extra edges with fuse faces ON
this in other cases, cylinders/spheres works as intended, but not for the torous eventhought in kindOfShape it gives the same values definitions for the two of them.
You can create a torus with the construction edge on top in GEOM also
You just need to rotate the circle to move its construction point where you want before doing the revolution.
The construction point is on OX so if you create a circle on XOY plan and then create the revolution around OX, you don’t even need to rotate the circle. torus.py (1,0 Ko)
yes, actually, i made a function that for ‘one internal edge to remove’ it works…
but would have liked to find a solution in the reparing tools instead of using CAD (as this should be the case…)
def fuseTorousFaces(compoundOfFaces):
faces = geompy.SubShapeAll(compoundOfFaces, geompy.ShapeType["FACE"])
IDsOfEdges=[geompy.GetSubShapesIDs(compoundOfFaces,geompy.SubShapeAll(face, geompy.ShapeType["EDGE"])) for face in faces]
notCommunEdges=[[ID for ID in IDsOfEdgesOfFace if sum(IDsOfEdges,[]).count(ID)==1] for IDsOfEdgesOfFace in IDsOfEdges]
edgesToRotate=[geompy.SubShapeAll(geompy.GetSubShape(compoundOfFaces, notCommunEdges_), geompy.ShapeType["EDGE"]) for notCommunEdges_ in notCommunEdges]
edgesToRotateVertIDs=[list(set(geompy.GetSubShapesIDs(compoundOfFaces,sum([geompy.SubShapeAll(edge, geompy.ShapeType["VERTEX"]) for edge in listOfEdges],[])))) for listOfEdges in edgesToRotate]
edgesToRotateVertIDsExp=sum(edgesToRotateVertIDs,[])
commonVertexID=[ID for ID in edgesToRotateVertIDsExp if edgesToRotateVertIDsExp.count(ID)!=1][0]
edgesToRotate_=[[edge for edge in listOfEdges if commonVertexID in geompy.GetSubShapesIDs(compoundOfFaces,geompy.SubShapeAll(edge, geompy.ShapeType["VERTEX"]))][0] for listOfEdges in edgesToRotate]
wireToRotate=geompy.MakeWire(edgesToRotate_, 1e-7)
wireToRotate=geompy.FuseCollinearEdgesWithinWire(wireToRotate,[ geompy.GetSubShape(compoundOfFaces, [commonVertexID])])
[dx,dy,dz]=geompy.KindOfShape(faces[0])[4:7]
newFace=geompy.SubShapeAll(geompy.MakeRevolution(wireToRotate, geompy.MakeVectorDXDYDZ(dx, dy, dz), math.pi*2), geompy.ShapeType["FACE"])[0]
return newFace
the reason i dont want to do ‘CAD’ is that i need to atomatize this so a little bit problematic… thanks in any case