More mech MB work
This is getting somewhere!
This commit is contained in:
parent
d3508e42fe
commit
8d98e30b04
|
@ -70,7 +70,7 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
deobfCompile 'net.industrial-craft:industrialcraft-2:2.8.+'
|
||||
//TODO readd when the wirechanges are on master deobfCompile "blusunrize:ImmersiveEngineering:0.12-+:deobf"
|
||||
deobfCompile "blusunrize:ImmersiveEngineering:0.12-+:deobf"
|
||||
compileOnly "TechReborn:TechReborn-1.12:2.6.+:dev"
|
||||
compileOnly "RebornCore:RebornCore-1.12:3.2.+:dev"
|
||||
deobfCompile 'com.elytradev:mirage:2.0.1-SNAPSHOT'
|
||||
|
|
|
@ -56,8 +56,8 @@ public class IWConfig {
|
|||
@Comment({"The efficiency of the conversion from IC2 kinetic energy to IE rotational energy"})
|
||||
public static double kinToRotEfficiency = .8;
|
||||
@Comment({"The conversion factor between Joules (the SI unit) and RF. Used for the Marx generator and the rotary converters"})
|
||||
//Default value assumes the IE diesel generator is 2000kW
|
||||
public static double joulesPerRF = 2000e3/(20*IEConfig.Machines.dieselGen_output);
|
||||
//Default value assumes the IE diesel generator is 200kW
|
||||
public static double joulesPerRF = 200e3/(20*IEConfig.Machines.dieselGen_output);
|
||||
}
|
||||
|
||||
public static HVStuff hv;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* This file is part of Industrial Wires.
|
||||
* Copyright (C) 2016-2017 malte0811
|
||||
*
|
||||
|
@ -17,58 +17,58 @@
|
|||
*/
|
||||
package malte0811.industrialWires;
|
||||
|
||||
import blusunrize.immersiveengineering.ImmersiveEngineering;
|
||||
import blusunrize.immersiveengineering.api.MultiblockHandler;
|
||||
import blusunrize.immersiveengineering.api.energy.wires.WireApi;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import malte0811.industrialWires.blocks.BlockIWBase;
|
||||
import malte0811.industrialWires.blocks.controlpanel.*;
|
||||
import malte0811.industrialWires.blocks.converter.*;
|
||||
import malte0811.industrialWires.blocks.hv.*;
|
||||
import malte0811.industrialWires.blocks.wire.*;
|
||||
import malte0811.industrialWires.compat.Compat;
|
||||
import malte0811.industrialWires.controlpanel.PanelComponent;
|
||||
import malte0811.industrialWires.controlpanel.PanelUtils;
|
||||
import malte0811.industrialWires.converter.MechMBPart;
|
||||
import malte0811.industrialWires.converter.MultiblockConverter;
|
||||
import malte0811.industrialWires.crafting.Recipes;
|
||||
import malte0811.industrialWires.hv.MarxOreHandler;
|
||||
import malte0811.industrialWires.hv.MultiblockMarx;
|
||||
import malte0811.industrialWires.items.ItemIC2Coil;
|
||||
import malte0811.industrialWires.items.ItemKey;
|
||||
import malte0811.industrialWires.items.ItemPanelComponent;
|
||||
import malte0811.industrialWires.network.MessageGUIInteract;
|
||||
import malte0811.industrialWires.network.MessageItemSync;
|
||||
import malte0811.industrialWires.network.MessagePanelInteract;
|
||||
import malte0811.industrialWires.network.MessageTileSyncIW;
|
||||
import malte0811.industrialWires.util.CommandIW;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import blusunrize.immersiveengineering.ImmersiveEngineering;
|
||||
import blusunrize.immersiveengineering.api.MultiblockHandler;
|
||||
import blusunrize.immersiveengineering.api.energy.wires.WireApi;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import malte0811.industrialWires.blocks.BlockIWBase;
|
||||
import malte0811.industrialWires.blocks.controlpanel.*;
|
||||
import malte0811.industrialWires.blocks.converter.*;
|
||||
import malte0811.industrialWires.blocks.hv.*;
|
||||
import malte0811.industrialWires.blocks.wire.*;
|
||||
import malte0811.industrialWires.compat.Compat;
|
||||
import malte0811.industrialWires.controlpanel.PanelComponent;
|
||||
import malte0811.industrialWires.controlpanel.PanelUtils;
|
||||
import malte0811.industrialWires.converter.MechMBPart;
|
||||
import malte0811.industrialWires.converter.MultiblockConverter;
|
||||
import malte0811.industrialWires.crafting.Recipes;
|
||||
import malte0811.industrialWires.hv.MarxOreHandler;
|
||||
import malte0811.industrialWires.hv.MultiblockMarx;
|
||||
import malte0811.industrialWires.items.ItemIC2Coil;
|
||||
import malte0811.industrialWires.items.ItemKey;
|
||||
import malte0811.industrialWires.items.ItemPanelComponent;
|
||||
import malte0811.industrialWires.network.MessageGUIInteract;
|
||||
import malte0811.industrialWires.network.MessageItemSync;
|
||||
import malte0811.industrialWires.network.MessagePanelInteract;
|
||||
import malte0811.industrialWires.network.MessageTileSyncIW;
|
||||
import malte0811.industrialWires.util.CommandIW;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static malte0811.industrialWires.blocks.wire.BlockTypes_IC2_Connector.*;
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.*;
|
||||
import static malte0811.industrialWires.blocks.wire.BlockTypes_IC2_Connector.*;
|
||||
import static malte0811.industrialWires.wires.IC2Wiretype.*;
|
||||
|
||||
@Mod(modid = IndustrialWires.MODID, version = IndustrialWires.VERSION, dependencies = "required-after:immersiveengineering@[0.12-72,);after:ic2",
|
||||
certificateFingerprint = "7e11c175d1e24007afec7498a1616bef0000027d")
|
||||
|
|
|
@ -33,8 +33,11 @@ import net.minecraft.util.ITickable;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static malte0811.industrialWires.util.NBTKeys.*;
|
||||
|
||||
|
@ -152,11 +155,14 @@ public class TileEntityIEMotor extends TileEntityIWBase implements ITickable, IF
|
|||
return super.hasCapability(capability, facing);
|
||||
}
|
||||
|
||||
private Map<EnumFacing, IEnergyStorage> energies = new HashMap<>();
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getCapability(@Nonnull Capability<T> capability, EnumFacing facing) {
|
||||
if (capability == CapabilityEnergy.ENERGY && canConnectEnergy(facing)) {
|
||||
return (T) new EnergyAdapter(this, facing);
|
||||
if (!energies.containsKey(facing))
|
||||
energies.put(facing, new EnergyAdapter(this, facing));
|
||||
return CapabilityEnergy.ENERGY.cast(energies.get(facing));
|
||||
}
|
||||
return super.getCapability(capability, facing);
|
||||
}
|
||||
|
|
|
@ -1,43 +1,57 @@
|
|||
package malte0811.industrialWires.blocks.converter;
|
||||
|
||||
import blusunrize.immersiveengineering.api.ApiUtils;
|
||||
import blusunrize.immersiveengineering.common.IEContent;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.ISyncReceiver;
|
||||
import malte0811.industrialWires.blocks.TileEntityIWMultiblock;
|
||||
import malte0811.industrialWires.converter.IMBPartElectric;
|
||||
import malte0811.industrialWires.converter.MechEnergy;
|
||||
import malte0811.industrialWires.converter.MechMBPart;
|
||||
import malte0811.industrialWires.network.MessageTileSyncIW;
|
||||
import malte0811.industrialWires.util.LocalSidedWorld;
|
||||
import malte0811.industrialWires.util.MiscUtils;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
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.capabilities.Capability;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.List;
|
||||
|
||||
import static malte0811.industrialWires.util.MiscUtils.getOffset;
|
||||
import static malte0811.industrialWires.util.NBTKeys.PARTS;
|
||||
import static malte0811.industrialWires.util.NBTKeys.SPEED;
|
||||
|
||||
public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implements ITickable, ISyncReceiver {
|
||||
private static final double DECAY_BASE = .99;
|
||||
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 = 1-1e-9;
|
||||
public MechMBPart[] mechanical;
|
||||
private static final double SYNC_THRESHOLD = .95;
|
||||
public MechMBPart[] mechanical = null;
|
||||
public int[] offsets = null;
|
||||
|
||||
private int[][] electricalStartEnd = null;
|
||||
|
||||
public MechEnergy energyState;
|
||||
private double lastSyncedSpeed = 0;
|
||||
private double decay;
|
||||
public double angle;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public List<BakedQuad> rotatingModel;
|
||||
private boolean shouldInitWorld;
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
ApiUtils.checkForNeedlessTicking(this);
|
||||
|
@ -48,25 +62,92 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
|
|||
if (world.isRemote||isLogicDummy()||mechanical==null) {
|
||||
return;
|
||||
}
|
||||
//energyState = new MechEnergy(energyState.weight, 10);
|
||||
if (shouldInitWorld) {
|
||||
int offset = 1;
|
||||
for (MechMBPart part:mechanical) {
|
||||
part.world.setWorld(world);
|
||||
part.world.setOrigin(MiscUtils.offset(pos, facing, mirrored, 0, -offset, 0));
|
||||
offset += part.getLength();
|
||||
}
|
||||
shouldInitWorld = false;
|
||||
}
|
||||
// Mechanical
|
||||
for (MechMBPart part:mechanical) {
|
||||
part.produceRotation(energyState);
|
||||
part.createMEnergy(energyState);
|
||||
}
|
||||
double requestSum = 0;
|
||||
IdentityHashMap<MechMBPart, Double> individualRequests = new IdentityHashMap<>();
|
||||
for (MechMBPart part:mechanical) {
|
||||
double eForPart = part.requestEnergy(energyState);
|
||||
double eForPart = part.requestMEnergy(energyState);
|
||||
requestSum += eForPart;
|
||||
individualRequests.put(part, eForPart);
|
||||
}
|
||||
double availableEnergy = energyState.getEnergy();
|
||||
double factor = (requestSum>availableEnergy)?availableEnergy/requestSum:1;
|
||||
energyState.extractEnergy(factor*requestSum);
|
||||
double availableEnergy = energyState.getEnergy()/5;//prevent energy transmission without movement
|
||||
double factor = Math.min(availableEnergy/requestSum, 1);
|
||||
energyState.extractEnergy(Math.min(requestSum, availableEnergy));
|
||||
for (MechMBPart part:mechanical) {
|
||||
part.consumeRotation(factor*individualRequests.get(part));
|
||||
part.insertMEnergy(factor*individualRequests.get(part));
|
||||
}
|
||||
//TODO proper failure!
|
||||
for (MechMBPart part:mechanical) {
|
||||
if (energyState.getSpeed()>part.getMaxSpeed()) {
|
||||
energyState.setSpeed(0);//TODO
|
||||
break;
|
||||
}
|
||||
}
|
||||
//TODO check for "overspeed"
|
||||
|
||||
//Electrical
|
||||
electricMain: for (int[] section:electricalStartEnd) {
|
||||
Boolean ac = null;
|
||||
double[] available = new double[section[1]-section[0]];
|
||||
double totalAvailable = 0;
|
||||
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]);
|
||||
if (ac==null) {
|
||||
ac = electricalComp.getProduced().isAC;
|
||||
} else {
|
||||
Boolean acLocal = electricalComp.getProduced().isAC;
|
||||
if (acLocal!=null&&acLocal!=ac) {
|
||||
//TODO break things!
|
||||
IndustrialWires.logger.info("This should break. Currently only breaks the loop, because NYI");
|
||||
break electricMain;
|
||||
}
|
||||
}
|
||||
double availableLocal = electricalComp.getAvailableEEnergy();
|
||||
availableLocal *= electricalComp.getProduced().efficiency;
|
||||
totalAvailable += availableLocal;
|
||||
available[i-section[0]] = availableLocal;
|
||||
double requestedLocal = electricalComp.requestEEnergy();
|
||||
totalRequested += requestedLocal;
|
||||
requested[i-section[0]] = requestedLocal;
|
||||
}
|
||||
//TODO this isn't quite ideal. It's a lot better than before though
|
||||
if (totalAvailable>0&&totalRequested>0) {
|
||||
for (int i = section[0]; i < section[1]; i++) {
|
||||
IMBPartElectric electricalComp = ((IMBPartElectric) mechanical[i]);
|
||||
int i0 = i-section[0];
|
||||
if (requested[i0] > 0 && totalAvailable!=available[i0]) {
|
||||
double otherAvailable = totalAvailable-available[i0];
|
||||
double ins = Math.min(requested[i0], otherAvailable);
|
||||
double extractFactor = ins/otherAvailable;
|
||||
electricalComp.insertEEnergy(ins);
|
||||
for (int j = section[0];j<section[1];j++) {
|
||||
if (i!=j) {
|
||||
IMBPartElectric compJ = (IMBPartElectric) mechanical[j];
|
||||
double extractRaw = extractFactor * available[j - section[0]];
|
||||
compJ.extractEEnergy(extractRaw/compJ.getProduced().efficiency);
|
||||
available[j-section[0]] -= extractFactor * available[j - section[0]];
|
||||
}
|
||||
}
|
||||
totalAvailable -= ins;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//General
|
||||
energyState.decaySpeed(decay);
|
||||
markDirty();
|
||||
if (lastSyncedSpeed<energyState.getSpeed()*SYNC_THRESHOLD||lastSyncedSpeed>energyState.getSpeed()/SYNC_THRESHOLD) {
|
||||
|
@ -95,34 +176,67 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
|
|||
if (in.hasKey(PARTS, Constants.NBT.TAG_LIST)) {
|
||||
NBTTagList mechParts = in.getTagList(PARTS, Constants.NBT.TAG_COMPOUND);
|
||||
MechMBPart[] mech = new MechMBPart[mechParts.tagCount()];
|
||||
int offset = 1;
|
||||
for (int i = 0; i < mechParts.tagCount(); i++) {
|
||||
mech[i] = MechMBPart.fromNBT(mechParts.getCompoundTagAt(i), this);
|
||||
mech[i] = MechMBPart.fromNBT(mechParts.getCompoundTagAt(i), new LocalSidedWorld(world, MiscUtils.offset(pos, facing, mirrored, 0, -offset, 0), facing, mirrored));
|
||||
offset += mech[i].getLength();
|
||||
}
|
||||
setMechanical(mech, in.getDouble(SPEED));
|
||||
if (world==null) {
|
||||
shouldInitWorld = true;
|
||||
}
|
||||
}
|
||||
rBB = null;
|
||||
}
|
||||
|
||||
public void setMechanical(MechMBPart[] mech, double speed) {
|
||||
Minecraft.getMinecraft().mouseHelper.ungrabMouseCursor();
|
||||
mechanical = mech;
|
||||
offsets = new int[mechanical.length];
|
||||
double weight = 0;
|
||||
int offset = 1;
|
||||
List<int[]> electrical = new ArrayList<>();
|
||||
int lastEStart = -1;
|
||||
for (int i = 0; i < mech.length; i++) {
|
||||
weight += mechanical[i].getWeight();
|
||||
offsets[i] = offset;
|
||||
weight += mechanical[i].getInertia();
|
||||
offset += mechanical[i].getLength();
|
||||
if (lastEStart<0&&mechanical[i] instanceof IMBPartElectric) {
|
||||
lastEStart = i;
|
||||
} else if (lastEStart>=0&&!(mechanical[i] instanceof IMBPartElectric)) {
|
||||
electrical.add(new int[]{lastEStart, i});
|
||||
lastEStart = -1;
|
||||
}
|
||||
}
|
||||
decay = Math.pow(DECAY_BASE, mechanical.length);//TODO init
|
||||
if (lastEStart>=0) {
|
||||
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
|
||||
energyState = new MechEnergy(weight, speed);
|
||||
}
|
||||
|
||||
private int getPart(int offset, TileEntityMultiblockConverter master) {
|
||||
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;
|
||||
}
|
||||
pos += part.getLength();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected BlockPos getOrigin() {
|
||||
return pos;
|
||||
return pos;//TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getOriginalBlock() {
|
||||
return null;
|
||||
return IEContent.blockMetalDecoration0.getDefaultState();//TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -144,4 +258,31 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
|
|||
}
|
||||
return rBB;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability(@Nonnull Capability<?> capability, @Nullable EnumFacing facing) {
|
||||
Vec3i offsetDirectional = getOffset(BlockPos.ORIGIN, this.facing, mirrored, offset);
|
||||
TileEntityMultiblockConverter master = masterOr(this, this);
|
||||
int id = getPart(offsetDirectional.getY(), master);
|
||||
if (id<0) {
|
||||
return false;
|
||||
}
|
||||
MechMBPart part = master.mechanical[id];
|
||||
Vec3i offsetPart = new Vec3i(offsetDirectional.getX(), offsetDirectional.getY()-master.offsets[id], offsetDirectional.getZ());
|
||||
return part.hasCapability(capability, facing, offsetPart);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public <T> T getCapability(@Nonnull Capability<T> capability, @Nullable EnumFacing facing) {
|
||||
Vec3i offsetDirectional = getOffset(BlockPos.ORIGIN, this.facing, mirrored, offset);
|
||||
TileEntityMultiblockConverter master = masterOr(this, this);
|
||||
int id = getPart(offsetDirectional.getY(), master);
|
||||
if (id<0) {
|
||||
return null;
|
||||
}
|
||||
MechMBPart part = master.mechanical[id];
|
||||
Vec3i offsetPart = new Vec3i(offsetDirectional.getX(), offsetDirectional.getY()-master.offsets[id], offsetDirectional.getZ());
|
||||
return part.getCapability(capability, facing, offsetPart);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -448,12 +448,13 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
return !isDummy() && from == facing && capability == CapabilityEnergy.ENERGY;
|
||||
}
|
||||
|
||||
private EnergyCap energyCap = new EnergyCap();
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getCapability(@Nonnull Capability<T> capability, @Nullable EnumFacing facing) {
|
||||
if (hasCapability(capability, facing)) {
|
||||
if (capability == CapabilityEnergy.ENERGY) {
|
||||
return (T) new EnergyCap();
|
||||
return CapabilityEnergy.ENERGY.cast(energyCap);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
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;
|
||||
|
@ -34,6 +35,7 @@ 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.*;
|
||||
|
@ -42,13 +44,18 @@ import static malte0811.industrialWires.blocks.converter.TileEntityMultiblockCon
|
|||
|
||||
public class TileRenderMBConverter extends TileEntitySpecialRenderer<TileEntityMultiblockConverter> implements IResourceManagerReloadListener {
|
||||
public static final Map<ResourceLocation, IBakedModel> BASE_MODELS = new HashMap<>();
|
||||
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()) {
|
||||
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) {
|
||||
|
@ -85,6 +92,7 @@ public class TileRenderMBConverter extends TileEntitySpecialRenderer<TileEntityM
|
|||
}
|
||||
offset += part.getLength();
|
||||
}
|
||||
TES_WITH_MODELS.add(te);
|
||||
}
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableCull();
|
||||
|
@ -100,6 +108,7 @@ public class TileRenderMBConverter extends TileEntitySpecialRenderer<TileEntityM
|
|||
Tessellator tes = Tessellator.getInstance();
|
||||
BufferBuilder bb = tes.getBuffer();
|
||||
bb.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
|
||||
//TODO fix that and probably remove the AT entry
|
||||
ClientUtils.renderModelTESRFast(te.rotatingModel, bb, te.getWorld(), te.getPos());
|
||||
tes.draw();
|
||||
GlStateManager.popMatrix();
|
||||
|
@ -110,5 +119,8 @@ 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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,10 +24,11 @@ public interface IMBPartElectric {
|
|||
* 2. Consume a lot of mechanical energy
|
||||
*/
|
||||
Waveform getProduced();
|
||||
// This is EU
|
||||
double getAvailableCurrent();
|
||||
double requestCurrent(double total);
|
||||
void consumeCurrent(double given);
|
||||
// All four in Joules
|
||||
double getAvailableEEnergy();
|
||||
void extractEEnergy(double energy);
|
||||
double requestEEnergy();
|
||||
void insertEEnergy(double given);
|
||||
|
||||
enum Waveform {
|
||||
NONE(null, 0, 0),
|
||||
|
@ -38,12 +39,12 @@ public interface IMBPartElectric {
|
|||
DC(false, 1, 6),
|
||||
SQUARE(true, Math.PI/4, 5);
|
||||
@Nullable
|
||||
public Boolean isEu;
|
||||
public Boolean isAC;
|
||||
public double efficiency;
|
||||
private int dualId;
|
||||
public Waveform dual;
|
||||
Waveform(@Nullable Boolean eu, double efficiency, int dualId) {
|
||||
isEu = eu;
|
||||
Waveform(@Nullable Boolean ac, double efficiency, int dualId) {
|
||||
isAC = ac;
|
||||
this.efficiency = efficiency;
|
||||
this.dualId = dualId;
|
||||
}
|
||||
|
|
|
@ -23,25 +23,28 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
|
||||
public enum Material {
|
||||
//TODO max speed
|
||||
COPPER(8.96, 1e3),
|
||||
ALUMINUM(2.7, 1e3),
|
||||
LEAD(11.34, 1e3),
|
||||
SILVER(10.49, 1e3),
|
||||
NICKEL(8.908, 1e3),
|
||||
GOLD(19.3, 1e3),
|
||||
URANIUM(19.1, 1e3),// This is a bit silly. But why not.
|
||||
CONSTANTAN(8.885, 1e3),
|
||||
ELECTRUM((SILVER.density + GOLD.density) / 2, 1e3),
|
||||
STEEL(7.874, 1e4),
|
||||
IRON(7.874, 1e3);
|
||||
COPPER(8.96, 220),
|
||||
ALUMINUM(2.7, 45),
|
||||
LEAD(11.34, 12),
|
||||
SILVER(10.49, 170),
|
||||
NICKEL(8.908, 165),
|
||||
GOLD(19.3, 100),
|
||||
URANIUM(19.1, 400),// This is a bit silly. But why not.
|
||||
CONSTANTAN(8.885, 600),
|
||||
ELECTRUM((SILVER.density + GOLD.density) / 2, (SILVER.tensileStrength + GOLD.tensileStrength) / 2),//Tensile strength is a guess ((GOLD+SILVER)/2), if anyone has better data I'll put it in
|
||||
STEEL(7.874, 1250),
|
||||
IRON(7.874, 350),
|
||||
DIAMOND(3.5, 2800);
|
||||
//in kg/m^3
|
||||
public double density;
|
||||
public double maxSpeed;
|
||||
public double tensileStrength;
|
||||
|
||||
//density as parameter: g/cm^3
|
||||
Material(double density, double maxSpeed) {
|
||||
// density as parameter: g/cm^3
|
||||
// tStrength: MPa
|
||||
Material(double density, double tensileStrength) {
|
||||
this.density = density*1e3;
|
||||
this.maxSpeed = maxSpeed;
|
||||
this.tensileStrength = tensileStrength*1e6;
|
||||
}
|
||||
|
||||
public boolean matchesBlock(ItemStack block, String prefix) {
|
||||
|
|
|
@ -44,6 +44,8 @@ public final class MechEnergy {
|
|||
|
||||
public void decaySpeed(double decay) {
|
||||
speed *= decay;
|
||||
if (speed<.1)
|
||||
speed = 0;
|
||||
}
|
||||
|
||||
//ONLY USE FOR SYNCING
|
||||
|
|
|
@ -28,8 +28,11 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
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.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -43,15 +46,15 @@ import static malte0811.industrialWires.util.NBTKeys.TYPE;
|
|||
|
||||
public abstract class MechMBPart {
|
||||
public static final Map<String, MechMBPart> INSTANCES = new HashMap<>();
|
||||
private TileEntityMultiblockConverter master;
|
||||
public LocalSidedWorld world;
|
||||
|
||||
// These 3 are called once per tick in bulk in this order
|
||||
public abstract void produceRotation(MechEnergy e);
|
||||
public abstract double requestEnergy(MechEnergy e);
|
||||
public abstract void createMEnergy(MechEnergy e);
|
||||
public abstract double requestMEnergy(MechEnergy e);
|
||||
// This should do any misc ticking as well
|
||||
public abstract void consumeRotation(double added);
|
||||
public abstract void insertMEnergy(double added);
|
||||
|
||||
public abstract double getWeight();
|
||||
public abstract double getInertia();
|
||||
public abstract double getMaxSpeed();
|
||||
public abstract void writeToNBT(NBTTagCompound out);
|
||||
public abstract void readFromNBT(NBTTagCompound out);
|
||||
|
@ -71,12 +74,22 @@ public abstract class MechMBPart {
|
|||
|
||||
public abstract MechanicalMBBlockType getType();
|
||||
|
||||
public <T> boolean hasCapability(Capability<T> cap, EnumFacing side, Vec3i pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public <T> T getCapability(Capability<T> cap, EnumFacing side, Vec3i pos) {
|
||||
return null;
|
||||
}
|
||||
|
||||
private static final BiMap<String, Class<? extends MechMBPart>> REGISTRY = HashBiMap.create();
|
||||
public static void init() {
|
||||
IMBPartElectric.Waveform.init();
|
||||
|
||||
REGISTRY.put("flywheel", MechPartFlywheel.class);
|
||||
REGISTRY.put("singleCoil", MechPartSingleCoil.class);
|
||||
//REGISTRY.put("twoElectrodes", MechPartTwoElectrodes.class);
|
||||
REGISTRY.put("commutator", MechPartCommutator.class);
|
||||
|
||||
for (String key : REGISTRY.keySet()) {
|
||||
cacheNewInstance(key);
|
||||
|
@ -92,13 +105,15 @@ public abstract class MechMBPart {
|
|||
}
|
||||
}
|
||||
|
||||
public static MechMBPart fromNBT(NBTTagCompound nbt, TileEntityMultiblockConverter master) {
|
||||
public static MechMBPart fromNBT(NBTTagCompound nbt, LocalSidedWorld w) {
|
||||
String name = nbt.getString(TYPE);
|
||||
Class<? extends MechMBPart> clazz = REGISTRY.get(name);
|
||||
try {
|
||||
MechMBPart ret = clazz.newInstance();
|
||||
ret.readFromNBT(nbt);
|
||||
ret.master = master;
|
||||
if (w==null)
|
||||
throw new NullPointerException();
|
||||
ret.world = w;
|
||||
return ret;
|
||||
} catch (InstantiationException | IllegalAccessException e) {
|
||||
throw new RuntimeException("While creating mechanical MB part", e);
|
||||
|
@ -120,6 +135,7 @@ public abstract class MechMBPart {
|
|||
|
||||
|
||||
public void form(LocalSidedWorld w, Consumer<TileEntityMultiblockConverter> initializer) {
|
||||
world = w;
|
||||
BlockPos.PooledMutableBlockPos pos = BlockPos.PooledMutableBlockPos.retain();
|
||||
short pattern = getFormPattern();
|
||||
int i = 0;
|
||||
|
|
|
@ -0,0 +1,191 @@
|
|||
/*
|
||||
* 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 blusunrize.immersiveengineering.common.blocks.metal.BlockTypes_MetalDecoration0;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.converter.MechanicalMBBlockType;
|
||||
import malte0811.industrialWires.util.ConversionUtil;
|
||||
import malte0811.industrialWires.util.LocalSidedWorld;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
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.CapabilityEnergy;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
|
||||
import static blusunrize.immersiveengineering.common.IEContent.blockMetalDecoration0;
|
||||
import static malte0811.industrialWires.util.ConversionUtil.ifPerJoule;
|
||||
import static malte0811.industrialWires.util.ConversionUtil.joulesPerIf;
|
||||
import static malte0811.industrialWires.util.NBTKeys.BUFFER_IN;
|
||||
import static malte0811.industrialWires.util.NBTKeys.BUFFER_OUT;
|
||||
|
||||
public class MechPartCommutator extends MechMBPart implements IMBPartElectric {
|
||||
private final static double MAX_BUFFER = 10e3;//200kW
|
||||
double bufferToMB;
|
||||
double bufferToWorld;
|
||||
@Override
|
||||
public Waveform getProduced() {
|
||||
return bufferToMB>0?Waveform.SQUARE:Waveform.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getAvailableEEnergy() {
|
||||
return bufferToMB;//TODO lower efficiency?
|
||||
}
|
||||
|
||||
@Override
|
||||
public void extractEEnergy(double energy) {
|
||||
bufferToMB -= energy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double requestEEnergy() {
|
||||
return MAX_BUFFER-bufferToWorld;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertEEnergy(double given) {
|
||||
bufferToWorld += given;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createMEnergy(MechEnergy e) {}
|
||||
|
||||
@Override
|
||||
public double requestMEnergy(MechEnergy e) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertMEnergy(double added) {
|
||||
int available = (int) (ConversionUtil.ifPerJoule()*bufferToWorld);
|
||||
if (available>0) {
|
||||
BlockPos up = BlockPos.ORIGIN.up();
|
||||
TileEntity te = world.getTileEntity(up);
|
||||
if (te != null && te.hasCapability(CapabilityEnergy.ENERGY, EnumFacing.DOWN)) {
|
||||
IEnergyStorage energy = te.getCapability(CapabilityEnergy.ENERGY, EnumFacing.DOWN);
|
||||
if (energy != null && energy.canReceive()) {
|
||||
int received = energy.receiveEnergy(available, false);
|
||||
bufferToWorld -= ConversionUtil.joulesPerIf()*received;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getInertia() {
|
||||
return 50;//Random value. Does this work reasonably well?
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxSpeed() {
|
||||
return Double.MAX_VALUE;//TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound out) {
|
||||
out.setDouble(BUFFER_IN, bufferToMB);
|
||||
out.setDouble(BUFFER_OUT, bufferToWorld);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound out) {
|
||||
bufferToMB = out.getDouble(BUFFER_IN);
|
||||
bufferToWorld = out.getDouble(BUFFER_OUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRotatingBaseModel() {
|
||||
return new ResourceLocation(IndustrialWires.MODID, "block/mech_mb/shaft.obj");//TODO texture
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canForm(LocalSidedWorld w) {
|
||||
IBlockState state = w.getBlockState(BlockPos.ORIGIN);
|
||||
return state.getBlock()== blockMetalDecoration0 &&
|
||||
state.getValue(blockMetalDecoration0.property)== BlockTypes_MetalDecoration0.GENERATOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getFormPattern() {
|
||||
return 0b000_010_000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MechanicalMBBlockType getType() {
|
||||
return MechanicalMBBlockType.SHAFT_COMMUTATOR;
|
||||
}
|
||||
|
||||
|
||||
private IEnergyStorage energy = new IEnergyStorage() {
|
||||
@Override
|
||||
public int receiveEnergy(int maxReceive, boolean simulate) {
|
||||
double joules = joulesPerIf()*maxReceive;
|
||||
double insert = Math.min(joules, MAX_BUFFER-bufferToMB);
|
||||
if (!simulate)
|
||||
bufferToMB += insert;
|
||||
return (int) Math.ceil(insert* ifPerJoule());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(int maxExtract, boolean simulate) {
|
||||
double joules = joulesPerIf()*maxExtract;
|
||||
double extract = Math.min(joules, bufferToWorld);
|
||||
if (!simulate)
|
||||
bufferToWorld -= extract;
|
||||
return (int) Math.floor(extract* ifPerJoule());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyStored() {
|
||||
return (int) Math.round((bufferToMB+bufferToWorld)* ifPerJoule());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored() {
|
||||
return (int) Math.round(MAX_BUFFER*2* ifPerJoule());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtract() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceive() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public <T> boolean hasCapability(Capability<T> cap, EnumFacing side, Vec3i pos) {
|
||||
if (pos.equals(BlockPos.ORIGIN)&&side==EnumFacing.UP&&cap== CapabilityEnergy.ENERGY)
|
||||
return true;
|
||||
return super.hasCapability(cap, side, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getCapability(Capability<T> cap, EnumFacing side, Vec3i pos) {
|
||||
if (pos.equals(BlockPos.ORIGIN)&&side==EnumFacing.UP&&cap== CapabilityEnergy.ENERGY)
|
||||
return CapabilityEnergy.ENERGY.cast(energy);
|
||||
return super.getCapability(cap, side, pos);
|
||||
}
|
||||
}
|
|
@ -23,28 +23,30 @@ import net.minecraft.util.ResourceLocation;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class MechPartFlywheel extends MechMBPart {
|
||||
private static final double VOLUME = 7;//~7 cubic meters
|
||||
private static final double RADIUS = 1.25;
|
||||
private static final double THICKNESS = 1;//TODO exact value from model?
|
||||
private static final double VOLUME = Math.PI*RADIUS*RADIUS*THICKNESS;
|
||||
private Material material;
|
||||
//A flywheel simply adds mass (lots of mass!), it doesn't actively change speeds/energy
|
||||
@Override
|
||||
public void produceRotation(MechEnergy e) {}
|
||||
public void createMEnergy(MechEnergy e) {}
|
||||
|
||||
@Override
|
||||
public double requestEnergy(MechEnergy e) {
|
||||
public double requestMEnergy(MechEnergy e) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void consumeRotation(double added) {}
|
||||
public void insertMEnergy(double added) {}
|
||||
|
||||
@Override
|
||||
public double getWeight() {
|
||||
return .5*material.density*VOLUME;
|
||||
public double getInertia() {
|
||||
return .5*material.density*VOLUME*RADIUS*RADIUS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxSpeed() {
|
||||
return Double.MAX_VALUE;//material.maxSpeed;
|
||||
return Math.sqrt(material.tensileStrength /material.density)/RADIUS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,7 +19,6 @@ import blusunrize.immersiveengineering.common.IEContent;
|
|||
import blusunrize.immersiveengineering.common.blocks.metal.BlockTypes_MetalDecoration0;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.converter.MechanicalMBBlockType;
|
||||
import malte0811.industrialWires.util.ConversionUtil;
|
||||
import malte0811.industrialWires.util.LocalSidedWorld;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -28,63 +27,73 @@ import net.minecraft.util.math.BlockPos;
|
|||
|
||||
import java.util.function.Predicate;
|
||||
|
||||
//TODO electrical side of things. Currently a creative energy source
|
||||
import static malte0811.industrialWires.util.NBTKeys.BUFFER_IN;
|
||||
import static malte0811.industrialWires.util.NBTKeys.BUFFER_OUT;
|
||||
|
||||
public class MechPartSingleCoil extends MechMBPart implements IMBPartElectric {
|
||||
double inBuffer;
|
||||
double outBuffer;
|
||||
private static final double MAX_BUFFER = 10e3;
|
||||
private double bufferToMech;
|
||||
private double bufferToE;
|
||||
@Override
|
||||
public Waveform getProduced() {
|
||||
return Waveform.AC;
|
||||
}
|
||||
@Override
|
||||
public double getAvailableCurrent() {
|
||||
return 0;
|
||||
public double getAvailableEEnergy() {
|
||||
return bufferToE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double requestCurrent(double total) {
|
||||
return 0;
|
||||
public void extractEEnergy(double energy) {
|
||||
bufferToE -= energy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void consumeCurrent(double given) {
|
||||
|
||||
public double requestEEnergy() {
|
||||
return MAX_BUFFER- bufferToMech;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void produceRotation(MechEnergy e) {
|
||||
double rf = 4e3;
|
||||
e.addEnergy(rf* ConversionUtil.joulesPerIf());
|
||||
public void insertEEnergy(double given) {
|
||||
bufferToMech += given;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double requestEnergy(MechEnergy e) {
|
||||
return 0;
|
||||
public void createMEnergy(MechEnergy e) {
|
||||
e.addEnergy(bufferToMech);
|
||||
bufferToMech = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void consumeRotation(double added) {
|
||||
|
||||
public double requestMEnergy(MechEnergy e) {
|
||||
return MAX_BUFFER-bufferToE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getWeight() {
|
||||
public void insertMEnergy(double added) {
|
||||
bufferToE += added;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getInertia() {
|
||||
return Material.IRON.density+Material.COPPER.density;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxSpeed() {
|
||||
return Double.MAX_VALUE;
|
||||
return Double.MAX_VALUE;//TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound out) {
|
||||
|
||||
out.setDouble(BUFFER_IN, bufferToMech);
|
||||
out.setDouble(BUFFER_OUT, bufferToE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound out) {
|
||||
|
||||
bufferToMech = out.getDouble(BUFFER_IN);
|
||||
bufferToE = out.getDouble(BUFFER_OUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
* 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.blocks.converter.MechanicalMBBlockType;
|
||||
import malte0811.industrialWires.util.LocalSidedWorld;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class MechPartTwoElectrodes extends MechMBPart implements IMBPartElectric {
|
||||
|
||||
@Override
|
||||
public Waveform getProduced() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getAvailableEEnergy() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void extractEEnergy(double energy) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public double requestEEnergy() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertEEnergy(double given) {
|
||||
|
||||
}
|
||||
|
||||
@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 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxSpeed() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound out) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound out) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRotatingBaseModel() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canForm(LocalSidedWorld w) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getFormPattern() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MechanicalMBBlockType getType() {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -106,7 +106,7 @@ public class MultiblockConverter implements MultiblockHandler.IMultiblock {
|
|||
if (next!=null) {
|
||||
parts.add(next);
|
||||
lastLength = next.getLength();
|
||||
weight += next.getWeight();
|
||||
weight += next.getInertia();
|
||||
} else {
|
||||
if (parts.size()>0&&checkEnd(w, mutPos)) {
|
||||
done = true;
|
||||
|
@ -134,7 +134,7 @@ public class MultiblockConverter implements MultiblockHandler.IMultiblock {
|
|||
};
|
||||
for (MechMBPart part:parts) {
|
||||
mutPos.setPos(0, 0, lastLength);
|
||||
w.setOrigin(w.getRealPos(mutPos));
|
||||
w = new LocalSidedWorld(world, w.getRealPos(mutPos), side.getOpposite(), false);
|
||||
part.form(w, init);
|
||||
lastLength = part.getLength();
|
||||
}
|
||||
|
|
|
@ -63,4 +63,12 @@ public class ConversionUtil {
|
|||
public static double ifPerJoule() {
|
||||
return 1/joulesPerIf();
|
||||
}
|
||||
|
||||
public static double joulesPerEu() {
|
||||
return joulesPerIf()*ifPerEuIdeal();
|
||||
}
|
||||
|
||||
public static double euPerJoule() {
|
||||
return euPerIfIdeal()*ifPerJoule();
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
|
||||
public class LocalSidedWorld {
|
||||
private final World world;
|
||||
private World world;
|
||||
private BlockPos origin;
|
||||
private EnumFacing facing;
|
||||
private boolean mirror;
|
||||
|
@ -72,4 +72,8 @@ public class LocalSidedWorld {
|
|||
public BlockPos getRealPos(BlockPos relative) {
|
||||
return MiscUtils.offset(origin, facing, mirror, relative);
|
||||
}
|
||||
|
||||
public void setWorld(World world) {
|
||||
this.world = world;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,10 +34,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec2f;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -73,7 +70,7 @@ public final class MiscUtils {
|
|||
return ret;
|
||||
}
|
||||
|
||||
public static BlockPos offset(BlockPos p, EnumFacing f, boolean mirror, BlockPos relative) {
|
||||
public static BlockPos offset(BlockPos p, EnumFacing f, boolean mirror, Vec3i relative) {
|
||||
return offset(p, f, mirror, relative.getX(), relative.getZ(), relative.getY());
|
||||
}
|
||||
/**
|
||||
|
@ -91,9 +88,9 @@ public final class MiscUtils {
|
|||
*
|
||||
* @return right, forward, up
|
||||
*/
|
||||
public static BlockPos getOffset(BlockPos origin, EnumFacing f, boolean mirror, BlockPos here) {
|
||||
int dX = origin.getZ() - here.getZ();
|
||||
int dZ = origin.getX() - here.getX();
|
||||
public static BlockPos getOffset(Vec3i origin, EnumFacing f, boolean mirror, Vec3i here) {
|
||||
int dX = here.getX()-origin.getX();
|
||||
int dZ = here.getZ()-origin.getZ();
|
||||
int forward = 0;
|
||||
int right = 0;
|
||||
int up = here.getY() - origin.getY();
|
||||
|
|
|
@ -16,13 +16,14 @@
|
|||
package malte0811.industrialWires.util;
|
||||
|
||||
public final class NBTKeys {
|
||||
private NBTKeys() {}
|
||||
|
||||
//General
|
||||
public static final String ENERGY_TAG = "energy";
|
||||
public static final String BUFFER_TAG = "buffer";
|
||||
public static final String DIR_TAG = "dir";
|
||||
public static final String TYPE = "type";
|
||||
public static final String BUFFER_IN = "inBuffer";
|
||||
public static final String BUFFER_OUT = "outBuffer";
|
||||
|
||||
//Control panels
|
||||
public static final String HEIGHT = "height";
|
||||
|
@ -53,4 +54,6 @@ public final class NBTKeys {
|
|||
public static final String PARTS = "parts";
|
||||
public static final String POS = "pos";
|
||||
public static final String SPEED = "speed";
|
||||
|
||||
private NBTKeys() {}
|
||||
}
|
||||
|
|
1
src/main/resources/META-INF/industrialwires_at.cfg
Normal file
1
src/main/resources/META-INF/industrialwires_at.cfg
Normal file
|
@ -0,0 +1 @@
|
|||
public net.minecraft.client.renderer.BlockModelRenderer func_187496_a(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/block/state/IBlockState;Lnet/minecraft/util/math/BlockPos;IZLnet/minecraft/client/renderer/BufferBuilder;Ljava/util/List;Ljava/util/BitSet;)V #renderQuadsFlat
|
|
@ -24,6 +24,9 @@
|
|||
},
|
||||
"coil_1_phase": {
|
||||
"model": "industrialwires:mech_mb/mag_ring.obj"
|
||||
},
|
||||
"shaft_commutator": {
|
||||
"model": "industrialwires:mech_mb/commutator.obj"
|
||||
}
|
||||
},
|
||||
"facing":
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# Blender MTL File: 'RotaryConverter.blend'
|
||||
# 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
|
|
@ -0,0 +1,80 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
mtllib commutator.mtl
|
||||
o Commutator_Cube.038
|
||||
v 0.125000 0.343750 0.625000
|
||||
v 0.125000 0.875000 0.625000
|
||||
v 0.000000 0.343750 0.625000
|
||||
v 0.000000 0.875000 0.625000
|
||||
v 0.125000 0.343750 0.375000
|
||||
v 0.125000 0.875000 0.375000
|
||||
v 0.000000 0.343750 0.375000
|
||||
v 0.000000 0.875000 0.375000
|
||||
v 1.000000 0.875000 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
v 0.000000 0.875000 1.000000
|
||||
v 0.000000 1.000000 1.000000
|
||||
v 1.000000 0.875000 0.000000
|
||||
v 1.000000 1.000000 0.000000
|
||||
v 0.000000 0.875000 0.000000
|
||||
v 0.000000 1.000000 0.000000
|
||||
v 0.000000 0.406250 0.562500
|
||||
v 0.500000 0.406250 0.562500
|
||||
v 0.000000 0.593750 0.562500
|
||||
v 0.500000 0.593750 0.562500
|
||||
v 0.000000 0.406250 0.437500
|
||||
v 0.500000 0.406250 0.437500
|
||||
v 0.000000 0.593750 0.437500
|
||||
v 0.500000 0.593750 0.437500
|
||||
v 0.500000 0.406250 0.562500
|
||||
v 1.000000 0.406250 0.562500
|
||||
v 0.500000 0.593750 0.562500
|
||||
v 1.000000 0.593750 0.562500
|
||||
v 0.500000 0.406250 0.437500
|
||||
v 1.000000 0.406250 0.437500
|
||||
v 0.500000 0.593750 0.437500
|
||||
v 1.000000 0.593750 0.437500
|
||||
v 1.000000 0.343750 0.625000
|
||||
v 1.000000 0.875000 0.625000
|
||||
v 0.875000 0.343750 0.625000
|
||||
v 0.875000 0.875000 0.625000
|
||||
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
|
||||
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
|
||||
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
|
|
@ -0,0 +1,2 @@
|
|||
newmtl None
|
||||
map_Ka industrialwires:blocks/converter/end
|
|
@ -0,0 +1,91 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
mtllib end.mtl
|
||||
o End.001_Cube.000
|
||||
v 0.000000 0.500000 0.750000
|
||||
v 0.000000 0.500000 0.250000
|
||||
v 1.000000 0.500000 0.750000
|
||||
v 1.000000 0.500000 0.250000
|
||||
v 0.853553 0.853553 0.750000
|
||||
v 0.853553 0.853554 0.250000
|
||||
v 0.500000 1.000000 0.750000
|
||||
v 0.500000 1.000000 0.250000
|
||||
v 0.146447 0.853553 0.750000
|
||||
v 0.146447 0.853554 0.250000
|
||||
v 1.000000 -1.000000 0.750000
|
||||
v 1.000000 0.500000 0.750000
|
||||
v 0.000000 -1.000000 0.750000
|
||||
v 0.000000 0.500000 0.750000
|
||||
v 1.000000 -1.000000 0.250000
|
||||
v 1.000000 0.500000 0.250000
|
||||
v 0.000000 -1.000000 0.250000
|
||||
v 0.000000 0.500000 0.250000
|
||||
v 0.500000 0.500000 0.750000
|
||||
vt 0.6250 0.6875
|
||||
vt 0.8750 0.6875
|
||||
vt 0.8750 0.8750
|
||||
vt 0.6250 0.8750
|
||||
vt 0.1250 0.4062
|
||||
vt 0.3750 0.4062
|
||||
vt 0.3750 0.5938
|
||||
vt 0.1250 0.5938
|
||||
vt 0.8750 0.5938
|
||||
vt 0.6250 0.5938
|
||||
vt 0.6250 0.4062
|
||||
vt 0.8750 0.4062
|
||||
vt 0.6250 0.6875
|
||||
vt 0.8750 0.6875
|
||||
vt 0.8750 0.8750
|
||||
vt 0.6250 0.8750
|
||||
vt 0.5000 0.0000
|
||||
vt 0.5000 0.7500
|
||||
vt 0.0000 0.7500
|
||||
vt -0.0000 0.0000
|
||||
vt 0.8750 0.0000
|
||||
vt 0.8750 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 -0.0000
|
||||
vt 0.8750 0.0000
|
||||
vt 0.8750 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 0.0000
|
||||
vt 0.0000 0.6250
|
||||
vt 0.0000 0.3750
|
||||
vt 0.5000 0.3750
|
||||
vt 0.5000 0.6250
|
||||
vt 0.4062 0.9375
|
||||
vt 0.0938 0.9375
|
||||
vt 0.2188 1.0000
|
||||
vt 0.0625 0.9375
|
||||
vt 0.5312 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 0.7500
|
||||
vt 0.5312 0.7500
|
||||
vt 0.5938 0.9375
|
||||
vt 0.5000 0.7500
|
||||
vt 0.9062 0.9375
|
||||
vt 0.7500 1.0000
|
||||
vn 0.9239 0.3827 0.0000
|
||||
vn 0.3827 0.9239 0.0000
|
||||
vn -0.3827 0.9239 0.0000
|
||||
vn -0.9239 0.3827 0.0000
|
||||
vn -0.0000 0.0000 -1.0000
|
||||
vn -1.0000 0.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 None
|
||||
s off
|
||||
f 3/1/1 4/2/1 6/3/1 5/4/1
|
||||
f 5/5/2 6/6/2 8/7/2 7/8/2
|
||||
f 7/9/3 8/10/3 10/11/3 9/12/3
|
||||
f 9/13/4 10/14/4 2/15/4 1/16/4
|
||||
f 17/17/5 18/18/5 16/19/5 15/20/5
|
||||
f 13/21/6 14/22/6 18/23/6 17/24/6
|
||||
f 15/25/7 16/26/7 12/27/7 11/28/7
|
||||
f 13/29/8 17/30/8 15/31/8 11/32/8
|
||||
f 18/18/5 10/33/5 6/34/5 16/19/5
|
||||
f 8/35/5 6/36/5 10/33/5
|
||||
f 13/37/9 11/38/9 12/39/9 14/40/9
|
||||
f 9/41/9 14/42/9 12/39/9 5/43/9
|
||||
f 5/43/9 7/44/9 9/41/9
|
|
@ -0,0 +1,2 @@
|
|||
newmtl None
|
||||
map_Ka industrialwires:blocks/converter/end
|
|
@ -0,0 +1,91 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
mtllib end_other.mtl
|
||||
o End.000_Cube.001
|
||||
v 1.000000 0.500000 0.250000
|
||||
v 1.000000 0.500000 0.750000
|
||||
v 0.000000 0.500000 0.250000
|
||||
v 0.000000 0.500000 0.750000
|
||||
v 0.146447 0.853553 0.250000
|
||||
v 0.146447 0.853554 0.750000
|
||||
v 0.500000 1.000000 0.250000
|
||||
v 0.500000 1.000000 0.750000
|
||||
v 0.853553 0.853553 0.250000
|
||||
v 0.853553 0.853554 0.750000
|
||||
v 0.000000 -1.000000 0.250000
|
||||
v 0.000000 0.500000 0.250000
|
||||
v 1.000000 -1.000000 0.250000
|
||||
v 1.000000 0.500000 0.250000
|
||||
v 0.000000 -1.000000 0.750000
|
||||
v 0.000000 0.500000 0.750000
|
||||
v 1.000000 -1.000000 0.750000
|
||||
v 1.000000 0.500000 0.750000
|
||||
v 0.500000 0.500000 0.250000
|
||||
vt 0.6250 0.6875
|
||||
vt 0.8750 0.6875
|
||||
vt 0.8750 0.8750
|
||||
vt 0.6250 0.8750
|
||||
vt 0.1250 0.4062
|
||||
vt 0.3750 0.4062
|
||||
vt 0.3750 0.5938
|
||||
vt 0.1250 0.5938
|
||||
vt 0.8750 0.5938
|
||||
vt 0.6250 0.5938
|
||||
vt 0.6250 0.4062
|
||||
vt 0.8750 0.4062
|
||||
vt 0.6250 0.6875
|
||||
vt 0.8750 0.6875
|
||||
vt 0.8750 0.8750
|
||||
vt 0.6250 0.8750
|
||||
vt 0.5000 0.0000
|
||||
vt 0.5000 0.7500
|
||||
vt 0.0000 0.7500
|
||||
vt -0.0000 0.0000
|
||||
vt 0.8750 0.0000
|
||||
vt 0.8750 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 -0.0000
|
||||
vt 0.8750 0.0000
|
||||
vt 0.8750 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 0.0000
|
||||
vt 0.0000 0.6250
|
||||
vt 0.0000 0.3750
|
||||
vt 0.5000 0.3750
|
||||
vt 0.5000 0.6250
|
||||
vt 0.4062 0.9375
|
||||
vt 0.0938 0.9375
|
||||
vt 0.2188 1.0000
|
||||
vt 0.0625 0.9375
|
||||
vt 0.5312 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 0.7500
|
||||
vt 0.5312 0.7500
|
||||
vt 0.5938 0.9375
|
||||
vt 0.5000 0.7500
|
||||
vt 0.9062 0.9375
|
||||
vt 0.7500 1.0000
|
||||
vn -0.9239 0.3827 -0.0000
|
||||
vn -0.3827 0.9239 -0.0000
|
||||
vn 0.3827 0.9239 -0.0000
|
||||
vn 0.9239 0.3827 -0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 1.0000 0.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 None
|
||||
s off
|
||||
f 3/1/1 4/2/1 6/3/1 5/4/1
|
||||
f 5/5/2 6/6/2 8/7/2 7/8/2
|
||||
f 7/9/3 8/10/3 10/11/3 9/12/3
|
||||
f 9/13/4 10/14/4 2/15/4 1/16/4
|
||||
f 17/17/5 18/18/5 16/19/5 15/20/5
|
||||
f 13/21/6 14/22/6 18/23/6 17/24/6
|
||||
f 15/25/7 16/26/7 12/27/7 11/28/7
|
||||
f 13/29/8 17/30/8 15/31/8 11/32/8
|
||||
f 18/18/5 10/33/5 6/34/5 16/19/5
|
||||
f 8/35/5 6/36/5 10/33/5
|
||||
f 13/37/9 11/38/9 12/39/9 14/40/9
|
||||
f 9/41/9 14/42/9 12/39/9 5/43/9
|
||||
f 5/43/9 7/44/9 9/41/9
|
|
@ -0,0 +1,2 @@
|
|||
newmtl None
|
||||
map_Ka immersiveengineering:blocks/storage_steel
|
|
@ -0,0 +1,156 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
mtllib flywheel.mtl
|
||||
o Flywheel_Cylinder
|
||||
v -0.500000 0.914214 0.937500
|
||||
v -0.500000 0.914214 0.062500
|
||||
v -0.500000 0.085786 0.937500
|
||||
v -0.500000 0.085786 0.062500
|
||||
v 0.085787 -0.500000 0.937500
|
||||
v 0.085786 -0.500000 0.062500
|
||||
v 0.914214 -0.500000 0.937500
|
||||
v 0.914214 -0.500000 0.062500
|
||||
v 1.500000 0.085787 0.937500
|
||||
v 1.500000 0.085787 0.062500
|
||||
v 1.500000 0.914214 0.937500
|
||||
v 1.500000 0.914214 0.062500
|
||||
v 0.914214 1.500000 0.937500
|
||||
v 0.914213 1.500000 0.062500
|
||||
v 0.085787 1.500000 0.937500
|
||||
v 0.085787 1.500000 0.062500
|
||||
v 0.375000 0.448223 0.000000
|
||||
v 0.375000 0.448223 1.000000
|
||||
v 0.375000 0.551777 0.000000
|
||||
v 0.375000 0.551777 1.000000
|
||||
v 0.448223 0.625000 0.000000
|
||||
v 0.448223 0.625000 1.000000
|
||||
v 0.551777 0.625000 0.000000
|
||||
v 0.551777 0.625000 1.000000
|
||||
v 0.625000 0.551777 0.000000
|
||||
v 0.625000 0.551777 1.000000
|
||||
v 0.625000 0.448223 0.000000
|
||||
v 0.625000 0.448223 1.000000
|
||||
v 0.551777 0.375000 0.000000
|
||||
v 0.551777 0.375000 1.000000
|
||||
v 0.448223 0.375000 0.000000
|
||||
v 0.448223 0.375000 1.000000
|
||||
v 0.085787 0.500000 0.937500
|
||||
v 0.914214 0.500000 0.937500
|
||||
v 0.914214 0.500000 0.062500
|
||||
v 0.085786 0.500000 0.062500
|
||||
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.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.5000 0.5000
|
||||
vt 0.5000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 0.5000 1.0000
|
||||
vt 0.5000 0.5000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.5000 0.5000
|
||||
vt 0.5000 0.0000
|
||||
vt 1.0000 -0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.5000 1.0000
|
||||
vt 0.5000 0.4375
|
||||
vt 1.0000 1.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 0.0000 -0.0000
|
||||
vt -0.0000 -0.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 0.5000 0.5000
|
||||
vt 0.5000 1.0000
|
||||
vt 0.5000 0.5000
|
||||
vt -0.0000 1.0000
|
||||
vt -0.0000 0.0000
|
||||
vt 0.5000 0.0000
|
||||
vt 0.5000 0.5000
|
||||
vt 0.5000 1.0000
|
||||
vt 0.0000 0.0000
|
||||
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 -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
|
||||
usemtl None
|
||||
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
|
|
@ -0,0 +1,10 @@
|
|||
# Blender MTL File: 'RotaryConverter.blend'
|
||||
# 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
|
|
@ -0,0 +1,154 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
mtllib four_coil.mtl
|
||||
o Rotor4Phase_Cylinder.008
|
||||
v 1.327665 0.998160 0.267005
|
||||
v 1.062500 0.732995 0.267005
|
||||
v 0.998160 1.327665 0.267005
|
||||
v 0.732995 1.062500 0.267005
|
||||
v 1.327665 0.998160 0.732995
|
||||
v 1.062500 0.732995 0.732995
|
||||
v 0.998160 1.327665 0.732995
|
||||
v 0.732995 1.062500 0.732995
|
||||
v 1.437500 0.267005 0.267005
|
||||
v 1.062500 0.267005 0.267005
|
||||
v 1.437500 0.732995 0.267005
|
||||
v 1.062500 0.732995 0.267005
|
||||
v 1.437500 0.267005 0.732995
|
||||
v 1.062500 0.267005 0.732995
|
||||
v 1.437500 0.732995 0.732995
|
||||
v 1.062500 0.732995 0.732995
|
||||
v 0.998160 -0.327665 0.267005
|
||||
v 0.732995 -0.062500 0.267005
|
||||
v 1.327665 0.001840 0.267005
|
||||
v 1.062500 0.267005 0.267005
|
||||
v 0.998160 -0.327665 0.732995
|
||||
v 0.732995 -0.062500 0.732995
|
||||
v 1.327665 0.001840 0.732995
|
||||
v 1.062500 0.267005 0.732995
|
||||
v 0.267005 -0.437500 0.267005
|
||||
v 0.267005 -0.062500 0.267005
|
||||
v 0.732995 -0.437500 0.267005
|
||||
v 0.732995 -0.062500 0.267005
|
||||
v 0.267005 -0.437500 0.732995
|
||||
v 0.267005 -0.062500 0.732995
|
||||
v 0.732995 -0.437500 0.732995
|
||||
v 0.732995 -0.062500 0.732995
|
||||
v -0.327665 0.001840 0.267005
|
||||
v -0.062500 0.267005 0.267005
|
||||
v 0.001840 -0.327665 0.267005
|
||||
v 0.267005 -0.062500 0.267005
|
||||
v -0.327665 0.001840 0.732995
|
||||
v -0.062500 0.267005 0.732995
|
||||
v 0.001840 -0.327665 0.732995
|
||||
v 0.267005 -0.062500 0.732995
|
||||
v -0.437500 0.732995 0.267005
|
||||
v -0.062500 0.732995 0.267005
|
||||
v -0.437500 0.267005 0.267005
|
||||
v -0.062500 0.267005 0.267005
|
||||
v -0.437500 0.732995 0.732995
|
||||
v -0.062500 0.732995 0.732995
|
||||
v -0.437500 0.267005 0.732995
|
||||
v -0.062500 0.267005 0.732995
|
||||
v 0.001840 1.327665 0.267005
|
||||
v 0.267005 1.062500 0.267005
|
||||
v -0.327665 0.998160 0.267005
|
||||
v -0.062500 0.732995 0.267005
|
||||
v 0.001840 1.327665 0.732995
|
||||
v 0.267005 1.062500 0.732995
|
||||
v -0.327665 0.998160 0.732995
|
||||
v -0.062500 0.732995 0.732995
|
||||
v 0.732995 1.437500 0.267005
|
||||
v 0.732995 1.062500 0.267005
|
||||
v 0.267005 1.437500 0.267005
|
||||
v 0.267005 1.062500 0.267005
|
||||
v 0.732995 1.437500 0.732995
|
||||
v 0.732995 1.062500 0.732995
|
||||
v 0.267005 1.437500 0.732995
|
||||
v 0.267005 1.062500 0.732995
|
||||
v -0.062500 0.732995 1.000000
|
||||
v -0.062500 0.732995 0.000000
|
||||
v -0.062500 0.267005 1.000000
|
||||
v -0.062500 0.267005 0.000000
|
||||
v 0.267005 -0.062500 1.000000
|
||||
v 0.267005 -0.062500 0.000000
|
||||
v 0.732995 -0.062500 1.000000
|
||||
v 0.732995 -0.062500 0.000000
|
||||
v 1.062500 0.267005 1.000000
|
||||
v 1.062500 0.267005 0.000000
|
||||
v 1.062500 0.732995 1.000000
|
||||
v 1.062500 0.732995 0.000000
|
||||
v 0.732995 1.062500 1.000000
|
||||
v 0.732995 1.062500 0.000000
|
||||
v 0.267005 1.062500 1.000000
|
||||
v 0.267005 1.062500 0.000000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.0000 0.0000 1.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 1.0000 -0.0000
|
||||
vn 1.0000 -0.0000 -0.0000
|
||||
vn -0.7071 -0.7071 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn -0.7071 0.7071 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 76//1 74//1 70//1
|
||||
f 6//2 5//2 7//2 8//2
|
||||
f 1//3 5//3 6//3 2//3
|
||||
f 77//4 75//4 76//4 78//4
|
||||
f 12//1 11//1 9//1 10//1
|
||||
f 48//5 47//5 43//5 44//5
|
||||
f 15//6 11//6 12//6 16//6
|
||||
f 13//2 15//2 16//2 14//2
|
||||
f 10//5 9//5 13//5 14//5
|
||||
f 9//7 11//7 15//7 13//7
|
||||
f 19//1 17//1 18//1 20//1
|
||||
f 23//4 19//4 20//4 24//4
|
||||
f 22//2 21//2 23//2 24//2
|
||||
f 17//8 21//8 22//8 18//8
|
||||
f 17//3 19//3 23//3 21//3
|
||||
f 28//1 27//1 25//1 26//1
|
||||
f 31//7 27//7 28//7 32//7
|
||||
f 29//2 31//2 32//2 30//2
|
||||
f 26//9 25//9 29//9 30//9
|
||||
f 25//5 27//5 31//5 29//5
|
||||
f 35//1 33//1 34//1 36//1
|
||||
f 39//3 35//3 36//3 40//3
|
||||
f 37//2 39//2 40//2 38//2
|
||||
f 33//10 37//10 38//10 34//10
|
||||
f 33//8 35//8 39//8 37//8
|
||||
f 44//1 43//1 41//1 42//1
|
||||
f 45//2 47//2 48//2 46//2
|
||||
f 41//6 45//6 46//6 42//6
|
||||
f 41//9 43//9 47//9 45//9
|
||||
f 69//8 67//8 68//8 70//8
|
||||
f 59//1 57//1 58//1 60//1
|
||||
f 53//2 55//2 56//2 54//2
|
||||
f 52//1 51//1 49//1 50//1
|
||||
f 71//5 69//5 70//5 72//5
|
||||
f 49//10 51//10 55//10 53//10
|
||||
f 3//1 1//1 2//1 4//1
|
||||
f 64//9 63//9 59//9 60//9
|
||||
f 61//2 63//2 64//2 62//2
|
||||
f 57//7 61//7 62//7 58//7
|
||||
f 57//6 59//6 63//6 61//6
|
||||
f 49//4 53//4 54//4 50//4
|
||||
f 73//3 71//3 72//3 74//3
|
||||
f 79//6 77//6 78//6 80//6
|
||||
f 68//9 67//9 65//9 66//9
|
||||
f 66//10 65//10 79//10 80//10
|
||||
f 70//1 66//1 78//1 76//1
|
||||
f 71//2 75//2 79//2 67//2
|
||||
f 70//1 68//1 66//1
|
||||
f 66//1 80//1 78//1
|
||||
f 74//1 72//1 70//1
|
||||
f 55//8 51//8 52//8 56//8
|
||||
f 75//7 73//7 74//7 76//7
|
||||
f 79//2 65//2 67//2
|
||||
f 67//2 69//2 71//2
|
||||
f 71//2 73//2 75//2
|
||||
f 75//2 77//2 79//2
|
||||
f 1//4 3//4 7//4 5//4
|
||||
f 8//10 7//10 3//10 4//10
|
|
@ -0,0 +1,10 @@
|
|||
# Blender MTL File: 'RotaryConverter.blend'
|
||||
# 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
|
|
@ -0,0 +1,106 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
mtllib four_electrodes.mtl
|
||||
o 4PhaseBrush_Cube.027
|
||||
v -0.500000 -1.000000 1.000000
|
||||
v -0.500000 1.000000 1.000000
|
||||
v -1.000000 -1.000000 1.000000
|
||||
v -1.000000 1.000000 1.000000
|
||||
v -0.500000 -1.000000 0.000000
|
||||
v -0.500000 1.000000 0.000000
|
||||
v -1.000000 -1.000000 0.000000
|
||||
v -1.000000 1.000000 0.000000
|
||||
v 2.000000 1.000000 1.000000
|
||||
v 2.000000 1.188000 1.000000
|
||||
v -1.000000 1.000000 1.000000
|
||||
v -1.000000 1.188000 1.000000
|
||||
v 2.000000 1.000000 -0.000000
|
||||
v 2.000000 1.188000 -0.000000
|
||||
v -1.000000 1.000000 0.000000
|
||||
v -1.000000 1.188000 0.000000
|
||||
v 0.593750 0.500000 0.262500
|
||||
v 0.593750 1.000000 0.262500
|
||||
v 0.406250 0.500000 0.262500
|
||||
v 0.406250 1.000000 0.262500
|
||||
v 0.593750 0.500000 0.137500
|
||||
v 0.593750 1.000000 0.137500
|
||||
v 0.406250 0.500000 0.137500
|
||||
v 0.406250 1.000000 0.137500
|
||||
v 0.593750 0.500000 0.462500
|
||||
v 0.593750 1.000000 0.462500
|
||||
v 0.406250 0.500000 0.462500
|
||||
v 0.406250 1.000000 0.462500
|
||||
v 0.593750 0.500000 0.337500
|
||||
v 0.593750 1.000000 0.337500
|
||||
v 0.406250 0.500000 0.337500
|
||||
v 0.406250 1.000000 0.337500
|
||||
v 0.593750 0.500000 0.862500
|
||||
v 0.593750 1.000000 0.862500
|
||||
v 0.406250 0.500000 0.862500
|
||||
v 0.406250 1.000000 0.862500
|
||||
v 0.593750 0.500000 0.737500
|
||||
v 0.593750 1.000000 0.737500
|
||||
v 0.406250 0.500000 0.737500
|
||||
v 0.406250 1.000000 0.737500
|
||||
v 0.593750 0.500000 0.662500
|
||||
v 0.593750 1.000000 0.662500
|
||||
v 0.406250 0.500000 0.662500
|
||||
v 0.406250 1.000000 0.662500
|
||||
v 0.593750 0.500000 0.537500
|
||||
v 0.593750 1.000000 0.537500
|
||||
v 0.406250 0.500000 0.537500
|
||||
v 0.406250 1.000000 0.537500
|
||||
v 2.000000 -1.000000 1.000000
|
||||
v 2.000000 1.000000 1.000000
|
||||
v 1.500000 -1.000000 1.000000
|
||||
v 1.500000 1.000000 1.000000
|
||||
v 2.000000 -1.000000 -0.000000
|
||||
v 2.000000 1.000000 -0.000000
|
||||
v 1.500000 -1.000000 -0.000000
|
||||
v 1.500000 1.000000 -0.000000
|
||||
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
|
||||
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//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 25//1 26//1 28//1 27//1
|
||||
f 27//2 28//2 32//2 31//2
|
||||
f 31//3 32//3 30//3 29//3
|
||||
f 29//4 30//4 26//4 25//4
|
||||
f 27//5 31//5 29//5 25//5
|
||||
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 41//1 42//1 44//1 43//1
|
||||
f 43//2 44//2 48//2 47//2
|
||||
f 47//3 48//3 46//3 45//3
|
||||
f 45//4 46//4 42//4 41//4
|
||||
f 43//5 47//5 45//5 41//5
|
||||
f 49//1 50//1 52//1 51//1
|
||||
f 51//2 52//2 56//2 55//2
|
||||
f 55//3 56//3 54//3 53//3
|
||||
f 53//4 54//4 50//4 49//4
|
||||
f 51//5 55//5 53//5 49//5
|
||||
f 56//6 52//6 50//6 54//6
|
|
@ -0,0 +1,12 @@
|
|||
# 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
|
|
@ -0,0 +1,99 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
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.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.914214 0.062500
|
||||
v 1.500000 0.914214 0.937500
|
||||
v 1.500000 0.914214 0.062500
|
||||
v 0.085787 1.500000 0.937500
|
||||
v 0.085787 1.500000 0.062500
|
||||
v 0.914214 1.500000 0.937500
|
||||
v 0.914214 1.500000 0.062500
|
||||
v 0.085786 -0.500000 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 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 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 -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 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
|
||||
vn -0.7071 0.7071 0.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
|
||||
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
|
|
@ -0,0 +1,10 @@
|
|||
# Blender MTL File: 'RotaryConverter.blend'
|
||||
# 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
|
|
@ -0,0 +1,38 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
mtllib shaft.mtl
|
||||
o Shaft_Cylinder.004
|
||||
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
|
||||
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 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
|
|
@ -0,0 +1,2 @@
|
|||
newmtl None
|
||||
map_Ka industrialwires:blocks/converter/coils
|
|
@ -0,0 +1,87 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
mtllib single_coil.mtl
|
||||
o Rotor1Phase_Cube.058
|
||||
v 0.812500 -0.250000 0.812500
|
||||
v 0.812500 1.250000 0.812500
|
||||
v 0.187500 -0.250000 0.812500
|
||||
v 0.187500 1.250000 0.812500
|
||||
v 0.812500 -0.250000 0.187500
|
||||
v 0.812500 1.250000 0.187500
|
||||
v 0.187500 -0.250000 0.187500
|
||||
v 0.187500 1.250000 0.187500
|
||||
v 0.937500 0.375000 1.000000
|
||||
v 0.937500 0.625000 1.000000
|
||||
v 0.062500 0.375000 1.000000
|
||||
v 0.062500 0.625000 1.000000
|
||||
v 0.937500 0.375000 -0.000000
|
||||
v 0.937500 0.625000 -0.000000
|
||||
v 0.062500 0.375000 -0.000000
|
||||
v 0.062500 0.625000 -0.000000
|
||||
vt 1.0000 -0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.5938 1.0000
|
||||
vt 0.5938 0.0000
|
||||
vt 0.5000 1.0000
|
||||
vt 0.5000 -0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.5938 1.0000
|
||||
vt 0.5938 0.0000
|
||||
vt 1.0000 -0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 1.0000 -0.0000
|
||||
vt 1.0000 1.0000
|
||||
vt 0.5938 1.0000
|
||||
vt 0.5938 0.0000
|
||||
vt 0.0312 0.5312
|
||||
vt 0.4688 0.5312
|
||||
vt 0.4688 0.9688
|
||||
vt 0.0312 0.9688
|
||||
vt 0.0312 0.5312
|
||||
vt 0.4688 0.5312
|
||||
vt 0.4688 0.9688
|
||||
vt 0.0312 0.9688
|
||||
vt 0.5000 0.2188
|
||||
vt 0.5000 0.3438
|
||||
vt -0.0000 0.3438
|
||||
vt 0.0000 0.2188
|
||||
vt 0.5000 0.1250
|
||||
vt 0.5000 0.2500
|
||||
vt -0.0000 0.2500
|
||||
vt 0.0000 0.1250
|
||||
vt 0.5000 0.1562
|
||||
vt 0.5000 0.2812
|
||||
vt -0.0000 0.2812
|
||||
vt -0.0000 0.1562
|
||||
vt 0.5000 0.2188
|
||||
vt 0.5000 0.3438
|
||||
vt 0.0000 0.3438
|
||||
vt 0.0000 0.2188
|
||||
vt 0.0000 0.0000
|
||||
vt 0.5000 0.0000
|
||||
vt 0.5000 0.5000
|
||||
vt -0.0000 0.5000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.5000 -0.0000
|
||||
vt 0.5000 0.5000
|
||||
vt 0.0000 0.5000
|
||||
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
|
||||
usemtl None
|
||||
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 8/21/6 4/22/6 2/23/6 6/24/6
|
||||
f 9/25/1 10/26/1 12/27/1 11/28/1
|
||||
f 11/29/2 12/30/2 16/31/2 15/32/2
|
||||
f 15/33/3 16/34/3 14/35/3 13/36/3
|
||||
f 13/37/4 14/38/4 10/39/4 9/40/4
|
||||
f 11/41/5 15/42/5 13/43/5 9/44/5
|
||||
f 16/45/6 12/46/6 10/47/6 14/48/6
|
|
@ -0,0 +1,10 @@
|
|||
# Blender MTL File: 'RotaryConverter.blend'
|
||||
# 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
|
|
@ -0,0 +1,52 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'RotaryConverter.blend'
|
||||
# www.blender.org
|
||||
mtllib two_electrodes.mtl
|
||||
o SinglePhaseBrush_Cube.029
|
||||
v 1.000000 0.812500 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
v 0.000000 0.812500 1.000000
|
||||
v 0.000000 1.000000 1.000000
|
||||
v 1.000000 0.812500 0.000000
|
||||
v 1.000000 1.000000 0.000000
|
||||
v 0.000000 0.812500 0.000000
|
||||
v 0.000000 1.000000 0.000000
|
||||
v 0.593750 0.500000 0.437500
|
||||
v 0.593750 1.000000 0.437500
|
||||
v 0.406250 0.500000 0.437500
|
||||
v 0.406250 1.000000 0.437500
|
||||
v 0.593750 0.500000 0.312500
|
||||
v 0.593750 1.000000 0.312500
|
||||
v 0.406250 0.500000 0.312500
|
||||
v 0.406250 1.000000 0.312500
|
||||
v 0.593750 0.500000 0.687500
|
||||
v 0.593750 1.000000 0.687500
|
||||
v 0.406250 0.500000 0.687500
|
||||
v 0.406250 1.000000 0.687500
|
||||
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
|
||||
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
|
||||
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
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1,020 B |
Loading…
Reference in a new issue