!2867 优化:铰链备注保留1位小数

pull/2692/MERGE
钱若寒 3 months ago committed by ChenX
parent 6e63885d46
commit afea2b423c

@ -196,15 +196,15 @@ function ParseHingeToDoor(door: Entity, hingObjId: ObjectId<CADObject>[], hingeM
newDetailedInformation += ParseExpr(hw.HardwareOption[key], accuracy, { L: size.x, W: size.y, H: size.z }) + " ";
}
const newPosion = new Vector2(fuzz.lookupOrCreate([pos.x], Math.round(pos.x)), Math.round(pos.z)); //获取位置信息
const newPosion = new Vector2(fuzz.lookupOrCreate([pos.x], parseFloat(pos.x.toFixed(1))), parseFloat(pos.z.toFixed(1)));//获取位置信息
const hingeRemarkInformations = hingeMap.get(key) || [] as HingeRemarkInformation[];
const hingeRemarkInformation = hingeRemarkInformations.find(info => info.detailedInformation === newDetailedInformation);
if (hingeRemarkInformation) //如果存在铰链详细信息且是相同的,将位置写入到一起
{
let x = fuzz.lookupOrCreate([pos.x], Math.round(pos.x));
let y = Math.round(pos.z);
let x = fuzz.lookupOrCreate([pos.x], parseFloat(pos.x.toFixed(1)));
let y = parseFloat(pos.z.toFixed(1));
//过滤重复点
let v2 = hingeRemarkInformation.postion.find((v) => equaln(v.x, x) && equaln(v.y, y));
if (!v2)

Loading…
Cancel
Save