DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Arc commands embedded in Plane command

Started by BlankMan, December 27, 2017, 11:41:42 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

BlankMan

Will this macro work? The key question being Arc commands embedded in the Plane command.

Can't try it till later tonight so I thought I'd ask. Sure makes things easier if it does.

Thanks.

   >Plane
    {
        <PointXYZ {CtrX+(BoxWidOD/2)-CoverFilRad,CtrY,CtrZ-(BoxDep/2)+Clearance]
        ' Points: 1 = center, 2 = start, 3 = end, 4 = plane
        <Arc4
        {
            <PointXYZ {CtrX+(BoxWidOD/2)-CoverFilRad,CtrY+CoverFilRad,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX+(BoxWidOD/2)-CoverFilRad,CtrY,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX+(BoxWidOD/2),CtrY+CoverFilRad,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX+(BoxWidOD/2),CtrY,CtrZ-(BoxDep/2)+Clearance]
            <Layer [CurLayer]
        }
        <PointXYZ {CtrX+(BoxWidOD/2),CtrY+CoverFilRad,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX+(BoxWidOD/2),CtrY+(BoxHgtOD/2),CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX+(BoxWidID/2)-Clearance,CtrY+(BoxHgtOD/2),CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX+(BoxWidID/2)-Clearance,CtrY+(BoxHgtOD/2)+CoverLipY2,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX+(BoxWidID/2)-WallThk,CtrY+(BoxHgtOD/2)+CoverLipY2,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX+(BoxWidID/2)-WallThk,CtrY+(BoxHgtOD/2)-CoverLipY1,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX+(BoxWidID/2),CtrY+(BoxHgtOD/2)-CoverLipY1-WallThk,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX+(BoxWidID/2),CtrY+WallThk+CoverBeadRad,CtrZ-(BoxDep/2)+Clearance]
        ' Points: 1 = center, 2 = start, 3 = end, 4 = plane
        <Arc4
        {
            <PointXYZ {CtrX+(BoxWidID/2),CtrY+WallThk,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX+(BoxWidID/2)-CoverBeadRad,CtrY+WallThk,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX+(BoxWidID/2),CtrY+WallThk+CoverBeadRad,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX+(BoxWidID/2)-CoverBeadRad,CtrY+WallThk+CoverBeadRad,CtrZ-(BoxDep/2)+Clearance]
            <Layer [CurLayer]
        }
        <PointXYZ {CtrX+(BoxWidID/2)-CoverBeadRad,CtrY+WallThk,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX-(BoxWidID/2)+CoverBeadRad,CtrY+WallThk,CtrZ-(BoxDep/2)+Clearance]
        ' Points: 1 = center, 2 = start, 3 = end, 4 = plane
        <Arc4
        {
            <PointXYZ {CtrX-(BoxWidID/2),CtrY+WallThk,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX-(BoxWidID/2)+CoverBeadRad,CtrY+WallThk,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX-(BoxWidID/2),CtrY+WallThk+CoverBeadRad,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX-(BoxWidID/2)+CoverBeadRad,CtrY+WallThk+CoverBeadRad,CtrZ-(BoxDep/2)+Clearance]
            <Layer [CurLayer]
        }
        <PointXYZ {CtrX-(BoxWidID/2),CtrY+WallThk+CoverBeadRad,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX-(BoxWidID/2),CtrY+(BoxHgtOD/2)-CoverLipY1-WallThk,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX-(BoxWidID/2)+WallThk,CtrY+(BoxHgtOD/2)-CoverLipY1,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX-(BoxWidID/2)+WallThk,CtrY+(BoxHgtOD/2)+CoverLipY2,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX-(BoxWidID/2)+Clearance,CtrY+(BoxHgtOD/2)+CoverLipY2,CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX-(BoxWidID/2)+Clearance,CtrY+(BoxHgtOD/2),CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX-(BoxWidOD/2),CtrY+(BoxHgtOD/2),CtrZ-(BoxDep/2)+Clearance]
        <PointXYZ {CtrX-(BoxWidOD/2),CtrY+CoverFilRad,CtrZ-(BoxDep/2)+Clearance]
        ' Points: 1 = center, 2 = start, 3 = end, 4 = plane
        <Arc4
        {
            <PointXYZ {CtrX-(BoxWidOD/2)+CoverFilRad,CtrY+CoverFilRad,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX-(BoxWidOD/2)+CoverFilRad,CtrY,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX-(BoxWidOD/2),CtrY+CoverFilRad,CtrZ-(BoxDep/2)+Clearance]
            <PointXYZ {CtrX-(BoxWidOD/2),CtrY,CtrZ-(BoxDep/2)+Clearance]
            <Layer [CurLayer]
        }
        <PointXYZ {CtrX-(BoxWidOD/2)+CoverFilRad,CtrY,CtrZ-(BoxDep/2)+Clearance]
        <Layer [CurLayer]
    }
Newbie? Not.
Been using DesignCAD 3D since ~1990
Still have version 4 floppies from 1992...

Bob P

I doubt that will work. You can't use arcs to define the boundaries of a plane. What I would do is first draw all the boundaries as lines and arcs, then select them all and >MakePlane. You might want to draw all the entities in a new layer so that you can use SelectAll combined with manipulating only the current layer.

BlankMan

Yeah that's what I normally do, it just be simpler if I could do it within the context of a >Plane.

I worte it but before I even tried to execute it (it was in a subroutine and I was working on other parts) it did not like <Arc4 within the >Plane even just being there. I thought maybe because it likes <PointXYZ's in there it might work.

I landed up using Line and Arc's then PointSelect'ing everything. I sometimes use SelectAll if nothing else is drawn yet but can't always do that when there's multiple Extrude's or Sweeps.

But I like the idea of doing it on a different Layer so I can then use SelectAll. Did not think of that, i'll have to give that a try next time, thanks!
Newbie? Not.
Been using DesignCAD 3D since ~1990
Still have version 4 floppies from 1992...