Пример #1
0
def create3dModel(group, doc):
	strategy = chooseImportStrategyAcis()
	if (strategy in (STRATEGY_SAT, STRATEGY_NATIVE)):
		importModel(group)
	elif (strategy == STRATEGY_STEP):
		convertModel(group, doc.Name)
	setReader(None)
	return
def create3dModel(group, doc):
    strategy = chooseImportStrategyAcis()
    #	setVersion(7.0)
    if (strategy == STRATEGY_SAT):
        importModel(group)
    else:
        convertModel(group, doc.Name)
    setReader(None)
    return
Пример #3
0
def create3dModel(root, doc):
    strategy = getStrategy()
    if (strategy == STRATEGY_NATIVE):
        creator = FreeCADImporter()
        creator.importModel(root)
    else:
        brep = getModel().getBRep()
        for asm in brep.AcisList:
            setReader(asm.get('SAT'))
            if (strategy == STRATEGY_SAT):
                importModel(root)
            elif (strategy == STRATEGY_STEP):
                convertModel(root, doc.Name)
    return
def create3dModel(group, doc):
    global _3dSolids

    strategy = chooseImportStrategyAcis()
    for reader in _3dSolids:
        setReader(reader)
        if (strategy == STRATEGY_SAT):
            importModel(group)
        else:
            convertModel(group, doc.Name)
        satFile = _getSatFileName(reader.name)
        if (not os.path.exists(satFile)):
            dumpSat(satFile, reader, False)
        setReader(None)
    return
Пример #5
0
def resolveNodes(acis):
	init()
	bodies = []
	doAdd  = True
	setReader(acis)
	for entity in acis.getEntities():
		node = createNode(entity)
		if (node):
			if (doAdd and (entity.name == 'body')):
				bodies.append(node)
			if (entity.name in ['Begin-of-ACIS-History-Data', 'End-of-ACIS-data']):
				doAdd = False

	if (getDumpFolder()[-3:].lower() != 'sat'):
		name = _getSatFileName(acis.name)
		dumpSat(name, acis)

	return bodies