SOLVED: Help with computing shared face.

Need help, or want to share a macro? Post here!
keithsloan52
Veteran
Posts: 2407
Joined: Mon Feb 27, 2012 5:31 pm

SOLVED: Help with computing shared face.

Post by keithsloan52 »

For an enhancement to my GDML workbench, I have the situation where I need to determine a shared face.
The two objects look like
4A238841-1C80-45BA-963E-5B9DB8189CEA.jpeg
4A238841-1C80-45BA-963E-5B9DB8189CEA.jpeg (291.56 KiB) Viewed 1043 times
The FreeCAD file is
Compute_Shared_Face.FCStd
(153.48 KiB) Downloaded 10 times
The test GDML file being imported is
OpticalSurfaces.gdml.txt
(2.43 KiB) Downloaded 9 times
My latest code attempt is branch borderSurface see https://github.com/KeithSloan/GDML/tree/borderSurface

The challenge is that the two cubes are one cube and a linked copy of the same cube displaced by 2000 ( Not my choice or under my control )

For the linked cube with displacment a new Shape is built with this code

Code: Select all

def getShape(obj):
    print(obj.TypeId)
    print(obj.Name)
    if hasattr(obj,'Shape'):
       return obj.Shape.copy()
    print(dir(obj))
    return obj

def adjustShape(part):
    print("Adjust Shape")
    print(part.Name)
    print(part.OutList)
    if hasattr(part,'LinkedObject'):
       print(f'Linked Object {part.LinkedObject}')
       part = part.getLinkedObject()
       print(part.Name)
       print(part.OutList)
    obj = getGDMLObject(part.OutList)
    obj.recompute()
    # Shape is immutable so have to copy
    shape = getShape(obj)
    print(f'Shape Valid {shape.isValid()}')
    print(dir(shape))
    #return shape
    return shape.translate(part.Placement.Base)
Current attempt at working out common face is

Code: Select all

def commonFace(shape0, shape1):
    print('Common Face')
    shape0.check()
    shape1.check()
    print(dir(shape0))
    print(dir(shape1))
    print(shape0.TypeId)
    print(shape1.TypeId)
    print(shape0.ShapeType)
    print(shape1.ShapeType)
    print(f'Vertexes {len(shape0.Vertexes)}')
    print(f'Vertexes {len(shape1.Vertexes)}')
    print(f'Faces {len(shape0.Faces)}')
    print(f'Faces {len(shape1.Faces)}')
    for face0 in shape0.Faces :
        for face1 in shape1.Faces :
            distance, points, info = face0.distToShape(face1)
            print(f'Distance {distance} points {points} info {info}')
Which produces the following output

Code: Select all

22:33:30  Part::TopoShape
22:33:30  Part::TopoShape
22:33:30  Solid
22:33:30  Solid
22:33:30  Vertexes 8
22:33:30  Vertexes 8
22:33:30  Faces 6
22:33:30  Faces 6
22:33:30  Distance 0.0 points [(Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 2000.0 points [(Vector (-1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 1, None, 'Vertex', 1, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 1, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0))] info [('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 3, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 0, None)]
22:33:30  Distance 2000.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 2, None), ('Vertex', 1, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 1, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 2, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 2, None, 'Vertex', 2, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0)), (Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0))] info [('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 3, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 2000.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 1, None, 'Vertex', 1, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 1, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0))] info [('Vertex', 1, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 2, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 2, None, 'Vertex', 2, None)]
22:33:30  Distance 2000.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 2, None), ('Vertex', 1, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 1, None, 'Vertex', 1, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 1, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 3, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, -1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 2000.0 points [(Vector (-1000.0, 1000.0, -1000.0), Vector (-1000.0, 1000.0, 1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (-1000.0, -1000.0, 1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0)), (Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 2, None), ('Vertex', 1, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 0, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 1, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 2, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 2, None, 'Vertex', 2, None)]
22:33:30  Distance 2000.0 points [(Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, -1000.0)), (Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  Distance 0.0 points [(Vector (-1000.0, 1000.0, 1000.0), Vector (-1000.0, 1000.0, 1000.0)), (Vector (-1000.0, -1000.0, 1000.0), Vector (-1000.0, -1000.0, 1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
22:33:30  End processing GDML file
22:33:30  time : 1.2244 seconds
22:34:03  Activated
I was hoping to see just a single Face with Distance of 0, but I have lots, where am I going wrong?

Thanks
Last edited by keithsloan52 on Tue Jul 05, 2022 10:06 am, edited 1 time in total.
edwilliams16
Veteran
Posts: 1374
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Help with computing shared face.

Post by edwilliams16 »

The problem is that both cube's face Position/Axis are returned in their local coordinate systems and thus appear co-located.

Code: Select all

def commonFaces(shp1, shp2, tol = 1e-7):
    facePairs = []
    for i1, face1 in enumerate(shp1.Faces):
        for i2, face2 in enumerate(shp2.Faces):
            if face1.Surface.Axis.isEqual(face2.Surface.Axis, tol) or face1.Surface.Axis.isEqual(-face2.Surface.Axis, tol):
                facePairs.append((i1, i2))

    facePairs1 = []
    for i1, i2 in facePairs:
        if abs(shp1.Faces[i1].Surface.Axis.dot(shp1.Faces[i1].Surface.Position - shp2.Faces[i2].Surface.Position)) < tol:
            facePairs1.append((i1,i2))
    return [(shp1.Faces[i1], shp2.Faces[i2]) for i1, i2 in facePairs1]

returns six face pairs.

What you need is to account for the LinkPlacement of Detector001. It's easy enough to do this by fiat, but I don't know the correct way to walk the tree back, when you have linked objects, to get the global Placement, while remaining solely in App.
If you select the object, OTOH

Code: Select all

for sel in Gui.Selection.getSelectionEx('',0):
  for path in sel.SubElementNames if sel.SubElementNames else ['']:
    placement = sel.Object.getSubObject(path, retType=3) # retType 3 returns the placement. Check the doc string for more info
    print('%s.%s -- %s' % (sel.Object.Name, path, placement))
gets the global placement you need to apply to check for the face coincidence in the global system.

I've been puzzling over how to do this for a while. @realthunder might be saying it can't be done - but I don't fully understand what was said.
https://forum.freecadweb.org/viewtopic. ... 83#p569083
edwilliams16
Veteran
Posts: 1374
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Help with computing shared face.

Post by edwilliams16 »

Btw, I only checked that the faces were coplanar which is a necessary condition. Further checks would be required to test if they were identical, or overlapping, or what.
keithsloan52
Veteran
Posts: 2407
Joined: Mon Feb 27, 2012 5:31 pm

Re: Help with computing shared face.

Post by keithsloan52 »

edwilliams16 wrote: Sun Jun 12, 2022 11:36 pm The problem is that both cube's face Position/Axis are returned in their local coordinate systems and thus appear co-located.
Thanks, was then puzzled as to why the translate had made no effect, until I added a print statement and there is a problem with the
values being passed as they are Vector(0,0,0) in ALL cases. My next step is to try and find the bug.
edwilliams16
Veteran
Posts: 1374
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Help with computing shared face.

Post by edwilliams16 »

I was unable to install GDML:

Code: Select all

07:30:49  Addon Developer Warning: Repository URL set in package.xml file for addon Help (https://github.com/yorikvanhavre/FreeCAD-Help) does not match the URL it was fetched from (https://github.com/FreeCAD/FreeCAD-Help)
07:32:26  b'pip 22.1.1 from /Applications/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/pip (python 3.9)\n'Nonepip 22.1.1 from /Applications/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/pip (python 3.9)
which limits my ability to help.
Attachments
Screen Shot 2022-06-13 at 7.32.35 AM.png
Screen Shot 2022-06-13 at 7.32.35 AM.png (36.82 KiB) Viewed 866 times
keithsloan52
Veteran
Posts: 2407
Joined: Mon Feb 27, 2012 5:31 pm

Re: Help with computing shared face.

Post by keithsloan52 »

edwilliams16 wrote: Mon Jun 13, 2022 5:41 pm I was unable to install GDML:

Code: Select all

07:30:49  Addon Developer Warning: Repository URL set in package.xml file for addon Help (https://github.com/yorikvanhavre/FreeCAD-Help) does not match the URL it was fetched from (https://github.com/FreeCAD/FreeCAD-Help)
07:32:26  b'pip 22.1.1 from /Applications/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/pip (python 3.9)\n'Nonepip 22.1.1 from /Applications/FreeCAD.app/Contents/Resources/lib/python3.9/site-packages/pip (python 3.9)
which limits my ability to help.
Gmsh dev is only used by functions that use the python Gmsh library, does it stop the install?

I am reluctant to change from gmsh-dev to gmsh as I was planning on using some new function in dev.

What if you install gmsh-dev from one of the SDK's listed https://gmsh.info
keithsloan52
Veteran
Posts: 2407
Joined: Mon Feb 27, 2012 5:31 pm

Re: Help with computing shared face.

Post by keithsloan52 »

Okay I changed the code to save the original Placement before getting the Linked Object which has zero placement
and now I seem to get the common face info but n times

Code: Select all

def adjustShape(part):
    print("Adjust Shape")
    print(part.Name)
    print(part.OutList)
    print(f'Before Placement Base {part.Placement.Base}')
    beforeBase = part.Placement.Base
    if hasattr(part,'LinkedObject'):
       print(f'Linked Object {part.LinkedObject}')
       part = part.getLinkedObject()
       print(part.Name)
       print(part.OutList)
    obj = getGDMLObject(part.OutList)
    obj.recompute()
    # Shape is immutable so have to copy
    shape = getShape(obj)
    print(f'Shape Valid {shape.isValid()}')
    print(dir(shape))
    #return shape
    print(f'After Placement Base {part.Placement.Base}')
    #return translate(part, part.Placement.Base)
    return shape.translate(beforeBase)

def commonFace(shape0, shape1):
    print('Common Face')
    shape0.check()
    shape1.check()
    print(dir(shape0))
    print(dir(shape1))
    print(shape0.TypeId)
    print(shape1.TypeId)
    print(shape0.ShapeType)
    print(shape1.ShapeType)
    print(f'Vertexes {len(shape0.Vertexes)}')
    print(f'Vertexes {len(shape1.Vertexes)}')
    print(f'Faces {len(shape0.Faces)}')
    print(f'Faces {len(shape1.Faces)}')
    for face0 in shape0.Faces :
        for face1 in shape1.Faces :
            distance, points, info = face0.distToShape(face1)
            #print(f'Distance {distance} points {points} info {info}')
            if distance == 0.0:
               print(f'Distance {distance} points {points} info {info}')


Which Outputs

Code: Select all

11:01:58  Vertexes 8
11:01:58  Vertexes 8
11:01:58  Faces 6
11:01:58  Faces 6
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 1, None, 'Vertex', 1, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 3, None, 'Vertex', 0, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 0, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 0, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 3, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 1, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 2, None, 'Vertex', 2, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 3, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 0, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 3, None, 'Vertex', 1, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 1, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 0, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 0, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 3, None, 'Vertex', 3, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None)]
11:01:58  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 0, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:01:58  End processing GDML file
11:01:58  time : 1.1700 seconds
Which seems to be the common face output n times. Confused as to how I might just get it once?

The full output without the test for 0 Distance gives

Code: Select all

11:11:49  Vertexes 8
11:11:49  Vertexes 8
11:11:49  Faces 6
11:11:49  Faces 6
11:11:49  Distance 2000.0 points [(Vector (-1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
11:11:49  Distance 4000.0 points [(Vector (-1000.0, -1000.0, 1000.0), Vector (3000.0, -1000.0, 1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (3000.0, -1000.0, -1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (3000.0, 1000.0, 1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (3000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
11:11:49  Distance 2000.0 points [(Vector (-1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (-1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 1, None, 'Vertex', 1, None)]
11:11:49  Distance 2000.0 points [(Vector (-1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:11:49  Distance 2000.0 points [(Vector (-1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (-1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 3, None, 'Vertex', 0, None)]
11:11:49  Distance 2000.0 points [(Vector (-1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (-1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 0, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
11:11:49  Distance 2000.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (3000.0, -1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (3000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (3000.0, 1000.0, 1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (3000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None), ('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 3, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 1, None, 'Vertex', 1, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 1, None, 'Vertex', 1, None), ('Vertex', 3, None, 'Vertex', 0, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 0, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 0, None)]
11:11:49  Distance 2000.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (3000.0, -1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (3000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 0, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 3, None)]
11:11:49  Distance 2000.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 3, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 1, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 2, None, 'Vertex', 2, None)]
11:11:49  Distance 2000.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (3000.0, 1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (3000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 3, None), ('Vertex', 2, None, 'Vertex', 2, None)]
11:11:49  Distance 2000.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 3, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 0, None, 'Vertex', 1, None), ('Vertex', 2, None, 'Vertex', 3, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 0, None, 'Vertex', 0, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 0, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:11:49  Distance 2000.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (3000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (3000.0, -1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 3, None, 'Vertex', 1, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 1, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 0, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:11:49  Distance 2000.0 points [(Vector (1000.0, 1000.0, -1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, -1000.0, -1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 0, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 0, None)]
11:11:49  Distance 2000.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (3000.0, 1000.0, 1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (3000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 2, None), ('Vertex', 3, None, 'Vertex', 0, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 3, None, 'Vertex', 3, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 3, None)]
11:11:49  Distance 2000.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, -1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, -1000.0))] info [('Vertex', 2, None, 'Vertex', 0, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:11:49  Distance 0.0 points [(Vector (1000.0, 1000.0, 1000.0), Vector (1000.0, 1000.0, 1000.0)), (Vector (1000.0, -1000.0, 1000.0), Vector (1000.0, -1000.0, 1000.0))] info [('Vertex', 2, None, 'Vertex', 0, None), ('Vertex', 3, None, 'Vertex', 1, None)]
11:11:50  End processing GDML file
11:11:50  time : 1.1540 seconds

edwilliams16
Veteran
Posts: 1374
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Help with computing shared face.

Post by edwilliams16 »

You are forgetting that the side faces of one touch the front face of the other. You need to add a parallel check (ie Axis of one is +- Axis of other) to single out the coincident faces. The required check is both zero distance and parallel.


EDIT: Even this only guarentees the two flat co-planar faces share at least one point. As I said earlier, you'll need additional checks to see if the faces are identical or share some area or what. Since I don't know the final objective, I've not addressed that.
keithsloan52
Veteran
Posts: 2407
Joined: Mon Feb 27, 2012 5:31 pm

Re: Help with computing shared face.

Post by keithsloan52 »

edwilliams16 wrote: Tue Jun 14, 2022 9:23 pm You are forgetting that the side faces of one touch the front face of the other. You need to add a parallel check (ie Axis of one is +- Axis of other) to single out the coincident faces. The required check is both zero distance and parallel.
Thanks - now understand.
edwilliams16
Veteran
Posts: 1374
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Help with computing shared face.

Post by edwilliams16 »

keithsloan52 wrote: Wed Jun 15, 2022 6:56 am Thanks - now understand.
You should check out the isSame() and isPartner() methods for the face pairs. Both return the correct matching faces in your test file.

https://forum.freecadweb.org/viewtopic. ... 57#p110957
Post Reply