Using SBOX with OPT NOT for secondary group assignments

Hello,

It is required to assign elements in the green zone to a secondary group.

The first, intuitive test script produces a warning and a wrong result.

+PROG AQUA urs:1
HEAD
NORM DC EN NDC 199X-200X
CONC NO 1 TYPE C FC 30
END

+PROG SOFIMSHC urs:2
SYST TYPE 3D
CTRL MESH 1
CTRL HMIN VAL 0.5
SAR  1 MNO 1  NX 0 0 1 NRA 7 DRX 1 0 0 T 200 CB 0 CT 0
SARB OUT
SLNB R 20 XM 0 YM 0 ZM 0 NX 0 0 1
END 

+PROG SOFIMSHA urs:3
SYST REST
GRP 'A'
    SBOX A1X 0 A1Y 0 A1Z 0 B1X 0 B1Y 0 B1Z 1 R 21
    SBOX A1X 0 A1Y 0 A1Z 0 B1X 0 B1Y 0 B1Z 1 R 15 OPT NOT
END  

The second script with auxiliary secondary groups produces the right result but it is to verbose and pollute the project with the auxiliary secondary groups ‘A1’ and ‘A2’.

+PROG SOFIMSHA urs:4
SYST REST
GRP 'A1'
    SBOX A1X 0 A1Y 0 A1Z 0 B1X 0 B1Y 0 B1Z 1 R 21
GRP 'A2'
    SBOX A1X 0 A1Y 0 A1Z 0 B1X 0 B1Y 0 B1Z 1 R 15
GRP 'A'
    QUAD 'GRP' 'A1'
    QUAD '!GRP' 'A2'

END  

Can the first script without auxiliary secondary groups be modified to reach the aim?

Hello

The logical operators of SBOX are known to be of limited use, especially when multiple SBOXes need to be combined. In your example, logical ‘NOT’ actually means ‘OR NOT’, and not ‘AND NOT’, as would be required to subtract the two selection discs.

For this reason, since SOFiSTiK 2020, we have a new set of logical operators for selections that are applied directly to groups / secondary groups. Please refer to section 3.9.2 of the SOFiMSHA manual.

So the solution to your question would be to use the following teddy input:

+PROG SOFIMSHA urs:3
SYST REST
GRUP 'big' BEZ "Quads in SBOX"
SBOX a1x 0 a1y 0 a1z 0 b1x 0 b1y 0 b1z 1 r 30

GRUP 'small' BEZ "Quads in SBOX"
SBOX a1x 0 a1y 0 a1z 0 b1x 0 b1y 0 b1z 1 r 10

GRUP 'A' $ big - small = ring
quad 'grp' 'big' ! select big disc
quad '!grp' 'small' ! subtract small disc

ENDE    

Apart from that: Why don’t you use attribute areas? That way you can change the SARs directly in SOFiMSHC.

+PROG SOFIMSHC urs:2
SYST ART 3D GDIV 10000
STEU MESH 2
STEU HMIN WERT 0.5

SAR  1 MNR 1  NX 0 0 1 NRA 7 DRX 1 0 0 T 200 CB 0 CT 0
SARB OUT
SLNB R 20 XM 0 YM 0 ZM 0 NX 0 0 1

SAR NR prop GRP 10
SARB out
SLNB R 10 XM 0 YM 0 ZM 0 NX 0 0 1

ENDE

Here is the corresponding TEDDY script.
Sekundäre Gruppe.dat (1.1 KB)

Best regards
Frederik Höller
Your SOFiSTiK Support Team