Added the commutator, the essential part for medium-power conversion

Also, textures! Some are s**t, esp the one for the magnet ring
This commit is contained in:
malte0811 2018-02-28 21:03:26 +01:00
parent 56fb9e3b3a
commit 8cca1b13e1
38 changed files with 1481 additions and 367 deletions

View file

@ -29,6 +29,7 @@ package malte0811.industrialWires;
import malte0811.industrialWires.compat.Compat;
import malte0811.industrialWires.controlpanel.PanelComponent;
import malte0811.industrialWires.controlpanel.PanelUtils;
import malte0811.industrialWires.converter.EUCapability;
import malte0811.industrialWires.converter.MechMBPart;
import malte0811.industrialWires.converter.MultiblockConverter;
import malte0811.industrialWires.crafting.Recipes;
@ -104,6 +105,11 @@ public class IndustrialWires {
public static ItemPanelComponent panelComponent = null;
@GameRegistry.ObjectHolder(MODID+":"+ItemKey.ITEM_NAME)
public static ItemKey key = null;
@GameRegistry.ObjectHolder("ic2:te")
public static Block ic2TeBlock = null;
public static final SimpleNetworkWrapper packetHandler = NetworkRegistry.INSTANCE.newSimpleChannel(MODID);
public static Logger logger;
@ -177,6 +183,7 @@ public class IndustrialWires {
proxy.preInit();
Compat.preInit();
MarxOreHandler.preInit();
MechMBPart.preInit();
}
@SubscribeEvent
@ -262,8 +269,10 @@ public class IndustrialWires {
IWPotions.init();
Compat.init();
MarxOreHandler.init();
MechMBPart.init();
PanelComponent.init();
if (hasIC2) {
EUCapability.register();
}
}
@EventHandler

View file

@ -1,10 +1,16 @@
package malte0811.industrialWires.blocks.converter;
import blusunrize.immersiveengineering.api.ApiUtils;
import com.google.common.collect.ImmutableSet;
import ic2.api.energy.event.EnergyTileLoadEvent;
import ic2.api.energy.event.EnergyTileUnloadEvent;
import ic2.api.energy.tile.IEnergyAcceptor;
import ic2.api.energy.tile.IEnergyEmitter;
import ic2.api.energy.tile.IEnergySink;
import ic2.api.energy.tile.IEnergySource;
import malte0811.industrialWires.IndustrialWires;
import malte0811.industrialWires.blocks.ISyncReceiver;
import malte0811.industrialWires.blocks.TileEntityIWMultiblock;
import malte0811.industrialWires.converter.EUCapability;
import malte0811.industrialWires.converter.IMBPartElectric;
import malte0811.industrialWires.converter.IMBPartElectric.Waveform;
import malte0811.industrialWires.converter.MechEnergy;
@ -21,8 +27,10 @@ import net.minecraft.util.ITickable;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.fml.common.Optional;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -32,18 +40,24 @@ import java.util.*;
import static blusunrize.immersiveengineering.common.IEContent.blockMetalDecoration0;
import static blusunrize.immersiveengineering.common.blocks.metal.BlockTypes_MetalDecoration0.LIGHT_ENGINEERING;
import static malte0811.industrialWires.converter.EUCapability.ENERGY_IC2;
import static malte0811.industrialWires.converter.IMBPartElectric.Waveform.*;
import static malte0811.industrialWires.util.MiscUtils.getOffset;
import static malte0811.industrialWires.util.MiscUtils.offset;
import static malte0811.industrialWires.util.NBTKeys.PARTS;
import static malte0811.industrialWires.util.NBTKeys.SPEED;
public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implements ITickable, ISyncReceiver {
@net.minecraftforge.fml.common.Optional.InterfaceList({
@net.minecraftforge.fml.common.Optional.Interface(iface = "ic2.api.energy.tile.IEnergySource", modid = "ic2"),
@Optional.Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "ic2")
})
public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implements ITickable, ISyncReceiver,
IEnergySource, IEnergySink {
private static final double DECAY_BASE = Math.exp(Math.log(.5)/(2*60*60*20));
public static final double TICK_ANGLE_PER_SPEED = 180/20/Math.PI;
private static final double SYNC_THRESHOLD = .95;
public MechMBPart[] mechanical = null;
public int[] offsets = null;
private int[] offsets = null;
private int[][] electricalStartEnd = null;
@ -54,10 +68,18 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
@SideOnly(Side.CLIENT)
public List<BakedQuad> rotatingModel;
private boolean shouldInitWorld;
private boolean firstTick = true;
@Override
public void update() {
ApiUtils.checkForNeedlessTicking(this);
if (firstTick) {
//TODO make safe for when IC2 isn't installed
if (!world.isRemote&& IndustrialWires.hasIC2) {
MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
}
firstTick = false;
}
if (world.isRemote&&mechanical!=null) {
angle += energyState.getSpeed()*TICK_ANGLE_PER_SPEED;
angle %= 360;
@ -67,12 +89,11 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
}
if (shouldInitWorld) {
int offset = 1;
for (MechMBPart part:mechanical) {
for (MechMBPart part : mechanical) {
part.world.setWorld(world);
part.world.setOrigin(offset(pos, facing, mirrored, 0, -offset, 0));
offset += part.getLength();
}
shouldInitWorld = false;
}
// Mechanical
for (MechMBPart part:mechanical) {
@ -104,41 +125,74 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
//Electrical
for (int[] section:electricalStartEnd) {
double[] available = new double[section[1]-section[0]];
double totalAvailable = 0;
final int sectionLength = section[1]-section[0];
double[] available = new double[sectionLength];
Waveform[] availableWf = new Waveform[sectionLength];
double[] availablePerWf = new double[Waveform.VALUES.length];
double[] requested = new double[section[1]-section[0]];
double totalRequested = 0;
for (int i = section[0];i<section[1];i++) {
IMBPartElectric electricalComp = ((IMBPartElectric) mechanical[i]);
Waveform localWf = electricalComp.getProduced();
Waveform localWf = electricalComp.getProduced(energyState);
if (localWf==NONE) {
availableWf[i-section[0]] = NONE;
continue;
}
if (localWf == AC_ASYNC&&Math.abs(energyState.getSpeed() - ASYNC_SPEED) >= SYNC_TOLERANCE * ASYNC_SPEED) {
if (localWf == AC_ASYNC&&Math.abs(energyState.getSpeed() - ASYNC_SPEED) <= SYNC_TOLERANCE * ASYNC_SPEED) {
localWf = AC_SYNC;
}
double availableLocal = electricalComp.getAvailableEEnergy();
totalAvailable += availableLocal;
available[i - section[0]] = availableLocal;
availablePerWf[localWf.ordinal()] += availableLocal;
availableWf[i-section[0]] = localWf;
}
Waveform maxWf = NONE;
double totalAvailable = 0;
double totalRequested = 0;
{
double max = 0;
for (int i = 0;i<availablePerWf.length;i++) {
if (availablePerWf[i]>max) {
maxWf = Waveform.VALUES[i];
max = availablePerWf[i];
List<Waveform> candidates = new ArrayList<>();
for (int i = 0; i < availablePerWf.length; i++) {
if (availablePerWf[i] > totalAvailable) {
candidates.clear();
candidates.add(Waveform.VALUES[i]);
totalAvailable = availablePerWf[i];
} else if (availablePerWf[i] == totalAvailable) {
candidates.add(Waveform.VALUES[i]);
}
}
if (candidates.size()==1) {
maxWf = candidates.iterator().next();//There is only one anyways
} else if (candidates.size()>1) {
double[] requestedPerWfSum = new double[candidates.size()];
for (int i = 0;i<sectionLength;i++) {
for (int j = 0;j<candidates.size();j++) {
double req = ((IMBPartElectric)mechanical[i+section[0]]).requestEEnergy(candidates.get(j), energyState);
if (availableWf[i]!=candidates.get(j)) {
requestedPerWfSum[j] += req;
} else {
requestedPerWfSum[j] += Math.max(req-available[i], 0);
}
}
}
for (int i = 0; i < candidates.size(); i++) {
if (totalRequested<requestedPerWfSum[i]) {
totalRequested = requestedPerWfSum[i];
maxWf = candidates.get(i);
}
}
}
}
for (int i = section[0];i<section[1];i++) {
IMBPartElectric electricalComp = ((IMBPartElectric) mechanical[i]);
double requestedLocal = electricalComp.requestEEnergy(maxWf);
totalRequested += requestedLocal;
requested[i - section[0]] = requestedLocal;
for (int i = 0;i<sectionLength;i++) {
if (availableWf[i]!=maxWf) {
available[i] = 0;//TODO should I extract the energy anyway?
}
}
double[] requested = new double[sectionLength];
for (int i = section[0]; i < section[1]; i++) {
IMBPartElectric electricalComp = ((IMBPartElectric) mechanical[i]);
double requestedLocal = electricalComp.requestEEnergy(maxWf, energyState);
totalRequested += requestedLocal;
requested[i - section[0]] = requestedLocal;
}
// this isn't ideal. It's a lot better than before though
if (totalAvailable>0&&totalRequested>0) {
for (int i = section[0]; i < section[1]; i++) {
@ -148,7 +202,7 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
double otherAvailable = totalAvailable-available[i0];
double ins = Math.min(requested[i0], otherAvailable);
double extractFactor = ins/otherAvailable;
electricalComp.insertEEnergy(ins, maxWf);
electricalComp.insertEEnergy(ins, maxWf, energyState);
for (int j = section[0];j<section[1];j++) {
if (i!=j) {
IMBPartElectric compJ = (IMBPartElectric) mechanical[j];
@ -227,19 +281,24 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
electrical.add(new int[]{lastEStart, mechanical.length});
}
electricalStartEnd = electrical.toArray(new int[electrical.size()][]);
decay = Math.pow(Math.exp(Math.log(.5)/(2*60*60*20)), mechanical.length);//TODO replace with DECAY_BASE
decay = Math.pow(DECAY_BASE, mechanical.length);
energyState = new MechEnergy(weight, speed);
}
private int getPart(int offset, TileEntityMultiblockConverter master) {
if (offset==0) {
return -1;
}
int pos = 1;
MechMBPart[] mechMaster = master.mechanical;
for (int i = 0, mechanical1Length = mechMaster.length; i < mechanical1Length; i++) {
MechMBPart part = mechMaster[i];
if (pos >= offset) {
return i;
if (mechMaster!=null) {
for (int i = 0, mechanical1Length = mechMaster.length; i < mechanical1Length; i++) {
MechMBPart part = mechMaster[i];
if (pos >= offset) {
return i;
}
pos += part.getLength();
}
pos += part.getLength();
}
return -1;
}
@ -252,7 +311,7 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
@Override
public IBlockState getOriginalBlock() {
return Blocks.AIR.getDefaultState();//Mostly irrelevant, since this uses a custome disassembly method
return Blocks.AIR.getDefaultState();//Mostly irrelevant, since this uses a custom disassembly method
}
@Override
@ -268,8 +327,8 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
if (isLogicDummy()) {
rBB = new AxisAlignedBB(pos, pos);
} else {
rBB = new AxisAlignedBB(offset(pos, facing, mirrored, -1, 0, -1),
offset(pos, facing, mirrored, 2, mechanical.length, 2));
rBB = new AxisAlignedBB(offset(pos, facing, mirrored, -2, 0, -2),
offset(pos, facing, mirrored, 2, -mechanical.length, 2));
}
}
return rBB;
@ -304,20 +363,23 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
@Override
public void disassemble() {
final double MIN_BREAK = .1;
final double MIN_BREAK_BROKEN = .5;
if (formed) {
TileEntityMultiblockConverter master = master(this);
if (master!=null) {
boolean disassembled = false;
int part = master.getPart(offset.getX(), master);
if (part>=0) {
MechMBPart m = master.mechanical[part];
if (master.energyState.getSpeed()>.05*m.getMaxSpeed()) {
master.disassemble(ImmutableSet.of(m));
disassembled = true;
if (master != null) {
int partId = master.getPart(offset.getX(), master);
MechMBPart broken = null;
if (partId >= 0) {
broken = master.mechanical[partId];
}
Set<MechMBPart> failed = new HashSet<>();
for (MechMBPart part : master.mechanical) {
if (master.energyState.getSpeed() > (part == broken ? MIN_BREAK_BROKEN : MIN_BREAK) * part.getMaxSpeed()) {
failed.add(part);
}
}
if (!disassembled)
master.disassemble(ImmutableSet.of());
master.disassemble(failed);
}
}
}
@ -349,4 +411,75 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
blockMetalDecoration0.getDefaultState().withProperty(blockMetalDecoration0.property, LIGHT_ENGINEERING));
}
}
private EUCapability.IC2EnergyHandler getIC2Cap() {
return ENERGY_IC2!=null?getCapability(ENERGY_IC2, null):null;
}
@Override
public boolean emitsEnergyTo(IEnergyAcceptor output, EnumFacing side) {
EUCapability.IC2EnergyHandler cap = getIC2Cap();
return cap!=null&&cap.emitsEnergyTo(side);
}
@Override
public double getDemandedEnergy() {
EUCapability.IC2EnergyHandler cap = getIC2Cap();
return cap!=null?cap.getDemandedEnergy():0;
}
@Override
public int getSinkTier() {
EUCapability.IC2EnergyHandler cap = getIC2Cap();
return cap!=null?cap.getEnergyTier():0;
}
@Override
public double injectEnergy(EnumFacing enumFacing, double amount, double voltage) {
EUCapability.IC2EnergyHandler cap = getIC2Cap();
return cap!=null?cap.injectEnergy(enumFacing, amount, voltage):0;
}
@Override
public boolean acceptsEnergyFrom(IEnergyEmitter input, EnumFacing side) {
EUCapability.IC2EnergyHandler cap = getIC2Cap();
return cap!=null&&cap.acceptsEnergyFrom(side);
}
@Override
public double getOfferedEnergy() {
EUCapability.IC2EnergyHandler cap = getIC2Cap();
return cap!=null?cap.getOfferedEnergy():0;
}
@Override
public void drawEnergy(double amount) {
EUCapability.IC2EnergyHandler cap = getIC2Cap();
if (cap!=null) {
cap.drawEnergy(amount);
}
}
@Override
public int getSourceTier() {
EUCapability.IC2EnergyHandler cap = getIC2Cap();
return cap!=null?cap.getEnergyTier():0;
}
@Override
public void invalidate() {
if (!world.isRemote && !firstTick)
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
firstTick = true;
super.invalidate();
}
@Override
public void onChunkUnload() {
super.onChunkUnload();
if (!world.isRemote && !firstTick)
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
firstTick = true;
}
}

View file

@ -21,6 +21,7 @@ import blusunrize.immersiveengineering.api.IEProperties;
import blusunrize.immersiveengineering.api.Lib;
import blusunrize.immersiveengineering.client.ClientUtils;
import blusunrize.immersiveengineering.common.util.ItemNBTHelper;
import com.google.common.collect.ImmutableMap;
import malte0811.industrialWires.IndustrialWires;
import malte0811.industrialWires.blocks.BlockIWBase;
import malte0811.industrialWires.blocks.IMetaEnum;
@ -28,6 +29,7 @@ import malte0811.industrialWires.blocks.controlpanel.TileEntityPanel;
import malte0811.industrialWires.blocks.hv.BlockHVMultiblocks;
import malte0811.industrialWires.client.panelmodel.PanelModel;
import malte0811.industrialWires.controlpanel.PanelComponent;
import malte0811.industrialWires.converter.MechMBPart;
import malte0811.industrialWires.items.ItemIC2Coil;
import malte0811.industrialWires.items.ItemKey;
import malte0811.industrialWires.items.ItemPanelComponent;
@ -35,9 +37,11 @@ import malte0811.industrialWires.wires.IC2Wiretype;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.statemap.StateMapperBase;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -50,7 +54,10 @@ import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.client.GuiIngameForge;
import net.minecraftforge.client.event.*;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.client.model.ModelLoaderRegistry;
import net.minecraftforge.client.model.obj.OBJModel;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@ -62,6 +69,8 @@ import javax.annotation.Nonnull;
import java.util.Locale;
import java.util.Map;
import static malte0811.industrialWires.client.render.TileRenderMBConverter.BASE_MODELS;
@Mod.EventBusSubscriber(modid = IndustrialWires.MODID, value = Side.CLIENT)
public class ClientEventHandler {
public static boolean shouldScreenshot = false;
@ -190,4 +199,22 @@ public class ClientEventHandler {
shouldScreenshot = false;
}
}
@SubscribeEvent
public static void onTextureStitch(TextureStitchEvent event) {
for (MechMBPart type:MechMBPart.INSTANCES.values()) {
ResourceLocation loc = type.getRotatingBaseModel();
try {
IModel model = ModelLoaderRegistry.getModel(loc);
if (model instanceof OBJModel) {
model = model.process(ImmutableMap.of("flip-v", "true"));
}
model.getTextures().forEach((rl)->event.getMap().registerSprite(rl));
IBakedModel b = model.bake(model.getDefaultState(), DefaultVertexFormats.BLOCK, (rl)->Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(rl.toString()));
BASE_MODELS.put(loc, b);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
}

View file

@ -16,7 +16,6 @@
package malte0811.industrialWires.client.render;
import blusunrize.immersiveengineering.client.ClientUtils;
import com.google.common.collect.ImmutableMap;
import malte0811.industrialWires.blocks.converter.TileEntityMultiblockConverter;
import malte0811.industrialWires.converter.MechMBPart;
import net.minecraft.client.Minecraft;
@ -33,9 +32,6 @@ import net.minecraft.client.renderer.vertex.VertexFormatElement;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.IResourceManagerReloadListener;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.ModelLoaderRegistry;
import net.minecraftforge.client.model.obj.OBJModel;
import org.lwjgl.opengl.GL11;
import java.util.*;
@ -47,21 +43,6 @@ public class TileRenderMBConverter extends TileEntitySpecialRenderer<TileEntityM
public static final Set<TileEntityMultiblockConverter> TES_WITH_MODELS = Collections.newSetFromMap(new WeakHashMap<>());
@Override
public void render(TileEntityMultiblockConverter te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
if (BASE_MODELS.isEmpty()) {
for (MechMBPart type:MechMBPart.INSTANCES.values()) {
ResourceLocation loc = type.getRotatingBaseModel();
try {
IModel model = ModelLoaderRegistry.getModel(loc);
if (model instanceof OBJModel) {
model = ((OBJModel)model).process(ImmutableMap.of("flip-v", "true"));
}
IBakedModel b = model.bake(model.getDefaultState(), DefaultVertexFormats.BLOCK, (rl)->Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(rl.toString()));
BASE_MODELS.put(loc, b);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
if (te.mechanical!=null) {
if (te.rotatingModel == null)
{
@ -118,7 +99,6 @@ public class TileRenderMBConverter extends TileEntitySpecialRenderer<TileEntityM
@Override
public void onResourceManagerReload(IResourceManager resourceManager) {
BASE_MODELS.clear();
for (TileEntityMultiblockConverter te:TES_WITH_MODELS)
te.rotatingModel = null;
TES_WITH_MODELS.clear();

View file

@ -0,0 +1,93 @@
/*
* This file is part of Industrial Wires.
* Copyright (C) 2016-2017 malte0811
* Industrial Wires is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Industrial Wires is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
*/
package malte0811.industrialWires.converter;
import net.minecraft.nbt.NBTBase;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.common.capabilities.CapabilityManager;
public class EUCapability {
@CapabilityInject(IC2EnergyHandler.class)
public static Capability<IC2EnergyHandler> ENERGY_IC2 = null;
public static void register() {
CapabilityManager.INSTANCE.register(IC2EnergyHandler.class, new Capability.IStorage<IC2EnergyHandler>() {
@Override
public NBTBase writeNBT(Capability<IC2EnergyHandler> capability, IC2EnergyHandler instance, EnumFacing side) {
throw new IllegalStateException("Can't serialize EU caps!");
}
@Override
public void readNBT(Capability<IC2EnergyHandler> capability, IC2EnergyHandler instance, EnumFacing side, NBTBase nbt) {
throw new IllegalStateException("Can't serialize EU caps!");
}
},
IC2EnergyHandlerDummy::new);
}
public static abstract class IC2EnergyHandler {
public int tier;
public double getDemandedEnergy() {
return 0;
}
public int getEnergyTier() {
return tier;
}
public abstract boolean acceptsEnergyFrom(EnumFacing side);
public abstract boolean emitsEnergyTo(EnumFacing side);
public abstract double injectEnergy(EnumFacing enumFacing, double v, double v1);
public abstract double getOfferedEnergy();
public abstract void drawEnergy(double v);
}
public static class IC2EnergyHandlerDummy extends IC2EnergyHandler {
@Override
public boolean acceptsEnergyFrom(EnumFacing side) {
return false;
}
@Override
public boolean emitsEnergyTo(EnumFacing side) {
return false;
}
@Override
public double injectEnergy(EnumFacing enumFacing, double v, double v1) {
return 0;
}
@Override
public double getOfferedEnergy() {
return 0;
}
@Override
public void drawEnergy(double v) {
}
}
}

View file

@ -23,18 +23,18 @@ public interface IMBPartElectric {
* 1. Heat up the sources, possibly destroying them (TODO do I want to do that?)
* 2. Consume a lot of mechanical energy
*/
Waveform getProduced();
Waveform getProduced(MechEnergy state);
// All four in Joules
double getAvailableEEnergy();
void extractEEnergy(double energy);
double requestEEnergy(Waveform waveform);
void insertEEnergy(double given, Waveform waveform);
double requestEEnergy(Waveform waveform, MechEnergy energy);
void insertEEnergy(double given, Waveform waveform, MechEnergy energy);
enum Waveform {
NONE(null, 0),
//Sync/async refers to multiblock rotation speed, not to line frequency
AC_SYNC(true, 3),
AC_ASYNC(true, 4) {
AC_SYNC(true, 4),
AC_ASYNC(true, 5) {
@Override
public Waveform getCommutated(double speed) {
if (Math.abs(speed-ASYNC_SPEED)<SYNC_TOLERANCE*ASYNC_SPEED) {
@ -45,10 +45,11 @@ public interface IMBPartElectric {
},
AC_4PHASE(true, 4),//TODO what should this rectify into? If anything at all
DC(false, 1),
MESS(null, 4);
MESS(null, 5);
public static final double ASYNC_SPEED = 10;//TODO is this a good value
public static final double SYNC_TOLERANCE = .1;//TODO is this a good value
public static final double MIN_COMM_SPEED = 4;//TODO is this a good value
public static final Waveform[] VALUES = values();
@Nullable
private Boolean isAC;
@ -67,7 +68,7 @@ public interface IMBPartElectric {
}
public Waveform getCommutated(double speed) {
return dual;
return speed<MIN_COMM_SPEED?this:dual;
}
public boolean isAC() {

View file

@ -31,7 +31,7 @@ public enum Material {
SILVER(10.49, 170, "blocks/storage_silver"),
NICKEL(8.908, 165, "blocks/storage_nickel"),
GOLD(19.3, 100, new ResourceLocation("minecraft", "blocks/gold_block")),
URANIUM(19.1, 400, "blocks/storage_uranium"),// This is a bit silly. But why not.
URANIUM(19.1, 400, "blocks/storage_uranium_side"),// This is a bit silly. But why not.
CONSTANTAN(8.885, 600, "blocks/storage_constantan"),
ELECTRUM((SILVER.density + GOLD.density) / 2, (SILVER.tensileStrength + GOLD.tensileStrength) / 2, "blocks/storage_electrum"),//Tensile strength is a guess ((GOLD+SILVER)/2), if anyone has better data I'll put it in
STEEL(7.874, 1250, "blocks/storage_steel"),

View file

@ -57,7 +57,7 @@ public abstract class MechMBPart {
public abstract double getInertia();
public abstract double getMaxSpeed();
public abstract void writeToNBT(NBTTagCompound out);
public abstract void readFromNBT(NBTTagCompound out);
public abstract void readFromNBT(NBTTagCompound in);
@SideOnly(Side.CLIENT)
public List<BakedQuad> getRotatingQuads() {
@ -89,13 +89,13 @@ public abstract class MechMBPart {
}
private static final BiMap<String, Class<? extends MechMBPart>> REGISTRY = HashBiMap.create();
public static void init() {
public static void preInit() {
IMBPartElectric.Waveform.init();
REGISTRY.put("flywheel", MechPartFlywheel.class);
REGISTRY.put("singleCoil", MechPartSingleCoil.class);
//REGISTRY.put("twoElectrodes", MechPartTwoElectrodes.class);
REGISTRY.put("commutator", MechPartTwoElectrodes.class);//TODO rename
REGISTRY.put("twoElectrodes", MechPartTwoElectrodes.class);
REGISTRY.put("commutator", MechPartCommutator.class);
REGISTRY.put("shaft", MechPartShaft.class);
for (String key : REGISTRY.keySet()) {

View file

@ -0,0 +1,275 @@
/*
* This file is part of Industrial Wires.
* Copyright (C) 2016-2017 malte0811
* Industrial Wires is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Industrial Wires is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
*/
package malte0811.industrialWires.converter;
import malte0811.industrialWires.IndustrialWires;
import malte0811.industrialWires.blocks.converter.MechanicalMBBlockType;
import malte0811.industrialWires.converter.EUCapability.IC2EnergyHandler;
import malte0811.industrialWires.util.ConversionUtil;
import malte0811.industrialWires.util.LocalSidedWorld;
import net.minecraft.client.Minecraft;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3i;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.energy.IEnergyStorage;
import static malte0811.industrialWires.util.NBTKeys.*;
import static net.minecraftforge.energy.CapabilityEnergy.ENERGY;
public class MechPartCommutator extends MechMBPart implements IMBPartElectric {
private double bufferToMB;
private Waveform wfToMB = Waveform.NONE;
private double bufferToWorld;
private Waveform wfToWorld = Waveform.NONE;
@Override
public Waveform getProduced(MechEnergy state) {
return wfToMB.getCommutated(state.getSpeed());
}
@Override
public double getAvailableEEnergy() {
return bufferToMB;
}
@Override
public void extractEEnergy(double energy) {
bufferToMB -= energy;
}
@Override
public double requestEEnergy(Waveform waveform, MechEnergy energy) {
if (waveform == wfToWorld.getCommutated(energy.getSpeed())) {
return getMaxBuffer() - bufferToWorld;
}
else {
return getMaxBuffer();
}
}
@Override
public void insertEEnergy(double given, Waveform waveform, MechEnergy energy) {
waveform = waveform.getCommutated(energy.getSpeed());
if (waveform!=wfToWorld) {
wfToWorld = waveform;
bufferToWorld = 0;
}
bufferToWorld += given;
}
private final IC2EnergyHandler capIc2 = new IC2EnergyHandler() {
{
tier = 3;//TODO does this mean everything blows up?
}
@Override
public boolean acceptsEnergyFrom(EnumFacing side) {
return side==EnumFacing.UP&&bufferToMB<getMaxBuffer();
}
@Override
public boolean emitsEnergyTo(EnumFacing side) {
return side==EnumFacing.UP&&bufferToWorld>0;
}
@Override
public double injectEnergy(EnumFacing side, double amount, double voltage) {
double buffer = bufferToMB;
double input = amount * ConversionUtil.joulesPerEu();
if (!wfToMB.isDC()) {
buffer = 0;
}
input = Math.min(input, getMaxBuffer()-buffer);
buffer += input;
bufferToMB = buffer;
wfToMB = Waveform.AC_ASYNC;
return amount-ConversionUtil.euPerJoule()*input;
}
@Override
public double getOfferedEnergy() {
if (wfToWorld.isDC()) {
return ConversionUtil.euPerJoule()*bufferToWorld;
}
return 0;
}
@Override
public void drawEnergy(double amount) {
bufferToWorld -= ConversionUtil.joulesPerEu()*amount;
}
};
private IEnergyStorage capForge = new IEnergyStorage() {
@Override
public int receiveEnergy(int maxReceive, boolean simulate) {
double buffer = bufferToMB;
double input = maxReceive* ConversionUtil.joulesPerIf();
if (!wfToMB.isAC()) {
buffer = 0;
}
input = Math.min(input, getMaxBuffer()-buffer);
buffer += input;
if (!simulate) {
bufferToMB = buffer;
wfToMB = Waveform.AC_ASYNC;
}
return (int) (ConversionUtil.ifPerJoule()*input);
}
@Override
public int extractEnergy(int maxExtract, boolean simulate) {
if (!wfToWorld.isAC()) {
return 0;
}
double buffer = bufferToWorld;
double output = maxExtract* ConversionUtil.joulesPerIf();
output = Math.min(output, getMaxBuffer()-buffer);
buffer += output;
if (!simulate) {
bufferToWorld = buffer;
}
return (int) (ConversionUtil.ifPerJoule()*output);
}
@Override
public int getEnergyStored() {
return (int) (ConversionUtil.ifPerJoule()*(bufferToWorld+bufferToMB));
}
@Override
public int getMaxEnergyStored() {
return (int)(2*ConversionUtil.ifPerJoule()*getMaxBuffer());
}
@Override
public boolean canExtract() {
return true;
}
@Override
public boolean canReceive() {
return true;
}
};
@Override
public <T> T getCapability(Capability<T> cap, EnumFacing side, Vec3i pos) {
if (cap==EUCapability.ENERGY_IC2) {
return EUCapability.ENERGY_IC2.cast(capIc2);
}
if (side==EnumFacing.UP&&cap== ENERGY) {
return ENERGY.cast(capForge);
}
return super.getCapability(cap, side, pos);
}
@Override
public <T> boolean hasCapability(Capability<T> cap, EnumFacing side, Vec3i pos) {
if (cap==EUCapability.ENERGY_IC2) {
return true;
}
if (side==EnumFacing.UP&&cap== ENERGY) {
return true;
}
return super.hasCapability(cap, side, pos);
}
@Override
public void createMEnergy(MechEnergy e) {}
@Override
public double requestMEnergy(MechEnergy e) {
return 0;
}
@Override
public void insertMEnergy(double added) {}
@Override
public double getInertia() {
return 50;
}
@Override
public double getMaxSpeed() {
return Double.MAX_VALUE;
}
@Override
public void writeToNBT(NBTTagCompound out) {
out.setDouble(BUFFER_IN, bufferToMB);
out.setDouble(BUFFER_OUT, bufferToWorld);
out.setInteger(BUFFER_IN+WAVEFORM, wfToMB.ordinal());
out.setInteger(BUFFER_OUT+WAVEFORM, wfToWorld.ordinal());
}
@Override
public void readFromNBT(NBTTagCompound in) {
bufferToMB = in.getDouble(BUFFER_IN);
bufferToWorld = in.getDouble(BUFFER_OUT);
wfToMB = Waveform.VALUES[in.getInteger(BUFFER_IN+WAVEFORM)];
wfToWorld = Waveform.VALUES[in.getInteger(BUFFER_OUT+WAVEFORM)];
}
@Override
public ResourceLocation getRotatingBaseModel() {
return new ResourceLocation(IndustrialWires.MODID, "block/mech_mb/shaft_comm.obj");
}
private static final ResourceLocation KINETIC_GEN_KEY =
new ResourceLocation("ic2", "kinetic_generator");
@Override
public boolean canForm(LocalSidedWorld w) {
Minecraft.getMinecraft().mouseHelper.ungrabMouseCursor();
//Center is an IC2 kinetic generator
TileEntity te = w.getTileEntity(BlockPos.ORIGIN);
if (te!=null) {
ResourceLocation loc = TileEntity.getKey(te.getClass());
if (loc!=null&&loc.equals(KINETIC_GEN_KEY)) {
return true;
}
}
return false;
}
@Override
public short getFormPattern() {
return 0b000_010_000;
}
@Override
public void disassemble(boolean failed, MechEnergy energy) {
if (IndustrialWires.ic2TeBlock!=null) {
NBTTagCompound dummyNbt = new NBTTagCompound();
dummyNbt.setString("id", KINETIC_GEN_KEY.toString());
world.setBlockState(BlockPos.ORIGIN, IndustrialWires.ic2TeBlock.getDefaultState());
world.setTileEntity(BlockPos.ORIGIN, TileEntity.create(world.getWorld(), dummyNbt));
}
}
@Override
public MechanicalMBBlockType getType() {
return MechanicalMBBlockType.SHAFT_COMMUTATOR;
}
protected double getMaxBuffer() {
return 2.5e3;
}
}

View file

@ -74,8 +74,8 @@ public class MechPartFlywheel extends MechMBPart {
}
@Override
public void readFromNBT(NBTTagCompound out) {
material = Material.values()[out.getInteger("material")];
public void readFromNBT(NBTTagCompound in) {
material = Material.values()[in.getInteger("material")];
}
@Override
@ -87,7 +87,13 @@ public class MechPartFlywheel extends MechMBPart {
public List<BakedQuad> getRotatingQuads() {
List<BakedQuad> orig = super.getRotatingQuads();
TextureAtlasSprite newTex = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(material.blockTexture.toString());
return orig.stream().map((quad)->new BakedQuadRetextured(quad, newTex)).collect(Collectors.toList());
return orig.stream().map((quad)->{
if (quad.getSprite().getIconName().contains("steel")) {
return new BakedQuadRetextured(quad, newTex);
} else {
return quad;
}
}).collect(Collectors.toList());
}
@Override

View file

@ -53,7 +53,7 @@ public class MechPartShaft extends MechMBPart {
public void writeToNBT(NBTTagCompound out) {}
@Override
public void readFromNBT(NBTTagCompound out) {}
public void readFromNBT(NBTTagCompound in) {}
@Override
public ResourceLocation getRotatingBaseModel() {

View file

@ -37,7 +37,7 @@ public class MechPartSingleCoil extends MechMBPart implements IMBPartElectric {
private double bufferToMech;
private double bufferToE;
@Override
public Waveform getProduced() {
public Waveform getProduced(MechEnergy state) {
return Waveform.AC_SYNC;
}
@Override
@ -51,12 +51,12 @@ public class MechPartSingleCoil extends MechMBPart implements IMBPartElectric {
}
@Override
public double requestEEnergy(Waveform waveform) {
public double requestEEnergy(Waveform waveform, MechEnergy energy) {
return MAX_BUFFER- bufferToMech;
}
@Override
public void insertEEnergy(double given, Waveform waveform) {
public void insertEEnergy(double given, Waveform waveform, MechEnergy energy) {
if (waveform.isDC()) {
bufferToMech = 0;//TODO something more spectacular
} else {
@ -87,7 +87,7 @@ public class MechPartSingleCoil extends MechMBPart implements IMBPartElectric {
@Override
public double getMaxSpeed() {
return Double.MAX_VALUE;//TODO
return Double.MAX_VALUE;//TODO I'm fine with shafts having infinite max speed. Not coils though.
}
@Override
@ -97,9 +97,9 @@ public class MechPartSingleCoil extends MechMBPart implements IMBPartElectric {
}
@Override
public void readFromNBT(NBTTagCompound out) {
bufferToMech = out.getDouble(BUFFER_IN);
bufferToE = out.getDouble(BUFFER_OUT);
public void readFromNBT(NBTTagCompound in) {
bufferToMech = in.getDouble(BUFFER_IN);
bufferToE = in.getDouble(BUFFER_OUT);
}
@Override

View file

@ -44,7 +44,7 @@ public class MechPartTwoElectrodes extends MechMBPart implements IMBPartElectric
private double bufferToWorld;
private boolean isACInWBuffer;
@Override
public Waveform getProduced() {
public Waveform getProduced(MechEnergy state) {
return bufferToMB>0?(isACInMBBuffer? AC_ASYNC: DC): NONE;
}
@ -59,12 +59,12 @@ public class MechPartTwoElectrodes extends MechMBPart implements IMBPartElectric
}
@Override
public double requestEEnergy(Waveform waveform) {
public double requestEEnergy(Waveform waveform, MechEnergy energy) {
return MAX_BUFFER-bufferToWorld;
}
@Override
public void insertEEnergy(double given, Waveform waveform) {
public void insertEEnergy(double given, Waveform waveform, MechEnergy energy) {
if (bufferToWorld > 0 && (isACInWBuffer ^ waveform.isAC())) {
bufferToWorld = 0;
}
@ -117,16 +117,16 @@ public class MechPartTwoElectrodes extends MechMBPart implements IMBPartElectric
}
@Override
public void readFromNBT(NBTTagCompound out) {
bufferToMB = out.getDouble(BUFFER_IN);
isACInMBBuffer = out.getBoolean(BUFFER_IN+AC);
bufferToWorld = out.getDouble(BUFFER_OUT);
isACInWBuffer = out.getBoolean(BUFFER_OUT+AC);
public void readFromNBT(NBTTagCompound in) {
bufferToMB = in.getDouble(BUFFER_IN);
isACInMBBuffer = in.getBoolean(BUFFER_IN+AC);
bufferToWorld = in.getDouble(BUFFER_OUT);
isACInWBuffer = in.getBoolean(BUFFER_OUT+AC);
}
@Override
public ResourceLocation getRotatingBaseModel() {
return new ResourceLocation(IndustrialWires.MODID, "block/mech_mb/shaft.obj");//TODO texture
return new ResourceLocation(IndustrialWires.MODID, "block/mech_mb/shaft2.obj");
}
@ -150,7 +150,7 @@ public class MechPartTwoElectrodes extends MechMBPart implements IMBPartElectric
@Override
public MechanicalMBBlockType getType() {
return MechanicalMBBlockType.SHAFT_COMMUTATOR;
return MechanicalMBBlockType.SHAFT_1_PHASE;
}

View file

@ -75,75 +75,69 @@ public class MultiblockConverter implements MultiblockHandler.IMultiblock {
@Override
public boolean createStructure(World world, BlockPos pos, EnumFacing side, EntityPlayer player) {
boolean b = true;
BlockPos.PooledMutableBlockPos mutPos = BlockPos.PooledMutableBlockPos.retain();
try {
LocalSidedWorld w = new LocalSidedWorld(world, pos, side.getOpposite(), false);
if (!checkEnd(w, mutPos)) {
return false;
}
mirrorLoop:do {
b = !b;
w.setMirror(b);
boolean done = false;
List<MechMBPart> parts = new ArrayList<>();
int lastLength = 1;
double weight = 0;
while (!done) {
mutPos.setPos(0, 0, lastLength);
w.setOrigin(w.getRealPos(mutPos));
MechMBPart next = null;
for (String key:MechMBPart.INSTANCES.keySet()) {
MechMBPart it = MechMBPart.INSTANCES.get(key);
if (it.canForm(w)) {
next = it;
MechMBPart.cacheNewInstance(key);
break;
}
}
if (next!=null) {
parts.add(next);
lastLength = next.getLength();
weight += next.getInertia();
} else {
if (parts.size()>0&&checkEnd(w, mutPos)) {
done = true;
} else {
continue mirrorLoop;
}
}
}
double finalWeight = weight;
w.setOrigin(pos);
formEnd(w, mutPos, END, (te, master)->{
if (master) {
te.offset = BlockPos.ORIGIN;
te.setMechanical(parts.toArray(new MechMBPart[parts.size()]), 0);
te.energyState = new MechEnergy(finalWeight, 0);
} else {
te.offset = new BlockPos(0, -1, 0);
}
te.facing = side;
te.formed = true;
});
lastLength = 1;
Consumer<TileEntityMultiblockConverter> init = (te)-> {
te.offset = te.getPos().subtract(pos);
te.facing = side;
te.formed = true;
};
for (MechMBPart part:parts) {
mutPos.setPos(0, 0, lastLength);
w = new LocalSidedWorld(world, w.getRealPos(mutPos), w.getFacing(), w.isMirrored());
part.form(w, init);
lastLength = part.getLength();
}
boolean foundAll = false;
List<MechMBPart> parts = new ArrayList<>();
int lastLength = 1;
double weight = 0;
while (!foundAll) {
mutPos.setPos(0, 0, lastLength);
w = new LocalSidedWorld(w.getWorld(), w.getRealPos(mutPos), w.getFacing(), w.isMirrored());
formEnd(w, mutPos, OTHER_END, (te, __)->init.accept(te));
break;
} while (!b);
return false;
w.setOrigin(w.getRealPos(mutPos));
MechMBPart next = null;
for (String key : MechMBPart.INSTANCES.keySet()) {
MechMBPart it = MechMBPart.INSTANCES.get(key);
if (it.canForm(w)) {
next = it;
MechMBPart.cacheNewInstance(key);
break;
}
}
if (next != null) {
parts.add(next);
lastLength = next.getLength();
weight += next.getInertia();
} else {
if (parts.size() > 0 && checkEnd(w, mutPos)) {
foundAll = true;
} else {
return false;
}
}
}
double finalWeight = weight;
w.setOrigin(pos);
formEnd(w, mutPos, END, (te, master) -> {
if (master) {
te.offset = BlockPos.ORIGIN;
te.setMechanical(parts.toArray(new MechMBPart[parts.size()]), 0);
te.energyState = new MechEnergy(finalWeight, 0);
} else {
te.offset = new BlockPos(0, -1, 0);
}
te.facing = side;
te.formed = true;
});
lastLength = 1;
Consumer<TileEntityMultiblockConverter> init = (te) -> {
te.offset = te.getPos().subtract(pos);
te.facing = side;
te.formed = true;
};
for (MechMBPart part : parts) {
mutPos.setPos(0, 0, lastLength);
w = new LocalSidedWorld(world, w.getRealPos(mutPos), w.getFacing(), w.isMirrored());
part.form(w, init);
lastLength = part.getLength();
}
mutPos.setPos(0, 0, lastLength);
w = new LocalSidedWorld(w.getWorld(), w.getRealPos(mutPos), w.getFacing(), w.isMirrored());
formEnd(w, mutPos, OTHER_END, (te, __) -> init.accept(te));
return true;
} finally {
mutPos.release();
}

View file

@ -28,6 +28,7 @@ public class LocalSidedWorld {
private BlockPos origin;
private EnumFacing facing;
private boolean mirror;
public LocalSidedWorld(World world, BlockPos origin, EnumFacing facing, boolean mirror) {
this.world = world;
this.facing = facing;
@ -61,6 +62,10 @@ public class LocalSidedWorld {
world.spawnEntity(e);
}
public void setTileEntity(BlockPos pos, TileEntity setTo) {
world.setTileEntity(getRealPos(pos), setTo);
}
public BlockPos getRealPos(BlockPos relative) {
return MiscUtils.offset(origin, facing, mirror, relative);
}
@ -73,6 +78,7 @@ public class LocalSidedWorld {
return MiscUtils.offset(Vec3d.ZERO, facing, mirror, dir);
}
//Getters+Setters
public World getWorld() {
return world;

View file

@ -56,6 +56,7 @@ public final class NBTKeys {
public static final String SPEED = "speed";
public static final String TEXTURE = "texture";
public static final String AC = "Ac";
public static final String WAVEFORM = "Wf";
private NBTKeys() {}

View file

@ -28,6 +28,9 @@
"shaft_commutator": {
"model": "industrialwires:mech_mb/commutator.obj"
},
"shaft_1_phase": {
"model": "industrialwires:mech_mb/two_electrodes.obj"
},
"shaft_basic": {
}
},

View file

@ -2,9 +2,4 @@
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Ka industrialwires:blocks/converter/electrodes

View file

@ -42,39 +42,129 @@ v 1.000000 0.343750 0.375000
v 1.000000 0.875000 0.375000
v 0.875000 0.343750 0.375000
v 0.875000 0.875000 0.375000
vt -0.0000 0.3125
vt 0.2500 0.3125
vt 0.2500 0.3750
vt -0.0000 0.3750
vt -0.0000 0.2500
vt 0.2812 0.2500
vt 0.2812 0.3750
vt -0.0000 0.3750
vt -0.0000 0.3125
vt 0.2812 0.3125
vt 0.2812 0.3750
vt -0.0000 0.3750
vt 0.2500 0.2500
vt 0.5000 0.2500
vt 0.5000 0.3750
vt 0.2500 0.3750
vt 0.0625 0.3750
vt 0.0625 0.2500
vt 0.0000 0.2500
vt 0.0000 0.3750
vt 0.0000 0.9062
vt 0.0000 0.8438
vt 0.5000 0.8438
vt 0.5000 0.9062
vt 0.5000 0.8125
vt 0.5000 0.8750
vt 0.0000 0.8750
vt 0.0000 0.8125
vt 0.5000 0.8125
vt 0.5000 0.8750
vt 0.0000 0.8750
vt -0.0000 0.8125
vt 0.5000 0.9375
vt 0.5000 1.0000
vt 0.0000 1.0000
vt -0.0000 0.9375
vt -0.0000 0.5000
vt 0.5000 0.5000
vt 0.5000 1.0000
vt 0.0000 1.0000
vt 0.5000 0.5000
vt 1.0000 0.5000
vt 1.0000 1.0000
vt 0.2500 0.5000
vt 0.5000 0.5000
vt 0.5000 0.3750
vt 0.2500 0.3750
vt 0.2500 0.4375
vt 0.5000 0.4375
vt 0.5000 0.5000
vt 0.2500 0.5000
vt 0.5000 0.3750
vt 0.2500 0.3750
vt 0.2500 0.5000
vt 0.5000 0.5000
vt 0.2500 0.5000
vt 0.5000 0.5000
vt 0.5000 0.4375
vt 0.2500 0.4375
vt 0.0000 0.3750
vt 0.2500 0.3750
vt 0.2500 0.5000
vt -0.0000 0.5000
vt 0.0000 0.3750
vt 0.2500 0.3750
vt 0.2500 0.4375
vt -0.0000 0.4375
vt 0.0000 0.5000
vt 0.2500 0.5000
vt 0.2500 0.3750
vt -0.0000 0.3750
vt 0.2500 0.5000
vt -0.0000 0.5000
vt 0.0000 0.4375
vt 0.2500 0.4375
vt 0.0000 0.2500
vt 0.2500 0.2500
vt 0.2500 0.3125
vt 0.0000 0.3125
vt 0.0000 0.2500
vt 0.2500 0.2500
vt 0.2500 0.3750
vt -0.0000 0.3750
vt 0.0000 0.2500
vt 0.2500 0.2500
vt 0.2500 0.3125
vt 0.0000 0.3125
vt 0.0000 0.2500
vt 0.2500 0.2500
vt 0.2500 0.3750
vt -0.0000 0.3750
vt -0.0000 0.3750
vt 0.0625 0.2500
vt 0.0625 0.3750
vn 0.0000 0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -1.0000 0.0000
vn -0.0000 1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None
s off
f 1//1 2//1 4//1 3//1
f 3//2 4//2 8//2 7//2
f 7//3 8//3 6//3 5//3
f 5//4 6//4 2//4 1//4
f 3//5 7//5 5//5 1//5
f 8//6 4//6 2//6 6//6
f 9//1 10//1 12//1 11//1
f 11//2 12//2 16//2 15//2
f 15//3 16//3 14//3 13//3
f 13//4 14//4 10//4 9//4
f 11//5 15//5 13//5 9//5
f 16//6 12//6 10//6 14//6
f 17//1 18//1 20//1 19//1
f 19//6 20//6 24//6 23//6
f 23//3 24//3 22//3 21//3
f 21//5 22//5 18//5 17//5
f 19//2 23//2 21//2 17//2
f 25//1 26//1 28//1 27//1
f 27//6 28//6 32//6 31//6
f 31//3 32//3 30//3 29//3
f 29//5 30//5 26//5 25//5
f 26//4 30//4 32//4 28//4
f 33//1 34//1 36//1 35//1
f 35//2 36//2 40//2 39//2
f 39//3 40//3 38//3 37//3
f 37//4 38//4 34//4 33//4
f 35//5 39//5 37//5 33//5
f 40//6 36//6 34//6 38//6
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 8/7/2 7/8/2
f 7/9/3 8/10/3 6/11/3 5/12/3
f 5/13/4 6/14/4 2/15/4 1/16/4
f 3/17/5 7/18/5 5/19/5 1/20/5
f 9/21/1 10/22/1 12/23/1 11/24/1
f 11/25/2 12/26/2 16/27/2 15/28/2
f 15/29/3 16/30/3 14/31/3 13/32/3
f 13/33/4 14/34/4 10/35/4 9/36/4
f 11/37/5 15/38/5 13/39/5 9/40/5
f 16/41/6 12/42/6 10/43/6 14/34/6
f 17/44/1 18/45/1 20/46/1 19/47/1
f 19/48/6 20/49/6 24/50/6 23/51/6
f 23/52/3 24/53/3 22/54/3 21/55/3
f 21/56/5 22/57/5 18/58/5 17/59/5
f 25/60/1 26/61/1 28/62/1 27/63/1
f 27/64/6 28/65/6 32/66/6 31/67/6
f 31/68/3 32/69/3 30/70/3 29/71/3
f 29/72/5 30/73/5 26/74/5 25/75/5
f 33/76/1 34/77/1 36/78/1 35/79/1
f 35/80/2 36/81/2 40/82/2 39/83/2
f 39/84/3 40/85/3 38/86/3 37/87/3
f 37/88/4 38/89/4 34/90/4 33/91/4
f 35/92/5 39/84/5 37/93/5 33/94/5

View file

@ -1,2 +1,8 @@
newmtl None
map_Ka immersiveengineering:blocks/storage_steel
# Blender MTL File: 'RotaryConverter.blend'
# Material Count: 2
newmtl Shaft
map_Ka industrialwires:blocks/converter/shaft
newmtl Wheel
map_Ka immersiveengineering:blocks/storage_steel

View file

@ -42,6 +42,34 @@ v 1.500000 0.500000 0.937500
v 1.500000 0.500000 0.062500
v -0.500000 0.500000 0.062500
v -0.500000 0.500000 0.937500
vt 0.1250 1.0000
vt 0.0625 1.0000
vt 0.0625 0.0000
vt 0.1250 0.0000
vt 0.2500 0.0000
vt 0.3125 0.0000
vt 0.3125 1.0000
vt 0.2500 1.0000
vt 0.3750 0.0000
vt 0.3125 0.0000
vt 0.3125 1.0000
vt 0.3750 1.0000
vt 0.3750 1.0000
vt 0.4375 1.0000
vt 0.4375 -0.0000
vt 0.3750 -0.0000
vt 0.5000 1.0000
vt 0.4375 1.0000
vt 0.4375 0.0000
vt 0.5000 0.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 0.1875 1.0000
vt 0.1875 -0.0000
vt 0.1875 1.0000
vt 0.1875 -0.0000
vt 0.2500 0.0000
vt 0.2500 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
@ -97,60 +125,44 @@ vt 0.5000 0.5000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 0.5000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vt 0.0000 0.0000
vn -0.7071 -0.7071 0.0000
vn 0.0000 1.0000 0.0000
vn 0.7071 -0.7071 -0.0000
vn 1.0000 0.0000 0.0000
vn -1.0000 -0.0000 0.0000
vn -0.0000 0.0000 -1.0000
vn -1.0000 0.0000 0.0000
vn -0.7071 0.7071 0.0000
vn 0.0000 0.0000 1.0000
vn 0.7071 0.7071 -0.0000
vn 0.0000 1.0000 0.0000
vn 0.7071 0.7071 0.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 -1.0000 -0.0000
usemtl None
vn -0.7071 -0.7071 -0.0000
vn -0.0000 0.0000 -1.0000
vn 0.0000 0.0000 1.0000
usemtl Shaft
s off
f 5/1/1 3/2/1 4/3/1 6/4/1
f 13/5/2 14/6/2 16/7/2 15/8/2
f 9/9/3 7/10/3 8/11/3 10/12/3
f 9/9/4 10/12/4 12/13/4 11/14/4
f 1/15/5 2/16/5 4/3/5 3/2/5
f 14/17/6 12/18/6 38/19/6 35/20/6
f 1/15/7 15/8/7 16/7/7 2/16/7
f 40/21/8 3/22/8 5/23/8 33/24/8
f 1/25/8 40/26/8 33/27/8 15/28/8
f 8/29/6 35/30/6 38/31/6 10/32/6
f 13/5/9 11/14/9 12/13/9 14/6/9
f 5/23/10 6/33/10 8/34/10 7/35/10
f 15/36/8 33/24/8 34/37/8 13/5/8
f 33/24/8 5/23/8 7/35/8 34/38/8
f 14/6/6 35/30/6 36/39/6 16/40/6
f 35/41/6 8/29/6 6/33/6 36/42/6
f 9/43/8 37/44/8 34/38/8 7/35/8
f 11/45/8 13/46/8 34/47/8 37/48/8
f 4/49/6 39/50/6 36/42/6 6/51/6
f 2/52/6 16/53/6 36/54/6 39/55/6
usemtl None_NONE
f 29/56/3 27/57/3 28/58/3 30/59/3
f 19/60/5 17/61/5 18/62/5 20/63/5
f 21/64/7 19/60/7 20/63/7 22/65/7
f 23/66/2 21/64/2 22/65/2 24/67/2
f 25/68/9 23/66/9 24/67/9 26/69/9
f 27/57/4 25/68/4 26/69/4 28/58/4
f 31/70/10 29/56/10 30/59/10 32/71/10
f 18/62/1 17/61/1 31/70/1 32/71/1
f 29/1/1 27/2/1 28/3/1 30/4/1
f 19/5/2 17/6/2 18/7/2 20/8/2
f 21/9/3 19/10/3 20/11/3 22/12/3
f 23/13/4 21/14/4 22/15/4 24/16/4
f 25/17/5 23/18/5 24/19/5 26/20/5
f 27/2/6 25/21/6 26/22/6 28/3/6
f 31/23/7 29/1/7 30/4/7 32/24/7
f 18/25/8 17/26/8 31/27/8 32/28/8
usemtl Wheel
f 5/29/8 3/30/8 4/31/8 6/32/8
f 13/33/4 14/34/4 16/35/4 15/36/4
f 9/37/1 7/38/1 8/39/1 10/40/1
f 9/37/6 10/40/6 12/41/6 11/42/6
f 1/43/2 2/44/2 4/31/2 3/30/2
f 14/45/9 12/46/9 38/47/9 35/48/9
f 1/43/3 15/36/3 16/35/3 2/44/3
f 40/49/10 3/50/10 5/51/10 33/52/10
f 1/53/10 40/54/10 33/55/10 15/56/10
f 8/57/9 35/58/9 38/59/9 10/60/9
f 13/33/5 11/42/5 12/41/5 14/34/5
f 5/51/7 6/61/7 8/62/7 7/63/7
f 15/64/10 33/52/10 34/65/10 13/33/10
f 33/52/10 5/51/10 7/63/10 34/66/10
f 14/34/9 35/58/9 36/67/9 16/68/9
f 35/69/9 8/57/9 6/61/9 36/70/9
f 9/71/10 37/72/10 34/66/10 7/63/10
f 11/73/10 13/74/10 34/75/10 37/76/10
f 4/77/9 39/78/9 36/70/9 6/79/9
f 2/80/9 16/81/9 36/82/9 39/83/9

View file

@ -1,12 +1,2 @@
# Blender MTL File: 'RotaryConverter.blend'
# Material Count: 1
newmtl Material.002
Ns 96.078431
Ka 1.000000 1.000000 1.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Ka industrialwires:blocks/converter/mag_ring

View file

@ -4,96 +4,213 @@ mtllib mag_ring.mtl
o MagRing_Cube.048
v 1.500000 0.085786 0.937500
v 1.500000 0.085786 0.062500
v 0.914214 -0.500000 0.937500
v 0.914214 -0.500001 0.937500
v 0.914214 -0.500000 0.062500
v -0.500000 0.085786 0.937500
v -0.500000 0.085786 0.062500
v -0.500000 0.914214 0.937500
v -0.500000 0.914213 0.937500
v -0.500000 0.914214 0.062500
v 1.500000 0.914214 0.937500
v 1.500000 0.914213 0.937500
v 1.500000 0.914214 0.062500
v 0.085787 1.500000 0.937500
v 0.085787 1.499999 0.937500
v 0.085787 1.500000 0.062500
v 0.914214 1.500000 0.937500
v 0.914214 1.499999 0.937500
v 0.914214 1.500000 0.062500
v 0.085786 -0.500000 0.937500
v 0.085786 -0.500001 0.937500
v 0.085786 -0.500000 0.062500
v 2.000000 -0.412909 0.062500
v 2.000000 -0.706577 0.937500
v 2.000000 -0.412908 0.937500
v 2.000000 -0.142556 0.062500
v 1.999999 -0.142556 0.937500
v 1.999995 -1.000000 0.937500
v 2.000000 -0.500001 0.937500
v 1.999999 0.085789 0.937500
v 1.999995 -1.000001 0.937500
v 1.999995 -1.000000 0.062500
v -1.000000 -0.142555 0.937500
v -0.999999 -0.142556 0.062500
v -0.142555 2.000000 0.937500
v -0.412908 1.729647 0.937500
v -0.142555 1.999999 0.937500
v -0.142555 2.000000 0.062500
v -0.999999 1.142555 0.937500
v -0.999999 1.142556 0.062500
v -0.729647 1.412908 0.937500
v -0.729646 1.412909 0.062500
v -1.000000 -1.000000 0.937500
v -1.000000 -1.000001 0.937500
v -0.999995 -1.000000 0.062500
v 2.000000 1.142555 0.062500
v 1.999999 1.142556 0.937500
v 1.142555 2.000000 0.937500
v 1.142555 1.999999 0.937500
v 1.142555 2.000000 0.062500
vn 0.0000 -0.0000 1.0000
vn 0.7071 0.7071 -0.0000
vn -0.7071 -0.7071 0.0000
v -1.000000 0.085789 0.937500
v -1.000000 -0.500001 0.937500
v -0.500000 0.085786 0.062500
v 0.085786 -0.500001 0.062500
v 1.500000 0.085786 0.062500
v 1.500000 0.914213 0.062500
v -0.500000 0.914213 0.062500
v 0.914213 1.500000 0.062500
v 0.085786 1.500000 0.062500
v 0.914213 -0.500001 0.062500
v -1.000000 -0.500000 0.062500
v -1.000000 0.085790 0.062500
v -0.999996 -1.000000 0.062500
v 1.142554 2.000000 0.062500
v 1.999999 1.142555 0.062500
v 2.000000 -1.000000 0.062500
v -0.999999 1.142556 0.062500
v -0.142556 2.000000 0.062500
v 1.999999 0.085790 0.062500
v 2.000000 -0.500000 0.062500
vt 0.3542 0.6042
vt 0.3542 0.3333
vt 0.6458 0.3333
vt 0.6458 0.6042
vt 0.6458 0.3333
vt 0.6458 0.6042
vt 0.3542 0.6042
vt 0.3542 0.3333
vt 0.3542 0.6042
vt 0.3542 0.3333
vt 0.6458 0.3333
vt 0.6458 0.6042
vt 0.6458 0.3333
vt 0.6458 0.6042
vt 0.3542 0.6042
vt 0.3542 0.3333
vt 0.5208 0.3333
vt 0.3542 0.4167
vt 0.6042 0.6667
vt 0.6875 0.5000
vt 0.3542 0.6042
vt 0.3542 0.3333
vt 0.6458 0.3333
vt 0.6458 0.6042
vt 0.3542 0.6042
vt 0.3542 0.3333
vt 0.6458 0.3333
vt 0.6458 0.6042
vt 0.6458 0.3333
vt 0.6458 0.6042
vt 0.3542 0.6042
vt 0.3542 0.3333
vt 0.6458 0.2708
vt 0.6458 0.7292
vt 0.3750 0.7292
vt 0.3750 0.2708
vt 0.4792 0.5000
vt 0.4792 0.7708
vt 0.6667 0.7708
vt 0.6667 0.4167
vt 0.6667 0.3333
vt 0.4792 0.3333
vt 0.4792 0.4583
vt 0.6667 0.7083
vt 0.5833 1.0000
vt 0.4167 1.0000
vt 0.4167 0.0000
vt 0.5833 0.0000
vt 0.0208 1.0000
vt 0.0208 0.5625
vt 0.3333 0.5625
vt 0.3333 1.0000
vt 0.6458 0.0000
vt 0.6458 1.0000
vt 0.3750 1.0000
vt 0.3750 0.0000
vt 0.0208 0.0000
vt 0.3333 0.0000
vt 0.3333 0.7083
vt 0.0208 0.7083
vt 0.0208 0.5625
vt 0.3333 0.5625
vt 0.3333 1.0000
vt 0.0208 1.0000
vt 0.3542 0.6042
vt 0.3542 0.3333
vt 0.6458 0.3333
vt 0.6458 0.6042
vt 0.5625 0.3542
vt 0.5625 0.6458
vt 0.4167 0.7083
vt 0.4167 0.2917
vt 0.6875 0.5208
vt 0.6042 0.6667
vt 0.3542 0.3958
vt 0.5208 0.3333
vt 0.4792 0.7708
vt 0.4792 0.5000
vt 0.6667 0.4167
vt 0.6667 0.7708
vt 0.6667 0.7083
vt 0.4792 0.4583
vt 0.4792 0.3333
vt 0.6667 0.3333
vt 0.0208 0.0000
vt 0.3333 0.0000
vt 0.3333 0.7083
vt 0.0208 0.7083
vt 0.5208 0.3333
vt 0.3542 0.4167
vt 0.6042 0.6667
vt 0.6875 0.5000
vt 0.4792 0.5000
vt 0.4792 0.7708
vt 0.6667 0.7708
vt 0.6667 0.4167
vt 0.6667 0.3333
vt 0.4792 0.3333
vt 0.4792 0.4583
vt 0.6667 0.7083
vt 0.5833 1.0000
vt 0.4167 1.0000
vt 0.4167 0.0000
vt 0.5833 0.0000
vt 0.5625 0.3542
vt 0.5625 0.6458
vt 0.4167 0.7083
vt 0.4167 0.2917
vt 0.6875 0.5208
vt 0.6042 0.6667
vt 0.3542 0.3958
vt 0.5208 0.3333
vt 0.4792 0.7708
vt 0.4792 0.5000
vt 0.6667 0.4167
vt 0.6667 0.7708
vt 0.6667 0.7083
vt 0.4792 0.4583
vt 0.4792 0.3333
vt 0.6667 0.3333
vn 0.7071 0.7071 0.0000
vn -0.7071 -0.7071 -0.0000
vn -0.7071 0.7071 0.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 -0.0000 -1.0000
vn 0.0000 -1.0000 -0.0000
vn -0.0000 -0.0000 1.0000
vn 0.7071 -0.7071 -0.0000
vn 1.0000 0.0000 0.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 1.0000 0.0000
vn -1.0000 0.0000 -0.0000
vn -0.0000 1.0000 0.0000
vn 0.0000 -0.0000 -1.0000
usemtl Material.002
s off
f 3//1 15//1 33//1
f 5//2 15//2 16//2 6//2
f 9//3 13//3 14//3 10//3
f 3//4 1//4 2//4 4//4
f 13//5 11//5 12//5 14//5
f 9//1 1//1 21//1 36//1
f 31//1 29//1 7//1
f 33//1 22//1 3//1
f 18//1 19//1 3//1
f 19//1 1//1 3//1
f 14//6 12//6 28//6 38//6
f 22//1 18//1 3//1
f 11//7 7//7 8//7 12//7
f 7//8 5//8 6//8 8//8
f 1//9 9//9 10//9 2//9
f 38//10 28//10 26//10 37//10
f 24//1 33//1 15//1 5//1
f 30//6 32//6 8//6
f 17//6 23//6 4//6
f 4//6 2//6 17//6
f 4//6 23//6 34//6
f 16//6 4//6 34//6
f 20//6 17//6 2//6
f 29//1 24//1 5//1 7//1
f 25//6 6//6 16//6 34//6
f 37//1 13//1 9//1 36//1
f 26//1 11//1 13//1 37//1
f 23//8 17//8 19//8 18//8
f 21//8 19//8 17//8 20//8
f 30//4 29//4 31//4 32//4
f 1//1 19//1 21//1
f 25//6 30//6 8//6 6//6
f 35//6 20//6 2//6 10//6
f 12//6 8//6 32//6 28//6
f 27//1 11//1 26//1
f 10//6 14//6 38//6 35//6
f 31//1 7//1 11//1 27//1
f 26//4 28//4 27//4
f 36//8 21//8 20//8 35//8
f 27//4 28//4 32//4 31//4
f 22//8 23//8 18//8
f 22//5 33//5 34//5 23//5
f 29//9 30//9 34//9 33//9
f 36//2 35//2 38//2 37//2
f 15//10 3//10 4//10 16//10
f 5/1/1 15/2/1 16/3/1 6/4/1
f 9/5/2 13/6/2 14/7/2 10/8/2
f 3/9/3 1/10/3 2/11/3 4/12/3
f 13/13/4 11/14/4 12/15/4 14/16/4
f 9/17/5 28/18/5 29/19/5 13/20/5
f 11/21/6 7/22/6 8/23/6 12/24/6
f 7/25/7 5/26/7 6/27/7 8/28/7
f 1/29/8 9/30/8 10/31/8 2/32/8
f 30/33/9 22/34/9 21/35/9 29/36/9
f 9/37/5 1/38/5 18/39/5 28/40/5
f 17/41/5 18/42/5 1/43/5 3/44/5
f 19/45/5 17/46/5 32/47/5 25/48/5
f 22/49/3 24/50/3 23/51/3 21/52/3
f 19/53/4 25/54/4 26/55/4 20/56/4
f 26/57/8 25/58/8 23/59/8 24/60/8
f 28/61/1 27/62/1 30/63/1 29/64/1
f 15/65/9 3/66/9 4/67/9 16/68/9
f 11/69/5 13/70/5 29/71/5 21/72/5
f 11/73/5 21/74/5 23/75/5 7/76/5
f 5/77/5 7/78/5 23/79/5 31/80/5
f 15/81/5 5/82/5 31/83/5 32/84/5
f 19/85/7 20/86/7 27/87/7 28/88/7
f 37/89/10 47/90/10 48/91/10 39/92/10
f 37/93/10 33/94/10 42/95/10 47/96/10
f 41/97/10 42/98/10 33/99/10 34/100/10
f 43/101/10 41/102/10 50/103/10 46/104/10
f 38/105/10 39/106/10 48/107/10 44/108/10
f 38/109/10 44/110/10 45/111/10 36/112/10
f 35/113/10 36/114/10 45/115/10 49/116/10
f 40/117/10 35/118/10 49/119/10 50/120/10

View file

@ -2,9 +2,4 @@
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Ka industrialwires:blocks/converter/shaft

View file

@ -18,6 +18,38 @@ v 0.551777 0.625000 1.000000
v 0.551777 0.625000 0.000000
v 0.448223 0.625000 1.000000
v 0.448223 0.625000 0.000000
vt 0.1875 1.0000
vt 0.1875 0.0000
vt 0.2500 0.0000
vt 0.2500 1.0000
vt 0.1250 1.0000
vt 0.1250 0.0000
vt 0.1875 0.0000
vt 0.1875 1.0000
vt 0.0625 1.0000
vt 0.0625 -0.0000
vt 0.1250 -0.0000
vt 0.1250 1.0000
vt -0.0000 1.0000
vt -0.0000 0.0000
vt 0.0625 0.0000
vt 0.0625 1.0000
vt 0.5000 0.0000
vt 0.5000 1.0000
vt 0.4375 1.0000
vt 0.4375 0.0000
vt 0.3750 1.0000
vt 0.3750 0.0000
vt 0.4375 0.0000
vt 0.4375 1.0000
vt 0.3125 1.0000
vt 0.3125 0.0000
vt 0.3750 0.0000
vt 0.3750 1.0000
vt 0.2500 1.0000
vt 0.2500 0.0000
vt 0.3125 0.0000
vt 0.3125 1.0000
vn -1.0000 0.0000 0.0000
vn -0.7071 -0.7071 0.0000
vn 0.0000 -1.0000 0.0000
@ -28,11 +60,11 @@ vn 0.0000 1.0000 0.0000
vn -0.7071 0.7071 0.0000
usemtl None
s off
f 1//1 2//1 4//1 3//1
f 3//2 4//2 6//2 5//2
f 5//3 6//3 8//3 7//3
f 7//4 8//4 10//4 9//4
f 9//5 10//5 12//5 11//5
f 11//6 12//6 14//6 13//6
f 13//7 14//7 16//7 15//7
f 15//8 16//8 2//8 1//8
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 6/7/2 5/8/2
f 5/9/3 6/10/3 8/11/3 7/12/3
f 7/13/4 8/14/4 10/15/4 9/16/4
f 9/17/5 10/18/5 12/19/5 11/20/5
f 11/21/6 12/22/6 14/23/6 13/24/6
f 13/25/7 14/26/7 16/27/7 15/28/7
f 15/29/8 16/30/8 2/31/8 1/32/8

View file

@ -0,0 +1,5 @@
# Blender MTL File: 'RotaryConverter.blend'
# Material Count: 1
newmtl None
map_Ka industrialwires:blocks/converter/shaft

View file

@ -0,0 +1,69 @@
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
# www.blender.org
mtllib shaft2.mtl
o Shaft2_Cylinder.005
v 0.375000 0.551777 1.000000
v 0.375000 0.551777 0.000000
v 0.375000 0.448223 1.000000
v 0.375000 0.448223 0.000000
v 0.448223 0.375000 1.000000
v 0.448223 0.375000 0.000000
v 0.551777 0.375000 1.000000
v 0.551777 0.375000 0.000000
v 0.625000 0.448223 1.000000
v 0.625000 0.448223 0.000000
v 0.625000 0.551777 1.000000
v 0.625000 0.551777 0.000000
v 0.551777 0.625000 1.000000
v 0.551777 0.625000 0.000000
v 0.448223 0.625000 1.000000
v 0.448223 0.625000 0.000000
vt 0.5625 0.0000
vt 0.5625 1.0000
vt 0.5000 1.0000
vt 0.5000 0.0000
vt 0.5000 1.0000
vt 0.5000 0.0000
vt 0.5625 0.0000
vt 0.5625 1.0000
vt 0.5625 0.0000
vt 0.5625 1.0000
vt 0.5000 1.0000
vt 0.5000 0.0000
vt 0.5000 1.0000
vt 0.5000 0.0000
vt 0.5625 0.0000
vt 0.5625 1.0000
vt 0.5625 0.0000
vt 0.5625 1.0000
vt 0.5000 1.0000
vt 0.5000 0.0000
vt 0.5000 1.0000
vt 0.5000 0.0000
vt 0.5625 0.0000
vt 0.5625 1.0000
vt 0.5625 0.0000
vt 0.5625 1.0000
vt 0.5000 1.0000
vt 0.5000 0.0000
vt 0.5000 1.0000
vt 0.5000 -0.0000
vt 0.5625 -0.0000
vt 0.5625 1.0000
vn -1.0000 0.0000 0.0000
vn -0.7071 -0.7071 0.0000
vn 0.0000 -1.0000 0.0000
vn 0.7071 -0.7071 0.0000
vn 1.0000 0.0000 -0.0000
vn 0.7071 0.7071 -0.0000
vn 0.0000 1.0000 0.0000
vn -0.7071 0.7071 0.0000
usemtl None
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 6/7/2 5/8/2
f 5/9/3 6/10/3 8/11/3 7/12/3
f 7/13/4 8/14/4 10/15/4 9/16/4
f 9/17/5 10/18/5 12/19/5 11/20/5
f 11/21/6 12/22/6 14/23/6 13/24/6
f 13/25/7 14/26/7 16/27/7 15/28/7
f 15/29/8 16/30/8 2/31/8 1/32/8

View file

@ -0,0 +1,5 @@
# Blender MTL File: 'RotaryConverter.blend'
# Material Count: 1
newmtl None
map_Ka industrialwires:blocks/converter/shaft

View file

@ -0,0 +1,66 @@
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
# www.blender.org
mtllib shaft4.mtl
o Shaft4_Cylinder.003
v 0.375000 0.551777 1.000000
v 0.375000 0.551777 0.000000
v 0.375000 0.448223 1.000000
v 0.375000 0.448223 0.000000
v 0.448223 0.375000 1.000000
v 0.448223 0.375000 0.000000
v 0.551777 0.375000 1.000000
v 0.551777 0.375000 0.000000
v 0.625000 0.448223 1.000000
v 0.625000 0.448223 0.000000
v 0.625000 0.551777 1.000000
v 0.625000 0.551777 0.000000
v 0.551777 0.625000 1.000000
v 0.551777 0.625000 0.000000
v 0.448223 0.625000 1.000000
v 0.448223 0.625000 0.000000
vt 0.5625 1.0000
vt 0.5625 -0.0000
vt 0.6250 -0.0000
vt 0.6250 1.0000
vt 0.5625 1.0000
vt 0.5625 0.0000
vt 0.6250 0.0000
vt 0.6250 1.0000
vt 0.6875 -0.0000
vt 0.6875 1.0000
vt 0.5625 1.0000
vt 0.5625 -0.0000
vt 0.6250 0.0000
vt 0.6250 1.0000
vt 0.6250 0.0000
vt 0.6250 1.0000
vt 0.5625 1.0000
vt 0.5625 0.0000
vt 0.5625 1.0000
vt 0.5625 -0.0000
vt 0.6250 -0.0000
vt 0.6250 1.0000
vt 0.6875 0.0000
vt 0.6875 1.0000
vt 0.6250 1.0000
vt 0.6250 0.0000
vt 0.6875 0.0000
vt 0.6875 1.0000
vn -1.0000 0.0000 0.0000
vn -0.7071 -0.7071 0.0000
vn 0.0000 -1.0000 0.0000
vn 0.7071 -0.7071 0.0000
vn 1.0000 0.0000 -0.0000
vn 0.7071 0.7071 -0.0000
vn 0.0000 1.0000 0.0000
vn -0.7071 0.7071 0.0000
usemtl None
s off
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 6/7/2 5/8/2
f 5/8/3 6/7/3 8/9/3 7/10/3
f 7/11/4 8/12/4 10/13/4 9/14/4
f 9/15/5 10/16/5 12/17/5 11/18/5
f 11/19/6 12/20/6 14/21/6 13/22/6
f 13/22/7 14/21/7 16/23/7 15/24/7
f 15/25/8 16/26/8 2/27/8 1/28/8

View file

@ -0,0 +1,5 @@
# Blender MTL File: 'RotaryConverter.blend'
# Material Count: 1
newmtl None
map_Ka industrialwires:blocks/converter/shaft

View file

@ -0,0 +1,70 @@
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
# www.blender.org
mtllib shaft_comm.mtl
o ShaftComm_Cylinder.001
v 0.375000 0.551777 1.000000
v 0.375000 0.551777 0.000000
v 0.375000 0.448223 1.000000
v 0.375000 0.448223 0.000000
v 0.448223 0.375000 1.000000
v 0.448223 0.375000 0.000000
v 0.551777 0.375000 1.000000
v 0.551777 0.375000 0.000000
v 0.625000 0.448223 1.000000
v 0.625000 0.448223 0.000000
v 0.625000 0.551777 1.000000
v 0.625000 0.551777 0.000000
v 0.551777 0.625000 1.000000
v 0.551777 0.625000 0.000000
v 0.448223 0.625000 1.000000
v 0.448223 0.625000 0.000000
vt 0.6875 1.0000
vt 0.6875 0.0000
vt 0.7500 -0.0000
vt 0.7500 1.0000
vt 0.1250 1.0000
vt 0.1250 0.0000
vt 0.1875 0.0000
vt 0.1875 1.0000
vt 0.0625 1.0000
vt 0.0625 -0.0000
vt 0.1250 -0.0000
vt 0.1250 1.0000
vt -0.0000 1.0000
vt -0.0000 0.0000
vt 0.0625 0.0000
vt 0.0625 1.0000
vt 0.7500 0.0000
vt 0.7500 1.0000
vt 0.6875 1.0000
vt 0.6875 0.0000
vt 0.3750 1.0000
vt 0.3750 0.0000
vt 0.4375 0.0000
vt 0.4375 1.0000
vt 0.3125 1.0000
vt 0.3125 0.0000
vt 0.3750 0.0000
vt 0.3750 1.0000
vt 0.2500 1.0000
vt 0.2500 0.0000
vt 0.3125 0.0000
vt 0.3125 1.0000
vn -1.0000 0.0000 0.0000
vn -0.7071 -0.7071 0.0000
vn 0.0000 -1.0000 0.0000
vn 0.7071 -0.7071 0.0000
vn 1.0000 0.0000 -0.0000
vn 0.7071 0.7071 -0.0000
vn 0.0000 1.0000 0.0000
vn -0.7071 0.7071 0.0000
usemtl None
s off
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 6/7/2 5/8/2
f 5/9/3 6/10/3 8/11/3 7/12/3
f 7/13/4 8/14/4 10/15/4 9/16/4
f 9/17/5 10/18/5 12/19/5 11/20/5
f 11/21/6 12/22/6 14/23/6 13/24/6
f 13/25/7 14/26/7 16/27/7 15/28/7
f 15/29/8 16/30/8 2/31/8 1/32/8

View file

@ -0,0 +1,5 @@
# Blender MTL File: 'RotaryConverter.blend'
# Material Count: 1
newmtl None
map_Ka industrialwires:blocks/converter/shaft

View file

@ -0,0 +1,70 @@
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
# www.blender.org
mtllib shaft_comm4.mtl
o ShaftComm4_Cylinder.002
v 0.375000 0.551777 1.000000
v 0.375000 0.551777 0.000000
v 0.375000 0.448223 1.000000
v 0.375000 0.448223 0.000000
v 0.448223 0.375000 1.000000
v 0.448223 0.375000 0.000000
v 0.551777 0.375000 1.000000
v 0.551777 0.375000 0.000000
v 0.625000 0.448223 1.000000
v 0.625000 0.448223 0.000000
v 0.625000 0.551777 1.000000
v 0.625000 0.551777 0.000000
v 0.551777 0.625000 1.000000
v 0.551777 0.625000 0.000000
v 0.448223 0.625000 1.000000
v 0.448223 0.625000 0.000000
vt 0.8750 1.0000
vt 0.8750 -0.0000
vt 0.9375 0.0000
vt 0.9375 1.0000
vt 0.1250 1.0000
vt 0.1250 0.0000
vt 0.1875 0.0000
vt 0.1875 1.0000
vt 0.8125 1.0000
vt 0.8125 -0.0000
vt 0.8750 0.0000
vt 0.8750 1.0000
vt -0.0000 1.0000
vt -0.0000 -0.0000
vt 0.0625 0.0000
vt 0.0625 1.0000
vt 0.7500 1.0000
vt 0.7500 0.0000
vt 0.8125 0.0000
vt 0.8125 1.0000
vt 0.3750 1.0000
vt 0.3750 0.0000
vt 0.4375 0.0000
vt 0.4375 1.0000
vt 0.9375 1.0000
vt 0.9375 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.2500 1.0000
vt 0.2500 0.0000
vt 0.3125 0.0000
vt 0.3125 1.0000
vn -1.0000 0.0000 0.0000
vn -0.7071 -0.7071 0.0000
vn 0.0000 -1.0000 0.0000
vn 0.7071 -0.7071 0.0000
vn 1.0000 0.0000 -0.0000
vn 0.7071 0.7071 -0.0000
vn 0.0000 1.0000 0.0000
vn -0.7071 0.7071 0.0000
usemtl None
s off
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 6/7/2 5/8/2
f 5/9/3 6/10/3 8/11/3 7/12/3
f 7/13/4 8/14/4 10/15/4 9/16/4
f 9/17/5 10/18/5 12/19/5 11/20/5
f 11/21/6 12/22/6 14/23/6 13/24/6
f 13/25/7 14/26/7 16/27/7 15/28/7
f 15/29/8 16/30/8 2/31/8 1/32/8

View file

@ -2,9 +2,4 @@
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Ka industrialwires:blocks/converter/electrodes

View file

@ -26,6 +26,65 @@ v 0.593750 0.500000 0.562500
v 0.593750 1.000000 0.562500
v 0.406250 0.500000 0.562500
v 0.406250 1.000000 0.562500
vt 0.0938 1.0000
vt 0.0000 1.0000
vt 0.0000 0.5000
vt 0.0938 0.5000
vt 0.4062 0.5000
vt 0.5000 0.5000
vt 0.5000 1.0000
vt 0.4062 1.0000
vt 0.1875 0.5000
vt 0.2812 0.5000
vt 0.2812 1.0000
vt 0.1875 1.0000
vt 0.0938 0.5000
vt 0.1875 0.5000
vt 0.1875 1.0000
vt -0.0000 0.5000
vt 0.5000 0.5000
vt 0.5000 1.0000
vt 0.0000 1.0000
vt 0.5000 0.5000
vt 1.0000 0.5000
vt 1.0000 1.0000
vt 0.5000 1.0000
vt 0.2500 0.5000
vt 0.2500 0.3750
vt 0.0000 0.3750
vt -0.0000 0.5000
vt 0.2500 0.5000
vt 0.2500 0.4375
vt 0.0000 0.4375
vt 0.5000 0.5000
vt 0.2500 0.5000
vt 0.2500 0.3750
vt 0.5000 0.3750
vt 0.2500 0.4375
vt 0.0000 0.4375
vt 0.0000 0.5000
vt 0.5312 0.3750
vt 0.5938 0.3750
vt 0.5938 0.5000
vt 0.5312 0.5000
vt 0.0000 0.5000
vt -0.0000 0.3750
vt 0.2500 0.3750
vt 0.2500 0.5000
vt 0.0000 0.3750
vt 0.2500 0.4375
vt -0.0000 0.4375
vt 0.2500 0.3750
vt 0.5000 0.3750
vt 0.5000 0.5000
vt 0.2500 0.5000
vt 0.0000 0.4375
vt 0.2500 0.4375
vt 0.2500 0.5000
vt 0.6562 0.5000
vt 0.5938 0.5000
vt 0.5938 0.3750
vt 0.6562 0.3750
vn 0.0000 0.0000 1.0000
vn -1.0000 0.0000 0.0000
vn -0.0000 0.0000 -1.0000
@ -34,19 +93,19 @@ vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None
s off
f 1//1 2//1 4//1 3//1
f 3//2 4//2 8//2 7//2
f 7//3 8//3 6//3 5//3
f 5//4 6//4 2//4 1//4
f 3//5 7//5 5//5 1//5
f 8//6 4//6 2//6 6//6
f 9//1 10//1 12//1 11//1
f 11//2 12//2 16//2 15//2
f 15//3 16//3 14//3 13//3
f 13//4 14//4 10//4 9//4
f 11//5 15//5 13//5 9//5
f 17//1 18//1 20//1 19//1
f 19//2 20//2 24//2 23//2
f 23//3 24//3 22//3 21//3
f 21//4 22//4 18//4 17//4
f 19//5 23//5 21//5 17//5
f 1/1/1 2/2/1 4/3/1 3/4/1
f 3/5/2 4/6/2 8/7/2 7/8/2
f 7/9/3 8/10/3 6/11/3 5/12/3
f 5/13/4 6/14/4 2/15/4 1/1/4
f 3/16/5 7/17/5 5/18/5 1/19/5
f 8/20/6 4/21/6 2/22/6 6/23/6
f 9/24/1 10/25/1 12/26/1 11/27/1
f 11/27/2 12/28/2 16/29/2 15/30/2
f 15/31/3 16/32/3 14/33/3 13/34/3
f 13/35/4 14/36/4 10/37/4 9/24/4
f 11/38/5 15/39/5 13/40/5 9/41/5
f 17/42/1 18/43/1 20/44/1 19/45/1
f 19/46/2 20/44/2 24/47/2 23/48/2
f 23/49/3 24/50/3 22/51/3 21/52/3
f 21/53/4 22/54/4 18/55/4 17/42/4
f 19/56/5 23/57/5 21/58/5 17/59/5

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,004 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B