SWEEPX, LOFTX, SSBS (SliceSolidBySurface) commands to SWEEP,LOFT Solids+Surfaces, Slice Solids by Su

Hi  Bricscad  Users,

 I am doing conceptual architectural modeling and "in-house" programming and customization of DWG CAD programs. In the course of this work, I make intensive use of 3D solids and Surfaces.

My path is mostly to use Lisp and C#.NET in combination, exposing the .NET functionality missing from Lisp to the Lisp environment and command line, using "LispFunction" and "CommandMethod" Attributes respectively. I have exposed most of the SWEEP and LOFT   C#.NET functionality of the .NET API  of Bricscad V12  in 2 commands .

I am programming in a  "as the need arises",  "on the fly"  non commercial modus and therefore I have not implemented rigorous testing and validation in the SWEEPX , LOFTX and SSBS (SliceSolidBySurface) commands nor have I written a detailed documentation.

The only validation and messages are the built-in ones (e.g. Skin path intersections with profiles are not monotonic ) coming from Bricscad and Teigha ACIS Libs.

Self-intersecting Solids and Surfaces are NOT checked or disabled;

They are possible and artistic !

 Due to this fact 6  Basic Rules are important :

 Use Closed OR Open Planar Curves as Loft and Sweep Profile-Curves /Cross Sections

  • Use Closed OR Open Planar or non-planar Curves as Loft / Sweep Paths
  • Use Open Planar or non-planar Curves as Loft  Guides
  • Never use mixed Closed and Open Profile-Curves /Cross Sections for a Sweep or Loft operation
  • Use Open Profile-Curves /Cross Sections for Surfaces ONLY. If you choose to create Solids, it will be an inconsistent Solid not capable of Boolean Operations.
  • Use Closed OR Open Profile-Curves /Cross Sections for Solids

I think their use is self-explanatory at the command line of Bricscad !

For more explanation consult the documentation of programs having already these commands

I have used the names SWEEPX  and  LOFTX  to avoid interference with other commands and applications !

 

 Command  SWEEPX

 The command creates a 3Dsolid or SweptSurface (ACIS) by sweeping an open or closed, planar (non-planar NOT at this time ,but I don't know why it doesn't work)  curve along an open or closed path curve. Open curves create surfaces and closed curves create solids or surfaces, according to your choice !

 I have included all the SweepOptions mostly used like Alignment, Basepoint, Scale and Twist, although Scale and Twist don't seem to have any effect or impact on the Sweep operation. Propably a bug or not yet properly exposed to .Net ???

 The Bank option , whether the curve(s) being swept will naturally rotate along a 3D sweep path (3D polyline, spline) is also not working ????? and I have not exposed it to the user; Bank = false is used.

 Command Sequence :

 : sweepx

Sweep a SOlid or a SUrface? [SOlid/SUrface] : : su

Select profile-curves (Regions or Planar Curves) to SWEEP:

Entities in set: 1

Select profile-curves (Regions or Planar Curves) to SWEEP:

Select path along which to sweep:

Enter an Option [Alignment/Basepoint/Scale/Twist]: b

Select Basis Point for the sweep:

Enter an Option [Alignment/Basepoint/Scale/Twist]:

 DONE !

 Command  LOFTX

 This command Creates a 3Dsolid or LoftedSurface (ACIS) thus filling the space between several cross sections using optionally any number of Guides or a single Loft Path.

 I have included all the LoftOptions mostly used like  Ruled, Smooth fit, Closed, No normal, Normal to all sections, Normal to start section, Normal to end section, Normal to start+end sections.  All seem to work properly...still testing !

Draft Angles come in the near future...

 The option Closed needs at least 3 Cross Sections /Curves !

The reason for that is left to you as homework .......

This option connects the first and the last Loft profile (cross section) thereby creating

a closed Surface or 3Dsolid  like a Torodial (Torus) !

 If Guides are used then following Rules must be followed :

 ·  Every Guide must intersect each cross section curve (profile)

·  Every Guide starts on the first cross section curve (profile)

·  Every Guide ends on the last cross section curve (profile)

 Command Sequence :

 : LOFTX

Loft a SOlid or a SUrface? [SOlid/SUrface] :  su

Select cross sections (Regions or Planar Curves) in lofting order or:

Entities in set: 1

Select cross sections (Regions or Planar Curves) in lofting order or:

Entities in set: 2

Select cross sections (Regions or Planar Curves) in lofting order or:

Entities in set: 3

Select cross sections (Regions or Planar Curves) in lofting order or:

Entities in set: 4

Select cross sections (Regions or Planar Curves) in lofting order or:

Enter an Option [Guides/Path/Cross sections only/Settings]: g

Select any number of guide curves:

Entities in set: 1

Select any number of guide curves:

Enter an Option [Guides/Path/Cross sections only/Settings]: s

 

Ruled/Smooth fit/Closed/No normal/Normal to all sections/Normal to start section/Normal to end section/Normal to start+end sections/

Enter a Loft Option [Ruled/Smooth/Closed/NOnormal/N2All/N2STart/N2End/N2SE]:

Enter an Option [Guides/Path/Cross sections only/Settings]:

 DONE !

 

 

 Command  SSBS (SliceSolidBySurface)

 The command slices one or more 3D Solids by a  Swept- or LoftedSurface !

Now that we have Surfaces, we can use them to slice 3D Solids.

 Command Sequence:

 : ssbs

Select 3D Solid entities to be sliced:

Entities in set: 1

Select 3D Solid entities to be sliced:

Entities in set: 2

Select 3D Solid entities to be sliced:

Entities in set: 3

Select 3D Solid entities to be sliced:

Select the slicing surface:

 DONE !

 The created Surfaces are not ESNAP aware or the ESNAP system is not aware of them!

I don't know how to activate this interaction or whether it is possible at all at this time.

If someone knows something about this please help !?

 

I'll try to create a command the extracts the EDGES of Solids and Surfaces therefore enabling ESNAP

via Edges...will see....

 The editing of Surfaces is another Work Site...for the future...!

 You can of course script the commands in Lisp like

(command "SWEEPX"   ...prompt sequence...)

(command "LOFTX"   ...prompt sequence...)

(command "SSBS"   ...prompt sequence...)

 and automate user input

 Installation Process:

Use the command NETLOAD to load the attached  SweepX-LoftX-bc12.dll

Then use the commands  SWEEPX, LOFTX, SSBS .

 That's almost all about the commands.

I hope you will enjoy them !!!!!!! into the coming 2012

 

I appreciate your feedback and I encourage all UserDevelopers... and DeveloperUsers...to

publish here in this Support Forum there elaborations and unlock and expose additional functionality out of Bricscad and APIS to Lisp and the Command Line.

In this way we can somehow and somewhat broaden the life-cycle features of Bricscad 12.....right?

What is NOT in the command line is in the API ! Publish it here !

 Konstantin  16.12.2011

«134

Comments

  •  Wow, sound interesting, I am going to give this a go at noon today, if you need somebody looking for bugs let me know and I will help you out...
  • Some Screenshots !

  • I am trying to include some Screenshots in this message
    but neither the Button Above nor the "Copy and Paste of Images" works!
    The Images are perfectly pasted into this message, BUT the message
    CANNOT be sent
    ! I receive an error "message cannot be posted"....
    The JPG files are ~ 90K each.
    Sorrry !
    Any Ideas to present some Images in this message ????

  • OK Now some Screenshots.....

    imageLoft22.jpg
    imageLoft11.jpg
    imageSSBS22.jpg
    imageSSBS11.jpg
  • LOFTX and SWEEPX





    SSBS  (Slice Solid by Surface)








  • That's looking really impressive. Too bad I can't check it out on linux...
  • Hi Knut,

    unfortunately the .NET API doesn't run on Linux, at least to my knowledge.
    I don't know if it is possible to run the module in a virtual machine under Linux
    I mean run Bricscad Win within a virtual Win environment under Linux and load the LoftX-SweepX assembly
    using the command NETLOAD
    Maybe Bricsys can answerr this question ?
    You can try the Bricsacd Win demo to test and get a feeling of it !

    In the meantime i have implemented minor corrections in the SweepX Command
    and exposed the Bank(rotate) sweep option for test purposes.

    Enter an Option [Alignment/Basepoint/Scale/Twist/BANk]: ban

    Like i stated in my doc text above the Sweep options Twist, Scale and Bank
    do not have any impact on the Sweep object ! In autoCAD they all work properly !



    SweepX-LoftX-bc12-1.dll

  • Hi Konstantin,
    Thanks, I may give the win trial version a look when I find the time...
    but in the end, Bricsys will have to find a solution to expose all functionality on all platforms, if they take Linux and MacOS seriously.
    Did you coordinate your effort with them? Would be too bad if you put that much work into something they are already implementing behind closed doors...
    Cheers,
    Knut
  • Fantastic work Konstantin!  
  • Thanks Daniel ! Did you testdrive it ?
    I am glad you like it !
  • Nice work!

    The SWEEPX command even works better than the XSWEEP command of Bricscad itself! The original command is not handling basepoints outside the profile correctly.

    But I do not understand why my profile is rotated when using default Alignment options. It only works as expected when choosing Alignment No. Or am I doing something wrong?

    In attached image the left one is created with defaults, the right with "No".


    imagesweepx.jpg
  • Bert,
    let me clarify the meaning of the Alignment option.
    It controls whether the sweep profile will be aligned to be normal to the tangent direction of the sweep path curve !
    If the profile has a "space placement" which is not perpendicular (normal) to the tangent of the start point of the path curve,
    it will be automatically aligned to be normal to it. This is the one of the advantages compared to the extrude along path command !

    So the "No Alignment" option prevents exactly this alignment !  With "No Alignment" the profile will be swept "in place"
    (not moved or rotated) and the start point of the path is virtually translated (moved) to the selected Basepoint of the Sweep profile.
    If you try the "No Alignment" option using one of the profiles lying on the XY plane (there are 8 of them) you get an error message :
    " Modeling operation error: The chain to be swept is parallel to the path ". I think it is self-explanatory !
    If you use the magenta, cyan and green profiles (upper left) and use "No Alignment" you can see the effect of this option respectively.

    In your case the profile is already normal to the sweep curve at its startpoint,  therefore "No Alignment" simply sweeps your profile "in place" as
    expected and everything is for you OK. When you use the default alignment which is the "AlignSweepEntityToPath" your profile is rotated
    although it is normal to the start point of the path and the why  is still an open question for me as well !!!!!!

    In order to illustrate the relation of different rotations of a profile and the effect on the Sweep operation, 8 differently rotated profiles are used and
    swept using the default "AlignSweepEntityToPath" (simply press Enter at the options prompt).
    Every conceivable profile has a different rotation at "Sweep time" according to its orientation to X and Y axes (Z rotation)
    and the position/ placement of the Path.
    The colored swept solids show 8 different "sweeps" with corresponding colors and rotations !

    There must be an arbitrary algorithm behind it but it has still to be discovered ! I don't know it at this time...does anybody know outhere ????
    Does the UCS, right-hand coordinate system, orientation of the sweep path etc play ......a role ? Is it a cryptic feature of ACIS  ?
    Have a look at the Screenshots and play with the dwg...!



    imagePlanView.jpg
    imageAxView.jpg

    ProfileSpacePlacementand Rotation.dwg

  • As far as I can see every sweep works as expected. Please keep in mind the normal of the profile can be up or down, depending on how you have created it (clockwise or ccw). Also the profile will be placed on the startpoint of the profile, so it can be the other end as expected.

    This is really brilliant! Thanks for exposing these options, I did not realize in was in there. 


  • I have noticed that it works, if you use
    mixed planar or non-planar curves in any sequence
    as Loft profile-curves /cross sections.
    The only restriction is that by lofting SOLIDS the first
    and last Profiles have to be planar curves !


  • I'm not able to run sweepx and loftx with latest bricscad version (12.1.12) !!

    Regards

    imagesweepx_error.JPG
  • Use the new version attached !
    If any problems please notify me .
    Thanks Regards

    SweepX-LoftX-bc12.1.12.dll

  • Thanks Konstantin, it's perfect !
    Regards
    Paola

  • Thanks, works great.

    A small glitch: when hitting ESC after using the option Path in LoftX an error will appear.

    imageloftx-path-error.jpg
  • it should be OK now in the attached version...


    SweepX-LoftX-bc12.1.12.dll

  • Hi Konstantin!
    I'm not able to run sweepx and loftx with latest bricscad version (12.1.22) !!
    Why at any update this routine need modification ??
    Kindly Regards
  • Hi Konstantin!
    I'm not able to run sweepx and loftx with latest bricscad version (12.1.22) !!
    Why at any update this routine need modification ??
    Kindly Regards

    runs on my machine 12.1.22 : )

  • Hi Paola,

    I don't have any problems using the program with the latest english version 12.1.22-1  !
    Please describe your problem with it ...
    Possible problems have to do with significant changes in the API (BRX or C# .NET) and
    this is the case with the latest version. A new BRX API is released!
    The routine needs not modification at any update though !!!!
    Your latest request was update 12.1.12   ....
    You find the new version attached
    If any problems still exist please notify me .

    greetings

    SweepX-LoftX-bc12.1.22-1.dll

  • Konstantin, Daniel I apologize :-(

    This morning was not working, now works also with 12.1.12 version ....
    Drag and drop the DLL on design area can be different from using Netload from command line ??

    Thanks very much !!

  • Sorry Guys, but I'm going crazy !!!
    Now I can load and run version 12.1.12, but when I try to load version 12.1.22 I've got this message:

    : netload

    Loading .NET runtime v2.0.50727:

    Error Message: Could not load file or assembly 'file:///C:\Program Files\Bricsys\Bricscad V12\Support\SweepX-LoftX-bc12.1.22-1.dll' or one of its dependencies. The module was expected to contain an assembly manifest.

    Thanks again !!
  • if problems continue to exist copy the SweepX-LoftX-bc12.1.22-1.dll file into your Bricscad installation
    directory   C:\Program Files\Bricsys\Bricscad V12\    and try again !
  • Hi Konstantin,
    after moving the file to C:\Program Files\Bricsys\Bricscad V12\  I've got the same error message ...



  • ...just a new version compiled for the latest version of Bricscad 12.2.8-1  !

    SweepX-LoftX-bc12.2.8-1.dll

  • Great work! I'm testing it!
  • Hi all 3D users,

    This Package is updated !!!

    The Command SSBS (SliceSolidBySurface) is renamed to SLICEX to better express its functionality and extended to the slicing of surfaces.

    Four new commands are added : INTERFEREX,  EDGEX,  SUBTRACTX,  UNIONX

    Please read the updated documentation for all 7 commands .

    As always your feedback is appreciated.

    Enjoy !



    imageINTERFEREX.jpg

    SweepX-LoftX-V2-bc12.2.8-1.dll

    imageSLICEX.jpg
    imageSUBTRACTX.jpg

    SweepX-LoftX-V2-bc12.2.8.pdf

This discussion has been closed.