!339 异形轮廓支持面域

Merge pull request !339 from 肖诗雅/specialShapeBr_region
pull/339/MERGE
肖诗雅 5 years ago committed by ChenX
parent 1e3f37b156
commit 8a81936164

@ -48,6 +48,7 @@ export function BoardApplyContour(contour: ExtureContour, brs: Board[], isKeepSi
let oldLength = br.Height;
let oldWidth = br.Width;
ExtrudeApplyContour(br, contour);
br.GrooveCheckAll([]);
if (isKeepSize)
{
br.Height = oldLength;
@ -122,7 +123,20 @@ export function ExtrudeApplyContour(ext: ExtureSolid, contour: ExtureContour): M
}
else if (contour instanceof Region)
{
//清除所有的内部拉槽,应用面域的网洞. 忽略多组面域
ext.Grooves.length = 0;
let sp = contour.ShapeManager.ShapeList[0];
let cu = sp.Outline.Curve;
let mtx = ExtrudeApplyContour(ext, cu);
for (let hole of sp.Holes)
{
let g = new ExtureSolid();
g.OCS = ext.OCS;
g.ContourCurve = hole.Curve.Clone().ApplyMatrix(mtx);
g.Thickness = ext.Thickness;
ext.AppendGroove(g);
}
return mtx;
}
else
{

@ -20,6 +20,7 @@ import { BoardConfigOption, BoardProcessOption, FaceDirection, IGrooveOption } f
import { RightPanelStore } from "../../Store/RightPanelStore";
import { BoardTypeComponent, ItemName, SetBoardDataBlock } from "./BoardCommon";
import { RightTabId } from "../RightPanel/RightPanel";
import { Region } from "../../../DatabaseServices/Region";
interface BoardConfigProps
{
@ -66,11 +67,14 @@ export class BoardConfigModal extends React.Component<BoardConfigProps, {}>{
let br = this.props.br;
let applyMatrix = ExtrudeApplyContour(br, contour);
if (contour instanceof Region)
br.GrooveCheckAll([]);//校验造型
else
br.ClearBoardModeling();//清除造型
//更新高级排钻数据
this.props.boardProcess.highDrill = br.BoardProcessOption.highDrill;
br.ClearBoardModeling();
//删除应用的轮廓
if (useCurves)
for (let c of useCurves)

Loading…
Cancel
Save